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: Sat, 12 Mar 2022 15:53:06 +0000 (UTC) [thread overview]
Message-ID: <1647100366.cad26fcc1480486168769f7838611a15c83b29bc.asturm@gentoo> (raw)
commit: cad26fcc1480486168769f7838611a15c83b29bc
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 7 16:40:35 2022 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Mar 12 15:52:46 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cad26fcc
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 <AT> gentoo.org>
.../files/scribus-1.5.8-poppler-22.03.0.patch | 52 ++++++++++++++++++++++
app-office/scribus/scribus-1.5.8.ebuild | 1 +
2 files changed, 53 insertions(+)
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"
next reply other threads:[~2022-03-12 15:53 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-12 15:53 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
2025-02-10 20:11 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-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=1647100366.cad26fcc1480486168769f7838611a15c83b29bc.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