public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Marek Kasik <mkasik@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/scribus] epel9: Rebuild for poppler 25.02.0
Date: Wed, 04 Nov 2026 21:42:50 GMT	[thread overview]
Message-ID: <179382857097.1.13379994888177001891.rpms-scribus-1d9e1e846d10@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/scribus
            Branch : epel9
            Commit : 1d9e1e846d108a70929d522abed0d892c377bf06
            Author : Marek Kasik <mkasik@redhat.com>
            Date   : 2025-02-18T13:49:24+01:00
            Stats  : +169/-0 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/scribus/c/1d9e1e846d108a70929d522abed0d892c377bf06?branch=epel9

            Log:
            Rebuild for poppler 25.02.0

Modify patch from Jean Ghali so it apply.

---
diff --git a/scribus-1.6.3-poppler-25.02.0.patch b/scribus-1.6.3-poppler-25.02.0.patch
new file mode 100644
index 0000000..64af51e
--- /dev/null
+++ b/scribus-1.6.3-poppler-25.02.0.patch
@@ -0,0 +1,167 @@
+From 188d030acd0cb71e89dbb57695fe52158b6a0959 Mon Sep 17 00:00:00 2001
+From: Jean Ghali <jghali@libertysurf.fr>
+Date: Tue, 4 Feb 2025 19:29:16 +0000
+Subject: #17405: Fix build error with poppler 25.02.0
+
+git-svn-id: svn://scribus.net/trunk/Scribus@26666 11d20701-8431-0410-a711-e3c959e3b870
+
+--- scribus-1.6.3/scribus/plugins/import/pdf/importpdfconfig.h
++++ scribus-1.6.3/scribus/plugins/import/pdf/importpdfconfig.h
+@@ -27,4 +27,10 @@ for which a new license (GPL+exception)
+ #define POPPLER_CONST_083
+ #endif
+ 
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
++#define POPPLER_CONST_25_02 const
++#else
++#define POPPLER_CONST_25_02
++#endif
++
+ #endif
+--- scribus-1.6.3/scribus/plugins/import/pdf/importpdf.cpp
++++ scribus-1.6.3/scribus/plugins/import/pdf/importpdf.cpp
+@@ -462,11 +462,11 @@ bool PdfPlug::convert(const QString& fn)
+ 
+ 			if (dev->isOk())
+ 			{
+-				OCGs* ocg = pdfDoc->getOptContentConfig();
++				POPPLER_CONST_25_02 OCGs* ocg = pdfDoc->getOptContentConfig();
+ 				if (ocg && ocg->hasOCGs())
+ 				{
+ 					QStringList ocgNames;
+-					Array *order = ocg->getOrderArray();
++					POPPLER_CONST_25_02 Array *order = ocg->getOrderArray();
+ 					if (order)
+ 					{
+ 						for (int i = 0; i < order->getLength (); ++i)
+--- scribus-1.6.3/scribus/plugins/import/pdf/slaoutput.cpp
++++ scribus-1.6.3/scribus/plugins/import/pdf/slaoutput.cpp
+@@ -2932,7 +2932,7 @@ void SlaOutputDev::beginMarkedContent(co
+ 	{
+ 		if (dictRef->isNull())
+ 			return;
+-		OCGs *contentConfig = m_catalog->getOptContentConfig();
++		POPPLER_CONST_25_02 OCGs *contentConfig = m_catalog->getOptContentConfig();
+ 		OptionalContentGroup *oc;
+ 		if (dictRef->isRef())
+ 		{
+@@ -3084,7 +3084,11 @@ void SlaOutputDev::updateFont(GfxState *
+ #if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(22, 4, 0)
+ 	int tmpBufLen = 0;
+ #endif
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
++	std::vector<int> codeToGID;
++#else
+ 	int *codeToGID = nullptr;
++#endif
+ 	const double *textMat = nullptr;
+ 	double m11, m12, m21, m22, fontSize;
+ 	SplashCoord mat[4] = { 1.0, 0.0, 0.0, 1.0 };
+@@ -3244,10 +3248,20 @@ void SlaOutputDev::updateFont(GfxState *
+ 			}
+ 			else
+ 			{
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
++				codeToGID.clear();
++#else
+ 				codeToGID = nullptr;
++#endif
+ 				n = 0;
+ 			}
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
++			if (!(fontFile = m_fontEngine->loadTrueTypeFont(std::move(id), fontsrc, std::move(codeToGID), 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(24, 11, 0)
+ 			if (!(fontFile = m_fontEngine->loadTrueTypeFont(std::move(id), fontsrc, codeToGID, n, fontLoc->fontNum)))
+ 			{
+ 				error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
+@@ -3278,6 +3292,18 @@ void SlaOutputDev::updateFont(GfxState *
+ #endif
+ 			break;
+ 		case fontCIDType0COT:
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
++			if (((GfxCIDFont*) gfxFont)->getCIDToGIDLen() > 0)
++			{
++				codeToGID = ((GfxCIDFont*) gfxFont)->getCIDToGID();
++				n = codeToGID.size();
++			}
++			else
++			{
++				codeToGID.clear();
++				n = 0;
++			}
++#else
+ 			if (((GfxCIDFont *) gfxFont)->getCIDToGID())
+ 			{
+ 				n = ((GfxCIDFont *) gfxFont)->getCIDToGIDLen();
+@@ -3289,7 +3315,15 @@ void SlaOutputDev::updateFont(GfxState *
+ 				codeToGID = nullptr;
+ 				n = 0;
+ 			}
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
++#endif
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
++			if (!(fontFile = m_fontEngine->loadOpenTypeCFFFont(std::move(id), fontsrc, std::move(codeToGID), 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(24, 11, 0)
+ 			if (!(fontFile = m_fontEngine->loadOpenTypeCFFFont(std::move(id), fontsrc, codeToGID, n, fontLoc->fontNum)))
+ 			{
+ 				error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
+@@ -3307,6 +3341,15 @@ void SlaOutputDev::updateFont(GfxState *
+ 			break;
+ 		case fontCIDType2:
+ 		case fontCIDType2OT:
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
++			codeToGID.clear();
++			n = 0;
++			if (((GfxCIDFont*) gfxFont)->getCIDToGIDLen() > 0)
++			{
++				codeToGID = ((GfxCIDFont*) gfxFont)->getCIDToGID();
++				n = codeToGID.size();
++			}
++#else
+ 			codeToGID = nullptr;
+ 			n = 0;
+ 			if (((GfxCIDFont *) gfxFont)->getCIDToGID())
+@@ -3318,6 +3361,7 @@ void SlaOutputDev::updateFont(GfxState *
+ 					memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(), n * sizeof(*codeToGID));
+ 				}
+ 			}
++#endif
+ 			else
+ 			{
+ #if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
+@@ -3339,14 +3383,24 @@ void SlaOutputDev::updateFont(GfxState *
+ 				if (! ff)
+ 					goto err2;
+ #if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
++				codeToGID = ((GfxCIDFont*) gfxFont)->getCodeToGIDMap(ff.get());
++#else
+ 				codeToGID = ((GfxCIDFont*) gfxFont)->getCodeToGIDMap(ff.get(), &n);
++#endif
+ 				ff.reset();
+ #else
+ 				codeToGID = ((GfxCIDFont *)gfxFont)->getCodeToGIDMap(ff, &n);
+ 				delete ff;
+ #endif
+ 			}
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
++			if (!(fontFile = m_fontEngine->loadTrueTypeFont(std::move(id), fontsrc, std::move(codeToGID), 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(24, 11, 0)
+ 			if (!(fontFile = m_fontEngine->loadTrueTypeFont(std::move(id), fontsrc, codeToGID, n, fontLoc->fontNum)))
+ 			{
+ 				error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");

diff --git a/scribus.spec b/scribus.spec
index 32661f2..759ea5c 100644
--- a/scribus.spec
+++ b/scribus.spec
@@ -14,6 +14,8 @@ 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
 
+Patch0:         scribus-1.6.3-poppler-25.02.0.patch
+
 BuildRequires:  boost-devel
 BuildRequires:  cmake
 BuildRequires:  cups-devel

                 reply	other threads:[~2026-11-04 21:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179382857097.1.13379994888177001891.rpms-scribus-1d9e1e846d10@fedoraproject.org \
    --to=mkasik@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox