Make the pdf-input extension buildable with gcc 8.3.diff -r1.70 -r1.71 pkgsrc/graphics/inkscape/distinfo
(martin)
@@ -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 | |||
3 | SHA1 (inkscape-0.92.4.tar.bz2) = 5dfabeab9f6925bf098b5eeba2fe2c82e36927cc | 3 | SHA1 (inkscape-0.92.4.tar.bz2) = 5dfabeab9f6925bf098b5eeba2fe2c82e36927cc | |
4 | RMD160 (inkscape-0.92.4.tar.bz2) = 18a998ed050030a6c89621f47e2e11b69d9f151b | 4 | RMD160 (inkscape-0.92.4.tar.bz2) = 18a998ed050030a6c89621f47e2e11b69d9f151b | |
5 | SHA512 (inkscape-0.92.4.tar.bz2) = b9034605a79cd8aea808edf42e284819951ae1ea67778f0922f4c10224e94aca6c844acbc2294625773f0a7047d4e32ccdada876238a792a2c17db172c88e120 | 5 | SHA512 (inkscape-0.92.4.tar.bz2) = b9034605a79cd8aea808edf42e284819951ae1ea67778f0922f4c10224e94aca6c844acbc2294625773f0a7047d4e32ccdada876238a792a2c17db172c88e120 | |
6 | Size (inkscape-0.92.4.tar.bz2) = 31929728 bytes | 6 | Size (inkscape-0.92.4.tar.bz2) = 31929728 bytes | |
7 | SHA1 (patch-CMakeScripts_Pod2man.cmake) = 6176956791ae3e8eb007345e5ec19100812bdeb8 | 7 | SHA1 (patch-CMakeScripts_Pod2man.cmake) = 6176956791ae3e8eb007345e5ec19100812bdeb8 | |
8 | SHA1 (patch-ag) = 6b6000f3940ec6db9404a206f9757928c1d5740b | 8 | SHA1 (patch-ag) = 6b6000f3940ec6db9404a206f9757928c1d5740b | |
9 | SHA1 (patch-aj) = 31d6cc8bb179629023bd04bcac0fd935b2c9636d | 9 | SHA1 (patch-aj) = 31d6cc8bb179629023bd04bcac0fd935b2c9636d | |
10 | SHA1 (patch-ap) = 412509a03d26e925548e3371529a1273db958611 | 10 | SHA1 (patch-ap) = 412509a03d26e925548e3371529a1273db958611 | |
11 | SHA1 (patch-aq) = fb7de44d33fdc5895ce84ca8d44ff6a6c328c402 | 11 | SHA1 (patch-aq) = fb7de44d33fdc5895ce84ca8d44ff6a6c328c402 | |
12 | SHA1 (patch-src_CMakeLists.txt) = ccd5eeca81891f83c5eaf8cb80d33f001beaf55c | 12 | SHA1 (patch-src_CMakeLists.txt) = ccd5eeca81891f83c5eaf8cb80d33f001beaf55c | |
13 | SHA1 (patch-src_extension_internal_emf-inout.cpp) = 4fe6c24007b54d55d11502876e759f62a290922e | 13 | SHA1 (patch-src_extension_internal_emf-inout.cpp) = 4fe6c24007b54d55d11502876e759f62a290922e | |
14 | SHA1 (patch-src_extension_internal_emf-print.cpp) = 5da493a452afa4b11bbb204c430fc3e63332c927 | 14 | SHA1 (patch-src_extension_internal_emf-print.cpp) = 5da493a452afa4b11bbb204c430fc3e63332c927 | |
15 | SHA1 (patch-src_extension_internal_metafile-print.cpp) = 798a2f15986cd81d13bf576b1641a810d4d40573 | 15 | SHA1 (patch-src_extension_internal_metafile-print.cpp) = 798a2f15986cd81d13bf576b1641a810d4d40573 | |
16 | SHA1 (patch-src_extension_internal_pdfinput_pdf-parser.cpp) = 94e7d8d755a1eafd47b688560498a71efe4ff9e5 | 16 | SHA1 (patch-src_extension_internal_pdfinput_pdf-input.cpp) = a837bde05708f5cb7640d4a1d9655c375f67b6ef | |
17 | SHA1 (patch-src_extension_internal_pdfinput_pdf-parser.cpp) = 10ce627dc8234364df1e4d91b6e53a664e8707ea | |||
17 | SHA1 (patch-src_extension_internal_pdfinput_pdf-parser.h) = f0ba86dca2fa52eec64aee8d0d92739422ae86ca | 18 | SHA1 (patch-src_extension_internal_pdfinput_pdf-parser.h) = f0ba86dca2fa52eec64aee8d0d92739422ae86ca | |
19 | SHA1 (patch-src_extension_internal_pdfinput_svg-builder.cpp) = 9cc29c7ac03f0c0419d632497c9eeae14fad9631 | |||
18 | SHA1 (patch-src_extension_internal_wmf-inout.cpp) = b49b504d1cf9388d2ad7e1c91c339e7c3d5ffdf5 | 20 | SHA1 (patch-src_extension_internal_wmf-inout.cpp) = b49b504d1cf9388d2ad7e1c91c339e7c3d5ffdf5 | |
19 | SHA1 (patch-src_extension_internal_wmf-print.cpp) = b658d7a0697aaed55671507fe88ce93619ef1070 | 21 | SHA1 (patch-src_extension_internal_wmf-print.cpp) = b658d7a0697aaed55671507fe88ce93619ef1070 | |
20 | SHA1 (patch-src_gradient-drag.cpp) = d6fc1f587a9ad404715fa6e70fe07823a3c68b0c | 22 | SHA1 (patch-src_gradient-drag.cpp) = d6fc1f587a9ad404715fa6e70fe07823a3c68b0c | |
21 | SHA1 (patch-src_io_inkjar.cpp) = 060d59225cfe7b66db5e9f41e76860df9ce12d01 | 23 | SHA1 (patch-src_io_inkjar.cpp) = 060d59225cfe7b66db5e9f41e76860df9ce12d01 | |
22 | SHA1 (patch-src_live__effects_lpe-ellipse__5pts.cpp) = e909a5b2e65f931246e5b3de7145739d1b6f6209 | 24 | SHA1 (patch-src_live__effects_lpe-ellipse__5pts.cpp) = e909a5b2e65f931246e5b3de7145739d1b6f6209 | |
23 | SHA1 (patch-src_live__effects_lpe-lattice.cpp) = 17040a794a312ebecb63dd7b19be8f3337b18c47 | 25 | SHA1 (patch-src_live__effects_lpe-lattice.cpp) = 17040a794a312ebecb63dd7b19be8f3337b18c47 | |
24 | SHA1 (patch-src_live__effects_lpe-lattice2.cpp) = bcff9e9177895168a4ef888376f1c3942e7786fb | 26 | SHA1 (patch-src_live__effects_lpe-lattice2.cpp) = bcff9e9177895168a4ef888376f1c3942e7786fb | |
25 | SHA1 (patch-src_sp-ellipse.cpp) = e0b273e14c8174712b40f2c83c2e5408644bb9c9 | 27 | SHA1 (patch-src_sp-ellipse.cpp) = e0b273e14c8174712b40f2c83c2e5408644bb9c9 | |
26 | SHA1 (patch-src_svg_svg-length.cpp) = 41679ab161275577ccd3f525653e7766ca4f92c6 | 28 | SHA1 (patch-src_svg_svg-length.cpp) = 41679ab161275577ccd3f525653e7766ca4f92c6 | |
27 | SHA1 (patch-src_trace_siox.cpp) = daeff4626dace6997f64ab9c96b0bfb304e724c8 | 29 | SHA1 (patch-src_trace_siox.cpp) = daeff4626dace6997f64ab9c96b0bfb304e724c8 | |
28 | SHA1 (patch-src_ui_dialog_grid-arrange-tab.cpp) = 0ea5b92f2bf923efd149a11d9fff3d5a1d5e5421 | 30 | SHA1 (patch-src_ui_dialog_grid-arrange-tab.cpp) = 0ea5b92f2bf923efd149a11d9fff3d5a1d5e5421 | |
29 | SHA1 (patch-src_ui_tool_node.h) = 2900ab737d6b9245aabefee5e79564bdbaec57bc | 31 | SHA1 (patch-src_ui_tool_node.h) = 2900ab737d6b9245aabefee5e79564bdbaec57bc | |
30 | SHA1 (patch-src_util_fixed__point.h) = 40b38724541a9dd5ea241370b23dfb55d93cbb58 | 32 | SHA1 (patch-src_util_fixed__point.h) = 40b38724541a9dd5ea241370b23dfb55d93cbb58 |
$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
}
$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) {
@@ -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 | |||
3 | Object.h is included in pdf-parser.h -- see patch for pdf-parser.h. | 3 | Object.h is included in pdf-parser.h -- see patch for pdf-parser.h. | |
4 | Fix building with poppler 0.76.x. | 4 | Fix building with poppler 0.76.x. | |
5 | Work around constness bugs (addChar should take a const arg). | 5 | Work around constness bugs (addChar should take a const arg). | |
6 | Add 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 |