[arch-commits] Commit in inkscape/trunk (PKGBUILD inkscape-poppler-0.71.patch)

Antonio Rojas arojas at archlinux.org
Thu Nov 1 16:19:03 UTC 2018


    Date: Thursday, November 1, 2018 @ 16:19:03
  Author: arojas
Revision: 337693

Use sed

Modified:
  inkscape/trunk/PKGBUILD
Deleted:
  inkscape/trunk/inkscape-poppler-0.71.patch

-----------------------------+
 PKGBUILD                    |    8 -
 inkscape-poppler-0.71.patch |  260 ------------------------------------------
 2 files changed, 4 insertions(+), 264 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-11-01 15:32:51 UTC (rev 337692)
+++ PKGBUILD	2018-11-01 16:19:03 UTC (rev 337693)
@@ -21,10 +21,9 @@
             'python2-numpy: some extensions'
             'python2-lxml: some extensions and filters')
 source=("https://media.inkscape.org/dl/resources/file/${pkgname}-${pkgver}.tar.bz2"
-        'poppler-fixes-from-master.patch' inkscape-poppler-0.71.patch)
+        'poppler-fixes-from-master.patch')
 sha256sums=('063296c05a65d7a92a0f627485b66221487acfc64a24f712eb5237c4bd7816b2'
-            'dbe0fa84f990ba76306ec5cda13b3ebe0303f325377ebdb64b061b83d453bd63'
-            '6c0b966d878bdbaa9da4bef65bf61e0e00d8226ce061bd633b06b072c5a47a46')
+            'dbe0fa84f990ba76306ec5cda13b3ebe0303f325377ebdb64b061b83d453bd63')
 
 # NB: Some CDN nodes appear to be distributing an outdated version of this file.
 
@@ -32,7 +31,6 @@
 	cd "${srcdir}/${pkgname}-${pkgver}"
 	./autogen.sh
 	patch -Np1 -i ../poppler-fixes-from-master.patch
-        patch -p1 -i ../inkscape-poppler-0.71.patch # Fix build with poppler 0.71
 
 	sed -i 's|/usr/bin/python\>|/usr/bin/python2|g' cxxtest/*.py
 	sed -i 's|/usr/bin/env python\>|/usr/bin/env python2|g' share/*/{test/,}*.py
@@ -41,6 +39,8 @@
 	sed -i 's|"python"|"python2"|g' src/main.cpp
 
 	sed -i 's| abs(| std::fabs(|g' src/ui/tools/flood-tool.cpp
+       # Fix build with poppler 0.71
+        sed -e 's|gTrue|true|g' -e 's|gFalse|false|g' -e 's|GBool|bool|g' -i src/extension/internal/pdfinput/pdf-parser.*
 }
 
 build() {

Deleted: inkscape-poppler-0.71.patch
===================================================================
--- inkscape-poppler-0.71.patch	2018-11-01 15:32:51 UTC (rev 337692)
+++ inkscape-poppler-0.71.patch	2018-11-01 16:19:03 UTC (rev 337693)
@@ -1,260 +0,0 @@
-diff -ru inkscape-0.92.3-orig/src/extension/internal/pdfinput/pdf-parser.cpp inkscape-0.92.3/src/extension/internal/pdfinput/pdf-parser.cpp
---- inkscape-0.92.3-orig/src/extension/internal/pdfinput/pdf-parser.cpp	2018-11-01 14:24:41.162363297 +0000
-+++ inkscape-0.92.3/src/extension/internal/pdfinput/pdf-parser.cpp	2018-11-01 14:28:57.619710989 +0000
-@@ -271,7 +271,7 @@
-     // Manipulate clip path stack
-     ClipHistoryEntry *save();
-     ClipHistoryEntry *restore();
--    GBool hasSaves() { return saved != NULL; }
-+    bool hasSaves() { return saved != NULL; }
-     void setClip(GfxPath *newClipPath, GfxClipType newClipType = clipNormal);
-     GfxPath *getClipPath() { return clipPath; }
-     GfxClipType getClipType() { return clipType; }
-@@ -299,11 +299,11 @@
-                      _POPPLER_CONST PDFRectangle *cropBox) :
-     xref(xrefA),
-     builder(builderA),
--    subPage(gFalse),
-+    subPage(false),
-     printCommands(false),
-     res(new GfxResources(xref, resDict, NULL)), // start the resource stack
--    state(new GfxState(72.0, 72.0, box, rotate, gTrue)),
--    fontChanged(gFalse),
-+    state(new GfxState(72.0, 72.0, box, rotate, true)),
-+    fontChanged(false),
-     clip(clipNone),
-     ignoreUndef(0),
-     baseMatrix(),
-@@ -356,11 +356,11 @@
- 		     _POPPLER_CONST PDFRectangle *box) :
-     xref(xrefA),
-     builder(builderA),
--    subPage(gTrue),
-+    subPage(true),
-     printCommands(false),
-     res(new GfxResources(xref, resDict, NULL)), // start the resource stack
--    state(new GfxState(72, 72, box, 0, gFalse)),
--    fontChanged(gFalse),
-+    state(new GfxState(72, 72, box, 0, false)),
-+    fontChanged(false),
-     clip(clipNone),
-     ignoreUndef(0),
-     baseMatrix(),
-@@ -434,13 +434,13 @@
- 	error(errInternal, -1, "Weird page contents");
-     	return;
-   }
--  parser = new Parser(xref, new Lexer(xref, obj), gFalse);
-+  parser = new Parser(xref, new Lexer(xref, obj), false);
-   go(topLevel);
-   delete parser;
-   parser = NULL;
- }
- 
--void PdfParser::go(GBool /*topLevel*/)
-+void PdfParser::go(bool /*topLevel*/)
- {
-   Object obj;
-   Object args[maxArgs];
-@@ -830,7 +830,7 @@
- #endif
- 
-   // fill/stroke overprint
--  GBool haveFillOP = gFalse;
-+  bool haveFillOP = false;
- #if defined(POPPLER_NEW_OBJECT_API)
-   if ((haveFillOP = (obj2 = obj1.dictLookup(const_cast<char*>("op"))).isBool())) {
- #else
-@@ -925,9 +925,9 @@
- #else
-       if (obj2.dictLookup(const_cast<char*>("S"), &obj3)->isName(const_cast<char*>("Alpha"))) {
- #endif
--	alpha = gTrue;
-+	alpha = true;
-       } else { // "Luminosity"
--	alpha = gFalse;
-+	alpha = false;
-       }
- #if !defined(POPPLER_NEW_OBJECT_API)
-       obj3.free();
-@@ -978,8 +978,8 @@
- 	if (obj3.streamGetDict()->lookup(const_cast<char*>("Group"), &obj4)->isDict()) {
- #endif
- 	  GfxColorSpace *blendingColorSpace = 0;
--	  GBool isolated = gFalse;
--	  GBool knockout = gFalse;
-+	  bool isolated = false;
-+	  bool knockout = false;
- #if defined(POPPLER_NEW_OBJECT_API)
- 	  if (!((obj5 = obj4.dictLookup(const_cast<char*>("CS"))).isNull())) {
- #else
-@@ -1863,7 +1863,7 @@
-   double xTemp, yTemp;
-   double gradientTransform[6];
-   double *matrix = NULL;
--  GBool savedState = gFalse;
-+  bool savedState = false;
- 
- #if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
-   if (!(shading = res->lookupShading(args[0].getName(), NULL, NULL))) {
-@@ -1879,13 +1879,13 @@
-   if (shading->getType() != 2 && shading->getType() != 3) {
-     savedPath = state->getPath()->copy();
-     saveState();
--    savedState = gTrue;
-+    savedState = true;
-   } else {  // get gradient transform if possible
-       // check proper operator sequence
-       // first there should be one W(*) and then one 'cm' somewhere before 'sh'
--      GBool seenClip, seenConcat;
-+      bool seenClip, seenConcat;
-       seenClip = (clipHistory->getClipPath() != NULL);
--      seenConcat = gFalse;
-+      seenConcat = false;
-       int i = 1;
-       while (i <= maxOperatorHistoryDepth) {
-         const char *opName = getPreviousOperator(i);
-@@ -2376,7 +2376,7 @@
-     // unsetting the font (drawing no text) is better than using the
-     // previous one and drawing random glyphs from it
-     state->setFont(NULL, args[1].getNum());
--    fontChanged = gTrue;
-+    fontChanged = true;
-     return;
-   }
-   if (printCommands) {
-@@ -2770,7 +2770,7 @@
- #else
-     res->lookupXObjectNF(name, &refObj);
- #endif
--    doImage(&refObj, obj1.getStream(), gFalse);
-+    doImage(&refObj, obj1.getStream(), false);
- #if !defined(POPPLER_NEW_OBJECT_API)
-     refObj.free();
- #endif
-@@ -2885,11 +2885,11 @@
-     if (obj1.isBool())
-       interpolate = obj1.getBool();
-     else
--      interpolate = gFalse;
-+      interpolate = false;
- #if !defined(POPPLER_NEW_OBJECT_API)
-     obj1.free();
- #endif
--    maskInterpolate = gFalse;
-+    maskInterpolate = false;
- 
-     // image or mask?
- #if defined(POPPLER_NEW_OBJECT_API)
-@@ -2949,7 +2949,7 @@
-         if (bits != 1) {
-             goto err1;
-         }
--        invert = gFalse;
-+        invert = false;
- #if defined(POPPLER_NEW_OBJECT_API)
-         obj1 = dict->lookup(const_cast<char*>("Decode"));
- #else
-@@ -3067,11 +3067,11 @@
-         
-         // get the mask
-         int maskColors[2*gfxColorMaxComps];
--        haveColorKeyMask = haveExplicitMask = haveSoftMask = gFalse;
-+        haveColorKeyMask = haveExplicitMask = haveSoftMask = false;
-         Stream *maskStr = NULL;
-         int maskWidth = 0;
-         int maskHeight = 0;
--        maskInvert = gFalse;
-+        maskInvert = false;
-         GfxImageColorMap *maskColorMap = NULL;
- #if defined(POPPLER_NEW_OBJECT_API)
-         maskObj = dict->lookup(const_cast<char*>("Mask"));
-@@ -3158,7 +3158,7 @@
- 	    if (obj1.isBool())
- 	      maskInterpolate = obj1.getBool();
- 	    else
--	      maskInterpolate = gFalse;
-+	      maskInterpolate = false;
- #if defined(POPPLER_NEW_OBJECT_API)
-             obj1 = maskDict->lookup(const_cast<char*>("ColorSpace"));
- #else
-@@ -3319,11 +3319,11 @@
- 	    if (obj1.isBool())
- 	      maskInterpolate = obj1.getBool();
- 	    else
--	      maskInterpolate = gFalse;
-+	      maskInterpolate = false;
- #if !defined(POPPLER_NEW_OBJECT_API)
- 	    obj1.free();
- #endif
--            maskInvert = gFalse;
-+            maskInvert = false;
- #if defined(POPPLER_NEW_OBJECT_API)
-             obj1 = maskDict->lookup(const_cast<char*>("Decode"));
- #else
-@@ -3344,7 +3344,7 @@
-                 obj1.arrayGet(0, &obj2);
- #endif
-                 if (obj2.isInt() && obj2.getInt() == 1) {
--                    maskInvert = gTrue;
-+                    maskInvert = true;
-                 }
- #if !defined(POPPLER_NEW_OBJECT_API)
-                 obj2.free();
-@@ -3355,7 +3355,7 @@
- #if !defined(POPPLER_NEW_OBJECT_API)
-             obj1.free();
- #endif
--            haveExplicitMask = gTrue;
-+            haveExplicitMask = true;
-         }
-         
-         // draw it
-@@ -3484,7 +3484,7 @@
-   resDict = resObj.isDict() ? resObj.getDict() : (Dict *)NULL;
- 
-   // check for a transparency group
--  transpGroup = isolated = knockout = gFalse;
-+  transpGroup = isolated = knockout = false;
-   blendingColorSpace = NULL;
- #if defined(POPPLER_NEW_OBJECT_API)
-   if ((obj1 = dict->lookup(const_cast<char*>("Group"))).isDict()) {
-@@ -3493,7 +3493,7 @@
-   if (dict->lookup(const_cast<char*>("Group"), &obj1)->isDict()) {
-     if (obj1.dictLookup(const_cast<char*>("S"), &obj2)->isName(const_cast<char*>("Transparency"))) {
- #endif
--      transpGroup = gTrue;
-+      transpGroup = true;
- #if defined(POPPLER_NEW_OBJECT_API)
-       if (!((obj3 = obj1.dictLookup(const_cast<char*>("CS"))).isNull())) {
- #else
-@@ -3653,7 +3653,7 @@
- 
-   // display the image
-   if (str) {
--    doImage(NULL, str, gTrue);
-+    doImage(NULL, str, true);
-   
-     // skip 'EI' tag
-     int c1 = str->getUndecodedStream()->getChar();
-diff -ru inkscape-0.92.3-orig/src/extension/internal/pdfinput/pdf-parser.h inkscape-0.92.3/src/extension/internal/pdfinput/pdf-parser.h
---- inkscape-0.92.3-orig/src/extension/internal/pdfinput/pdf-parser.h	2018-11-01 14:24:41.162363297 +0000
-+++ inkscape-0.92.3/src/extension/internal/pdfinput/pdf-parser.h	2018-11-01 14:28:57.616377646 +0000
-@@ -301,13 +301,13 @@
- 
-   // XObject operators
-   void opXObject(Object args[], int numArgs);
--  void doImage(Object *ref, Stream *str, GBool inlineImg);
-+  void doImage(Object *ref, Stream *str, bool inlineImg);
-   void doForm(Object *str);
-   void doForm1(Object *str, Dict *resDict, double *matrix, double *bbox,
--	       GBool transpGroup = gFalse, GBool softMask = gFalse,
-+	       bool transpGroup = false, bool softMask = false,
- 	       GfxColorSpace *blendingColorSpace = NULL,
--	       GBool isolated = gFalse, GBool knockout = gFalse,
--	       GBool alpha = gFalse, Function *transferFunc = NULL,
-+	       bool isolated = false, bool knockout = false,
-+	       bool alpha = false, Function *transferFunc = NULL,
- 	       GfxColor *backdropColor = NULL);
- 
-   // in-line image operators


More information about the arch-commits mailing list