public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas K. Hüttel" <dilfridge@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/inkscape/files/, media-gfx/inkscape/
Date: Fri, 18 Mar 2022 21:30:34 +0000 (UTC)	[thread overview]
Message-ID: <1647639022.29b4c8365673eb0c8663e18103e94c09504fe92c.dilfridge@gentoo> (raw)

commit:     29b4c8365673eb0c8663e18103e94c09504fe92c
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 18 20:33:43 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Mar 18 21:30:22 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=29b4c836

media-gfx/inkscape: Build fix for poppler-22.03.0

Closes: https://bugs.gentoo.org/835424
See also: https://gitlab.com/inkscape/inkscape/-/merge_requests/4116

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 .../files/inkscape-1.1.2-poppler-22.03.0.patch     | 38 ++++++++++++++++++++++
 media-gfx/inkscape/inkscape-1.1-r1.ebuild          |  3 ++
 media-gfx/inkscape/inkscape-1.1.1.ebuild           |  4 +++
 media-gfx/inkscape/inkscape-1.1.2.ebuild           |  4 +++
 4 files changed, 49 insertions(+)

diff --git a/media-gfx/inkscape/files/inkscape-1.1.2-poppler-22.03.0.patch b/media-gfx/inkscape/files/inkscape-1.1.2-poppler-22.03.0.patch
new file mode 100644
index 000000000000..5ec18157384e
--- /dev/null
+++ b/media-gfx/inkscape/files/inkscape-1.1.2-poppler-22.03.0.patch
@@ -0,0 +1,38 @@
+From 15ab83e02b07018c3ffd4952a2623393187659e0 Mon Sep 17 00:00:00 2001
+From: Evangelos Foutras <evangelos@foutrelis.com>
+Date: Wed, 2 Mar 2022 19:50:02 +0200
+Subject: [PATCH] Fix build with poppler 22.03.0
+
+PDFDoc's constructor now takes an std::unique_ptr as the filename and
+the rest of the parameters are std::optional and can be left out.
+
+Also, remove an obsolete comment regarding special handling on win32;
+the "ifndef _WIN32" it was referring to has been removed by commit
+ad8effaa6ec3 ("Fix PDF import with non-ASCII filename on Windows").
+---
+ src/extension/internal/pdfinput/pdf-input.cpp | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp
+index 3dabc94ba2..63742d8c6d 100644
+--- a/src/extension/internal/pdfinput/pdf-input.cpp
++++ b/src/extension/internal/pdfinput/pdf-input.cpp
+@@ -686,10 +686,12 @@ PdfInput::open(::Inkscape::Extension::Input * /*mod*/, const gchar * uri) {
+     // PDFDoc is from poppler. PDFDoc is used for preview and for native import.
+     std::shared_ptr<PDFDoc> pdf_doc;
+ 
+-    // poppler does not use glib g_open. So on win32 we must use unicode call. code was copied from
+-    // glib gstdio.c
++#if POPPLER_CHECK_VERSION(22, 3, 0)
++    pdf_doc = std::make_shared<PDFDoc>(std::make_unique<GooString>(uri)); // TODO: Could ask for password
++#else
+     GooString *filename_goo = new GooString(uri);
+-    pdf_doc = std::make_shared<PDFDoc>(filename_goo, nullptr, nullptr, nullptr);   // TODO: Could ask for password
++    pdf_doc = std::make_shared<PDFDoc>(filename_goo, nullptr, nullptr, nullptr); // TODO: Could ask for password
++#endif
+ 
+     if (!pdf_doc->isOk()) {
+         int error = pdf_doc->getErrorCode();
+-- 
+GitLab
+

diff --git a/media-gfx/inkscape/inkscape-1.1-r1.ebuild b/media-gfx/inkscape/inkscape-1.1-r1.ebuild
index 517577f93f25..64412bc803f8 100644
--- a/media-gfx/inkscape/inkscape-1.1-r1.ebuild
+++ b/media-gfx/inkscape/inkscape-1.1-r1.ebuild
@@ -111,6 +111,9 @@ src_prepare() {
 	eapply "${WORKDIR}/inkscape-1.1-musl/"*.patch
 	eapply "${FILESDIR}"/${P}-poppler-21.11.0.patch
 
+	# Not yet accepted upstream but rather trivial
+	eapply "${FILESDIR}/${PN}-1.1.2-poppler-22.03.0.patch"  # bug 835424
+
 	cmake_src_prepare
 	sed -i "/install.*COPYING/d" CMakeScripts/ConfigCPack.cmake || die
 }

diff --git a/media-gfx/inkscape/inkscape-1.1.1.ebuild b/media-gfx/inkscape/inkscape-1.1.1.ebuild
index e76f7867922d..a36c80fb7f88 100644
--- a/media-gfx/inkscape/inkscape-1.1.1.ebuild
+++ b/media-gfx/inkscape/inkscape-1.1.1.ebuild
@@ -97,6 +97,10 @@ RESTRICT="test"
 
 S="${WORKDIR}/${P}_2021-09-20_3bf5ae0d25"
 
+PATCHES=(
+	"${FILESDIR}/${PN}-1.1.2-poppler-22.03.0.patch"  # bug 835424
+)
+
 pkg_pretend() {
 	if [[ ${MERGE_TYPE} != binary ]] && use openmp; then
 		tc-has-openmp || die "Please switch to an openmp compatible compiler"

diff --git a/media-gfx/inkscape/inkscape-1.1.2.ebuild b/media-gfx/inkscape/inkscape-1.1.2.ebuild
index 58011f3429ba..5f461759e758 100644
--- a/media-gfx/inkscape/inkscape-1.1.2.ebuild
+++ b/media-gfx/inkscape/inkscape-1.1.2.ebuild
@@ -105,6 +105,10 @@ RESTRICT="!test? ( test )"
 
 S="${WORKDIR}/${MY_P}"
 
+PATCHES=(
+	"${FILESDIR}/${PN}-1.1.2-poppler-22.03.0.patch"  # bug 835424
+)
+
 pkg_pretend() {
 	if [[ ${MERGE_TYPE} != binary ]] && use openmp; then
 		tc-has-openmp || die "Please switch to an openmp compatible compiler"


             reply	other threads:[~2022-03-18 21:30 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-18 21:30 Andreas K. Hüttel [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-11-04  9:51 [gentoo-commits] repo/gentoo:master commit in: media-gfx/inkscape/files/, media-gfx/inkscape/ David Seifert
2024-05-31 16:08 David Seifert
2024-05-30 13:59 Andreas Sturmlechner
2023-05-01  7:32 Sam James
2022-09-03  1:42 Sam James
2022-09-02  4:38 Sam James
2022-05-26  1:12 Sam James
2021-09-25 15:59 Andreas K. Hüttel
2021-09-25 15:59 Andreas K. Hüttel
2021-04-14 19:01 Mikle Kolyada
2020-08-26  6:49 Mikle Kolyada
2020-07-02  8:18 Mikle Kolyada
2020-05-08  7:42 Miroslav Šulc
2019-11-16 13:25 Andreas K. Hüttel
2019-11-11  9:41 Miroslav Šulc
2019-11-09  8:57 Andreas Sturmlechner
2019-11-06 21:07 Miroslav Šulc
2019-07-24 20:57 Andreas Sturmlechner
2019-04-24 13:18 Lars Wendler
2018-09-15 21:46 Andreas Hüttel
2018-05-18  6:31 Lars Wendler
2018-05-07 12:59 Lars Wendler
2017-05-12 19:41 Andreas Hüttel
2016-06-29 20:29 Patrick McLean

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=1647639022.29b4c8365673eb0c8663e18103e94c09504fe92c.dilfridge@gentoo \
    --to=dilfridge@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