-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scribus: Rebuild against poppler 24.04.0
- Loading branch information
1 parent
58d6a40
commit 8dbe3a1
Showing
5 changed files
with
208 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
From dc2470990ab73c87fdd60068c99518ced01a3edd Mon Sep 17 00:00:00 2001 | ||
From: Andreas Sturmlechner <asturm@gentoo.org> | ||
Date: Mon, 4 Mar 2024 17:35:11 +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> | ||
--- | ||
scribus/plugins/import/pdf/slaoutput.cpp | 16 ++++++++++++++++ | ||
1 file changed, 16 insertions(+) | ||
|
||
diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp | ||
index 4e31e4b6c..3e4a768ec 100644 | ||
--- a/scribus/plugins/import/pdf/slaoutput.cpp | ||
+++ b/scribus/plugins/import/pdf/slaoutput.cpp | ||
@@ -1731,7 +1731,11 @@ bool SlaOutputDev::axialShadedFill(GfxState *state, GfxAxialShading *shading, do | ||
VGradient FillGradient = VGradient(VGradient::linear); | ||
FillGradient.clearStops(); | ||
GfxColorSpace *color_space = shading->getColorSpace(); | ||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 3, 0) | ||
+ if (func->getType() == Function::Type::Stitching) | ||
+#else | ||
if (func->getType() == 3) | ||
+#endif | ||
{ | ||
StitchingFunction *stitchingFunc = (StitchingFunction*)func; | ||
const double *bounds = stitchingFunc->getBounds(); | ||
@@ -1753,7 +1757,11 @@ bool SlaOutputDev::axialShadedFill(GfxState *state, GfxAxialShading *shading, do | ||
FillGradient.addStop( ScColorEngine::getShadeColor(m_doc->PageColors[stopColor], m_doc, shade), stopPoint, 0.5, 1.0, stopColor, shade ); | ||
} | ||
} | ||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 3, 0) | ||
+ else if ((func->getType() == Function::Type::Exponential) || (func->getType() == Function::Type::Sampled)) | ||
+#else | ||
else if ((func->getType() == 2) || (func->getType() == 0)) | ||
+#endif | ||
{ | ||
GfxColor stop1; | ||
shading->getColor(0.0, &stop1); | ||
@@ -1865,7 +1873,11 @@ bool SlaOutputDev::radialShadedFill(GfxState *state, GfxRadialShading *shading, | ||
VGradient FillGradient = VGradient(VGradient::linear); | ||
FillGradient.clearStops(); | ||
GfxColorSpace *color_space = shading->getColorSpace(); | ||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 3, 0) | ||
+ if (func->getType() == Function::Type::Stitching) | ||
+#else | ||
if (func->getType() == 3) | ||
+#endif | ||
{ | ||
StitchingFunction *stitchingFunc = (StitchingFunction*)func; | ||
const double *bounds = stitchingFunc->getBounds(); | ||
@@ -1887,7 +1899,11 @@ bool SlaOutputDev::radialShadedFill(GfxState *state, GfxRadialShading *shading, | ||
FillGradient.addStop( ScColorEngine::getShadeColor(m_doc->PageColors[stopColor], m_doc, shade), stopPoint, 0.5, 1.0, stopColor, shade ); | ||
} | ||
} | ||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 3, 0) | ||
+ else if ((func->getType() == Function::Type::Exponential) || (func->getType() == Function::Type::Sampled)) | ||
+#else | ||
else if ((func->getType() == 2) || (func->getType() == 0)) | ||
+#endif | ||
{ | ||
GfxColor stop1; | ||
shading->getColor(0.0, &stop1); | ||
-- | ||
2.44.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters