From: Matthias Kilian Subject: print/scribus: fix build with poppler-26.01.0 To: ports@openbsd.org Date: Thu, 8 Jan 2026 21:04:18 +0100 Hi, this diff fixes the build of scribus with poppler-26.01.0 (plain s/reset/rewind/ and some conversions from simle array to a std::array). Any objections? Ciao, Kili Index: patches/patch-scribus_plugins_import_pdf_slaoutput_cpp =================================================================== RCS file: /cvs/ports/print/scribus/patches/patch-scribus_plugins_import_pdf_slaoutput_cpp,v diff -u -p -r1.20 patch-scribus_plugins_import_pdf_slaoutput_cpp --- patches/patch-scribus_plugins_import_pdf_slaoutput_cpp 30 Oct 2025 20:57:55 -0000 1.20 +++ patches/patch-scribus_plugins_import_pdf_slaoutput_cpp 8 Jan 2026 19:02:23 -0000 @@ -1,7 +1,7 @@ https://github.com/scribusproject/scribus/commit/188d030acd0cb71e89dbb57695fe52158b6a0959 (and local changes for FoFiTrueType::make()) -Add fixes for poppler-25.09.1 and 25.10.0. +Add fixes for poppler-25.09.1, 25.10.0 and 26.01.0. Index: scribus/plugins/import/pdf/slaoutput.cpp --- scribus/plugins/import/pdf/slaoutput.cpp.orig @@ -56,6 +56,60 @@ Index: scribus/plugins/import/pdf/slaout Dict *resDict = tPat->getResDict(); PDFRectangle box; +@@ -2347,7 +2347,7 @@ void SlaOutputDev::drawImageMask(GfxState *state, Obje + { + // qDebug() << "Draw Image Mask"; + auto imgStr = std::make_unique(str, width, 1, 1); +- imgStr->reset(); ++ imgStr->rewind(); + #ifdef WORDS_BIGENDIAN + QImage image(width, height, QImage::Format_Mono); + #else +@@ -2421,7 +2421,7 @@ void SlaOutputDev::drawSoftMaskedImage(GfxState *state + { + // qDebug() << "SlaOutputDev::drawSoftMaskedImage Masked Image Components" << colorMap->getNumPixelComps(); + auto imgStr = std::make_unique(str, width, colorMap->getNumPixelComps(), colorMap->getBits()); +- imgStr->reset(); ++ imgStr->rewind(); + unsigned int *dest = nullptr; + unsigned char * buffer = new unsigned char[width * height * 4]; + for (int y = 0; y < height; y++) +@@ -2439,7 +2439,7 @@ void SlaOutputDev::drawSoftMaskedImage(GfxState *state + } + + auto mskStr = std::make_unique(maskStr, maskWidth, maskColorMap->getNumPixelComps(), maskColorMap->getBits()); +- mskStr->reset(); ++ mskStr->rewind(); + unsigned char *mdest = nullptr; + unsigned char * mbuffer = new unsigned char[maskWidth * maskHeight]; + memset(mbuffer, 0, maskWidth * maskHeight); +@@ -2497,7 +2497,7 @@ void SlaOutputDev::drawMaskedImage(GfxState *state, Ob + { + // qDebug() << "SlaOutputDev::drawMaskedImage"; + auto imgStr = std::make_unique(str, width, colorMap->getNumPixelComps(), colorMap->getBits()); +- imgStr->reset(); ++ imgStr->rewind(); + unsigned int *dest = nullptr; + unsigned char * buffer = new unsigned char[width * height * 4]; + for (int y = 0; y < height; y++) +@@ -2515,7 +2515,7 @@ void SlaOutputDev::drawMaskedImage(GfxState *state, Ob + } + + auto mskStr = std::make_unique(maskStr, maskWidth, 1, 1); +- mskStr->reset(); ++ mskStr->rewind(); + unsigned char *mdest = nullptr; + int invert_bit = maskInvert ? 1 : 0; + unsigned char * mbuffer = new unsigned char[maskWidth * maskHeight]; +@@ -2561,7 +2561,7 @@ void SlaOutputDev::drawMaskedImage(GfxState *state, Ob + 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()); +- imgStr->reset(); ++ imgStr->rewind(); + + QImage image(width, height, QImage::Format_ARGB32); + if (image.isNull()) @@ -2791,7 +2791,7 @@ void SlaOutputDev::beginMarkedContent(const char *name { if (dictRef->isNull()) @@ -65,7 +119,7 @@ Index: scribus/plugins/import/pdf/slaout OptionalContentGroup *oc; if (dictRef->isRef()) { -@@ -2928,7 +2928,11 @@ void SlaOutputDev::updateFont(GfxState *state) +@@ -2928,13 +2928,17 @@ void SlaOutputDev::updateFont(GfxState *state) SplashFontFile *fontFile; SplashFontSrc *fontsrc = nullptr; Object refObj, strObj; @@ -76,7 +130,15 @@ Index: scribus/plugins/import/pdf/slaout +#endif const double *textMat = nullptr; double m11, m12, m21, m22, fontSize; - SplashCoord mat[4] = { 1.0, 0.0, 0.0, 1.0 }; +- SplashCoord mat[4] = { 1.0, 0.0, 0.0, 1.0 }; ++ std::array mat = { 1.0, 0.0, 0.0, 1.0 }; + int n = 0; + int faceIndex = 0; +- SplashCoord matrix[6] = { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }; ++ std::array matrix = { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }; + + m_font = nullptr; + @@ -3040,12 +3044,12 @@ void SlaOutputDev::updateFont(GfxState *state) if (!fileName.empty()) ff = FoFiTrueType::load(fileName.c_str(), fontLoc->fontNum);