public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/scribus] rawhide: Fix FTBFS with poppler up to 26.08.0
@ 2026-08-07 21:05 Michael J Gruber
  0 siblings, 0 replies; only message in thread
From: Michael J Gruber @ 2026-08-07 21:05 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/scribus
Branch : rawhide
Commit : 7bb0c5bec52f9fd8f1d49072b3e2601fffaecb75
Author : Michael J Gruber <mjg@fedoraproject.org>
Date   : 2026-08-07T22:26:21+02:00
Stats  : +607/-0 in 6 file(s)
URL    : https://src.fedoraproject.org/rpms/scribus/c/7bb0c5bec52f9fd8f1d49072b3e2601fffaecb75?branch=rawhide

Log:
Fix FTBFS with poppler up to 26.08.0

---
diff --git a/0001-17808-Fix-failure-to-build-with-poppler-26.05.0.patch b/0001-17808-Fix-failure-to-build-with-poppler-26.05.0.patch
new file mode 100644
index 0000000..7ce3e37
--- /dev/null
+++ b/0001-17808-Fix-failure-to-build-with-poppler-26.05.0.patch
@@ -0,0 +1,77 @@
+From 0e9dfd58194b14450380d71989635adaada62e30 Mon Sep 17 00:00:00 2001
+Message-ID: <0e9dfd58194b14450380d71989635adaada62e30.1786131501.git.mjg@fedoraproject.org>
+From: Jean Ghali <jghali@libertysurf.fr>
+Date: Tue, 5 May 2026 22:28:48 +0000
+Subject: [PATCH] #17808: Fix failure to build with poppler 26.05.0
+
+git-svn-id: svn://scribus.net/branches/Version16x/Scribus@27544 11d20701-8431-0410-a711-e3c959e3b870
+---
+ scribus/plugins/import/pdf/importpdfconfig.h |  4 ++++
+ scribus/plugins/import/pdf/slaoutput.cpp     | 24 +++++++++++++++++---
+ 2 files changed, 25 insertions(+), 3 deletions(-)
+
+diff --git a/scribus/plugins/import/pdf/importpdfconfig.h b/scribus/plugins/import/pdf/importpdfconfig.h
+index bd4d30f28..cbd5a7e00 100644
+--- a/scribus/plugins/import/pdf/importpdfconfig.h
++++ b/scribus/plugins/import/pdf/importpdfconfig.h
+@@ -21,4 +21,8 @@ for which a new license (GPL+exception) is in place.
+ #define POPPLER_CONST_25_02
+ #endif
+ 
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 5, 0)
++using SplashCoord = double;
++#endif
++
+ #endif
+diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp
+index c88f8afbc..f78ea63bd 100644
+--- a/scribus/plugins/import/pdf/slaoutput.cpp
++++ b/scribus/plugins/import/pdf/slaoutput.cpp
+@@ -3177,7 +3177,13 @@ void SlaOutputDev::updateFont(GfxState *state)
+ 		// load the font file
+ 		switch (fontType) {
+ 		case fontType1:
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 5, 0)
++			if (!(fontFile = m_fontEngine->loadType1Font(std::move(id), std::move(fontsrc), static_cast<Gfx8BitFont*>(gfxFont)->getEncoding(), fontLoc->fontNum)))
++			{
++				error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
++				goto err2;
++			}
++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
+ 			if (!(fontFile = m_fontEngine->loadType1Font(std::move(id), std::move(fontsrc), (const char**) ((Gfx8BitFont*) gfxFont)->getEncoding(), fontLoc->fontNum)))
+ 			{
+ 				error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
+@@ -3198,7 +3204,13 @@ void SlaOutputDev::updateFont(GfxState *state)
+ #endif
+ 			break;
+ 		case fontType1C:
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 5, 0)
++			if (!(fontFile = m_fontEngine->loadType1CFont(std::move(id), std::move(fontsrc), static_cast<Gfx8BitFont*>(gfxFont)->getEncoding(), fontLoc->fontNum)))
++			{
++				error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
++				goto err2;
++			}
++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
+ 			if (!(fontFile = m_fontEngine->loadType1CFont(std::move(id), std::move(fontsrc), (const char**) ((Gfx8BitFont*) gfxFont)->getEncoding(), fontLoc->fontNum)))
+ 			{
+ 				error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
+@@ -3219,7 +3231,13 @@ void SlaOutputDev::updateFont(GfxState *state)
+ #endif
+ 			break;
+ 		case fontType1COT:
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 5, 0)
++			if (!(fontFile = m_fontEngine->loadOpenTypeT1CFont(std::move(id), std::move(fontsrc), static_cast<Gfx8BitFont*>(gfxFont)->getEncoding(), fontLoc->fontNum)))
++			{
++				error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
++				goto err2;
++			}
++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
+ 			if (!(fontFile = m_fontEngine->loadOpenTypeT1CFont(std::move(id), std::move(fontsrc), (const char**) ((Gfx8BitFont*) gfxFont)->getEncoding(), fontLoc->fontNum)))
+ 			{
+ 				error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
+-- 
+2.55.0.701.g8818f27704
+

diff --git a/0001-17832-Additional-fix-for-failure-to-build-with-poppl.patch b/0001-17832-Additional-fix-for-failure-to-build-with-poppl.patch
new file mode 100644
index 0000000..b2c014e
--- /dev/null
+++ b/0001-17832-Additional-fix-for-failure-to-build-with-poppl.patch
@@ -0,0 +1,28 @@
+From 5587a70a5c632b22df48b898ba91e4ba43bd7a72 Mon Sep 17 00:00:00 2001
+Message-ID: <5587a70a5c632b22df48b898ba91e4ba43bd7a72.1786131497.git.mjg@fedoraproject.org>
+From: Jean Ghali <jghali@libertysurf.fr>
+Date: Thu, 11 Jun 2026 19:02:55 +0000
+Subject: [PATCH] #17832: Additional fix for failure to build with poppler
+ 26.06.0
+
+git-svn-id: svn://scribus.net/branches/Version16x/Scribus@27641 11d20701-8431-0410-a711-e3c959e3b870
+---
+ scribus/plugins/import/pdf/slaoutput.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp
+index cef2cd07c..62980111e 100644
+--- a/scribus/plugins/import/pdf/slaoutput.cpp
++++ b/scribus/plugins/import/pdf/slaoutput.cpp
+@@ -744,7 +744,7 @@ bool SlaOutputDev::handleWidgetAnnot(Annot* annota, double xCoor, double yCoor,
+ 			}
+ 			ite->setIsAnnotation(true);
+ 			ite->AutoName = false;
+-			AnnotBorder *brd = annota->getBorder();
++			const AnnotBorder *brd = annota->getBorder();
+ 			if (brd)
+ 			{
+ 				int bsty = brd->getStyle();
+-- 
+2.55.0.701.g8818f27704
+

diff --git a/0001-17832-Fix-failure-to-build-with-poppler-26.06.0.patch b/0001-17832-Fix-failure-to-build-with-poppler-26.06.0.patch
new file mode 100644
index 0000000..fab69c7
--- /dev/null
+++ b/0001-17832-Fix-failure-to-build-with-poppler-26.06.0.patch
@@ -0,0 +1,432 @@
+From 208a6166a07bcda2f82832acd1ec0797091846c3 Mon Sep 17 00:00:00 2001
+Message-ID: <208a6166a07bcda2f82832acd1ec0797091846c3.1786131499.git.mjg@fedoraproject.org>
+From: Jean Ghali <jghali@libertysurf.fr>
+Date: Wed, 3 Jun 2026 23:06:07 +0000
+Subject: [PATCH] #17832: Fix failure to build with poppler 26.06.0
+
+git-svn-id: svn://scribus.net/branches/Version16x/Scribus@27628 11d20701-8431-0410-a711-e3c959e3b870
+---
+ scribus/plugins/import/pdf/importpdf.cpp     |  21 ++++
+ scribus/plugins/import/pdf/importpdfconfig.h |   6 ++
+ scribus/plugins/import/pdf/slaoutput.cpp     | 101 +++++++++++++++++--
+ scribus/plugins/import/pdf/slaoutput.h       |  26 ++++-
+ 4 files changed, 141 insertions(+), 13 deletions(-)
+
+diff --git a/scribus/plugins/import/pdf/importpdf.cpp b/scribus/plugins/import/pdf/importpdf.cpp
+index a359bc5a7..7347a6fd0 100644
+--- a/scribus/plugins/import/pdf/importpdf.cpp
++++ b/scribus/plugins/import/pdf/importpdf.cpp
+@@ -378,8 +378,13 @@ bool PdfPlug::convert(const QString& fn)
+ 			bool useMediaBox = true;
+ 			bool crop = true;
+ 			bool printing = false;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 6, 0)
++			const PDFRectangle& mediaBox = pdfDoc->getPage(1)->getMediaBox();
++			QRectF mediaRect = QRectF(QPointF(mediaBox.x1, mediaBox.y1), QPointF(mediaBox.x2, mediaBox.y2)).normalized();
++#else
+ 			const PDFRectangle *mediaBox = pdfDoc->getPage(1)->getMediaBox();
+ 			QRectF mediaRect = QRectF(QPointF(mediaBox->x1, mediaBox->y1), QPointF(mediaBox->x2, mediaBox->y2)).normalized();
++#endif
+ 			bool boxesAreDifferent = false;
+ 			if (getCBox(Crop_Box, 1) != mediaRect)
+ 				boxesAreDifferent = true;
+@@ -885,6 +890,21 @@ QImage PdfPlug::readPreview(int pgNum, int width, int height, int box)
+ 
+ QRectF PdfPlug::getCBox(int box, int pgNum)
+ {
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 6, 0)
++	PDFRectangle cBox;
++	if (box == Media_Box)
++		cBox = m_pdfDoc->getPage(pgNum)->getMediaBox();
++	else if (box == Bleed_Box)
++		cBox = m_pdfDoc->getPage(pgNum)->getBleedBox();
++	else if (box == Trim_Box)
++		cBox = m_pdfDoc->getPage(pgNum)->getTrimBox();
++	else if (box == Crop_Box)
++		cBox = m_pdfDoc->getPage(pgNum)->getCropBox();
++	else if (box == Art_Box)
++		cBox = m_pdfDoc->getPage(pgNum)->getArtBox();
++	QRectF cRect = QRectF(QPointF(cBox.x1, cBox.y1), QPointF(cBox.x2, cBox.y2)).normalized();
++	return cRect;
++#else
+ 	const PDFRectangle *cBox = nullptr;
+ 	if (box == Media_Box)
+ 		cBox = m_pdfDoc->getPage(pgNum)->getMediaBox();
+@@ -898,6 +918,7 @@ QRectF PdfPlug::getCBox(int box, int pgNum)
+ 		cBox = m_pdfDoc->getPage(pgNum)->getArtBox();
+ 	QRectF cRect = QRectF(QPointF(cBox->x1, cBox->y1), QPointF(cBox->x2, cBox->y2)).normalized();
+ 	return cRect;
++#endif
+ }
+ 
+ QString PdfPlug::UnicodeParsedString(const GooString *s1) const
+diff --git a/scribus/plugins/import/pdf/importpdfconfig.h b/scribus/plugins/import/pdf/importpdfconfig.h
+index cbd5a7e00..04bd710f4 100644
+--- a/scribus/plugins/import/pdf/importpdfconfig.h
++++ b/scribus/plugins/import/pdf/importpdfconfig.h
+@@ -25,4 +25,10 @@ for which a new license (GPL+exception) is in place.
+ using SplashCoord = double;
+ #endif
+ 
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 6, 0)
++#define POPPLER_CONST_26_06 const
++#else
++#define POPPLER_CONST_26_06
++#endif
++
+ #endif
+diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp
+index f78ea63bd..cef2cd07c 100644
+--- a/scribus/plugins/import/pdf/slaoutput.cpp
++++ b/scribus/plugins/import/pdf/slaoutput.cpp
+@@ -17,6 +17,7 @@ for which a new license (GPL+exception) is in place.
+ #include <poppler/poppler-config.h>
+ #include <poppler/FileSpec.h>
+ #include <poppler/fofi/FoFiTrueType.h>
++#include <poppler/OptionalContent.h>
+ 
+ #include <QApplication>
+ #include <QFile>
+@@ -189,7 +190,11 @@ void AnoOutputDev::drawString(GfxState *state, const GooString *s)
+ #endif
+ }
+ 
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 06, 0)
++QString AnoOutputDev::getColor(GfxColorSpace *color_space, const GfxColor &color, int* shade)
++#else
+ QString AnoOutputDev::getColor(GfxColorSpace *color_space, const GfxColor *color, int *shade)
++#endif
+ {
+ 	QString fNam;
+ 	QString namPrefix = "FromPDF";
+@@ -272,7 +277,11 @@ QString AnoOutputDev::getColor(GfxColorSpace *color_space, const GfxColor *color
+ 		tmp.setSpotColor(true);
+ 
+ 		fNam = m_doc->PageColors.tryAddColor(name, tmp);
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 06, 0)
++		*shade = qRound(colToDbl(color.c[0]) * 100);
++#else
+ 		*shade = qRound(colToDbl(color->c[0]) * 100);
++#endif
+ 	}
+ 	else
+ 	{
+@@ -660,7 +669,7 @@ bool SlaOutputDev::handleWidgetAnnot(Annot* annota, double xCoor, double yCoor,
+ 		}
+ 		if (retVal)
+ 		{
+-			AnnotAppearanceCharacs *achar = ano->getAppearCharacs();
++			POPPLER_CONST_26_06 AnnotAppearanceCharacs *achar = ano->getAppearCharacs();
+ 			bool fgFound = false;
+ 			bool bgFound = false;
+ 			if (achar)
+@@ -696,7 +705,10 @@ bool SlaOutputDev::handleWidgetAnnot(Annot* annota, double xCoor, double yCoor,
+ 			if (apa || !achar)
+ 			{
+ 				auto annotOutDev = std::make_shared<AnoOutputDev>(m_doc, m_importedColors);
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 6, 0)
++				const PDFRectangle& annotaRect = annota->getRect();
++				auto gfx = std::make_shared<Gfx>(m_pdfDoc, annotOutDev.get(), m_pdfDoc->getPage(m_actPage)->getResourceDict(), annotaRect, nullptr);
++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
+ 				const PDFRectangle& annotaRect = annota->getRect();
+ 				auto gfx = std::make_shared<Gfx>(m_pdfDoc, annotOutDev.get(), m_pdfDoc->getPage(m_actPage)->getResourceDict(), &annotaRect, nullptr);
+ #else
+@@ -853,7 +865,11 @@ bool SlaOutputDev::handleWidgetAnnot(Annot* annota, double xCoor, double yCoor,
+ 				{
+ 					if (wtyp == 5)
+ 						ite->annotation().addToFlag(Annotation::Flag_Combo);
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 6, 0)
++					size_t co = btn->getChoices().size();
++#else
+ 					int co = btn->getNumChoices();
++#endif
+ 					if (co > 0)
+ 					{
+ 						QString inh = UnicodeParsedString(btn->getChoice(0));
+@@ -958,7 +974,7 @@ void SlaOutputDev::applyTextStyle(PageItem* ite, const QString& fontName, const
+ 
+ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano)
+ {
+-	LinkAction *Lact = ano->getAction();
++	POPPLER_CONST_26_06 LinkAction *Lact = ano->getAction();
+ 	if (Lact)
+ 	{
+ 		if (Lact->getKind() == actionJavaScript)
+@@ -1508,7 +1524,9 @@ void SlaOutputDev::endTransparencyGroup(GfxState *state)
+ 	m_tmpSel->clear();
+ }
+ 
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 9, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 6, 0)
++void SlaOutputDev::setSoftMask(GfxState* /*state*/, const std::array<double, 4>& bbox, bool alpha, Function* transferFunc, const GfxColor& /*backdropColor*/)
++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 9, 0)
+ void SlaOutputDev::setSoftMask(GfxState* /*state*/, const std::array<double, 4>& bbox, bool alpha, Function* transferFunc, GfxColor* /*backdropColor*/)
+ #else
+ void SlaOutputDev::setSoftMask(GfxState* /*state*/, const double* bbox, bool alpha, Function* transferFunc, GfxColor* /*backdropColor*/)
+@@ -2303,7 +2321,11 @@ bool SlaOutputDev::tilingPatternFill(GfxState *state, Gfx* /*gfx*/, Catalog *cat
+ 	QTransform mm(mat[0], mat[1], mat[2], mat[3], mat[4], mat[5]);
+ 	QTransform mmx = mm * m_ctm;
+ 
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 6, 0)
++	auto gfx = std::make_shared<Gfx>(m_pdfDoc, this, resDict, box, nullptr);
++#else
+ 	auto gfx = std::make_shared<Gfx>(m_pdfDoc, this, resDict, &box, nullptr);
++#endif
+ 	m_inPattern++;
+ 	// Unset the clip path as it is unrelated to the pattern's coordinate space.
+ 	QPainterPath savedClip = m_graphicStack.top().clipPath;
+@@ -2551,7 +2573,11 @@ void SlaOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str
+ 	if (matteColor != nullptr)
+ 	{
+ 		GfxRGB matteRgb;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 6, 0)
++		colorMap->getColorSpace()->getRGB(*matteColor, &matteRgb);
++#else
+ 		colorMap->getColorSpace()->getRGB(matteColor, &matteRgb);
++#endif
+ 		matteRc = qRound(colToDbl(matteRgb.r) * 255);
+ 		matteGc = qRound(colToDbl(matteRgb.g) * 255);
+ 		matteBc = qRound(colToDbl(matteRgb.b) * 255);
+@@ -2939,10 +2965,18 @@ void SlaOutputDev::beginMarkedContent(const char *name, Object *dictRef)
+ 	m_mcStack.push(mSte);
+ }
+ 
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 6, 0)
++void SlaOutputDev::beginMarkedContent(const std::string& name, Dict* properties)
++#else
+ void SlaOutputDev::beginMarkedContent(const char *name, Dict *properties)
++#endif
+ {
+ //	qDebug() << "Begin Marked Content with Name " << QString(name);
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 6, 0)
++	QString nam = QString::fromStdString(name);
++#else
+ 	QString nam(name);
++#endif
+ 	mContent mSte;
+ 	mSte.name = nam;
+ 	mSte.ocgName = "";
+@@ -3021,16 +3055,31 @@ void SlaOutputDev::endMarkedContent(GfxState *state)
+ 	}
+ }
+ 
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 6, 0)
++void SlaOutputDev::markPoint(const std::string& name)
++{
++	//	qDebug() << "Begin Marked Point with Name " << QString(name);
++}
++#else
+ void SlaOutputDev::markPoint(const char *name)
+ {
+ //	qDebug() << "Begin Marked Point with Name " << QString(name);
+ }
++#endif
+ 
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 6, 0)
++void SlaOutputDev::markPoint(const std::string& name, Dict* properties)
++{
++	//	qDebug() << "Begin Marked Point with Name " << QString(name) << "and Properties";
++	beginMarkedContent(name.c_str(), properties);
++}
++#else
+ void SlaOutputDev::markPoint(const char *name, Dict *properties)
+ {
+ //	qDebug() << "Begin Marked Point with Name " << QString(name) << "and Properties";
+ 	beginMarkedContent(name, properties);
+ }
++#endif
+ 
+ void SlaOutputDev::updateFont(GfxState *state)
+ {
+@@ -3761,6 +3810,13 @@ void SlaOutputDev::endTextObject(GfxState *state)
+ }
+ 
+ QString SlaOutputDev::getColor(GfxColorSpace *color_space, const GfxColor *color, int *shade)
++{
++	if (!color)
++		return CommonStrings::None;
++	return getColor(color_space, *color, shade);
++}
++
++QString SlaOutputDev::getColor(GfxColorSpace *color_space, const GfxColor &color, int *shade)
+ {
+ 	QString fNam;
+ 	QString namPrefix = "FromPDF";
+@@ -3777,31 +3833,43 @@ QString SlaOutputDev::getColor(GfxColorSpace *color_space, const GfxColor *color
+ 	if ((color_space->getMode() == csDeviceRGB) || (color_space->getMode() == csCalRGB))
+ 	{
+ 		GfxRGB rgb;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 6, 0)
+ 		color_space->getRGB(color, &rgb);
++#else
++		color_space->getRGB(&color, &rgb);
++#endif
+ 		double Rc = colToDbl(rgb.r);
+ 		double Gc = colToDbl(rgb.g);
+ 		double Bc = colToDbl(rgb.b);
+ 		tmp.setRgbColorF(Rc, Gc, Bc);
+-		fNam = m_doc->PageColors.tryAddColor(namPrefix+tmp.name(), tmp);
++		fNam = m_doc->PageColors.tryAddColor(namPrefix + tmp.name(), tmp);
+ 	}
+ 	else if (color_space->getMode() == csDeviceCMYK)
+ 	{
+ 		GfxCMYK cmyk;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 6, 0)
+ 		color_space->getCMYK(color, &cmyk);
++#else
++		color_space->getCMYK(&color, &cmyk);
++#endif
+ 		double Cc = colToDbl(cmyk.c);
+ 		double Mc = colToDbl(cmyk.m);
+ 		double Yc = colToDbl(cmyk.y);
+ 		double Kc = colToDbl(cmyk.k);
+ 		tmp.setCmykColorF(Cc, Mc, Yc, Kc);
+-		fNam = m_doc->PageColors.tryAddColor(namPrefix+tmp.name(), tmp);
++		fNam = m_doc->PageColors.tryAddColor(namPrefix + tmp.name(), tmp);
+ 	}
+ 	else if ((color_space->getMode() == csCalGray) || (color_space->getMode() == csDeviceGray))
+ 	{
+ 		GfxGray gray;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 6, 0)
+ 		color_space->getGray(color, &gray);
++#else
++		color_space->getGray(&color, &gray);
++#endif
+ 		double Kc = 1.0 - colToDbl(gray);
+ 		tmp.setCmykColorF(0, 0, 0, Kc);
+-		fNam = m_doc->PageColors.tryAddColor(namPrefix+tmp.name(), tmp);
++		fNam = m_doc->PageColors.tryAddColor(namPrefix + tmp.name(), tmp);
+ 	}
+ 	else if (color_space->getMode() == csSeparation)
+ 	{
+@@ -3839,7 +3907,11 @@ QString SlaOutputDev::getColor(GfxColorSpace *color_space, const GfxColor *color
+ 		else
+ 		{
+ 			GfxCMYK cmyk;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 6, 0)
+ 			color_space->getCMYK(color, &cmyk);
++#else
++			color_space->getCMYK(&color, &cmyk);
++#endif
+ 			double Cc = colToDbl(cmyk.c);
+ 			double Mc = colToDbl(cmyk.m);
+ 			double Yc = colToDbl(cmyk.y);
+@@ -3849,20 +3921,24 @@ QString SlaOutputDev::getColor(GfxColorSpace *color_space, const GfxColor *color
+ 		tmp.setSpotColor(true);
+ 
+ 		fNam = m_doc->PageColors.tryAddColor(name, tmp);
+-		*shade = qRound(colToDbl(color->c[0]) * 100);
++		*shade = qRound(colToDbl(color.c[0]) * 100);
+ 	}
+ 	else
+ 	{
+ 		GfxRGB rgb;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 6, 0)
+ 		color_space->getRGB(color, &rgb);
++#else
++		color_space->getRGB(&color, &rgb);
++#endif
+ 		double Rc = colToDbl(rgb.r);
+ 		double Gc = colToDbl(rgb.g);
+ 		double Bc = colToDbl(rgb.b);
+ 		tmp.setRgbColorF(Rc, Gc, Bc);
+-		fNam = m_doc->PageColors.tryAddColor(namPrefix+tmp.name(), tmp);
++		fNam = m_doc->PageColors.tryAddColor(namPrefix + tmp.name(), tmp);
+ //		qDebug() << "update fill color other colorspace" << color_space->getMode() << "treating as rgb" << Rc << Gc << Bc;
+ 	}
+-	if (fNam == namPrefix+tmp.name())
++	if (fNam == namPrefix + tmp.name())
+ 		m_importedColors->append(fNam);
+ 	return fNam;
+ }
+@@ -4109,6 +4185,11 @@ void SlaOutputDev::pushGroup(const QString& maskName, bool forSoftMask, bool alp
+ 	m_groupStack.push(gElements);
+ }
+ 
++QString SlaOutputDev::UnicodeParsedString(const GooString& s1) const
++{
++	return UnicodeParsedString(&s1);
++}
++
+ QString SlaOutputDev::UnicodeParsedString(const GooString *s1) const
+ {
+ #if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 10, 0)
+diff --git a/scribus/plugins/import/pdf/slaoutput.h b/scribus/plugins/import/pdf/slaoutput.h
+index 7b3a71dc6..0211d77e7 100644
+--- a/scribus/plugins/import/pdf/slaoutput.h
++++ b/scribus/plugins/import/pdf/slaoutput.h
+@@ -22,6 +22,7 @@ for which a new license (GPL+exception) is in place.
+ 
+ #include <array>
+ #include <memory>
++#include <string>
+ 
+ #include "fpointarray.h"
+ #include "importpdfconfig.h"
+@@ -156,9 +157,14 @@ public:
+ 	std::unique_ptr<GooString> itemText;
+ 
+ private:
+-	QString getColor(GfxColorSpace *color_space, const GfxColor *color, int *shade);
+ 	ScribusDoc* m_doc { nullptr };
+ 	QStringList *m_importedColors { nullptr };
++
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 06, 0)
++	QString getColor(GfxColorSpace *color_space, const GfxColor &color, int *shade);
++#else
++	QString getColor(GfxColorSpace *color_space, const GfxColor *color, int* shade);
++#endif
+ };
+ 
+ 
+@@ -239,11 +245,21 @@ public:
+ 	virtual void endMaskClip(GfxState *state) { qDebug() << "End Mask Clip"; }
+ 
+   //----- grouping operators
+-	void beginMarkedContent(const char *name, Dict *properties) override;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 6, 0)
++	void beginMarkedContent(const std::string& name, Dict* properties) override;
++#else
++	void beginMarkedContent(const char* name, Dict* properties) override;
++#endif
+ 	virtual void beginMarkedContent(const char *name, Object *dictRef);
+ 	void endMarkedContent(GfxState *state) override;
++
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 6, 0)
++	void markPoint(const std::string& name) override;
++	void markPoint(const std::string& name, Dict* properties) override;
++#else
+ 	void markPoint(const char *name) override;
+ 	void markPoint(const char *name, Dict *properties) override;
++#endif
+ 
+ 	//----- image drawing
+ 	void drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, bool invert, bool interpolate, bool inlineImg) override;
+@@ -275,7 +291,9 @@ public:
+ #endif
+ 	void endTransparencyGroup(GfxState *state) override;
+ 
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 9, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 6, 0)
++	void setSoftMask(GfxState * /*state*/, const std::array<double, 4> & /*bbox*/, bool /*alpha*/, Function * /*transferFunc*/, const GfxColor & /*backdropColor*/) override;
++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 9, 0)
+ 	void setSoftMask(GfxState * /*state*/, const std::array<double, 4> & /*bbox*/, bool /*alpha*/, Function * /*transferFunc*/, GfxColor * /*backdropColor*/) override;
+ #else
+ 	void setSoftMask(GfxState * /*state*/, const double * /*bbox*/, bool /*alpha*/, Function * /*transferFunc*/, GfxColor * /*backdropColor*/) override;
+@@ -384,10 +402,12 @@ protected:
+ private:
+ 	void getPenState(GfxState *state);
+ 	QString getColor(GfxColorSpace *color_space, const GfxColor *color, int *shade);
++	QString getColor(GfxColorSpace* color_space, const GfxColor &color, int* shade);
+ 	QString getAnnotationColor(const AnnotColor *color);
+ 	QString convertPath(const GfxPath *path);
+ 	int getBlendMode(GfxState *state) const;
+ 	QString UnicodeParsedString(const GooString *s1) const;
++	QString UnicodeParsedString(const GooString &s1) const;
+ 	QString UnicodeParsedString(const std::string& s1) const;
+ 	bool checkClip();
+ 
+-- 
+2.55.0.701.g8818f27704
+

diff --git a/0001-17880-Attempt-to-fix-failure-to-build-with-poppler-2.patch b/0001-17880-Attempt-to-fix-failure-to-build-with-poppler-2.patch
new file mode 100644
index 0000000..15af1b7
--- /dev/null
+++ b/0001-17880-Attempt-to-fix-failure-to-build-with-poppler-2.patch
@@ -0,0 +1,35 @@
+From 4ded13f2c5684eb11939cbb4f69f3fb9b7696e8a Mon Sep 17 00:00:00 2001
+Message-ID: <4ded13f2c5684eb11939cbb4f69f3fb9b7696e8a.1786131475.git.mjg@fedoraproject.org>
+From: Jean Ghali <jghali@libertysurf.fr>
+Date: Wed, 8 Jul 2026 07:04:33 +0000
+Subject: [PATCH] #17880: Attempt to fix failure to build with poppler 26.07.0
+
+git-svn-id: svn://scribus.net/branches/Version16x/Scribus@27702 11d20701-8431-0410-a711-e3c959e3b870
+---
+ scribus/plugins/import/pdf/slaoutput.cpp | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp
+index 62980111e..26d9c2df4 100644
+--- a/scribus/plugins/import/pdf/slaoutput.cpp
++++ b/scribus/plugins/import/pdf/slaoutput.cpp
+@@ -914,12 +914,13 @@ bool SlaOutputDev::handleWidgetAnnot(Annot* annota, double xCoor, double yCoor,
+ 			{
+ 				// Load children
+ 				QList<int> radList;
+-				for (int i = 0; i < obj2.arrayGetLength(); i++)
++				Array* kidsArray = obj2.getArray();
++				for (int i = 0; i < kidsArray->getLength(); i++)
+ 				{
+-					const Object& childRef = obj2.arrayGetNF(i);
++					const Object& childRef = kidsArray->getNF(i);
+ 					if (!childRef.isRef())
+ 						continue;
+-					Object childObj = obj2.arrayGet(i);
++					Object childObj = kidsArray->get(i);
+ 					if (!childObj.isDict())
+ 						continue;
+ 					const Ref ref = childRef.getRef();
+-- 
+2.55.0.701.g8818f27704
+

diff --git a/0001-Fix-another-compiler-error-when-building-with-old-po.patch b/0001-Fix-another-compiler-error-when-building-with-old-po.patch
new file mode 100644
index 0000000..3beeb53
--- /dev/null
+++ b/0001-Fix-another-compiler-error-when-building-with-old-po.patch
@@ -0,0 +1,28 @@
+From 2ab86b1ed8792e27c4cf20f2ee129e093fa8b9e6 Mon Sep 17 00:00:00 2001
+Message-ID: <2ab86b1ed8792e27c4cf20f2ee129e093fa8b9e6.1786131492.git.mjg@fedoraproject.org>
+From: Jean Ghali <jghali@libertysurf.fr>
+Date: Thu, 11 Jun 2026 19:47:26 +0000
+Subject: [PATCH] Fix another compiler error when building with old poppler
+ versions
+
+git-svn-id: svn://scribus.net/branches/Version16x/Scribus@27643 11d20701-8431-0410-a711-e3c959e3b870
+---
+ scribus/plugins/import/pdf/importpdf.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scribus/plugins/import/pdf/importpdf.cpp b/scribus/plugins/import/pdf/importpdf.cpp
+index 7347a6fd0..edb22df34 100644
+--- a/scribus/plugins/import/pdf/importpdf.cpp
++++ b/scribus/plugins/import/pdf/importpdf.cpp
+@@ -842,7 +842,7 @@ QImage PdfPlug::readPreview(int pgNum, int width, int height, int box)
+ #if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
+ 	auto dev = std::make_unique<SplashOutputDev>(splashModeXBGR8, 4, bgColor, true);
+ #else
+-	auto dev = std::make_unique<SplashOutputDev>(splashModeXBGR8, 4, false, bgColor, true);
++	std::unique_ptr<SplashOutputDev> dev(new SplashOutputDev(splashModeXBGR8, 4, false, bgColor, true));
+ #endif
+ 	dev->setVectorAntialias(true);
+ 	dev->setFreeTypeHinting(true, false);
+-- 
+2.55.0.701.g8818f27704
+

diff --git a/scribus.spec b/scribus.spec
index 0777655..7089918 100644
--- a/scribus.spec
+++ b/scribus.spec
@@ -14,6 +14,13 @@ Source0:        %{name}-%{version}-free.tar.xz
 #Source0:        http://downloads.sourceforge.net/%%{name}/%%{name}-%%{version}.tar.xz
 #Source1:        http://downloads.sourceforge.net/%%{name}/%%{name}-%%{version}.tar.xz.asc
 
+# upstream patches from branch Version16x
+Patch:          0001-17808-Fix-failure-to-build-with-poppler-26.05.0.patch
+Patch:          0001-17832-Fix-failure-to-build-with-poppler-26.06.0.patch
+Patch:          0001-17832-Additional-fix-for-failure-to-build-with-poppl.patch
+Patch:          0001-Fix-another-compiler-error-when-building-with-old-po.patch
+Patch:          0001-17880-Attempt-to-fix-failure-to-build-with-poppler-2.patch
+
 BuildRequires:  boost-devel
 BuildRequires:  cmake
 BuildRequires:  cups-devel

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-07 21:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-07 21:05 [rpms/scribus] rawhide: Fix FTBFS with poppler up to 26.08.0 Michael J Gruber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox