]> git.pld-linux.org Git - packages/inkscape.git/commitdiff
add combined patches to fix build with poppler >= 0.64.0
authorJan Palus <atler@pld-linux.org>
Thu, 24 May 2018 22:39:15 +0000 (00:39 +0200)
committerJan Palus <atler@pld-linux.org>
Thu, 24 May 2018 22:39:36 +0000 (00:39 +0200)
inkscape-poppler.patch [new file with mode: 0644]
inkscape.spec

diff --git a/inkscape-poppler.patch b/inkscape-poppler.patch
new file mode 100644 (file)
index 0000000..d48380c
--- /dev/null
@@ -0,0 +1,144 @@
+From f0697de012598ea84edafea9a326e5e101eccd2a Mon Sep 17 00:00:00 2001
+From: Eduard Braun <eduard.braun2@gmx.de>
+Date: Tue, 24 Apr 2018 19:18:26 +0200
+Subject: Fix compilation with poppler 0.64
+
+(cherry picked from commit a600c6438fef2f4c06f9a4a7d933d99fb054a973)
+
+diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extension/internal/pdfinput/pdf-parser.cpp
+index 604b7f8..721524e 100644
+--- a/src/extension/internal/pdfinput/pdf-parser.cpp
++++ b/src/extension/internal/pdfinput/pdf-parser.cpp
+@@ -2582,7 +2582,7 @@ void PdfParser::opShowSpaceText(Object args[], int /*numArgs*/)
+   }
+ }
+-void PdfParser::doShowText(GooString *s) {
++void PdfParser::doShowText(const GooString *s) {
+   GfxFont *font;
+   int wMode;
+   double riseX, riseY;
+@@ -2601,7 +2601,7 @@ void PdfParser::doShowText(GooString *s) {
+   font = state->getFont();
+   wMode = font->getWMode();
+-  builder->beginString(state, s);
++  builder->beginString(state);
+   // handle a Type 3 char
+   if (font->getType() == fontType3 && 0) {//out->interpretType3Chars()) {
+@@ -2631,7 +2631,7 @@ void PdfParser::doShowText(GooString *s) {
+     double lineX = state->getLineX();
+     double lineY = state->getLineY();
+     oldParser = parser;
+-    p = s->getCString();
++    p = g_strdup(s->getCString());
+     len = s->getLength();
+     while (len > 0) {
+       n = font->getNextChar(p, len, &code,
+@@ -2686,7 +2686,7 @@ void PdfParser::doShowText(GooString *s) {
+   } else {
+     state->textTransformDelta(0, state->getRise(), &riseX, &riseY);
+-    p = s->getCString();
++    p = g_strdup(s->getCString());
+     len = s->getLength();
+     while (len > 0) {
+       n = font->getNextChar(p, len, &code,
+@@ -2732,7 +2732,7 @@ void PdfParser::opXObject(Object args[], int /*numArgs*/)
+ {
+   Object obj1, obj2, obj3, refObj;
+-  char *name = args[0].getName();
++  char *name = g_strdup(args[0].getName());
+ #if defined(POPPLER_NEW_OBJECT_API)
+   if ((obj1 = res->lookupXObject(name)).isNull()) {
+ #else
+diff --git a/src/extension/internal/pdfinput/pdf-parser.h b/src/extension/internal/pdfinput/pdf-parser.h
+index e28fecc..f985b15 100644
+--- a/src/extension/internal/pdfinput/pdf-parser.h
++++ b/src/extension/internal/pdfinput/pdf-parser.h
+@@ -287,7 +287,7 @@ private:
+   void opMoveShowText(Object args[], int numArgs);
+   void opMoveSetShowText(Object args[], int numArgs);
+   void opShowSpaceText(Object args[], int numArgs);
+-  void doShowText(GooString *s);
++  void doShowText(const GooString *s);
+   // XObject operators
+   void opXObject(Object args[], int numArgs);
+diff --git a/src/extension/internal/pdfinput/svg-builder.cpp b/src/extension/internal/pdfinput/svg-builder.cpp
+index a448be6..6178619 100644
+--- a/src/extension/internal/pdfinput/svg-builder.cpp
++++ b/src/extension/internal/pdfinput/svg-builder.cpp
+@@ -1020,7 +1020,7 @@ void SvgBuilder::updateFont(GfxState *state) {
+     GfxFont *font = state->getFont();
+     // Store original name
+     if (font->getName()) {
+-        _font_specification = font->getName()->getCString();
++        _font_specification = g_strdup(font->getName()->getCString());
+     } else {
+         _font_specification = (char*) "Arial";
+     }
+@@ -1361,7 +1361,7 @@ void SvgBuilder::_flushText() {
+     _glyphs.clear();
+ }
+-void SvgBuilder::beginString(GfxState *state, GooString * /*s*/) {
++void SvgBuilder::beginString(GfxState *state) {
+     if (_need_font_update) {
+         updateFont(state);
+     }
+diff --git a/src/extension/internal/pdfinput/svg-builder.h b/src/extension/internal/pdfinput/svg-builder.h
+index ad15c9c..ed2a4d4 100644
+--- a/src/extension/internal/pdfinput/svg-builder.h
++++ b/src/extension/internal/pdfinput/svg-builder.h
+@@ -29,7 +29,6 @@ namespace Inkscape {
+ #include <glibmm/ustring.h>
+ #include "CharTypes.h"
+-class GooString;
+ class Function;
+ class GfxState;
+ struct GfxColor;
+@@ -136,7 +135,7 @@ public:
+     void clearSoftMask(GfxState *state);
+     // Text handling
+-    void beginString(GfxState *state, GooString *s);
++    void beginString(GfxState *state);
+     void endString(GfxState *state);
+     void addChar(GfxState *state, double x, double y,
+                  double dx, double dy,
+-- 
+cgit v0.10.2
+
+From 332a80f4847715546be9a00756f693b4aa1316e2 Mon Sep 17 00:00:00 2001
+From: Jan Palus <atler@pld-linux.org>
+Date: Fri, 25 May 2018 00:30:17 +0200
+Subject: [PATCH] Fix compilation with poppler 0.65.0
+
+replace unused includes with one that is actually used
+
+Signed-off-by: Jan Palus <atler@pld-linux.org>
+---
+ src/extension/internal/pdfinput/pdf-parser.cpp | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extension/internal/pdfinput/pdf-parser.cpp
+index 6c498f9..caaeca1 100644
+--- a/src/extension/internal/pdfinput/pdf-parser.cpp
++++ b/src/extension/internal/pdfinput/pdf-parser.cpp
+@@ -37,8 +37,7 @@ extern "C" {
+ #include "util/units.h"
+ #include "goo/gmem.h"
+-#include "goo/GooTimer.h"
+-#include "goo/GooHash.h"
++#include "goo/GooString.h"
+ #include "GlobalParams.h"
+ #include "CharTypes.h"
+ #include "Object.h"
+-- 
+2.17.0
+
index bffbe0b24277fcd1b85c460de5cbeb12d4842474..038f029993239d4405e3f011f62fb181171325fc 100644 (file)
@@ -17,6 +17,7 @@ Source0:      https://media.inkscape.org/dl/resources/file/%{name}-%{version}.tar.bz2
 # Source0-md5: 4ef7171cc1de9e1608d8c49b77fed99e
 Patch0:                %{name}-man.patch
 Patch1:                %{name}-gtk3.patch
+Patch2:                %{name}-poppler.patch
 URL:           http://www.inkscape.org/
 BuildRequires: ImageMagick-c++-devel
 BuildRequires: aspell-devel
@@ -106,6 +107,7 @@ dwuwymiarowej grafiki wektorowej.
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %{__sed} -i -e 's,po/Makefile.in,,' configure.ac
 
This page took 0.176177 seconds and 4 git commands to generate.