diff options
author | Andreas K. Hüttel <dilfridge@gentoo.org> | 2022-03-18 21:33:43 +0100 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2022-03-18 22:30:22 +0100 |
commit | 29b4c8365673eb0c8663e18103e94c09504fe92c (patch) | |
tree | ddc442568265b3892042afa0017c5c658692ef67 /media-gfx | |
parent | media-gfx/inkscape: minor fixes, also from live ebuild (diff) | |
download | gentoo-29b4c8365673eb0c8663e18103e94c09504fe92c.tar.gz gentoo-29b4c8365673eb0c8663e18103e94c09504fe92c.tar.bz2 gentoo-29b4c8365673eb0c8663e18103e94c09504fe92c.zip |
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@gentoo.org>
Diffstat (limited to 'media-gfx')
-rw-r--r-- | media-gfx/inkscape/files/inkscape-1.1.2-poppler-22.03.0.patch | 38 | ||||
-rw-r--r-- | media-gfx/inkscape/inkscape-1.1-r1.ebuild | 3 | ||||
-rw-r--r-- | media-gfx/inkscape/inkscape-1.1.1.ebuild | 4 | ||||
-rw-r--r-- | media-gfx/inkscape/inkscape-1.1.2.ebuild | 4 |
4 files changed, 49 insertions, 0 deletions
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" |