From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1374833-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id AB8A415808C
	for <garchives@archives.gentoo.org>; Sat, 12 Mar 2022 15:53:10 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id AC8DDE08F6;
	Sat, 12 Mar 2022 15:53:09 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 887D6E08BF
	for <gentoo-commits@lists.gentoo.org>; Sat, 12 Mar 2022 15:53:09 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 5EB62342F58
	for <gentoo-commits@lists.gentoo.org>; Sat, 12 Mar 2022 15:53:08 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 78B61318
	for <gentoo-commits@lists.gentoo.org>; Sat, 12 Mar 2022 15:53:06 +0000 (UTC)
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" <asturm@gentoo.org>
Message-ID: <1647100366.cad26fcc1480486168769f7838611a15c83b29bc.asturm@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: app-office/scribus/, app-office/scribus/files/
X-VCS-Repository: repo/gentoo
X-VCS-Files: app-office/scribus/files/scribus-1.5.8-poppler-22.03.0.patch app-office/scribus/scribus-1.5.8.ebuild
X-VCS-Directories: app-office/scribus/files/ app-office/scribus/
X-VCS-Committer: asturm
X-VCS-Committer-Name: Andreas Sturmlechner
X-VCS-Revision: cad26fcc1480486168769f7838611a15c83b29bc
X-VCS-Branch: master
Date: Sat, 12 Mar 2022 15:53:06 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 8f84e484-d9a0-45b6-ac31-aaac2d752b83
X-Archives-Hash: 6eaf85fe4da6e23ff59892876c56996d

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"