diff --git a/ports/gimp/build.sh b/ports/gimp/build.sh new file mode 100755 index 00000000..a311cb5f --- /dev/null +++ b/ports/gimp/build.sh @@ -0,0 +1,33 @@ +#!/bin/bash ../install.sh + +NAME='gimp' +VERSION='3.2.4' +DOWNLOAD_URL="https://download.gimp.org/gimp/v3.2/gimp-$VERSION.tar.xz#7312bc53e9c6d2d0056ca7b93f1c6b98707946dd934f714c21b8746ecb601588" +DEPENDENCIES=('gtk3' 'gegl' 'gexiv2' 'glib-networking' 'librsvg' 'lcms2' 'libmypaint' 'mypaint-brushes' 'AppStream' 'libarchive' 'libXmu' 'poppler') +CONFIGURE_OPTIONS=( + '-Dprefix=/usr' + '-Dbuildtype=release' + '-Dshmem-type=sysv' + '-Dgi-docgen=disabled' +) + +pre_configure() { + # allow native pkgconfig lookup + unset PKG_CONFIG_DIR PKG_CONFIG_SYSROOT_DIR PKG_CONFIG_LIBDIR PKG_CONFIG_PATH +} + +configure() { + meson setup \ + --reconfigure \ + --cross-file "$MESON_CROSS_FILE" \ + "${CONFIGURE_OPTIONS[@]}" \ + _build || exit 1 +} + +build() { + meson compile -C _build || exit 1 +} + +install() { + meson install --destdir="$DESTDIR" -C _build || exit 1 +} diff --git a/ports/gimp/patches/0001-fix-cross-compile-execute.patch b/ports/gimp/patches/0001-fix-cross-compile-execute.patch new file mode 100644 index 00000000..efc934b1 --- /dev/null +++ b/ports/gimp/patches/0001-fix-cross-compile-execute.patch @@ -0,0 +1,21 @@ +diff -ruN gimp-3.2.4/meson.build gimp-3.2.4-banan_os/meson.build +--- gimp-3.2.4/meson.build 2026-04-17 11:37:38.000000000 +0300 ++++ gimp-3.2.4-banan_os/meson.build 2026-08-24 21:47:23.319981280 +0300 +@@ -573,7 +573,7 @@ + pangoft2 = dependency('pangoft2', version: '>='+pango_minver) + endif + +-if cc.run(''' ++if meson.can_run_host_binaries() and cc.run(''' + #include + #include + #include +@@ -1580,7 +1580,7 @@ + endif + + if shmem_choice == 'sysv' +- check_ip_rmid_deferred_release = cc.run(''' ++ check_ip_rmid_deferred_release = host_os.contains('banan_os') or cc.run(''' + #include + #include + #include diff --git a/ports/gimp/patches/0002-fix-sys-select-include.patch b/ports/gimp/patches/0002-fix-sys-select-include.patch new file mode 100644 index 00000000..ffc566fa --- /dev/null +++ b/ports/gimp/patches/0002-fix-sys-select-include.patch @@ -0,0 +1,13 @@ +diff -ruN gimp-3.2.4/libgimp/gimpplugin.c gimp-3.2.4-banan_os/libgimp/gimpplugin.c +--- gimp-3.2.4/libgimp/gimpplugin.c 2026-04-17 11:37:38.000000000 +0300 ++++ gimp-3.2.4-banan_os/libgimp/gimpplugin.c 2026-08-24 21:47:23.319160010 +0300 +@@ -24,6 +24,9 @@ + #include + #include + #include ++#ifdef __banan_os__ ++#include ++#endif + + #include "gimp.h" + diff --git a/ports/gimp/patches/0003-dont-reguire-gir.patch b/ports/gimp/patches/0003-dont-reguire-gir.patch new file mode 100644 index 00000000..0dd0f133 --- /dev/null +++ b/ports/gimp/patches/0003-dont-reguire-gir.patch @@ -0,0 +1,32 @@ +diff -ruN gimp-3.2.4/meson.build gimp-3.2.4-banan_os/meson.build +--- gimp-3.2.4/meson.build 2026-04-17 11:37:38.000000000 +0300 ++++ gimp-3.2.4-banan_os/meson.build 2026-08-24 21:47:23.319981280 +0300 +@@ -486,7 +486,7 @@ + # minimum requirement. + add_project_arguments('-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_76', language: 'c') + +-gi = dependency('gobject-introspection-1.0') ++gi = dependency('gobject-introspection-1.0', required: false) + + gobject = dependency('gobject-2.0', version: '>='+glib_minver) + gmodule = dependency('gmodule-no-export-2.0') +diff -ruN gimp-3.2.4/plug-ins/meson.build gimp-3.2.4-banan_os/plug-ins/meson.build +--- gimp-3.2.4/plug-ins/meson.build 2026-04-17 11:37:38.000000000 +0300 ++++ gimp-3.2.4-banan_os/plug-ins/meson.build 2026-08-24 21:47:23.320319594 +0300 +@@ -35,10 +35,15 @@ + { 'name': 'pagecurl', }, + { 'name': 'print', }, + { 'name': 'screenshot', }, +- { 'name': 'script-fu', }, + { 'name': 'selection-to-path', } + ] + ++if gi.found() ++ comples_plugins_list += { ++ 'name': 'script-fu', ++ } ++endif ++ + if openexr.found() + complex_plugins_list += { + 'name': 'file-exr',