commit:     9a31f36aa85c0e0860454a780c64fe925e02f9dc
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 12 22:01:12 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Jan 13 17:11:52 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a31f36a

media-gfx/inkscape: Fix build w/ app-text/poppler-24.12

Closes: https://bugs.gentoo.org/946597
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/inkscape-1.4-poppler-24.12.0.patch       | 53 ++++++++++++++++++++++
 media-gfx/inkscape/inkscape-1.4-r1.ebuild          |  3 +-
 2 files changed, 55 insertions(+), 1 deletion(-)

diff --git a/media-gfx/inkscape/files/inkscape-1.4-poppler-24.12.0.patch 
b/media-gfx/inkscape/files/inkscape-1.4-poppler-24.12.0.patch
new file mode 100644
index 000000000000..f4e0a8391b78
--- /dev/null
+++ b/media-gfx/inkscape/files/inkscape-1.4-poppler-24.12.0.patch
@@ -0,0 +1,53 @@
+From c9046810d899a408bfbd489aad91872b1203ee6d Mon Sep 17 00:00:00 2001
+From: KrIr17 <[email protected]>
+Date: Thu, 5 Dec 2024 15:03:47 +0100
+Subject: [PATCH] Fix building with poppler 24.12.0
+
+Fixes https://gitlab.com/inkscape/inkscape/-/issues/5415
+---
+ src/extension/internal/pdfinput/pdf-parser.cpp           | 4 +++-
+ src/extension/internal/pdfinput/poppler-transition-api.h | 6 ++++++
+ 2 files changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp 
b/src/extension/internal/pdfinput/pdf-parser.cpp
+index 28000a87b0c..9ea30b90a48 100644
+--- a/src/extension/internal/pdfinput/pdf-parser.cpp
++++ b/src/extension/internal/pdfinput/pdf-parser.cpp
+@@ -2403,6 +2403,7 @@ void PdfParser::doImage(Object * /*ref*/, Stream *str, 
GBool inlineImg)
+     int bits;
+     GBool interpolate;
+     StreamColorSpaceMode csMode;
++    GBool hasAlpha;
+     GBool mask;
+     GBool invert;
+     Object maskObj, smaskObj;
+@@ -2414,7 +2415,8 @@ void PdfParser::doImage(Object * /*ref*/, Stream *str, 
GBool inlineImg)
+     // get info from the stream
+     bits = 0;
+     csMode = streamCSNone;
+-    str->getImageParams(&bits, &csMode);
++    hasAlpha = false;
++    str->_POPPLER_GET_IMAGE_PARAMS(&bits, &csMode, &hasAlpha);
+     
+     // get stream dict
+     dict = str->getDict();
+diff --git a/src/extension/internal/pdfinput/poppler-transition-api.h 
b/src/extension/internal/pdfinput/poppler-transition-api.h
+index 8f03aa17779..b7a54828e74 100644
+--- a/src/extension/internal/pdfinput/poppler-transition-api.h
++++ b/src/extension/internal/pdfinput/poppler-transition-api.h
+@@ -39,6 +39,12 @@
+ #define _POPPLER_FUNCTION_TYPE_STITCHING 3
+ #endif
+ 
++#if POPPLER_CHECK_VERSION(24,12,0)
++#define _POPPLER_GET_IMAGE_PARAMS(bits, csMode, hasAlpha) 
getImageParams(bits, csMode, hasAlpha)
++#else
++#define _POPPLER_GET_IMAGE_PARAMS(bits, csMode, hasAlpha) 
getImageParams(bits, csMode)
++#endif
++
+ #if POPPLER_CHECK_VERSION(22, 4, 0)
+ #define _POPPLER_FONTPTR_TO_GFX8(font_ptr) ((Gfx8BitFont *)font_ptr.get())
+ #else
+-- 
+GitLab
+

diff --git a/media-gfx/inkscape/inkscape-1.4-r1.ebuild 
b/media-gfx/inkscape/inkscape-1.4-r1.ebuild
index ad760e5f993d..574250c2b239 100644
--- a/media-gfx/inkscape/inkscape-1.4-r1.ebuild
+++ b/media-gfx/inkscape/inkscape-1.4-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -116,6 +116,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-1.4-gcc15.patch
        "${FILESDIR}"/${PN}-1.4-poppler-24.10-fix-backport.patch
        "${FILESDIR}"/${P}-poppler-24.11.0.patch # bug 943499
+       "${FILESDIR}"/${P}-poppler-24.12.0.patch # bug 946597
 )
 
 pkg_pretend() {

Reply via email to