From 5f19629e0a9fc0e2ae03382664e72eea71526311 Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Mon, 4 Mar 2024 23:15:58 +0100 Subject: app-office/scribus: Fix build with >=app-text/poppler-24.03 Fix is pending upstream: https://github.com/scribusproject/scribus/pull/177 Signed-off-by: Andreas Sturmlechner --- .../files/scribus-1.6.1-poppler-24.03.patch | 70 ++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 app-office/scribus/files/scribus-1.6.1-poppler-24.03.patch (limited to 'app-office/scribus/files') diff --git a/app-office/scribus/files/scribus-1.6.1-poppler-24.03.patch b/app-office/scribus/files/scribus-1.6.1-poppler-24.03.patch new file mode 100644 index 000000000000..076e48e14fd9 --- /dev/null +++ b/app-office/scribus/files/scribus-1.6.1-poppler-24.03.patch @@ -0,0 +1,70 @@ +From dc2470990ab73c87fdd60068c99518ced01a3edd Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner +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 +--- + 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 + -- cgit v1.2.3-65-gdbad