public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-office/scribus/, app-office/scribus/files/
Date: Mon, 10 Feb 2025 20:11:55 +0000 (UTC)	[thread overview]
Message-ID: <1739218297.97d8345d581f542c0b7c4903de1c7b777cb32d49.asturm@gentoo> (raw)

commit:     97d8345d581f542c0b7c4903de1c7b777cb32d49
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 10 20:06:21 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Feb 10 20:11:37 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=97d8345d

app-office/scribus: Fix build w/ >=pp-text/poppler-25.02.0

Closes: https://bugs.gentoo.org/949396
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/scribus-1.7.0-poppler-25.02.0.patch      | 162 +++++++++++++++++++++
 app-office/scribus/scribus-1.7.0.ebuild            |   1 +
 2 files changed, 163 insertions(+)

diff --git a/app-office/scribus/files/scribus-1.7.0-poppler-25.02.0.patch b/app-office/scribus/files/scribus-1.7.0-poppler-25.02.0.patch
new file mode 100644
index 000000000000..288f42ae3c53
--- /dev/null
+++ b/app-office/scribus/files/scribus-1.7.0-poppler-25.02.0.patch
@@ -0,0 +1,162 @@
+Index: Scribus/scribus/plugins/import/pdf/importpdf.cpp
+===================================================================
+--- Scribus/scribus/plugins/import/pdf/importpdf.cpp	(revision 26665)
++++ Scribus/scribus/plugins/import/pdf/importpdf.cpp	(revision 26666)
+@@ -416,11 +416,11 @@
+ 
+ 			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)
+Index: Scribus/scribus/plugins/import/pdf/importpdfconfig.h
+===================================================================
+--- Scribus/scribus/plugins/import/pdf/importpdfconfig.h	(revision 26665)
++++ Scribus/scribus/plugins/import/pdf/importpdfconfig.h	(revision 26666)
+@@ -15,4 +15,10 @@
+ 	+ ((micro) *     1))
+ #define POPPLER_ENCODED_VERSION POPPLER_VERSION_ENCODE(POPPLER_VERSION_MAJOR, POPPLER_VERSION_MINOR, POPPLER_VERSION_MICRO)
+ 
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
++#define POPPLER_CONST_25_02 const
++#else
++#define POPPLER_CONST_25_02
+ #endif
++
++#endif
+Index: Scribus/scribus/plugins/import/pdf/slaoutput.cpp
+===================================================================
+--- Scribus/scribus/plugins/import/pdf/slaoutput.cpp	(revision 26665)
++++ Scribus/scribus/plugins/import/pdf/slaoutput.cpp	(revision 26666)
+@@ -2791,7 +2791,7 @@
+ 	{
+ 		if (dictRef->isNull())
+ 			return;
+-		OCGs *contentConfig = m_catalog->getOptContentConfig();
++		POPPLER_CONST_25_02 OCGs *contentConfig = m_catalog->getOptContentConfig();
+ 		OptionalContentGroup *oc;
+ 		if (dictRef->isRef())
+ 		{
+@@ -2928,7 +2928,11 @@
+ 	SplashFontFile *fontFile;
+ 	SplashFontSrc *fontsrc = nullptr;
+ 	Object refObj, strObj;
++#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 };
+@@ -3055,10 +3059,20 @@
+ 			}
+ 			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)");
+@@ -3089,6 +3103,18 @@
+ #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();
+@@ -3100,7 +3126,15 @@
+ 				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}'",
+@@ -3118,6 +3152,15 @@
+ 			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())
+@@ -3129,6 +3172,7 @@
+ 					memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(), n * sizeof(*codeToGID));
+ 				}
+ 			}
++#endif
+ 			else
+ 			{
+ #if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
+@@ -3144,10 +3188,20 @@
+ #endif
+ 				if (! ff)
+ 					goto err2;
++#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();
+ 			}
+-#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/app-office/scribus/scribus-1.7.0.ebuild b/app-office/scribus/scribus-1.7.0.ebuild
index fe52e9c32325..11ecb660fcc5 100644
--- a/app-office/scribus/scribus-1.7.0.ebuild
+++ b/app-office/scribus/scribus-1.7.0.ebuild
@@ -80,6 +80,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-1.7.0-findhyphen.patch
 	"${FILESDIR}"/${PN}-1.7.0-dont-install-thirdparty-license.patch
 	"${FILESDIR}"/${PN}-1.7.0-fix-icon-version.patch
+	"${FILESDIR}"/${P}-poppler-25.02.0.patch # from trunk
 )
 
 src_prepare() {


             reply	other threads:[~2025-02-10 20:11 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-10 20:11 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-03-07 13:16 [gentoo-commits] repo/gentoo:master commit in: app-office/scribus/, app-office/scribus/files/ Andreas Sturmlechner
2024-11-13 22:45 Andreas Sturmlechner
2024-07-18  8:44 Miroslav Šulc
2024-06-04 10:35 Miroslav Šulc
2024-03-04 10:29 Miroslav Šulc
2024-01-14  9:30 Miroslav Šulc
2023-09-24  8:02 Miroslav Šulc
2022-09-02  4:38 Sam James
2022-05-08 18:01 Sam James
2022-03-12 15:53 Andreas Sturmlechner
2022-01-14  4:48 Ionen Wolkens
2021-08-25 10:54 Miroslav Šulc
2021-04-06 12:30 Miroslav Šulc
2020-01-02 20:26 Andreas Sturmlechner
2019-12-07  9:47 Andreas Sturmlechner
2019-11-01 18:39 Andreas Sturmlechner
2019-01-25  0:00 Andreas Sturmlechner
2019-01-14 23:34 Andreas Sturmlechner
2018-03-19 23:56 Andreas Sturmlechner
2017-12-26  1:02 Andreas Sturmlechner
2017-06-04 11:54 Justin Lecher
2017-06-04 11:49 Justin Lecher
2016-12-06  9:32 Miroslav Šulc

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=1739218297.97d8345d581f542c0b7c4903de1c7b777cb32d49.asturm@gentoo \
    --to=asturm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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