Accepting request 706629 from home:iznogood:factory

Add patch from upstream to build with new poppler releases

OBS-URL: https://build.opensuse.org/request/show/706629
OBS-URL: https://build.opensuse.org/package/show/graphics/inkscape?expand=0&rev=50
This commit is contained in:
Ismail Dönmez 2019-05-31 09:27:18 +00:00 committed by Git OBS Bridge
parent 9bfc5e6632
commit c53887602c
3 changed files with 53 additions and 4 deletions

View File

@ -0,0 +1,44 @@
From dc25406853353320078eca22cf817fb052c97082 Mon Sep 17 00:00:00 2001
From: Marc Jeanmougin <marc@jeanmougin.fr>
Date: Wed, 24 Apr 2019 14:11:26 +0200
Subject: [PATCH] Tentative fix for poppler 0.76
---
src/extension/internal/pdfinput/pdf-parser.cpp | 2 +-
src/extension/internal/pdfinput/poppler-transition-api.h | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extension/internal/pdfinput/pdf-parser.cpp
index 2981d6ee51..ddbff7671f 100644
--- a/src/extension/internal/pdfinput/pdf-parser.cpp
+++ b/src/extension/internal/pdfinput/pdf-parser.cpp
@@ -426,7 +426,7 @@ void PdfParser::parse(Object *obj, GBool topLevel) {
error(errInternal, -1, "Weird page contents");
return;
}
- parser = new Parser(xref, new Lexer(xref, obj), gFalse);
+ parser = new _POPPLER_NEW_PARSER(xref, obj);
go(topLevel);
delete parser;
parser = NULL;
diff --git a/src/extension/internal/pdfinput/poppler-transition-api.h b/src/extension/internal/pdfinput/poppler-transition-api.h
index 6e4dde7dee..21a60702fa 100644
--- a/src/extension/internal/pdfinput/poppler-transition-api.h
+++ b/src/extension/internal/pdfinput/poppler-transition-api.h
@@ -3,6 +3,13 @@
#include <glib/poppler-features.h>
+#if POPPLER_CHECK_VERSION(0, 76, 0)
+#define _POPPLER_NEW_PARSER(xref, obj) Parser(xref, obj, gFalse)
+#else
+#define _POPPLER_NEW_PARSER(xref, obj) Parser(xref, new Lexer(xref, obj), gFalse)
+#endif
+
+
#if POPPLER_CHECK_VERSION(0, 72, 0)
#define getCString c_str
#endif
--
2.21.0

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri May 31 08:43:53 UTC 2019 - Bjørn Lie <bjorn.lie@gmail.com>
- Add inkscape-fix-for-poppler-0.76.patch: Fix build with poppler
0.76, patch from upstream git.
-------------------------------------------------------------------
Wed May 15 13:09:07 UTC 2019 - Martin Liška <mliska@suse.cz>

View File

@ -35,6 +35,8 @@ Patch0: inkscape-packages.patch
Patch1: build_internal_libraries_as_static.patch
# PATCH-FIX-OPENSUSE fix_install_targets.patch -- use correct libdir etc.
Patch2: fix_install_targets.patch
# PATCH-FIX-UPSTREAM inkscape-fix-for-poppler-0.76.patch -- Fix build with poppler 0.76
Patch3: inkscape-fix-for-poppler-0.76.patch
BuildRequires: gtkspell-devel
%if 0%{?suse_version} > 1325
@ -157,10 +159,7 @@ Inkscape is a vector graphics editor.
%lang_package
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%autosetup -p1
%build
%define _lto_cflags %{nil}