From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/inkscape/, media-gfx/inkscape/files/
Date: Mon, 4 Mar 2024 22:18:37 +0000 (UTC) [thread overview]
Message-ID: <1709590688.4f3b5e55d2516361e92aa64612330c0a228a9de5.asturm@gentoo> (raw)
commit: 4f3b5e55d2516361e92aa64612330c0a228a9de5
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 4 22:11:14 2024 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Mar 4 22:18:08 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f3b5e55
media-gfx/inkscape: Fix build with >=app-text/poppler-24.03
Fix is pending upstream:
https://gitlab.com/inkscape/inkscape/-/merge_requests/6209
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
.../files/inkscape-1.3.2-poppler-24.03.patch | 61 ++++++++++++++++++++++
media-gfx/inkscape/inkscape-1.3.2.ebuild | 3 +-
2 files changed, 63 insertions(+), 1 deletion(-)
diff --git a/media-gfx/inkscape/files/inkscape-1.3.2-poppler-24.03.patch b/media-gfx/inkscape/files/inkscape-1.3.2-poppler-24.03.patch
new file mode 100644
index 000000000000..53cf3fd2b6cd
--- /dev/null
+++ b/media-gfx/inkscape/files/inkscape-1.3.2-poppler-24.03.patch
@@ -0,0 +1,61 @@
+From 3dd9846ab99260134e11938f0e575be822507037 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Mon, 4 Mar 2024 22:59:40 +0100
+Subject: [PATCH] Fix build with >=poppler-24.03.0
+
+Fixes build errors caused by:
+
+"Use an enum for Function getType"
+Upstream commit 6e3824d45d42cb806a28a2df84e4ab6bb3587083
+
+Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
+---
+ src/extension/internal/pdfinput/svg-builder.cpp | 14 +++++++++++++-
+ 1 file changed, 13 insertions(+), 1 deletion(-)
+
+diff --git a/src/extension/internal/pdfinput/svg-builder.cpp b/src/extension/internal/pdfinput/svg-builder.cpp
+index 525fbfec0..bcd7b1f61 100644
+--- a/src/extension/internal/pdfinput/svg-builder.cpp
++++ b/src/extension/internal/pdfinput/svg-builder.cpp
+@@ -1175,9 +1175,13 @@ static bool svgGetShadingColor(GfxShading *shading, double offset, GfxColor *res
+ #define INT_EPSILON 8
+ bool SvgBuilder::_addGradientStops(Inkscape::XML::Node *gradient, GfxShading *shading,
+ _POPPLER_CONST Function *func) {
+- int type = func->getType();
++ auto type = func->getType();
+ auto space = shading->getColorSpace();
++#if POPPLER_CHECK_VERSION(24, 3, 0)
++ if ( type == Function::Type::Sampled || type == Function::Type::Exponential ) { // Sampled or exponential function
++#else
+ if ( type == 0 || type == 2 ) { // Sampled or exponential function
++#endif
+ GfxColor stop1, stop2;
+ if (!svgGetShadingColor(shading, 0.0, &stop1) || !svgGetShadingColor(shading, 1.0, &stop2)) {
+ return false;
+@@ -1185,7 +1189,11 @@ bool SvgBuilder::_addGradientStops(Inkscape::XML::Node *gradient, GfxShading *sh
+ _addStopToGradient(gradient, 0.0, &stop1, space, 1.0);
+ _addStopToGradient(gradient, 1.0, &stop2, space, 1.0);
+ }
++#if POPPLER_CHECK_VERSION(24, 3, 0)
++ } else if ( type == Function::Type::Stitching ) { // Stitching
++#else
+ } else if ( type == 3 ) { // Stitching
++#endif
+ auto stitchingFunc = static_cast<_POPPLER_CONST StitchingFunction*>(func);
+ const double *bounds = stitchingFunc->getBounds();
+ const double *encode = stitchingFunc->getEncode();
+@@ -1200,7 +1208,11 @@ bool SvgBuilder::_addGradientStops(Inkscape::XML::Node *gradient, GfxShading *sh
+ for ( int i = 0 ; i < num_funcs ; i++ ) {
+ svgGetShadingColor(shading, bounds[i + 1], &color);
+ // Add stops
++#if POPPLER_CHECK_VERSION(24, 3, 0)
++ if (stitchingFunc->getFunc(i)->getType() == Function::Type::Exponential) { // process exponential fxn
++#else
+ if (stitchingFunc->getFunc(i)->getType() == 2) { // process exponential fxn
++#endif
+ double expE = (static_cast<_POPPLER_CONST ExponentialFunction*>(stitchingFunc->getFunc(i)))->getE();
+ if (expE > 1.0) {
+ expE = (bounds[i + 1] - bounds[i])/expE; // approximate exponential as a single straight line at x=1
+--
+2.44.0
+
diff --git a/media-gfx/inkscape/inkscape-1.3.2.ebuild b/media-gfx/inkscape/inkscape-1.3.2.ebuild
index 5aeb0df4ea69..bcd4aa1ca77c 100644
--- a/media-gfx/inkscape/inkscape-1.3.2.ebuild
+++ b/media-gfx/inkscape/inkscape-1.3.2.ebuild
@@ -107,7 +107,8 @@ DEPEND="${COMMON_DEPEND}
"
PATCHES=(
- "${FILESDIR}"/${PN}-1.3.2-libxml2-2.12.patch
+ "${FILESDIR}"/${P}-libxml2-2.12.patch
+ "${FILESDIR}"/${P}-poppler-24.03.patch
)
pkg_pretend() {
next reply other threads:[~2024-03-04 22:18 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-04 22:18 Andreas Sturmlechner [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-09-03 16:15 [gentoo-commits] repo/gentoo:master commit in: media-gfx/inkscape/, media-gfx/inkscape/files/ Andreas Sturmlechner
2025-07-08 16:03 Andreas Sturmlechner
2025-02-15 0:12 Andreas K. Hüttel
2024-12-17 21:44 Andreas Sturmlechner
2024-11-14 18:42 Andreas Sturmlechner
2024-10-17 7:08 Sam James
2024-04-05 15:02 Andreas Sturmlechner
2024-01-29 9:37 Sam James
2022-10-22 14:54 Michał Górny
2022-09-03 4:25 Sam James
2022-09-03 1:43 Sam James
2022-05-26 2:47 Sam James
2022-05-08 17:42 Sam James
2021-12-17 14:55 Andreas Sturmlechner
2021-11-06 21:06 Sam James
2021-04-14 19:28 Mikle Kolyada
2020-04-25 13:24 Andreas K. Hüttel
2020-01-06 10:31 Andreas K. Hüttel
2019-12-11 9:20 Miroslav Šulc
2019-11-07 8:11 Lars Wendler
2019-01-11 0:37 Andreas Sturmlechner
2018-11-07 15:48 Lars Wendler
2018-05-25 9:35 Lars Wendler
2018-03-31 5:12 Tim Harder
2017-05-12 19:41 Andreas Hüttel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1709590688.4f3b5e55d2516361e92aa64612330c0a228a9de5.asturm@gentoo \
--to=asturm@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox