inkscape: Fix build with poller 22.03
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
This commit is contained in:
@@ -4,7 +4,10 @@ LICENSE = "GPL-3.0-or-later"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=d20d608cfa3a8343d722c2e69a43bbcd"
|
||||
|
||||
PV = "1.1.2"
|
||||
SRC_URI = "https://inkscape.org/gallery/item/31668/${BP}.tar.xz"
|
||||
SRC_URI = " \
|
||||
https://inkscape.org/gallery/item/31668/${BP}.tar.xz \
|
||||
file://0001-Fix-build-with-poppler-22.03.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "3ffe54a06d0b25a4cd8b6eb424536ef1ed205be13443a39cd437c8c7b89b96d1"
|
||||
S = "${WORKDIR}/${BPN}-${PV}_2022-02-04_0a00cf5339"
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
From a87fba8eaa4c53fa5f2a00d751c93bbffde21ec1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
|
||||
Date: Fri, 11 Mar 2022 23:15:08 +0100
|
||||
Subject: [PATCH] Fix build with poppler >= 22.03
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
|
||||
---
|
||||
src/extension/internal/pdfinput/pdf-input.cpp | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp
|
||||
index e6204f6..2cba594 100644
|
||||
--- a/src/extension/internal/pdfinput/pdf-input.cpp
|
||||
+++ b/src/extension/internal/pdfinput/pdf-input.cpp
|
||||
@@ -668,8 +668,12 @@ PdfInput::open(::Inkscape::Extension::Input * /*mod*/, const gchar * uri) {
|
||||
|
||||
// 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,03,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
|
||||
+#endif
|
||||
|
||||
if (!pdf_doc->isOk()) {
|
||||
int error = pdf_doc->getErrorCode();
|
||||
--
|
||||
2.34.1
|
||||
|
||||
Reference in New Issue
Block a user