commit:     8aaa2563f26699b3c1564fb29e99e1d9ef2b122c
Author:     Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Mon Sep  5 14:38:27 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Sep 25 01:27:14 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8aaa2563

media-gfx/gimp: 2.99.12 fix build against libheif-1.13

Thanks-to: Daniel Novomesky <dnovomesky <AT> gmail.com>
Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>
Closes: https://github.com/gentoo/gentoo/pull/27155
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../gimp-2.99.12_fix_libheif-1.13_build.patch      | 78 ++++++++++++++++++++++
 media-gfx/gimp/gimp-2.99.12.ebuild                 |  2 +
 2 files changed, 80 insertions(+)

diff --git a/media-gfx/gimp/files/gimp-2.99.12_fix_libheif-1.13_build.patch 
b/media-gfx/gimp/files/gimp-2.99.12_fix_libheif-1.13_build.patch
new file mode 100644
index 000000000000..672a9ef7217e
--- /dev/null
+++ b/media-gfx/gimp/files/gimp-2.99.12_fix_libheif-1.13_build.patch
@@ -0,0 +1,78 @@
+Upstream issue: "GIMP fails to build with libheif >= 1.13.0"
+https://gitlab.gnome.org/GNOME/gimp/-/issues/8570
+
+From a61299ddb184babca015a846c72bf3e1a57faf2a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Daniel=20Novomesk=C3=BD?= <[email protected]>
+Date: Sat, 3 Sep 2022 13:19:33 +0200
+Subject: [PATCH] plug-ins: fix builing with libheif 1.13.0+
+
+---
+ plug-ins/common/file-heif.c | 22 +++++++++++-----------
+ 1 file changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/plug-ins/common/file-heif.c b/plug-ins/common/file-heif.c
+index 76bc41f44d..36899bcf5f 100644
+--- a/plug-ins/common/file-heif.c
++++ b/plug-ins/common/file-heif.c
+@@ -56,24 +56,24 @@ typedef enum _HeifpluginExportFormat
+   HEIFPLUGIN_EXPORT_FORMAT_YUV420 = 3
+ } HeifpluginExportFormat;
+ 
+-typedef struct _Heif      Heif;
+-typedef struct _HeifClass HeifClass;
++typedef struct _GimpHeif      GimpHeif;
++typedef struct _GimpHeifClass GimpHeifClass;
+ 
+-struct _Heif
++struct _GimpHeif
+ {
+   GimpPlugIn      parent_instance;
+ };
+ 
+-struct _HeifClass
++struct _GimpHeifClass
+ {
+   GimpPlugInClass parent_class;
+ };
+ 
+ 
+-#define HEIF_TYPE  (heif_get_type ())
+-#define HEIF (obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), HEIF_TYPE, Heif))
++#define GIMP_HEIF_TYPE  (gimp_heif_get_type ())
++#define GIMP_HEIF (obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_HEIF_TYPE, 
GimpHeif))
+ 
+-GType                   heif_get_type         (void) G_GNUC_CONST;
++GType                   gimp_heif_get_type    (void) G_GNUC_CONST;
+ 
+ static GList          * heif_init_procedures  (GimpPlugIn           *plug_in);
+ static GimpProcedure  * heif_create_procedure (GimpPlugIn           *plug_in,
+@@ -123,14 +123,14 @@ static gboolean         save_dialog           
(GimpProcedure        *procedure,
+                                                GimpImage            *image);
+ 
+ 
+-G_DEFINE_TYPE (Heif, heif, GIMP_TYPE_PLUG_IN)
++G_DEFINE_TYPE (GimpHeif, gimp_heif, GIMP_TYPE_PLUG_IN)
+ 
+-GIMP_MAIN (HEIF_TYPE)
++GIMP_MAIN (GIMP_HEIF_TYPE)
+ DEFINE_STD_SET_I18N
+ 
+ 
+ static void
+-heif_class_init (HeifClass *klass)
++gimp_heif_class_init (GimpHeifClass *klass)
+ {
+   GimpPlugInClass *plug_in_class = GIMP_PLUG_IN_CLASS (klass);
+ 
+@@ -140,7 +140,7 @@ heif_class_init (HeifClass *klass)
+ }
+ 
+ static void
+-heif_init (Heif *heif)
++gimp_heif_init (GimpHeif *heif)
+ {
+ }
+ 
+-- 
+GitLab
+

diff --git a/media-gfx/gimp/gimp-2.99.12.ebuild 
b/media-gfx/gimp/gimp-2.99.12.ebuild
index 5a97b3f4724a..fc46f29d2a4a 100644
--- a/media-gfx/gimp/gimp-2.99.12.ebuild
+++ b/media-gfx/gimp/gimp-2.99.12.ebuild
@@ -111,6 +111,8 @@ BDEPEND="
 
 DOCS=( "AUTHORS" "devel-docs/CODING_STYLE.md" "devel-docs/HACKING.md" "NEWS" 
"README" "README.i18n" )
 
+PATCHES=( "${FILESDIR}/${P}_fix_libheif-1.13_build.patch" )
+
 pkg_setup() {
        use lua && lua-single_pkg_setup
 

Reply via email to