From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-office/scribus/files/, app-office/scribus/
Date: Fri, 07 Mar 2025 13:16:22 +0000 (UTC) [thread overview]
Message-ID: <1741353368.c4dffa52a89a3614a5bc0401576d3ee7769e6f78.asturm@gentoo> (raw)
commit: c4dffa52a89a3614a5bc0401576d3ee7769e6f78
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 7 13:11:14 2025 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri Mar 7 13:16:08 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4dffa52
app-office/scribus: Fix build w/ >=app-text/poppler-25.02.0
Bug: https://bugs.gentoo.org/949396
Bug: https://bugs.gentoo.org/950281
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
.../files/scribus-1.6.3-poppler-25.02.0.patch | 186 +++++++++++++++++++++
app-office/scribus/scribus-1.6.3.ebuild | 1 +
2 files changed, 187 insertions(+)
diff --git a/app-office/scribus/files/scribus-1.6.3-poppler-25.02.0.patch b/app-office/scribus/files/scribus-1.6.3-poppler-25.02.0.patch
new file mode 100644
index 000000000000..d933e5bbde0a
--- /dev/null
+++ b/app-office/scribus/files/scribus-1.6.3-poppler-25.02.0.patch
@@ -0,0 +1,186 @@
+Index: Scribus/scribus/plugins/import/pdf/importpdf.cpp
+===================================================================
+--- Scribus/scribus/plugins/import/pdf/importpdf.cpp (revision 26663)
++++ Scribus/scribus/plugins/import/pdf/importpdf.cpp (revision 26668)
+@@ -462,11 +462,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 26663)
++++ Scribus/scribus/plugins/import/pdf/importpdfconfig.h (revision 26668)
+@@ -27,4 +27,10 @@
+ #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
+Index: Scribus/scribus/plugins/import/pdf/slaoutput.cpp
+===================================================================
+--- Scribus/scribus/plugins/import/pdf/slaoutput.cpp (revision 26663)
++++ Scribus/scribus/plugins/import/pdf/slaoutput.cpp (revision 26668)
+@@ -1685,7 +1685,7 @@
+
+ auto& graphicState = m_graphicStack.top();
+ graphicState.strokeColor = getColor(state->getStrokeColorSpace(), state->getStrokeColor(), &graphicState.strokeShade);
+-
++
+ QString output = convertPath(state->getPath());
+ if ((m_Elements->count() != 0) && (output == m_coords)) // Path is the same as in last fill
+ {
+@@ -2393,8 +2393,9 @@
+ #endif
+ m_graphicStack.top().clipPath = savedClip;
+ m_inPattern--;
++ m_doc->m_Selection->clear();
++
+ gElements = m_groupStack.pop();
+- m_doc->m_Selection->clear();
+ if (gElements.Items.count() > 0)
+ {
+ for (int dre = 0; dre < gElements.Items.count(); ++dre)
+@@ -2932,7 +2933,7 @@
+ {
+ 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 +3085,11 @@
+ #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 +3249,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)");
+@@ -3278,6 +3293,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();
+@@ -3289,7 +3316,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}'",
+@@ -3307,6 +3342,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())
+@@ -3318,6 +3362,7 @@
+ memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(), n * sizeof(*codeToGID));
+ }
+ }
++#endif
+ else
+ {
+ #if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
+@@ -3338,7 +3383,9 @@
+ #endif
+ 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());
++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
+ codeToGID = ((GfxCIDFont*) gfxFont)->getCodeToGIDMap(ff.get(), &n);
+ ff.reset();
+ #else
+@@ -3346,7 +3393,13 @@
+ 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/app-office/scribus/scribus-1.6.3.ebuild b/app-office/scribus/scribus-1.6.3.ebuild
index 641ff2870f37..01029511526a 100644
--- a/app-office/scribus/scribus-1.6.3.ebuild
+++ b/app-office/scribus/scribus-1.6.3.ebuild
@@ -83,6 +83,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.5.3-fpic.patch
"${FILESDIR}"/${PN}-1.6.1-findhyphen.patch
"${FILESDIR}"/${PN}-1.7.0-fix-icon-version.patch
+ "${FILESDIR}"/${P}-poppler-25.02.0.patch # Version16x branch
)
src_prepare() {
next reply other threads:[~2025-03-07 13:16 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-07 13:16 Andreas Sturmlechner [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-09-05 18:59 [gentoo-commits] repo/gentoo:master commit in: app-office/scribus/files/, app-office/scribus/ Andreas Sturmlechner
2025-09-03 16:15 Andreas Sturmlechner
2025-07-08 16:03 Andreas Sturmlechner
2024-11-03 20:36 Andreas Sturmlechner
2024-06-03 17:36 Miroslav Šulc
2024-05-22 7:39 Miroslav Šulc
2024-05-14 17:25 Andreas Sturmlechner
2024-03-04 22:18 Andreas Sturmlechner
2024-01-14 10:24 Miroslav Šulc
2024-01-14 9:38 Miroslav Šulc
2024-01-01 9:30 Miroslav Šulc
2023-03-17 6:52 Miroslav Šulc
2023-02-06 10:36 Andreas Sturmlechner
2022-03-27 6:05 Miroslav Šulc
2022-02-10 19:38 Miroslav Šulc
2021-10-09 19:38 Sam James
2021-05-30 10:45 Miroslav Šulc
2021-03-07 1:30 Andreas Sturmlechner
2020-07-18 8:41 Andreas Sturmlechner
2020-05-30 9:31 Andreas Sturmlechner
2020-04-07 7:49 Andreas Sturmlechner
2019-12-29 11:54 Andreas Sturmlechner
2019-11-08 20:13 Andreas Sturmlechner
2019-10-01 23:43 Andreas Sturmlechner
2019-08-16 8:52 Miroslav Šulc
2019-06-23 16:44 Miroslav Šulc
2018-06-20 16:31 Andreas Sturmlechner
2018-05-10 15:55 Andreas Sturmlechner
2018-03-13 22:50 Andreas Sturmlechner
2018-01-09 13:46 Andreas Sturmlechner
2017-12-20 21:34 Justin Lecher
2016-11-06 8:25 Justin Lecher
2016-10-23 20:25 Justin Lecher
2016-09-27 18:50 Michael Weber
2015-10-19 12:06 Justin Lecher
2015-10-16 13:04 Justin Lecher
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=1741353368.c4dffa52a89a3614a5bc0401576d3ee7769e6f78.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