diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2022-03-07 17:40:35 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2022-03-12 16:52:46 +0100 |
commit | cad26fcc1480486168769f7838611a15c83b29bc (patch) | |
tree | 58835cb247cd8cefc301b160eeca26b2ed798930 /app-office/scribus | |
parent | media-gfx/digikam: Drop 7.4.0-r1 (diff) | |
download | gentoo-cad26fcc1480486168769f7838611a15c83b29bc.tar.gz gentoo-cad26fcc1480486168769f7838611a15c83b29bc.tar.bz2 gentoo-cad26fcc1480486168769f7838611a15c83b29bc.zip |
app-office/scribus: Fix build with >=app-text/poppler-22.03.0
Closes: https://bugs.gentoo.org/834537
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'app-office/scribus')
-rw-r--r-- | app-office/scribus/files/scribus-1.5.8-poppler-22.03.0.patch | 52 | ||||
-rw-r--r-- | app-office/scribus/scribus-1.5.8.ebuild | 1 |
2 files changed, 53 insertions, 0 deletions
diff --git a/app-office/scribus/files/scribus-1.5.8-poppler-22.03.0.patch b/app-office/scribus/files/scribus-1.5.8-poppler-22.03.0.patch new file mode 100644 index 000000000000..f7a0c03fdd96 --- /dev/null +++ b/app-office/scribus/files/scribus-1.5.8-poppler-22.03.0.patch @@ -0,0 +1,52 @@ +From f19410ac3b27e33dd62105746784e61e85b90a1d Mon Sep 17 00:00:00 2001 +From: Jean Ghali <jghali@libertysurf.fr> +Date: Wed, 2 Mar 2022 22:22:53 +0000 +Subject: [PATCH] #16764: Build break with poppler 22.03.0 + +git-svn-id: svn://scribus.net/trunk/Scribus@24982 11d20701-8431-0410-a711-e3c959e3b870 +--- + scribus/plugins/import/pdf/importpdf.cpp | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/scribus/plugins/import/pdf/importpdf.cpp b/scribus/plugins/import/pdf/importpdf.cpp +index 154e58a3f0..392dcd9e64 100644 +--- a/scribus/plugins/import/pdf/importpdf.cpp ++++ b/scribus/plugins/import/pdf/importpdf.cpp +@@ -89,7 +89,11 @@ QImage PdfPlug::readThumbnail(const QString& fName) + #endif
+ globalParams->setErrQuiet(gTrue);
+
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 3, 0)
++ PDFDoc pdfDoc{ std::make_unique<GooString>(fname) };
++#else
+ PDFDoc pdfDoc{fname, nullptr, nullptr, nullptr};
++#endif
+ if (!pdfDoc.isOk() || pdfDoc.getErrorCode() == errEncrypted)
+ return QImage();
+
+@@ -342,7 +346,11 @@ bool PdfPlug::convert(const QString& fn) + globalParams->setErrQuiet(gTrue);
+ // globalParams->setPrintCommands(gTrue);
+ QList<OptionalContentGroup*> ocgGroups;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 3, 0)
++ auto pdfDoc = std::make_unique<PDFDoc>(std::make_unique<GooString>(fname));
++#else
+ auto pdfDoc = std::unique_ptr<PDFDoc>(new PDFDoc(fname, nullptr, nullptr, nullptr));
++#endif
+ if (pdfDoc)
+ {
+ if (pdfDoc->getErrorCode() == errEncrypted)
+@@ -361,8 +369,13 @@ bool PdfPlug::convert(const QString& fn) + #else
+ auto fname = new GooString(QFile::encodeName(fn).data());
+ #endif
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 3, 0)
++ std::optional<GooString> userPW(std::in_place, text.toLocal8Bit().data());
++ pdfDoc.reset(new PDFDoc(std::make_unique<GooString>(fname), userPW, userPW, nullptr));
++#else
+ auto userPW = new GooString(text.toLocal8Bit().data());
+ pdfDoc.reset(new PDFDoc(fname, userPW, userPW, nullptr));
++#endif
+ qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
+ }
+ if ((!pdfDoc) || (pdfDoc->getErrorCode() != errNone))
diff --git a/app-office/scribus/scribus-1.5.8.ebuild b/app-office/scribus/scribus-1.5.8.ebuild index 506619d80133..228401b0e914 100644 --- a/app-office/scribus/scribus-1.5.8.ebuild +++ b/app-office/scribus/scribus-1.5.8.ebuild @@ -78,6 +78,7 @@ PATCHES=( "${FILESDIR}"/${PN}-1.5.6-findhyphen.patch "${FILESDIR}"/${PN}-1.5.8-poppler-22.2.0-1.patch "${FILESDIR}"/${PN}-1.5.8-poppler-22.2.0-2.patch + "${FILESDIR}"/${PN}-1.5.8-poppler-22.03.0.patch # bug 834537 ) CMAKE_BUILD_TYPE="Release" |