From d3c7d3e5f9607edef1a795ccc502ab3eb3121165 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 14 Nov 2024 03:02:32 +0000 Subject: gentoo auto-resync : 14:11:2024 - 03:02:32 --- app-office/scribus/Manifest | 5 +- .../files/scribus-1.6.2-poppler-24.11.0-1.patch | 277 +++++++++++++++++++++ .../files/scribus-1.6.2-poppler-24.11.0-2.patch | 42 ++++ .../files/scribus-1.6.2-poppler-24.11.0.patch | 277 --------------------- app-office/scribus/scribus-1.6.2.ebuild | 3 +- 5 files changed, 324 insertions(+), 280 deletions(-) create mode 100644 app-office/scribus/files/scribus-1.6.2-poppler-24.11.0-1.patch create mode 100644 app-office/scribus/files/scribus-1.6.2-poppler-24.11.0-2.patch delete mode 100644 app-office/scribus/files/scribus-1.6.2-poppler-24.11.0.patch (limited to 'app-office/scribus') diff --git a/app-office/scribus/Manifest b/app-office/scribus/Manifest index 92df0219c66e..4c4ffe2a7810 100644 --- a/app-office/scribus/Manifest +++ b/app-office/scribus/Manifest @@ -2,12 +2,13 @@ AUX scribus-1.5.3-fpic.patch 376 BLAKE2B 102f6ca21c96d0b05354bf65c551efde01291c1 AUX scribus-1.5.8-cmake.patch 951 BLAKE2B 7f64fbb7d92974b44946eeee359a87ea3c1564a804765169f0271d5cbdef488b142eec3d057d0367415b665c09ef82ef4da2934b3343e6bf0f0a91abe949bb23 SHA512 340185ac6ae1a0dbb6138ff2d714ba330ce4957864788a5f7786d7f5149abddcda222e5b902bc67c6ed61bf01dd4225eb66ce6abc5e3a672ef2c0586701384e7 AUX scribus-1.6.1-findhyphen.patch 1787 BLAKE2B 28faaa033a876516333ce10f89cc741c56090c53e98b0b9dee44cd05153533b0fd088e178f087f1125365b199385463ae1e07add1a92976e32a8b500d6e2979c SHA512 772ded373a356a679416dcd4f87abaf4b2a47bcf48738a8d40103cadff6eb332381e07bd277c5013c5e112f5b2997b2e9667052b83324960990ce96fa7ec4542 AUX scribus-1.6.2-poppler-24.10.0.patch 5944 BLAKE2B 90c8cce46f3993e2102d2a14d65f932dbde979dd1fa55c40bee6dad5f1f94cdf2de5f6976b6ac3f4e24b34b3b1012152abe597b959a1f3f9030a28d8f4a7bf66 SHA512 5443a35b586ed2f6552bb07ff6bfc1a6fc4177f3bbdc94e3bb09b5977d799b6357cd62ca8f773a6757469eefce6cc3cf38880e4baa47f9f8a858f5dedf4aac51 -AUX scribus-1.6.2-poppler-24.11.0.patch 10980 BLAKE2B fce503d3a018dac6747f7462febe82a2201935e371ec890191692964ecc667800d60c775f9f69941abf3449f0ab23dc3c5084c2ab20e26834b00f44321a7913f SHA512 cff7998296b83123d7ef31844244553774998b5c94bbbfb592ac3495ac0f4fb6588296e6322b68383c06e31c5f6c22386ce309dbf9f3b930c9cae1965386b9ca +AUX scribus-1.6.2-poppler-24.11.0-1.patch 10980 BLAKE2B fce503d3a018dac6747f7462febe82a2201935e371ec890191692964ecc667800d60c775f9f69941abf3449f0ab23dc3c5084c2ab20e26834b00f44321a7913f SHA512 cff7998296b83123d7ef31844244553774998b5c94bbbfb592ac3495ac0f4fb6588296e6322b68383c06e31c5f6c22386ce309dbf9f3b930c9cae1965386b9ca +AUX scribus-1.6.2-poppler-24.11.0-2.patch 1573 BLAKE2B c1f00b8fe437f921aec7e96a7f530445ac39d000c600ca3203c98a98bf2081b19dc4e28b77f3f2dad36d934532f2977931ab4f9a3732889179533a1083cabcea SHA512 716fd00c292051734603bff501d6148411f8efeea87ed3f837cf0b257ead2964261c67ebd00c8837c502f58f809213a2becdcc1c40654fa7262908ae9fd9ad52 AUX scribus-1.7.0-dont-install-thirdparty-license.patch 517 BLAKE2B cba2d9ad7e3b4a028f75dddb8296d8d5fd8f38c6eb91f673db4fda779375ed7f29e266874a66c9ea7d40c6e54908a2c98397072805cfb6c640c6a0a58b1cfd2a SHA512 8a38b5a1254f089f94f0fc8ca8f646e1c1d76a1193b232bb4420639a725f10cc2204d83c42a6a7535347dc7e2486048311e8221cfb445542b32511cedb07142e AUX scribus-1.7.0-findhyphen.patch 1900 BLAKE2B 6d5ef69a889afefa8449e35cdb4348d9cdf3ebe1b110b4de86a35e72e5faae97ae2fbadfe9ae2672a144d7ccea33ea95e0e25f2894f444c3a58a6e1b713aa357 SHA512 cde9231dd4783832340d9dd3df1522d3f5f7a3ab4f26d18ca5825d634d8102e3ca1bae483f0bd111e7e4fff31e5c9154923a9d79eae735a0445b6829e74b5c5f AUX scribus-1.7.0-fix-icon-version.patch 410 BLAKE2B 65d077457d8c85a8830345d7299b054806c16285e75ed4055f14ba4d844a9b0fd4972f0f1eba6ec889af4f460f50522d88722bfa34b123b80f280f2f0e029462 SHA512 230085c17081a33fb900e686e7469b878965c659e10845c39d2c7dc68a11e1f6a01bd614a21a555539c437a567ac8231490da739bfe5c17ef13fed9bd61352e2 DIST scribus-1.6.2.tar.xz 73129400 BLAKE2B 2da98dc322319db18a157f66aef024b7392dbbfaf22adba14f719b48c644d1cc1546cc4d0cccf6dfe479571cf84de6f5645e5d452154f96ddc886e390702d547 SHA512 2f691c1f6b7beada89be410a2936b23641913bf26bd2152974bbaa747aeafb05aa797356a85bd55c14f60f0031ce1addedc9a3ce3e92546ebbb45f96a5ff3e62 -EBUILD scribus-1.6.2.ebuild 4158 BLAKE2B 04ab98dd2165578a38a5e1c6cba1d965dcc5c9e1aaa90d3458f4734a077da06085ad2e951f7cb3f79a75748cd72008e98f6c65eb58a2637b579f6ff2898291d8 SHA512 def82103c8890d80cf8db84884c7e764f1fa5f44493eaaf02ea56c7bcb1fccb821ffc6ca20e2446d4cc79815e87d13aadd392ed769c307eab4a3131c3b8dd9ce +EBUILD scribus-1.6.2.ebuild 4201 BLAKE2B 1e28eb40199277d68579f85d47468acb34b0b5575f11e628ff5edb6a45fca4056f1d8ee9f7f3933cb81e389903498db0d450628443643cc3358116f8e47aa0e6 SHA512 bd3be20c40fd83e5d22154b8c4ceb95cbb212403941f5bbe28eae80191d346e2d512db3fbdf87cac5e932fe0e2a194c8f61b2896ce573e6ef67b385b588386b9 EBUILD scribus-1.6.9999.ebuild 4102 BLAKE2B 5e2a0cd07aae3d44d0439fc55343aede839ef7391e72c9e9dcfb92246f127f58faa1a597c2ff9a3564bc77522f709ceb9e424aa3a61540ce6e569f633104f028 SHA512 85b061e3e87e6d9dcf0c5e025ecc7e2acb533c2e7420bda14d3be53b91e5daa7b6b74f4d5061e74cf9fc22d89eeb7e03be956c2c3aaed5e997a7c6ad090b652f EBUILD scribus-9999.ebuild 3989 BLAKE2B 20bbc3996092f2e2afd085b749fb9d043ce01b4571447edca5498970f2879aa3a3284f282276fc60d0642ea55f0b8609445d8f6e387abe420ebabf768856ae40 SHA512 882a57ab93f56ee6afc81dda58d79b41e9d2035b4a24cc8c70edfc7aeed6b7beba6bb392cd0d751747d58cc66b5ce7dc625b627e172b6335ecbf060383d7b326 MISC metadata.xml 883 BLAKE2B 7dc92ce97a3337f9397b52c647c00313790a8a674c88ba3491ef55b056941d6dcdfe1eac9009c4a5f2c4ebe70d81f9fa27439efad544bf8415ffb2235440402e SHA512 3348ea8be21835e88182c23e21dfaef4f52928aee1f4af1c88707cc3bd3f016d56986f197eec9b26279f4df72f20559fe7f4cad7439e67a66ab2c1b4f585ad91 diff --git a/app-office/scribus/files/scribus-1.6.2-poppler-24.11.0-1.patch b/app-office/scribus/files/scribus-1.6.2-poppler-24.11.0-1.patch new file mode 100644 index 000000000000..c6ad46df633a --- /dev/null +++ b/app-office/scribus/files/scribus-1.6.2-poppler-24.11.0-1.patch @@ -0,0 +1,277 @@ +From 46f78fd4d22f17257ef18fb6c41267ad1185aaa6 Mon Sep 17 00:00:00 2001 +From: Jean Ghali +Date: Sun, 3 Nov 2024 02:07:56 +0000 +Subject: [PATCH 1/3] Fix build with poppler 24.11.0 + +git-svn-id: svn://scribus.net/branches/Version16x/Scribus@26390 11d20701-8431-0410-a711-e3c959e3b870 +--- + scribus/plugins/import/pdf/slaoutput.cpp | 77 +++++++++++++++++++++++- + scribus/plugins/import/pdf/slaoutput.h | 7 +++ + 2 files changed, 82 insertions(+), 2 deletions(-) + +diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp +index 69022014b..a49ef2263 100644 +--- a/scribus/plugins/import/pdf/slaoutput.cpp ++++ b/scribus/plugins/import/pdf/slaoutput.cpp +@@ -3079,7 +3079,11 @@ void SlaOutputDev::updateFont(GfxState *state) + char* tmpBuf = nullptr; + #endif + GfxFontType fontType; ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0) ++ std::unique_ptr id; ++#else + SlaOutFontFileID *id; ++#endif + SplashFontFile *fontFile; + SplashFontSrc *fontsrc = nullptr; + Object refObj, strObj; +@@ -3109,9 +3113,15 @@ void SlaOutputDev::updateFont(GfxState *state) + goto err1; + + // check the font file cache ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0) ++ id.reset(new SlaOutFontFileID(gfxFont->getID())); ++ if ((fontFile = m_fontEngine->getFontFile(*id))) ++ id.reset(); ++#else + id = new SlaOutFontFileID(gfxFont->getID()); + if ((fontFile = m_fontEngine->getFontFile(id))) + delete id; ++#endif + else + { + fontLoc = gfxFont->locateFont(m_xref ? m_xref : m_pdfDoc->getXRef(), nullptr); +@@ -3165,29 +3175,58 @@ void SlaOutputDev::updateFont(GfxState *state) + // load the font file + switch (fontType) { + case fontType1: ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0) ++ if (!(fontFile = m_fontEngine->loadType1Font(std::move(id), 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)"); ++ goto err2; ++ } ++#else + if (!(fontFile = m_fontEngine->loadType1Font(id, fontsrc, (const char **)((Gfx8BitFont *) gfxFont)->getEncoding()))) + { + error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); + goto err2; + } ++#endif + break; + case fontType1C: ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0) ++ if (!(fontFile = m_fontEngine->loadType1CFont(std::move(id), 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)"); ++ goto err2; ++ } ++#else + if (!(fontFile = m_fontEngine->loadType1CFont(id, fontsrc, (const char **)((Gfx8BitFont *) gfxFont)->getEncoding()))) + { + error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); + goto err2; + } ++#endif + break; + case fontType1COT: ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0) ++ if (!(fontFile = m_fontEngine->loadOpenTypeT1CFont(std::move(id), 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)"); ++ goto err2; ++ } ++#else + if (!(fontFile = m_fontEngine->loadOpenTypeT1CFont(id, fontsrc, (const char **)((Gfx8BitFont *) gfxFont)->getEncoding()))) + { + error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); + goto err2; + } ++#endif + break; + case fontTrueType: + case fontTrueTypeOT: +-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0) ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0) ++ if (!fileName.empty()) ++ ff = FoFiTrueType::load(fileName.c_str(), fontLoc->fontNum); ++ else ++ ff = FoFiTrueType::make(fontsrc->buf.data(), fontsrc->buf.size(), fontLoc->fontNum); ++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0) + if (!fileName.empty()) + ff = FoFiTrueType::load(fileName.c_str()); + else +@@ -3214,19 +3253,35 @@ void SlaOutputDev::updateFont(GfxState *state) + codeToGID = nullptr; + n = 0; + } ++#if 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)"); ++ goto err2; ++ } ++#else + if (!(fontFile = m_fontEngine->loadTrueTypeFont(id, fontsrc, codeToGID, n))) + { + error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); + goto err2; + } ++#endif + break; + case fontCIDType0: + case fontCIDType0C: ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0) ++ if (!(fontFile = m_fontEngine->loadCIDFont(std::move(id), fontsrc, fontLoc->fontNum))) ++ { ++ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)"); ++ goto err2; ++ } ++#else + if (!(fontFile = m_fontEngine->loadCIDFont(id, fontsrc))) + { + error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); + goto err2; + } ++#endif + break; + case fontCIDType0COT: + if (((GfxCIDFont *) gfxFont)->getCIDToGID()) +@@ -3240,12 +3295,21 @@ void SlaOutputDev::updateFont(GfxState *state) + codeToGID = nullptr; + n = 0; + } ++#if 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}'", ++ gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)"); ++ goto err2; ++ } ++#else + if (!(fontFile = m_fontEngine->loadOpenTypeCFFFont(id, fontsrc, codeToGID, n))) + { + error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", + gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); + goto err2; + } ++#endif + break; + case fontCIDType2: + case fontCIDType2OT: +@@ -3262,7 +3326,12 @@ void SlaOutputDev::updateFont(GfxState *state) + } + else + { +-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0) ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0) ++ if (!fileName.empty()) ++ ff = FoFiTrueType::load(fileName.c_str(), fontLoc->fontNum); ++ else ++ ff = FoFiTrueType::make(fontsrc->buf.data(), fontsrc->buf.size(), fontLoc->fontNum); ++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0) + if (!fileName.empty()) + ff = FoFiTrueType::load(fileName.c_str()); + else +@@ -3322,7 +3391,11 @@ void SlaOutputDev::updateFont(GfxState *state) + return; + + err2: ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0) ++ id.reset(); ++#else + delete id; ++#endif + #if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(22, 2, 0) + delete fontLoc; + #endif +diff --git a/scribus/plugins/import/pdf/slaoutput.h b/scribus/plugins/import/pdf/slaoutput.h +index 0482a5855..69bebbf5f 100644 +--- a/scribus/plugins/import/pdf/slaoutput.h ++++ b/scribus/plugins/import/pdf/slaoutput.h +@@ -115,10 +115,17 @@ public: + SlaOutFontFileID(const Ref *rA) { r = *rA; } + ~SlaOutFontFileID() {} + ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0) ++ bool matches(const SplashFontFileID& id) const override ++ { ++ return ((const SlaOutFontFileID&) id).r.num == r.num && ((const SlaOutFontFileID&) id).r.gen == r.gen; ++ } ++#else + GBool matches(SplashFontFileID *id) override + { + return ((SlaOutFontFileID*) id)->r.num == r.num && ((SlaOutFontFileID *) id)->r.gen == r.gen; + } ++#endif + + private: + Ref r; +-- +2.47.0 + + +From 0a02f661959d62492695dee6b3538ab2bdf01c91 Mon Sep 17 00:00:00 2001 +From: Jean Ghali +Date: Sun, 3 Nov 2024 02:12:49 +0000 +Subject: [PATCH 2/3] Fix build with poppler 24.11.0 (2) + +git-svn-id: svn://scribus.net/branches/Version16x/Scribus@26391 11d20701-8431-0410-a711-e3c959e3b870 +--- + scribus/plugins/import/pdf/slaoutput.cpp | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp +index a49ef2263..41eaba921 100644 +--- a/scribus/plugins/import/pdf/slaoutput.cpp ++++ b/scribus/plugins/import/pdf/slaoutput.cpp +@@ -3352,11 +3352,19 @@ void SlaOutputDev::updateFont(GfxState *state) + delete ff; + #endif + } ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0) ++ if (!(fontFile = m_fontEngine->loadTrueTypeFont(std::move(id), fontsrc, codeToGID, n, faceIndex))) ++ { ++ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)"); ++ goto err2; ++ } ++#else + if (!(fontFile = m_fontEngine->loadTrueTypeFont(id, fontsrc, codeToGID, n, faceIndex))) + { + error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); + goto err2; + } ++#endif + break; + default: + // this shouldn't happen +-- +2.47.0 + + +From 93db266048e90ca31a9c50ee4696956a93b816ab Mon Sep 17 00:00:00 2001 +From: Jean Ghali +Date: Sun, 3 Nov 2024 02:17:33 +0000 +Subject: [PATCH 3/3] Fix from poppler 24.11.0 SplashOutputDev + +git-svn-id: svn://scribus.net/branches/Version16x/Scribus@26393 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 41eaba921..9724ff72b 100644 +--- a/scribus/plugins/import/pdf/slaoutput.cpp ++++ b/scribus/plugins/import/pdf/slaoutput.cpp +@@ -3353,7 +3353,7 @@ void SlaOutputDev::updateFont(GfxState *state) + #endif + } + #if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0) +- if (!(fontFile = m_fontEngine->loadTrueTypeFont(std::move(id), fontsrc, codeToGID, n, faceIndex))) ++ 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)"); + goto err2; +-- +2.47.0 + diff --git a/app-office/scribus/files/scribus-1.6.2-poppler-24.11.0-2.patch b/app-office/scribus/files/scribus-1.6.2-poppler-24.11.0-2.patch new file mode 100644 index 000000000000..1402ebd8d26e --- /dev/null +++ b/app-office/scribus/files/scribus-1.6.2-poppler-24.11.0-2.patch @@ -0,0 +1,42 @@ +From 874e1c13995223b1433026bc26e13911a74f3880 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner +Date: Wed, 13 Nov 2024 23:19:51 +0100 +Subject: [PATCH] Drop unused headers to fix build w/ poppler-24.11 + +Fix still pending upstream: +https://bugs.scribus.net/view.php?id=17308 + +Signed-off-by: Andreas Sturmlechner +--- + scribus/plugins/import/pdf/pdftextrecognition.h | 1 - + scribus/plugins/import/pdf/slaoutput.h | 2 -- + 2 files changed, 3 deletions(-) + +diff --git a/scribus/plugins/import/pdf/pdftextrecognition.h b/scribus/plugins/import/pdf/pdftextrecognition.h +index a04b45358..6edac9906 100644 +--- a/scribus/plugins/import/pdf/pdftextrecognition.h ++++ b/scribus/plugins/import/pdf/pdftextrecognition.h +@@ -16,7 +16,6 @@ for which a new license (GPL+exception) is in place. + #include "slaoutput.h" + + #include +-#include + + /* PDF TextBox Framework */ + /* +diff --git a/scribus/plugins/import/pdf/slaoutput.h b/scribus/plugins/import/pdf/slaoutput.h +index 69bebbf5f..ae7630d29 100644 +--- a/scribus/plugins/import/pdf/slaoutput.h ++++ b/scribus/plugins/import/pdf/slaoutput.h +@@ -45,8 +45,6 @@ for which a new license (GPL+exception) is in place. + #include + #include + #include +-#include +-#include + #include + #include + #include +-- +2.47.0 + diff --git a/app-office/scribus/files/scribus-1.6.2-poppler-24.11.0.patch b/app-office/scribus/files/scribus-1.6.2-poppler-24.11.0.patch deleted file mode 100644 index c6ad46df633a..000000000000 --- a/app-office/scribus/files/scribus-1.6.2-poppler-24.11.0.patch +++ /dev/null @@ -1,277 +0,0 @@ -From 46f78fd4d22f17257ef18fb6c41267ad1185aaa6 Mon Sep 17 00:00:00 2001 -From: Jean Ghali -Date: Sun, 3 Nov 2024 02:07:56 +0000 -Subject: [PATCH 1/3] Fix build with poppler 24.11.0 - -git-svn-id: svn://scribus.net/branches/Version16x/Scribus@26390 11d20701-8431-0410-a711-e3c959e3b870 ---- - scribus/plugins/import/pdf/slaoutput.cpp | 77 +++++++++++++++++++++++- - scribus/plugins/import/pdf/slaoutput.h | 7 +++ - 2 files changed, 82 insertions(+), 2 deletions(-) - -diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp -index 69022014b..a49ef2263 100644 ---- a/scribus/plugins/import/pdf/slaoutput.cpp -+++ b/scribus/plugins/import/pdf/slaoutput.cpp -@@ -3079,7 +3079,11 @@ void SlaOutputDev::updateFont(GfxState *state) - char* tmpBuf = nullptr; - #endif - GfxFontType fontType; -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0) -+ std::unique_ptr id; -+#else - SlaOutFontFileID *id; -+#endif - SplashFontFile *fontFile; - SplashFontSrc *fontsrc = nullptr; - Object refObj, strObj; -@@ -3109,9 +3113,15 @@ void SlaOutputDev::updateFont(GfxState *state) - goto err1; - - // check the font file cache -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0) -+ id.reset(new SlaOutFontFileID(gfxFont->getID())); -+ if ((fontFile = m_fontEngine->getFontFile(*id))) -+ id.reset(); -+#else - id = new SlaOutFontFileID(gfxFont->getID()); - if ((fontFile = m_fontEngine->getFontFile(id))) - delete id; -+#endif - else - { - fontLoc = gfxFont->locateFont(m_xref ? m_xref : m_pdfDoc->getXRef(), nullptr); -@@ -3165,29 +3175,58 @@ void SlaOutputDev::updateFont(GfxState *state) - // load the font file - switch (fontType) { - case fontType1: -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0) -+ if (!(fontFile = m_fontEngine->loadType1Font(std::move(id), 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)"); -+ goto err2; -+ } -+#else - if (!(fontFile = m_fontEngine->loadType1Font(id, fontsrc, (const char **)((Gfx8BitFont *) gfxFont)->getEncoding()))) - { - error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); - goto err2; - } -+#endif - break; - case fontType1C: -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0) -+ if (!(fontFile = m_fontEngine->loadType1CFont(std::move(id), 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)"); -+ goto err2; -+ } -+#else - if (!(fontFile = m_fontEngine->loadType1CFont(id, fontsrc, (const char **)((Gfx8BitFont *) gfxFont)->getEncoding()))) - { - error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); - goto err2; - } -+#endif - break; - case fontType1COT: -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0) -+ if (!(fontFile = m_fontEngine->loadOpenTypeT1CFont(std::move(id), 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)"); -+ goto err2; -+ } -+#else - if (!(fontFile = m_fontEngine->loadOpenTypeT1CFont(id, fontsrc, (const char **)((Gfx8BitFont *) gfxFont)->getEncoding()))) - { - error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); - goto err2; - } -+#endif - break; - case fontTrueType: - case fontTrueTypeOT: --#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0) -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0) -+ if (!fileName.empty()) -+ ff = FoFiTrueType::load(fileName.c_str(), fontLoc->fontNum); -+ else -+ ff = FoFiTrueType::make(fontsrc->buf.data(), fontsrc->buf.size(), fontLoc->fontNum); -+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0) - if (!fileName.empty()) - ff = FoFiTrueType::load(fileName.c_str()); - else -@@ -3214,19 +3253,35 @@ void SlaOutputDev::updateFont(GfxState *state) - codeToGID = nullptr; - n = 0; - } -+#if 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)"); -+ goto err2; -+ } -+#else - if (!(fontFile = m_fontEngine->loadTrueTypeFont(id, fontsrc, codeToGID, n))) - { - error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); - goto err2; - } -+#endif - break; - case fontCIDType0: - case fontCIDType0C: -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0) -+ if (!(fontFile = m_fontEngine->loadCIDFont(std::move(id), fontsrc, fontLoc->fontNum))) -+ { -+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)"); -+ goto err2; -+ } -+#else - if (!(fontFile = m_fontEngine->loadCIDFont(id, fontsrc))) - { - error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); - goto err2; - } -+#endif - break; - case fontCIDType0COT: - if (((GfxCIDFont *) gfxFont)->getCIDToGID()) -@@ -3240,12 +3295,21 @@ void SlaOutputDev::updateFont(GfxState *state) - codeToGID = nullptr; - n = 0; - } -+#if 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}'", -+ gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)"); -+ goto err2; -+ } -+#else - if (!(fontFile = m_fontEngine->loadOpenTypeCFFFont(id, fontsrc, codeToGID, n))) - { - error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", - gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); - goto err2; - } -+#endif - break; - case fontCIDType2: - case fontCIDType2OT: -@@ -3262,7 +3326,12 @@ void SlaOutputDev::updateFont(GfxState *state) - } - else - { --#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0) -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0) -+ if (!fileName.empty()) -+ ff = FoFiTrueType::load(fileName.c_str(), fontLoc->fontNum); -+ else -+ ff = FoFiTrueType::make(fontsrc->buf.data(), fontsrc->buf.size(), fontLoc->fontNum); -+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0) - if (!fileName.empty()) - ff = FoFiTrueType::load(fileName.c_str()); - else -@@ -3322,7 +3391,11 @@ void SlaOutputDev::updateFont(GfxState *state) - return; - - err2: -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0) -+ id.reset(); -+#else - delete id; -+#endif - #if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(22, 2, 0) - delete fontLoc; - #endif -diff --git a/scribus/plugins/import/pdf/slaoutput.h b/scribus/plugins/import/pdf/slaoutput.h -index 0482a5855..69bebbf5f 100644 ---- a/scribus/plugins/import/pdf/slaoutput.h -+++ b/scribus/plugins/import/pdf/slaoutput.h -@@ -115,10 +115,17 @@ public: - SlaOutFontFileID(const Ref *rA) { r = *rA; } - ~SlaOutFontFileID() {} - -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0) -+ bool matches(const SplashFontFileID& id) const override -+ { -+ return ((const SlaOutFontFileID&) id).r.num == r.num && ((const SlaOutFontFileID&) id).r.gen == r.gen; -+ } -+#else - GBool matches(SplashFontFileID *id) override - { - return ((SlaOutFontFileID*) id)->r.num == r.num && ((SlaOutFontFileID *) id)->r.gen == r.gen; - } -+#endif - - private: - Ref r; --- -2.47.0 - - -From 0a02f661959d62492695dee6b3538ab2bdf01c91 Mon Sep 17 00:00:00 2001 -From: Jean Ghali -Date: Sun, 3 Nov 2024 02:12:49 +0000 -Subject: [PATCH 2/3] Fix build with poppler 24.11.0 (2) - -git-svn-id: svn://scribus.net/branches/Version16x/Scribus@26391 11d20701-8431-0410-a711-e3c959e3b870 ---- - scribus/plugins/import/pdf/slaoutput.cpp | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp -index a49ef2263..41eaba921 100644 ---- a/scribus/plugins/import/pdf/slaoutput.cpp -+++ b/scribus/plugins/import/pdf/slaoutput.cpp -@@ -3352,11 +3352,19 @@ void SlaOutputDev::updateFont(GfxState *state) - delete ff; - #endif - } -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0) -+ if (!(fontFile = m_fontEngine->loadTrueTypeFont(std::move(id), fontsrc, codeToGID, n, faceIndex))) -+ { -+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)"); -+ goto err2; -+ } -+#else - if (!(fontFile = m_fontEngine->loadTrueTypeFont(id, fontsrc, codeToGID, n, faceIndex))) - { - error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); - goto err2; - } -+#endif - break; - default: - // this shouldn't happen --- -2.47.0 - - -From 93db266048e90ca31a9c50ee4696956a93b816ab Mon Sep 17 00:00:00 2001 -From: Jean Ghali -Date: Sun, 3 Nov 2024 02:17:33 +0000 -Subject: [PATCH 3/3] Fix from poppler 24.11.0 SplashOutputDev - -git-svn-id: svn://scribus.net/branches/Version16x/Scribus@26393 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 41eaba921..9724ff72b 100644 ---- a/scribus/plugins/import/pdf/slaoutput.cpp -+++ b/scribus/plugins/import/pdf/slaoutput.cpp -@@ -3353,7 +3353,7 @@ void SlaOutputDev::updateFont(GfxState *state) - #endif - } - #if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0) -- if (!(fontFile = m_fontEngine->loadTrueTypeFont(std::move(id), fontsrc, codeToGID, n, faceIndex))) -+ 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)"); - goto err2; --- -2.47.0 - diff --git a/app-office/scribus/scribus-1.6.2.ebuild b/app-office/scribus/scribus-1.6.2.ebuild index 753044e56f3c..71b32025e6fc 100644 --- a/app-office/scribus/scribus-1.6.2.ebuild +++ b/app-office/scribus/scribus-1.6.2.ebuild @@ -83,7 +83,8 @@ 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-24.{10,11}.0.patch # bug 941932 + "${FILESDIR}"/${P}-poppler-24.10.0.patch # bug 941932 + "${FILESDIR}"/${P}-poppler-24.11.0-{1,2}.patch ) src_prepare() { -- cgit v1.2.3