diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-11-04 03:03:54 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-11-04 03:03:54 +0000 |
commit | 3cc82055be7dba177f4aea15af9f5414b532da7e (patch) | |
tree | 1eed8bbe7a93b3a0a7d6091ead40e81519978a38 /app-office/scribus | |
parent | 212000bb5eabdfeb9a6e7a9b8f28e2740cae555a (diff) |
gentoo auto-resync : 04:11:2024 - 03:03:54
Diffstat (limited to 'app-office/scribus')
-rw-r--r-- | app-office/scribus/Manifest | 4 | ||||
-rw-r--r-- | app-office/scribus/files/scribus-1.6.2-poppler-24.10.0.patch | 178 | ||||
-rw-r--r-- | app-office/scribus/files/scribus-1.6.2-poppler-24.11.0.patch | 277 | ||||
-rw-r--r-- | app-office/scribus/scribus-1.6.2.ebuild | 1 |
4 files changed, 459 insertions, 1 deletions
diff --git a/app-office/scribus/Manifest b/app-office/scribus/Manifest index 401265b1ef93..92df0219c66e 100644 --- a/app-office/scribus/Manifest +++ b/app-office/scribus/Manifest @@ -1,11 +1,13 @@ AUX scribus-1.5.3-fpic.patch 376 BLAKE2B 102f6ca21c96d0b05354bf65c551efde01291c1b878db27e24ee8680eca6bebc9e402b19d62fe2001ed5dfc46ca11c3b3450816a017c942ba848bd43476628fc SHA512 531c3697983adbdeef4959c44a89ccf5e3802f2b1e64a65a63747a659cb808a08095d7592e6f8974e3e0e16ad913ba05bd3f3fe9c9fbd0a50463fd8df6f47d34 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.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 4098 BLAKE2B 00da5a091ba9a730846d9be6dbaa714992c453ac6fec9f50a2f98ae3d643db748e4c76a197dfa1ecfd52b75ba693cf30bdd25b35b57300268f907a6e1de0b76d SHA512 92172501c4807a70ac4d83792240f68fca088bd3f335c06fc2cceffbaa099aa40b2a1e10c72b2fc52ba9157c465ac51ccdc4f7f1eb38092bae3a13da46539cf1 +EBUILD scribus-1.6.2.ebuild 4158 BLAKE2B 04ab98dd2165578a38a5e1c6cba1d965dcc5c9e1aaa90d3458f4734a077da06085ad2e951f7cb3f79a75748cd72008e98f6c65eb58a2637b579f6ff2898291d8 SHA512 def82103c8890d80cf8db84884c7e764f1fa5f44493eaaf02ea56c7bcb1fccb821ffc6ca20e2446d4cc79815e87d13aadd392ed769c307eab4a3131c3b8dd9ce 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.10.0.patch b/app-office/scribus/files/scribus-1.6.2-poppler-24.10.0.patch new file mode 100644 index 000000000000..230af10ea007 --- /dev/null +++ b/app-office/scribus/files/scribus-1.6.2-poppler-24.10.0.patch @@ -0,0 +1,178 @@ +From 09e6d8cd005fd36811998bbc8c9de3a019c7b8fb Mon Sep 17 00:00:00 2001 +From: Jean Ghali <jghali@libertysurf.fr> +Date: Tue, 15 Oct 2024 21:09:31 +0000 +Subject: [PATCH 1/2] Fix build with poppler 24.10.0 + +git-svn-id: svn://scribus.net/branches/Version16x/Scribus@26324 11d20701-8431-0410-a711-e3c959e3b870 +--- + scribus/plugins/import/pdf/slaoutput.cpp | 34 ++++++++++++++++++++++++ + scribus/plugins/import/pdf/slaoutput.h | 6 ++++- + 2 files changed, 39 insertions(+), 1 deletion(-) + +diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp +index c002a886a..dfabf7039 100644 +--- a/scribus/plugins/import/pdf/slaoutput.cpp ++++ b/scribus/plugins/import/pdf/slaoutput.cpp +@@ -81,6 +81,8 @@ namespace + }
+ }
+
++#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(24, 10, 0)
++
+ LinkSubmitForm::LinkSubmitForm(Object *actionObj)
+ {
+ if (!actionObj->isDict())
+@@ -111,6 +113,8 @@ LinkSubmitForm::~LinkSubmitForm() + delete fileName;
+ }
+
++#endif
++
+ LinkImportData::LinkImportData(Object *actionObj)
+ {
+ if (!actionObj->isDict())
+@@ -1078,6 +1082,32 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano) + }
+ }
+ }
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 89, 0)
++ else if (Lact->getKind() == actionResetForm)
++ {
++ ite->annotation().setActionType(4);
++ }
++#endif
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 10, 0)
++ else if (Lact->getKind() == actionSubmitForm)
++ {
++ const auto* impo = (LinkSubmitForm*) Lact;
++ if (impo->isOk())
++ {
++ ite->annotation().setActionType(3);
++ ite->annotation().setAction(UnicodeParsedString(impo->getUrl()));
++ int fl = impo->getFlags();
++ if (fl == 0)
++ ite->annotation().setHTML(0);
++ else if (fl == 4)
++ ite->annotation().setHTML(1);
++ else if (fl == 64)
++ ite->annotation().setHTML(2);
++ else if (fl == 512)
++ ite->annotation().setHTML(3);
++ }
++ }
++#endif
+ else if (Lact->getKind() == actionUnknown)
+ {
+ auto *uno = (LinkUnknown*) Lact;
+@@ -1106,7 +1136,11 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano) + if (impo->isOk())
+ {
+ ite->annotation().setActionType(3);
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 10, 0)
++ ite->annotation().setAction(UnicodeParsedString(impo->getUrl()));
++#else
+ ite->annotation().setAction(UnicodeParsedString(impo->getFileName()));
++#endif
+ int fl = impo->getFlags();
+ if (fl == 0)
+ ite->annotation().setHTML(0);
+diff --git a/scribus/plugins/import/pdf/slaoutput.h b/scribus/plugins/import/pdf/slaoutput.h +index 35de565b0..90a745972 100644 +--- a/scribus/plugins/import/pdf/slaoutput.h ++++ b/scribus/plugins/import/pdf/slaoutput.h +@@ -56,9 +56,11 @@ for which a new license (GPL+exception) is in place. + #include <poppler/splash/SplashGlyphBitmap.h>
+
+ //------------------------------------------------------------------------
+-// LinkSubmitData
++// LinkSubmitForm
+ //------------------------------------------------------------------------
+
++#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(24, 10, 0)
++
+ class LinkSubmitForm: public LinkAction
+ {
+ public:
+@@ -79,6 +81,8 @@ private: + int m_flags {0};
+ };
+
++#endif
++
+ //------------------------------------------------------------------------
+ // LinkImportData
+ //------------------------------------------------------------------------
+-- +2.47.0 + + +From 6b80de8425a5b6b3e8c170b4a99cb4c5e0d85789 Mon Sep 17 00:00:00 2001 +From: Jean Ghali <jghali@libertysurf.fr> +Date: Tue, 15 Oct 2024 21:15:36 +0000 +Subject: [PATCH 2/2] Simplify build fix for poppler 24.10.0 + +git-svn-id: svn://scribus.net/branches/Version16x/Scribus@26326 11d20701-8431-0410-a711-e3c959e3b870 +--- + scribus/plugins/import/pdf/slaoutput.cpp | 8 ++------ + scribus/plugins/import/pdf/slaoutput.h | 6 +++--- + 2 files changed, 5 insertions(+), 9 deletions(-) + +diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp +index dfabf7039..69022014b 100644 +--- a/scribus/plugins/import/pdf/slaoutput.cpp ++++ b/scribus/plugins/import/pdf/slaoutput.cpp +@@ -99,7 +99,7 @@ LinkSubmitForm::LinkSubmitForm(Object *actionObj) + {
+ Object obj2 = obj1.dictLookup("F");
+ if (!obj2.isNull())
+- fileName = obj2.getString()->copy();
++ m_url = obj2.getString()->copy();
+ }
+ }
+ }
+@@ -110,7 +110,7 @@ LinkSubmitForm::LinkSubmitForm(Object *actionObj) +
+ LinkSubmitForm::~LinkSubmitForm()
+ {
+- delete fileName;
++ delete m_url;
+ }
+
+ #endif
+@@ -1136,11 +1136,7 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano) + if (impo->isOk())
+ {
+ ite->annotation().setActionType(3);
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 10, 0)
+ ite->annotation().setAction(UnicodeParsedString(impo->getUrl()));
+-#else
+- ite->annotation().setAction(UnicodeParsedString(impo->getFileName()));
+-#endif
+ int fl = impo->getFlags();
+ if (fl == 0)
+ ite->annotation().setHTML(0);
+diff --git a/scribus/plugins/import/pdf/slaoutput.h b/scribus/plugins/import/pdf/slaoutput.h +index 90a745972..0482a5855 100644 +--- a/scribus/plugins/import/pdf/slaoutput.h ++++ b/scribus/plugins/import/pdf/slaoutput.h +@@ -70,14 +70,14 @@ public: + virtual ~LinkSubmitForm();
+
+ // Was the LinkImportData created successfully?
+- GBool isOk() POPPLER_CONST override { return fileName != nullptr; }
++ GBool isOk() POPPLER_CONST override { return m_url != nullptr; }
+ // Accessors.
+ LinkActionKind getKind() POPPLER_CONST override { return actionUnknown; }
+- GooString *getFileName() { return fileName; }
++ GooString *getUrl() { return m_url; }
+ int getFlags() { return m_flags; }
+
+ private:
+- GooString *fileName {nullptr}; // file name
++ GooString *m_url {nullptr}; // URL
+ int m_flags {0};
+ };
+
+-- +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 new file mode 100644 index 000000000000..c6ad46df633a --- /dev/null +++ b/app-office/scribus/files/scribus-1.6.2-poppler-24.11.0.patch @@ -0,0 +1,277 @@ +From 46f78fd4d22f17257ef18fb6c41267ad1185aaa6 Mon Sep 17 00:00:00 2001 +From: Jean Ghali <jghali@libertysurf.fr> +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<SlaOutFontFileID> 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 <jghali@libertysurf.fr> +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 <jghali@libertysurf.fr> +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 764455f39f70..753044e56f3c 100644 --- a/app-office/scribus/scribus-1.6.2.ebuild +++ b/app-office/scribus/scribus-1.6.2.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-24.{10,11}.0.patch # bug 941932 ) src_prepare() { |