pkgsrc-Changes archive

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

CVS commit: pkgsrc/graphics/inkscape



Module Name:    pkgsrc
Committed By:   martin
Date:           Sat Jan 11 09:59:06 UTC 2020

Modified Files:
        pkgsrc/graphics/inkscape: distinfo
        pkgsrc/graphics/inkscape/patches:
            patch-src_extension_internal_pdfinput_pdf-parser.cpp
Added Files:
        pkgsrc/graphics/inkscape/patches:
            patch-src_extension_internal_pdfinput_pdf-input.cpp
            patch-src_extension_internal_pdfinput_svg-builder.cpp

Log Message:
Make the pdf-input extension buildable with gcc 8.3.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 pkgsrc/graphics/inkscape/distinfo
cvs rdiff -u -r0 -r1.4 \
    pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-input.cpp \
    pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_svg-builder.cpp
cvs rdiff -u -r1.12 -r1.13 \
    pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-parser.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/graphics/inkscape/distinfo
diff -u pkgsrc/graphics/inkscape/distinfo:1.70 pkgsrc/graphics/inkscape/distinfo:1.71
--- pkgsrc/graphics/inkscape/distinfo:1.70      Sat Nov 23 09:23:21 2019
+++ pkgsrc/graphics/inkscape/distinfo   Sat Jan 11 09:59:05 2020
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.70 2019/11/23 09:23:21 martin Exp $
+$NetBSD: distinfo,v 1.71 2020/01/11 09:59:05 martin Exp $
 
 SHA1 (inkscape-0.92.4.tar.bz2) = 5dfabeab9f6925bf098b5eeba2fe2c82e36927cc
 RMD160 (inkscape-0.92.4.tar.bz2) = 18a998ed050030a6c89621f47e2e11b69d9f151b
@@ -13,8 +13,10 @@ SHA1 (patch-src_CMakeLists.txt) = ccd5ee
 SHA1 (patch-src_extension_internal_emf-inout.cpp) = 4fe6c24007b54d55d11502876e759f62a290922e
 SHA1 (patch-src_extension_internal_emf-print.cpp) = 5da493a452afa4b11bbb204c430fc3e63332c927
 SHA1 (patch-src_extension_internal_metafile-print.cpp) = 798a2f15986cd81d13bf576b1641a810d4d40573
-SHA1 (patch-src_extension_internal_pdfinput_pdf-parser.cpp) = 94e7d8d755a1eafd47b688560498a71efe4ff9e5
+SHA1 (patch-src_extension_internal_pdfinput_pdf-input.cpp) = a837bde05708f5cb7640d4a1d9655c375f67b6ef
+SHA1 (patch-src_extension_internal_pdfinput_pdf-parser.cpp) = 10ce627dc8234364df1e4d91b6e53a664e8707ea
 SHA1 (patch-src_extension_internal_pdfinput_pdf-parser.h) = f0ba86dca2fa52eec64aee8d0d92739422ae86ca
+SHA1 (patch-src_extension_internal_pdfinput_svg-builder.cpp) = 9cc29c7ac03f0c0419d632497c9eeae14fad9631
 SHA1 (patch-src_extension_internal_wmf-inout.cpp) = b49b504d1cf9388d2ad7e1c91c339e7c3d5ffdf5
 SHA1 (patch-src_extension_internal_wmf-print.cpp) = b658d7a0697aaed55671507fe88ce93619ef1070
 SHA1 (patch-src_gradient-drag.cpp) = d6fc1f587a9ad404715fa6e70fe07823a3c68b0c

Index: pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-parser.cpp
diff -u pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-parser.cpp:1.12 pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-parser.cpp:1.13
--- pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-parser.cpp:1.12  Sat Nov 23 09:23:22 2019
+++ pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-parser.cpp       Sat Jan 11 09:59:06 2020
@@ -1,11 +1,12 @@
-$NetBSD: patch-src_extension_internal_pdfinput_pdf-parser.cpp,v 1.12 2019/11/23 09:23:22 martin Exp $
+$NetBSD: patch-src_extension_internal_pdfinput_pdf-parser.cpp,v 1.13 2020/01/11 09:59:06 martin Exp $
 
 Object.h is included in pdf-parser.h -- see patch for pdf-parser.h.
 Fix building with poppler 0.76.x.
 Work around constness bugs (addChar should take a const arg).
+Add some needed const casts for GfxPath objects.
 
---- src/extension/internal/pdfinput/pdf-parser.cpp.orig        2019-01-15 05:29:27.000000000 +0100
-+++ src/extension/internal/pdfinput/pdf-parser.cpp     2019-11-23 10:14:30.693904450 +0100
+--- src/extension/internal/pdfinput/pdf-parser.cpp.orig        2020-01-11 10:11:43.316590715 +0100
++++ src/extension/internal/pdfinput/pdf-parser.cpp     2020-01-11 10:22:11.403079322 +0100
 @@ -41,7 +41,6 @@
  #include "goo/GooString.h"
  #include "GlobalParams.h"
@@ -14,6 +15,15 @@ Work around constness bugs (addChar shou
  #include "Array.h"
  #include "Dict.h"
  #include "Stream.h"
+@@ -342,7 +341,7 @@
+         state->lineTo(cropBox->x1, cropBox->y2);
+         state->closePath();
+         state->clip();
+-        clipHistory->setClip(state->getPath(), clipNormal);
++        clipHistory->setClip(const_cast<GfxPath*>(state->getPath()), clipNormal);
+         builder->setClipPath(state);
+         state->clearPath();
+     }
 @@ -426,7 +425,7 @@
        error(errInternal, -1, "Weird page contents");
        return;
@@ -23,6 +33,19 @@ Work around constness bugs (addChar shou
    go(topLevel);
    delete parser;
    parser = NULL;
+@@ -2143,10 +2142,10 @@
+   if (state->isCurPt() && clip != clipNone) {
+     state->clip();
+     if (clip == clipNormal) {
+-      clipHistory->setClip(state->getPath(), clipNormal);
++      clipHistory->setClip(const_cast<GfxPath*>(state->getPath()), clipNormal);
+       builder->clip(state);
+     } else {
+-      clipHistory->setClip(state->getPath(), clipEO);
++      clipHistory->setClip(const_cast<GfxPath*>(state->getPath()), clipEO);
+       builder->clip(state, true);
+     }
+   }
 @@ -2414,7 +2413,7 @@
    int wMode;
    double riseX, riseY;
@@ -42,3 +65,12 @@ Work around constness bugs (addChar shou
        state->shift(tdx, tdy);
        p += n;
        len -= n;
+@@ -3112,7 +3112,7 @@
+   state->lineTo(bbox[0], bbox[3]);
+   state->closePath();
+   state->clip();
+-  clipHistory->setClip(state->getPath());
++  clipHistory->setClip(const_cast<GfxPath*>(state->getPath()));
+   builder->clip(state);
+   state->clearPath();
+ 

Added files:

Index: pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-input.cpp
diff -u /dev/null pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-input.cpp:1.4
--- /dev/null   Sat Jan 11 09:59:06 2020
+++ pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-input.cpp        Sat Jan 11 09:59:05 2020
@@ -0,0 +1,20 @@
+$NetBSD: patch-src_extension_internal_pdfinput_pdf-input.cpp,v 1.4 2020/01/11 09:59:05 martin Exp $
+
+Properly use uniqe_ptr method reset() to set the pointer (this is not
+compiled as C++14 yet, so no make_unique).
+
+--- src/extension/internal/pdfinput/pdf-input.cpp.orig 2019-01-15 05:29:27.000000000 +0100
++++ src/extension/internal/pdfinput/pdf-input.cpp      2020-01-11 10:36:40.264346717 +0100
+@@ -691,10 +691,10 @@
+         if (poppler_datadir != NULL) {
+             globalParams = new GlobalParams(poppler_datadir);
+         } else {
+-            globalParams = new GlobalParams();
++            globalParams.reset(new GlobalParams());
+         }
+ #else
+-        globalParams = new GlobalParams();
++        globalParams.reset(new GlobalParams());
+ #endif // ENABLE_OSX_APP_LOCATIONS
+     }
+ 
Index: pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_svg-builder.cpp
diff -u /dev/null pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_svg-builder.cpp:1.4
--- /dev/null   Sat Jan 11 09:59:06 2020
+++ pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_svg-builder.cpp      Sat Jan 11 09:59:06 2020
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_extension_internal_pdfinput_svg-builder.cpp,v 1.4 2020/01/11 09:59:06 martin Exp $
+
+Add const casts for GfxPath.
+
+--- src/extension/internal/pdfinput/svg-builder.cpp.orig       2019-01-15 05:29:27.000000000 +0100
++++ src/extension/internal/pdfinput/svg-builder.cpp    2020-01-11 10:25:56.021965309 +0100
+@@ -441,7 +441,7 @@
+  */
+ void SvgBuilder::addPath(GfxState *state, bool fill, bool stroke, bool even_odd) {
+     Inkscape::XML::Node *path = _xml_doc->createElement("svg:path");
+-    gchar *pathtext = svgInterpretPath(state->getPath());
++    gchar *pathtext = svgInterpretPath(const_cast<GfxPath*>(state->getPath()));
+     path->setAttribute("d", pathtext);
+     g_free(pathtext);
+ 
+@@ -528,7 +528,7 @@
+     clip_path->setAttribute("clipPathUnits", "userSpaceOnUse");
+     // Create the path
+     Inkscape::XML::Node *path = _xml_doc->createElement("svg:path");
+-    gchar *pathtext = svgInterpretPath(state->getPath());
++    gchar *pathtext = svgInterpretPath(const_cast<GfxPath*>(state->getPath()));
+     path->setAttribute("d", pathtext);
+     g_free(pathtext);
+     if (even_odd) {



Home | Main Index | Thread Index | Old Index