inkscape: Fix building for poppler 0.69. Rebuild

This commit is contained in:
Alexey Pavlov
2018-10-22 23:39:39 +03:00
parent de2f1d1cef
commit d584eb54fb
5 changed files with 2998 additions and 97 deletions

View File

@@ -12,7 +12,7 @@ _realname=inkscape
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=0.92.3
pkgrel=5
pkgrel=6
pkgdesc="Vector graphics editor using the SVG file format (mingw-w64)"
arch=('any')
url="https://inkscape.sourceforge.io/"
@@ -62,33 +62,30 @@ source=(https://inkscape.org/en/gallery/item/12187/${_realname}-${pkgver}.tar.bz
inkscape-0.91-simulaneous-intltool-gettext.patch
inkscape-0.92.3-abs-overloaded.patch
inkscape-0.92.2-fix-imagemagick-detect.patch
inkscape-0.92.3-poppler-0.64-compatibility.patch
inkscape-0.92.3-poppler-0.65-compatibility.patch)
inkscape-0.92.3-poppler-new.patch)
sha256sums=('063296c05a65d7a92a0f627485b66221487acfc64a24f712eb5237c4bd7816b2'
'e578fbef476704a42522ec5298f0202d2e600c2e03a98dba2c62d4ee1e53b6b5'
'ee948c90126407285b262cbea3d5a182e8fc166fddce09ea33d689fde3101a49'
'7458f4fac3bf75d388b71a61bdc30e0bed97cbbf63b73119b2f61af6d674a8b0'
'37594b4aea0d05a6e90db814f986bcd5623f8ded40ce2b2e5b1833aa542553cb'
'38a880a5475dd0ad99707c18a35e716f6cd677ecb7982612f2f699002f7113bf'
'55b0922f98c98ac5df8ba0869c46ff9eeeee9aaceef9afbaad9c4763dd3923ba'
'ea625d1d7260d32866e4e61946fa02793b1762f66dc223364dbcc5e628bb5bfe'
'833980a8bd2c67be66a8d7c211c7996984728372a2c55ec71e1f93e2fb2343c5'
'aa118059aee51702af6131d95de05c4cee4e5ddfaaba5a43783c3c537c943458'
'b2291a0025b795ffda58b33b298116a002dc2da606491caec454f957ee211430'
'a68fd59663d4bab3d4603b460069c8de6c3a7c6dca6016379e40829c0d0da11b')
'150151f4886edef6af3ee3985c01344a4ff7568c91add7762133fba213a8a3c3')
prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
patch -p1 -i ${srcdir}/inkscape-0.48.4-headers-fix.patch
patch -p1 -i ${srcdir}/inkscape-0.48.4-python.patch
patch -p1 -i ${srcdir}/inkscape-0.48.4-poppler-includes-conflicts.patch
patch -p1 -i ${srcdir}/inkscape-0.92.0-win32-relocatable.patch
patch -p1 -i ${srcdir}/inkscape-0.48.4-python-extensions-location.patch
#patch -p1 -i ${srcdir}/inkscape-0.91-simulaneous-intltool-gettext.patch
patch -p1 -i ${srcdir}/inkscape-0.92.3-abs-overloaded.patch
#patch -p1 -i ${srcdir}/inkscape-0.92.2-fix-imagemagick-detect.patch
patch -p1 -i ${srcdir}/inkscape-0.92.3-poppler-0.64-compatibility.patch
patch -p1 -i ${srcdir}/inkscape-0.92.3-poppler-0.65-compatibility.patch
patch -p1 -i ${srcdir}/inkscape-0.92.3-poppler-new.patch
patch -p1 -i ${srcdir}/inkscape-0.48.4-poppler-includes-conflicts.patch
./autogen.sh

View File

@@ -12,9 +12,9 @@
--- inkscape-0.48.4-orig/src/extension/internal/pdfinput/pdf-parser.cpp.orig 2012-12-13 21:00:46.726633000 +0400
+++ inkscape-0.48.4-orig/src/extension/internal/pdfinput/pdf-parser.cpp 2014-03-02 17:31:00.838000000 +0400
@@ -36,20 +36,20 @@
#include "glib/poppler-features.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"

View File

@@ -1,58 +0,0 @@
--- inkscape-0.92.3/src/extension/internal/pdfinput/pdf-parser.cpp.orig 2018-03-11 23:38:09.000000000 +0300
+++ inkscape-0.92.3/src/extension/internal/pdfinput/pdf-parser.cpp 2018-04-24 14:14:59.576013800 +0300
@@ -2490,7 +2490,7 @@
builder->updateFont(state);
fontChanged = gFalse;
}
- doShowText(args[0].getString());
+ doShowText(args[0].getString()->copy());
}
// TODO not good that numArgs is ignored but args[] is used:
@@ -2511,7 +2511,7 @@
ty = state->getLineY() - state->getLeading();
state->textMoveTo(tx, ty);
builder->updateTextPosition(tx, ty);
- doShowText(args[0].getString());
+ doShowText(args[0].getString()->copy());
}
// TODO not good that numArgs is ignored but args[] is used:
@@ -2534,7 +2534,7 @@
ty = state->getLineY() - state->getLeading();
state->textMoveTo(tx, ty);
builder->updateTextPosition(tx, ty);
- doShowText(args[2].getString());
+ doShowText(args[2].getString()->copy());
}
// TODO not good that numArgs is ignored but args[] is used:
@@ -2572,7 +2572,7 @@
}
builder->updateTextShift(state, obj.getNum());
} else if (obj.isString()) {
- doShowText(obj.getString());
+ doShowText(obj.getString()->copy());
} else {
error(errSyntaxError, getPos(), "Element of show/space array must be number or string");
}
@@ -2732,7 +2732,7 @@
{
Object obj1, obj2, obj3, refObj;
- char *name = args[0].getName();
+ const char *name = args[0].getName();
#if defined(POPPLER_NEW_OBJECT_API)
if ((obj1 = res->lookupXObject(name)).isNull()) {
#else
--- inkscape-0.92.3/src/extension/internal/pdfinput/svg-builder.cpp.orig 2018-04-24 13:54:53.312932900 +0300
+++ inkscape-0.92.3/src/extension/internal/pdfinput/svg-builder.cpp 2018-04-24 14:13:17.239834100 +0300
@@ -1020,7 +1020,7 @@
GfxFont *font = state->getFont();
// Store original name
if (font->getName()) {
- _font_specification = font->getName()->getCString();
+ _font_specification = font->getName()->copy()->getCString();
} else {
_font_specification = (char*) "Arial";
}

View File

@@ -1,28 +0,0 @@
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 <poppler/GlobalParams.h>
#include <poppler/CharTypes.h>
#include <poppler/Object.h>
--
2.17.0

File diff suppressed because it is too large Load Diff