pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/inkscape inkscape: fix build with poppler-0.64.0



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3556dcfb8704
branches:  trunk
changeset: 379492:3556dcfb8704
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Tue May 01 06:17:11 2018 +0000

description:
inkscape: fix build with poppler-0.64.0

diffstat:

 graphics/inkscape/distinfo                                                      |   5 +-
 graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-parser.cpp  |  47 ++++++++-
 graphics/inkscape/patches/patch-src_extension_internal_pdfinput_svg-builder.cpp |  15 +++
 3 files changed, 59 insertions(+), 8 deletions(-)

diffs (122 lines):

diff -r 2b65f646a3b6 -r 3556dcfb8704 graphics/inkscape/distinfo
--- a/graphics/inkscape/distinfo        Mon Apr 30 20:57:47 2018 +0000
+++ b/graphics/inkscape/distinfo        Tue May 01 06:17:11 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.62 2017/12/19 09:28:25 markd Exp $
+$NetBSD: distinfo,v 1.63 2018/05/01 06:17:11 wiz Exp $
 
 SHA1 (inkscape-0.92.2.tar.bz2) = c620d7aac594a0f839f2f7840d57e26f00991d16
 RMD160 (inkscape-0.92.2.tar.bz2) = 5508b38c47ed0a860a734eef8f8ca8e53f4e923a
@@ -13,8 +13,9 @@
 SHA1 (patch-config.h.cmake) = 1dcc7237fba3dbdfd7993ea2f5a2176785fb561e
 SHA1 (patch-src_CMakeLists.txt) = ccd5eeca81891f83c5eaf8cb80d33f001beaf55c
 SHA1 (patch-src_extension_internal_pdfinput_pdf-input.cpp) = 437cb3a461df047fef3c91e86c89cdcf15ef9965
-SHA1 (patch-src_extension_internal_pdfinput_pdf-parser.cpp) = ebb2ad7862ac6d97a8dc40be27b7560defcc80fe
+SHA1 (patch-src_extension_internal_pdfinput_pdf-parser.cpp) = 4ec25124dabf13ab3f68bcc626a2152ab3115a00
 SHA1 (patch-src_extension_internal_pdfinput_pdf-parser.h) = ba408f45544853f9323f8bd879bd55604072bb7a
+SHA1 (patch-src_extension_internal_pdfinput_svg-builder.cpp) = d7bfff0d3a1309b96eb70bc75b08d5d1ddf400da
 SHA1 (patch-src_io_inkjar.cpp) = 060d59225cfe7b66db5e9f41e76860df9ce12d01
 SHA1 (patch-src_trace_siox.cpp) = daeff4626dace6997f64ab9c96b0bfb304e724c8
 SHA1 (patch-src_ui_tool_node.h) = 2900ab737d6b9245aabefee5e79564bdbaec57bc
diff -r 2b65f646a3b6 -r 3556dcfb8704 graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-parser.cpp
--- a/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-parser.cpp    Mon Apr 30 20:57:47 2018 +0000
+++ b/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-parser.cpp    Tue May 01 06:17:11 2018 +0000
@@ -1,12 +1,13 @@
-$NetBSD: patch-src_extension_internal_pdfinput_pdf-parser.cpp,v 1.6 2017/09/09 21:48:56 prlw1 Exp $
+$NetBSD: patch-src_extension_internal_pdfinput_pdf-parser.cpp,v 1.7 2018/05/01 06:17:11 wiz Exp $
 
 - Object.h is included in pdf-parser.h -- see patch for pdf-parser.h.
 - Support poppler 0.58
   https://gitlab.com/inkscape/inkscape/commit/9418824967eb4c53371ef8588243fed4cab496e0
+- Support poppler 0.64
 
---- src/extension/internal/pdfinput/pdf-parser.cpp.orig        2014-06-09 13:24:41.000000000 +0000
+--- src/extension/internal/pdfinput/pdf-parser.cpp.orig        2017-08-06 20:44:00.000000000 +0000
 +++ src/extension/internal/pdfinput/pdf-parser.cpp
-@@ -38,7 +38,7 @@ extern "C" {
+@@ -41,7 +41,7 @@ extern "C" {
  #include "goo/GooHash.h"
  #include "GlobalParams.h"
  #include "CharTypes.h"
@@ -505,6 +506,33 @@
    if (colorSpace) {
      GfxColor color;
      state->setStrokeColorSpace(colorSpace);
+@@ -2310,7 +2490,7 @@ void PdfParser::opShowText(Object args[]
+     builder->updateFont(state);
+     fontChanged = gFalse;
+   }
+-  doShowText(args[0].getString());
++  doShowText((GooString *)args[0].getString());
+ }
+ 
+ // TODO not good that numArgs is ignored but args[] is used:
+@@ -2331,7 +2511,7 @@ void PdfParser::opMoveShowText(Object ar
+   ty = state->getLineY() - state->getLeading();
+   state->textMoveTo(tx, ty);
+   builder->updateTextPosition(tx, ty);
+-  doShowText(args[0].getString());
++  doShowText((GooString *)args[0].getString());
+ }
+ 
+ // TODO not good that numArgs is ignored but args[] is used:
+@@ -2354,7 +2534,7 @@ void PdfParser::opMoveSetShowText(Object
+   ty = state->getLineY() - state->getLeading();
+   state->textMoveTo(tx, ty);
+   builder->updateTextPosition(tx, ty);
+-  doShowText(args[2].getString());
++  doShowText((GooString *)args[2].getString());
+ }
+ 
+ // TODO not good that numArgs is ignored but args[] is used:
 @@ -2375,7 +2555,11 @@ void PdfParser::opShowSpaceText(Object a
    wMode = state->getFont()->getWMode();
    a = args[0].getArray();
@@ -517,7 +545,12 @@
      if (obj.isNum()) {
        // this uses the absolute value of the font size to match
        // Acrobat's behavior
-@@ -2392,7 +2576,9 @@ void PdfParser::opShowSpaceText(Object a
+@@ -2388,11 +2572,13 @@ void PdfParser::opShowSpaceText(Object a
+       }
+       builder->updateTextShift(state, obj.getNum());
+     } else if (obj.isString()) {
+-      doShowText(obj.getString());
++      doShowText((GooString *)obj.getString());
      } else {
        error(errSyntaxError, getPos(), "Element of show/space array must be number or string");
      }
@@ -549,10 +582,12 @@
        }
        restoreState();
        // GfxState::restore() does *not* restore the current position,
-@@ -2541,23 +2733,43 @@ void PdfParser::opXObject(Object args[],
+@@ -2540,24 +2732,44 @@ void PdfParser::opXObject(Object args[],
+ {
    Object obj1, obj2, obj3, refObj;
  
-   char *name = args[0].getName();
+-  char *name = args[0].getName();
++  char *name = (char *)args[0].getName();
 +#if defined(POPPLER_NEW_OBJECT_API)
 +  if ((obj1 = res->lookupXObject(name)).isNull()) {
 +#else
diff -r 2b65f646a3b6 -r 3556dcfb8704 graphics/inkscape/patches/patch-src_extension_internal_pdfinput_svg-builder.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_svg-builder.cpp   Tue May 01 06:17:11 2018 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_extension_internal_pdfinput_svg-builder.cpp,v 1.1 2018/05/01 06:17:11 wiz Exp $
+
+Support poppler-0.64.0.
+
+--- src/extension/internal/pdfinput/svg-builder.cpp.orig       2017-08-06 20:44:00.000000000 +0000
++++ src/extension/internal/pdfinput/svg-builder.cpp
+@@ -1020,7 +1020,7 @@ void SvgBuilder::updateFont(GfxState *st
+     GfxFont *font = state->getFont();
+     // Store original name
+     if (font->getName()) {
+-        _font_specification = font->getName()->getCString();
++        _font_specification = (char*)font->getName()->getCString();
+     } else {
+         _font_specification = (char*) "Arial";
+     }



Home | Main Index | Thread Index | Old Index