commit:     75037b3df189b2faaef813bb63c730238228682b
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu Jan  8 18:52:54 2026 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Jan  8 19:08:28 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75037b3d

app-office/scribus: Fix build w/ poppler-26.01

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/scribus-1.7.1-poppler-26.01.patch        | 109 +++++++++++++++++++++
 app-office/scribus/scribus-1.7.1.ebuild            |   1 +
 2 files changed, 110 insertions(+)

diff --git a/app-office/scribus/files/scribus-1.7.1-poppler-26.01.patch 
b/app-office/scribus/files/scribus-1.7.1-poppler-26.01.patch
new file mode 100644
index 000000000000..87ed0b87362d
--- /dev/null
+++ b/app-office/scribus/files/scribus-1.7.1-poppler-26.01.patch
@@ -0,0 +1,109 @@
+Index: Scribus/scribus/plugins/import/pdf/slaoutput.cpp
+===================================================================
+--- Scribus/scribus/plugins/import/pdf/slaoutput.cpp   (revision 27296)
++++ Scribus/scribus/plugins/import/pdf/slaoutput.cpp   (revision 27298)
+@@ -7,6 +7,7 @@
+ 
+ #include "slaoutput.h"
+ 
++#include <array>
+ #include <memory>
+ #include <optional>
+ 
+@@ -2372,7 +2373,11 @@
+ {
+ //    qDebug() << "Draw Image Mask";
+       auto imgStr = std::make_unique<ImageStream>(str, width, 1, 1);
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 1, 0)
++      bool rewindDone = imgStr->rewind();
++      if (!rewindDone)
++              return;
++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
+       bool resetDone = imgStr->reset();
+       if (!resetDone)
+               return;
+@@ -2453,7 +2458,11 @@
+ {
+ //    qDebug() << "SlaOutputDev::drawSoftMaskedImage Masked Image Components" 
<< colorMap->getNumPixelComps();
+       auto imgStr = std::make_unique<ImageStream>(str, width, 
colorMap->getNumPixelComps(), colorMap->getBits());
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 1, 0)
++      bool rewindDone = imgStr->rewind();
++      if (!rewindDone)
++              return;
++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
+       bool resetDone = imgStr->reset();
+       if (!resetDone)
+               return;
+@@ -2475,7 +2484,11 @@
+               return;
+ 
+       auto mskStr = std::make_unique<ImageStream>(maskStr, maskWidth, 
maskColorMap->getNumPixelComps(), maskColorMap->getBits());
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 1, 0)
++      bool mskRewindDone = mskStr->rewind();
++      if (!mskRewindDone)
++              return;
++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
+       bool mskResetDone = mskStr->reset();
+       if (!mskResetDone)
+               return;
+@@ -2537,7 +2550,11 @@
+ {
+ //    qDebug() << "SlaOutputDev::drawMaskedImage";
+       auto imgStr = std::make_unique<ImageStream>(str, width, 
colorMap->getNumPixelComps(), colorMap->getBits());
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 1, 0)
++      bool rewindDone = imgStr->rewind();
++      if (!rewindDone)
++              return;
++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
+       bool resetDone = imgStr->reset();
+       if (resetDone)
+               return;
+@@ -2559,7 +2576,11 @@
+               return;
+ 
+       auto mskStr = std::make_unique<ImageStream>(maskStr, maskWidth, 1, 1);
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 1, 0)
++      bool mskRewindDone = mskStr->rewind();
++      if (!mskRewindDone)
++              return;
++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
+       bool mskResetDone = mskStr->reset();
+       if (!mskResetDone)
+               return;
+@@ -2609,7 +2630,11 @@
+ void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int 
width, int height, GfxImageColorMap *colorMap, bool interpolate, const int* 
maskColors, bool inlineImg)
+ {
+       auto imgStr = std::make_unique<ImageStream>(str, width, 
colorMap->getNumPixelComps(), colorMap->getBits());
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 1, 0)
++      bool rewindDone = imgStr->rewind();
++      if (!rewindDone)
++              return;
++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
+       bool resetDone = imgStr->reset();
+       if (!resetDone)
+               return;
+@@ -2987,10 +3012,18 @@
+ #endif
+       const double *textMat = nullptr;
+       double m11, m12, m21, m22, fontSize;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 1, 0)
++      std::array<SplashCoord, 4> mat = { 1.0, 0.0, 0.0, 1.0 };
++#else
+       SplashCoord mat[4] = { 1.0, 0.0, 0.0, 1.0 };
++#endif
+       int n = 0;
+       int faceIndex = 0;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 1, 0)
++      std::array<SplashCoord, 6> matrix = { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 };
++#else
+       SplashCoord matrix[6] = { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 };
++#endif
+ 
+       m_font = nullptr;
+ 

diff --git a/app-office/scribus/scribus-1.7.1.ebuild 
b/app-office/scribus/scribus-1.7.1.ebuild
index 4dbaf024e886..b02064a6ae8c 100644
--- a/app-office/scribus/scribus-1.7.1.ebuild
+++ b/app-office/scribus/scribus-1.7.1.ebuild
@@ -85,6 +85,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-1.7.0-findhyphen.patch
        "${FILESDIR}"/${PN}-1.7.0-dont-install-qtadvanceddocking.patch # bugs 
961290, 960017
        "${FILESDIR}"/${PN}-1.7.0-fix-icon-version.patch
+       "${FILESDIR}"/${P}-poppler-26.01.patch # upstream trunk
 )
 
 src_prepare() {

Reply via email to