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 0000000000000..87ed0b87362d1 --- /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 + #include + #include + +@@ -2372,7 +2373,11 @@ + { + // qDebug() << "Draw Image Mask"; + auto imgStr = std::make_unique(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(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(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(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(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(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 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 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 4dbaf024e8861..b02064a6ae8c1 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() {