commit:     b4b9f72802b4d4be021e6fa77198c5d3d0d1a4d1
Author:     Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Thu Oct 17 14:08:46 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Oct 18 12:25:00 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4b9f728

media-gfx/gimp: gimp-2.10.x, fix media-libs/libheif-1.18 compat

Closes: https://bugs.gentoo.org/940915
Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>
Closes: https://github.com/gentoo/gentoo/pull/39017
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...mp-2.10_libheif-1.18_unconditional_compat.patch | 23 ++++++++++++++++++++++
 ...mp-2.10.34-r2.ebuild => gimp-2.10.34-r3.ebuild} |  6 +++++-
 ...{gimp-2.10.36.ebuild => gimp-2.10.36-r3.ebuild} |  6 +++++-
 ...mp-2.10.36-r2.ebuild => gimp-2.10.36-r4.ebuild} |  6 +++++-
 ...{gimp-2.10.38.ebuild => gimp-2.10.38-r1.ebuild} |  4 ++++
 5 files changed, 42 insertions(+), 3 deletions(-)

diff --git 
a/media-gfx/gimp/files/gimp-2.10_libheif-1.18_unconditional_compat.patch 
b/media-gfx/gimp/files/gimp-2.10_libheif-1.18_unconditional_compat.patch
new file mode 100644
index 000000000000..cc1e565b6c6d
--- /dev/null
+++ b/media-gfx/gimp/files/gimp-2.10_libheif-1.18_unconditional_compat.patch
@@ -0,0 +1,23 @@
+Gentoo issue: https://bugs.gentoo.org/940915
+
+diff '--color=auto' -Naur a/configure.ac b/configure.ac
+--- a/configure.ac
++++ b/configure.ac
+@@ -1843,13 +1843,13 @@
+ can_import_avif=no
+ can_export_avif=no
+ if test "x$have_libheif" = xyes; then
+-  can_import_heic=`$PKG_CONFIG --variable=builtin_h265_decoder libheif`
+-  can_export_heic=`$PKG_CONFIG --variable=builtin_h265_encoder libheif`
++  can_import_heic=yes
++  can_export_heic=yes
+   if test "x$can_import_heic" = xyes; then
+     MIME_TYPES="$MIME_TYPES;image/heif;image/heic"
+   fi
+-  can_import_avif=`$PKG_CONFIG --variable=builtin_avif_decoder libheif`
+-  can_export_avif=`$PKG_CONFIG --variable=builtin_avif_encoder libheif`
++  can_import_avif=yes
++  can_export_avif=yes
+   if test "x$can_import_avif" = xyes; then
+     MIME_TYPES="$MIME_TYPES;image/avif"
+   fi

diff --git a/media-gfx/gimp/gimp-2.10.34-r2.ebuild 
b/media-gfx/gimp/gimp-2.10.34-r3.ebuild
similarity index 96%
rename from media-gfx/gimp/gimp-2.10.34-r2.ebuild
rename to media-gfx/gimp/gimp-2.10.34-r3.ebuild
index 697f118424cd..d1af397feaf9 100644
--- a/media-gfx/gimp/gimp-2.10.34-r2.ebuild
+++ b/media-gfx/gimp/gimp-2.10.34-r3.ebuild
@@ -94,6 +94,10 @@ src_prepare() {
        sed -i -e 's/== "xquartz"/= "xquartz"/' configure.ac || die #494864
        sed 's/-DGIMP_DISABLE_DEPRECATED/-DGIMP_protect_DISABLE_DEPRECATED/g' 
-i configure.ac || die #615144
 
+       if use heif ; then
+               has_version -d ">=media-libs/libheif-1.18.0" && eapply 
"${FILESDIR}/${PN}-2.10_libheif-1.18_unconditional_compat.patch" # 940915
+       fi
+
        gnome2_src_prepare  # calls eautoreconf
 
        sed 's/-DGIMP_protect_DISABLE_DEPRECATED/-DGIMP_DISABLE_DEPRECATED/g' 
-i configure || die #615144
@@ -192,7 +196,7 @@ src_install() {
        # precedence on PDF documents by default
        mv "${ED}"/usr/share/applications/{,zzz-}gimp.desktop || die
 
-       find "${D}" -name '*.la' -type f -delete || die
+       find "${ED}" -name '*.la' -type f -delete || die
 
        # Prevent dead symlink gimp-console.1 from downstream man page 
compression (bug #433527)
        local gimp_app_version=$(ver_cut 1-2)

diff --git a/media-gfx/gimp/gimp-2.10.36.ebuild 
b/media-gfx/gimp/gimp-2.10.36-r3.ebuild
similarity index 96%
rename from media-gfx/gimp/gimp-2.10.36.ebuild
rename to media-gfx/gimp/gimp-2.10.36-r3.ebuild
index 2407c368ab63..e0082d3fdfdb 100644
--- a/media-gfx/gimp/gimp-2.10.36.ebuild
+++ b/media-gfx/gimp/gimp-2.10.36-r3.ebuild
@@ -93,6 +93,10 @@ src_prepare() {
        sed -i -e 's/== "xquartz"/= "xquartz"/' configure.ac || die #494864
        sed 's/-DGIMP_DISABLE_DEPRECATED/-DGIMP_protect_DISABLE_DEPRECATED/g' 
-i configure.ac || die #615144
 
+       if use heif ; then
+               has_version -d ">=media-libs/libheif-1.18.0" && eapply 
"${FILESDIR}/${PN}-2.10_libheif-1.18_unconditional_compat.patch" # 940915
+       fi
+
        gnome2_src_prepare  # calls eautoreconf
 
        sed 's/-DGIMP_protect_DISABLE_DEPRECATED/-DGIMP_DISABLE_DEPRECATED/g' 
-i configure || die #615144
@@ -191,7 +195,7 @@ src_install() {
        # precedence on PDF documents by default
        mv "${ED}"/usr/share/applications/{,zzz-}gimp.desktop || die
 
-       find "${D}" -name '*.la' -type f -delete || die
+       find "${ED}" -name '*.la' -type f -delete || die
 
        # Prevent dead symlink gimp-console.1 from downstream man page 
compression (bug #433527)
        local gimp_app_version=$(ver_cut 1-2)

diff --git a/media-gfx/gimp/gimp-2.10.36-r2.ebuild 
b/media-gfx/gimp/gimp-2.10.36-r4.ebuild
similarity index 96%
rename from media-gfx/gimp/gimp-2.10.36-r2.ebuild
rename to media-gfx/gimp/gimp-2.10.36-r4.ebuild
index 3f4740a9243d..1acf5d818486 100644
--- a/media-gfx/gimp/gimp-2.10.36-r2.ebuild
+++ b/media-gfx/gimp/gimp-2.10.36-r4.ebuild
@@ -96,6 +96,10 @@ src_prepare() {
        sed -i -e 's/== "xquartz"/= "xquartz"/' configure.ac || die #494864
        sed 's/-DGIMP_DISABLE_DEPRECATED/-DGIMP_protect_DISABLE_DEPRECATED/g' 
-i configure.ac || die #615144
 
+       if use heif ; then
+               has_version -d ">=media-libs/libheif-1.18.0" && eapply 
"${FILESDIR}/${PN}-2.10_libheif-1.18_unconditional_compat.patch" # 940915
+       fi
+
        gnome2_src_prepare  # calls eautoreconf
 
        sed 's/-DGIMP_protect_DISABLE_DEPRECATED/-DGIMP_DISABLE_DEPRECATED/g' 
-i configure || die #615144
@@ -194,7 +198,7 @@ src_install() {
        # precedence on PDF documents by default
        mv "${ED}"/usr/share/applications/{,zzz-}gimp.desktop || die
 
-       find "${D}" -name '*.la' -type f -delete || die
+       find "${ED}" -name '*.la' -type f -delete || die
 
        # Prevent dead symlink gimp-console.1 from downstream man page 
compression (bug #433527)
        local gimp_app_version=$(ver_cut 1-2)

diff --git a/media-gfx/gimp/gimp-2.10.38.ebuild 
b/media-gfx/gimp/gimp-2.10.38-r1.ebuild
similarity index 97%
rename from media-gfx/gimp/gimp-2.10.38.ebuild
rename to media-gfx/gimp/gimp-2.10.38-r1.ebuild
index 013da52ecc68..89d2bf00caac 100644
--- a/media-gfx/gimp/gimp-2.10.38.ebuild
+++ b/media-gfx/gimp/gimp-2.10.38-r1.ebuild
@@ -105,6 +105,10 @@ src_prepare() {
        sed -i -e 's/== "xquartz"/= "xquartz"/' configure.ac || die #494864
        sed 's/-DGIMP_DISABLE_DEPRECATED/-DGIMP_protect_DISABLE_DEPRECATED/g' 
-i configure.ac || die #615144
 
+       if use heif ; then
+               has_version -d ">=media-libs/libheif-1.18.0" && eapply 
"${FILESDIR}/${PN}-2.10_libheif-1.18_unconditional_compat.patch" # 940915
+       fi
+
        gnome2_src_prepare  # calls eautoreconf
 
        sed 's/-DGIMP_protect_DISABLE_DEPRECATED/-DGIMP_DISABLE_DEPRECATED/g' 
-i configure || die #615144

Reply via email to