Sat Jan 11 09:59:06 2020 UTC ()
Make the pdf-input extension buildable with gcc 8.3.


(martin)
diff -r1.70 -r1.71 pkgsrc/graphics/inkscape/distinfo
diff -r0 -r1.4 pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-input.cpp
diff -r0 -r1.4 pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_svg-builder.cpp
diff -r1.12 -r1.13 pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-parser.cpp

cvs diff -r1.70 -r1.71 pkgsrc/graphics/inkscape/distinfo (expand / switch to unified diff)

--- pkgsrc/graphics/inkscape/distinfo 2019/11/23 09:23:21 1.70
+++ pkgsrc/graphics/inkscape/distinfo 2020/01/11 09:59:05 1.71
@@ -1,30 +1,32 @@ @@ -1,30 +1,32 @@
1$NetBSD: distinfo,v 1.70 2019/11/23 09:23:21 martin Exp $ 1$NetBSD: distinfo,v 1.71 2020/01/11 09:59:05 martin Exp $
2 2
3SHA1 (inkscape-0.92.4.tar.bz2) = 5dfabeab9f6925bf098b5eeba2fe2c82e36927cc 3SHA1 (inkscape-0.92.4.tar.bz2) = 5dfabeab9f6925bf098b5eeba2fe2c82e36927cc
4RMD160 (inkscape-0.92.4.tar.bz2) = 18a998ed050030a6c89621f47e2e11b69d9f151b 4RMD160 (inkscape-0.92.4.tar.bz2) = 18a998ed050030a6c89621f47e2e11b69d9f151b
5SHA512 (inkscape-0.92.4.tar.bz2) = b9034605a79cd8aea808edf42e284819951ae1ea67778f0922f4c10224e94aca6c844acbc2294625773f0a7047d4e32ccdada876238a792a2c17db172c88e120 5SHA512 (inkscape-0.92.4.tar.bz2) = b9034605a79cd8aea808edf42e284819951ae1ea67778f0922f4c10224e94aca6c844acbc2294625773f0a7047d4e32ccdada876238a792a2c17db172c88e120
6Size (inkscape-0.92.4.tar.bz2) = 31929728 bytes 6Size (inkscape-0.92.4.tar.bz2) = 31929728 bytes
7SHA1 (patch-CMakeScripts_Pod2man.cmake) = 6176956791ae3e8eb007345e5ec19100812bdeb8 7SHA1 (patch-CMakeScripts_Pod2man.cmake) = 6176956791ae3e8eb007345e5ec19100812bdeb8
8SHA1 (patch-ag) = 6b6000f3940ec6db9404a206f9757928c1d5740b 8SHA1 (patch-ag) = 6b6000f3940ec6db9404a206f9757928c1d5740b
9SHA1 (patch-aj) = 31d6cc8bb179629023bd04bcac0fd935b2c9636d 9SHA1 (patch-aj) = 31d6cc8bb179629023bd04bcac0fd935b2c9636d
10SHA1 (patch-ap) = 412509a03d26e925548e3371529a1273db958611 10SHA1 (patch-ap) = 412509a03d26e925548e3371529a1273db958611
11SHA1 (patch-aq) = fb7de44d33fdc5895ce84ca8d44ff6a6c328c402 11SHA1 (patch-aq) = fb7de44d33fdc5895ce84ca8d44ff6a6c328c402
12SHA1 (patch-src_CMakeLists.txt) = ccd5eeca81891f83c5eaf8cb80d33f001beaf55c 12SHA1 (patch-src_CMakeLists.txt) = ccd5eeca81891f83c5eaf8cb80d33f001beaf55c
13SHA1 (patch-src_extension_internal_emf-inout.cpp) = 4fe6c24007b54d55d11502876e759f62a290922e 13SHA1 (patch-src_extension_internal_emf-inout.cpp) = 4fe6c24007b54d55d11502876e759f62a290922e
14SHA1 (patch-src_extension_internal_emf-print.cpp) = 5da493a452afa4b11bbb204c430fc3e63332c927 14SHA1 (patch-src_extension_internal_emf-print.cpp) = 5da493a452afa4b11bbb204c430fc3e63332c927
15SHA1 (patch-src_extension_internal_metafile-print.cpp) = 798a2f15986cd81d13bf576b1641a810d4d40573 15SHA1 (patch-src_extension_internal_metafile-print.cpp) = 798a2f15986cd81d13bf576b1641a810d4d40573
16SHA1 (patch-src_extension_internal_pdfinput_pdf-parser.cpp) = 94e7d8d755a1eafd47b688560498a71efe4ff9e5 16SHA1 (patch-src_extension_internal_pdfinput_pdf-input.cpp) = a837bde05708f5cb7640d4a1d9655c375f67b6ef
 17SHA1 (patch-src_extension_internal_pdfinput_pdf-parser.cpp) = 10ce627dc8234364df1e4d91b6e53a664e8707ea
17SHA1 (patch-src_extension_internal_pdfinput_pdf-parser.h) = f0ba86dca2fa52eec64aee8d0d92739422ae86ca 18SHA1 (patch-src_extension_internal_pdfinput_pdf-parser.h) = f0ba86dca2fa52eec64aee8d0d92739422ae86ca
 19SHA1 (patch-src_extension_internal_pdfinput_svg-builder.cpp) = 9cc29c7ac03f0c0419d632497c9eeae14fad9631
18SHA1 (patch-src_extension_internal_wmf-inout.cpp) = b49b504d1cf9388d2ad7e1c91c339e7c3d5ffdf5 20SHA1 (patch-src_extension_internal_wmf-inout.cpp) = b49b504d1cf9388d2ad7e1c91c339e7c3d5ffdf5
19SHA1 (patch-src_extension_internal_wmf-print.cpp) = b658d7a0697aaed55671507fe88ce93619ef1070 21SHA1 (patch-src_extension_internal_wmf-print.cpp) = b658d7a0697aaed55671507fe88ce93619ef1070
20SHA1 (patch-src_gradient-drag.cpp) = d6fc1f587a9ad404715fa6e70fe07823a3c68b0c 22SHA1 (patch-src_gradient-drag.cpp) = d6fc1f587a9ad404715fa6e70fe07823a3c68b0c
21SHA1 (patch-src_io_inkjar.cpp) = 060d59225cfe7b66db5e9f41e76860df9ce12d01 23SHA1 (patch-src_io_inkjar.cpp) = 060d59225cfe7b66db5e9f41e76860df9ce12d01
22SHA1 (patch-src_live__effects_lpe-ellipse__5pts.cpp) = e909a5b2e65f931246e5b3de7145739d1b6f6209 24SHA1 (patch-src_live__effects_lpe-ellipse__5pts.cpp) = e909a5b2e65f931246e5b3de7145739d1b6f6209
23SHA1 (patch-src_live__effects_lpe-lattice.cpp) = 17040a794a312ebecb63dd7b19be8f3337b18c47 25SHA1 (patch-src_live__effects_lpe-lattice.cpp) = 17040a794a312ebecb63dd7b19be8f3337b18c47
24SHA1 (patch-src_live__effects_lpe-lattice2.cpp) = bcff9e9177895168a4ef888376f1c3942e7786fb 26SHA1 (patch-src_live__effects_lpe-lattice2.cpp) = bcff9e9177895168a4ef888376f1c3942e7786fb
25SHA1 (patch-src_sp-ellipse.cpp) = e0b273e14c8174712b40f2c83c2e5408644bb9c9 27SHA1 (patch-src_sp-ellipse.cpp) = e0b273e14c8174712b40f2c83c2e5408644bb9c9
26SHA1 (patch-src_svg_svg-length.cpp) = 41679ab161275577ccd3f525653e7766ca4f92c6 28SHA1 (patch-src_svg_svg-length.cpp) = 41679ab161275577ccd3f525653e7766ca4f92c6
27SHA1 (patch-src_trace_siox.cpp) = daeff4626dace6997f64ab9c96b0bfb304e724c8 29SHA1 (patch-src_trace_siox.cpp) = daeff4626dace6997f64ab9c96b0bfb304e724c8
28SHA1 (patch-src_ui_dialog_grid-arrange-tab.cpp) = 0ea5b92f2bf923efd149a11d9fff3d5a1d5e5421 30SHA1 (patch-src_ui_dialog_grid-arrange-tab.cpp) = 0ea5b92f2bf923efd149a11d9fff3d5a1d5e5421
29SHA1 (patch-src_ui_tool_node.h) = 2900ab737d6b9245aabefee5e79564bdbaec57bc 31SHA1 (patch-src_ui_tool_node.h) = 2900ab737d6b9245aabefee5e79564bdbaec57bc
30SHA1 (patch-src_util_fixed__point.h) = 40b38724541a9dd5ea241370b23dfb55d93cbb58 32SHA1 (patch-src_util_fixed__point.h) = 40b38724541a9dd5ea241370b23dfb55d93cbb58

File Added: pkgsrc/graphics/inkscape/patches/Attic/patch-src_extension_internal_pdfinput_pdf-input.cpp
$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
     }
 

File Added: pkgsrc/graphics/inkscape/patches/Attic/patch-src_extension_internal_pdfinput_svg-builder.cpp
$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) {

cvs diff -r1.12 -r1.13 pkgsrc/graphics/inkscape/patches/Attic/patch-src_extension_internal_pdfinput_pdf-parser.cpp (expand / switch to unified diff)

--- pkgsrc/graphics/inkscape/patches/Attic/patch-src_extension_internal_pdfinput_pdf-parser.cpp 2019/11/23 09:23:22 1.12
+++ pkgsrc/graphics/inkscape/patches/Attic/patch-src_extension_internal_pdfinput_pdf-parser.cpp 2020/01/11 09:59:06 1.13
@@ -1,44 +1,76 @@ @@ -1,44 +1,76 @@
1$NetBSD: patch-src_extension_internal_pdfinput_pdf-parser.cpp,v 1.12 2019/11/23 09:23:22 martin Exp $ 1$NetBSD: patch-src_extension_internal_pdfinput_pdf-parser.cpp,v 1.13 2020/01/11 09:59:06 martin Exp $
2 2
3Object.h is included in pdf-parser.h -- see patch for pdf-parser.h. 3Object.h is included in pdf-parser.h -- see patch for pdf-parser.h.
4Fix building with poppler 0.76.x. 4Fix building with poppler 0.76.x.
5Work around constness bugs (addChar should take a const arg). 5Work around constness bugs (addChar should take a const arg).
 6Add some needed const casts for GfxPath objects.
6 7
7--- src/extension/internal/pdfinput/pdf-parser.cpp.orig 2019-01-15 05:29:27.000000000 +0100 8--- src/extension/internal/pdfinput/pdf-parser.cpp.orig 2020-01-11 10:11:43.316590715 +0100
8+++ src/extension/internal/pdfinput/pdf-parser.cpp 2019-11-23 10:14:30.693904450 +0100 9+++ src/extension/internal/pdfinput/pdf-parser.cpp 2020-01-11 10:22:11.403079322 +0100
9@@ -41,7 +41,6 @@ 10@@ -41,7 +41,6 @@
10 #include "goo/GooString.h" 11 #include "goo/GooString.h"
11 #include "GlobalParams.h" 12 #include "GlobalParams.h"
12 #include "CharTypes.h" 13 #include "CharTypes.h"
13-#include "Object.h" 14-#include "Object.h"
14 #include "Array.h" 15 #include "Array.h"
15 #include "Dict.h" 16 #include "Dict.h"
16 #include "Stream.h" 17 #include "Stream.h"
 18@@ -342,7 +341,7 @@
 19 state->lineTo(cropBox->x1, cropBox->y2);
 20 state->closePath();
 21 state->clip();
 22- clipHistory->setClip(state->getPath(), clipNormal);
 23+ clipHistory->setClip(const_cast<GfxPath*>(state->getPath()), clipNormal);
 24 builder->setClipPath(state);
 25 state->clearPath();
 26 }
17@@ -426,7 +425,7 @@ 27@@ -426,7 +425,7 @@
18 error(errInternal, -1, "Weird page contents"); 28 error(errInternal, -1, "Weird page contents");
19 return; 29 return;
20 } 30 }
21- parser = new Parser(xref, new Lexer(xref, obj), gFalse); 31- parser = new Parser(xref, new Lexer(xref, obj), gFalse);
22+ parser = new Parser(xref, obj, gFalse); 32+ parser = new Parser(xref, obj, gFalse);
23 go(topLevel); 33 go(topLevel);
24 delete parser; 34 delete parser;
25 parser = NULL; 35 parser = NULL;
 36@@ -2143,10 +2142,10 @@
 37 if (state->isCurPt() && clip != clipNone) {
 38 state->clip();
 39 if (clip == clipNormal) {
 40- clipHistory->setClip(state->getPath(), clipNormal);
 41+ clipHistory->setClip(const_cast<GfxPath*>(state->getPath()), clipNormal);
 42 builder->clip(state);
 43 } else {
 44- clipHistory->setClip(state->getPath(), clipEO);
 45+ clipHistory->setClip(const_cast<GfxPath*>(state->getPath()), clipEO);
 46 builder->clip(state, true);
 47 }
 48 }
26@@ -2414,7 +2413,7 @@ 49@@ -2414,7 +2413,7 @@
27 int wMode; 50 int wMode;
28 double riseX, riseY; 51 double riseX, riseY;
29 CharCode code; 52 CharCode code;
30- Unicode *u = NULL; 53- Unicode *u = NULL;
31+ const Unicode *u = NULL; 54+ const Unicode *u = NULL;
32 double x, y, dx, dy, tdx, tdy; 55 double x, y, dx, dy, tdx, tdy;
33 double originX, originY, tOriginX, tOriginY; 56 double originX, originY, tOriginX, tOriginY;
34 double oldCTM[6], newCTM[6]; 57 double oldCTM[6], newCTM[6];
35@@ -2537,7 +2536,8 @@ 58@@ -2537,7 +2536,8 @@
36 originY *= state->getFontSize(); 59 originY *= state->getFontSize();
37 state->textTransformDelta(originX, originY, &tOriginX, &tOriginY); 60 state->textTransformDelta(originX, originY, &tOriginX, &tOriginY);
38 builder->addChar(state, state->getCurX() + riseX, state->getCurY() + riseY, 61 builder->addChar(state, state->getCurX() + riseX, state->getCurY() + riseY,
39- dx, dy, tOriginX, tOriginY, code, n, u, uLen); 62- dx, dy, tOriginX, tOriginY, code, n, u, uLen);
40+ dx, dy, tOriginX, tOriginY, code, n, 63+ dx, dy, tOriginX, tOriginY, code, n,
41+ const_cast<Unicode*>(u), uLen); 64+ const_cast<Unicode*>(u), uLen);
42 state->shift(tdx, tdy); 65 state->shift(tdx, tdy);
43 p += n; 66 p += n;
44 len -= n; 67 len -= n;
 68@@ -3112,7 +3112,7 @@
 69 state->lineTo(bbox[0], bbox[3]);
 70 state->closePath();
 71 state->clip();
 72- clipHistory->setClip(state->getPath());
 73+ clipHistory->setClip(const_cast<GfxPath*>(state->getPath()));
 74 builder->clip(state);
 75 state->clearPath();
 76