diff options
author | wiz <wiz@pkgsrc.org> | 2018-12-21 08:46:16 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2018-12-21 08:46:16 +0000 |
commit | e63414c0682bde79a3735542f33ac8c5a84eacae (patch) | |
tree | 5c04c15e8bfef9a5340b2c436bd74f49b989a0bf /graphics | |
parent | 86b3955f92b8f719d067a9b756dcc0792e9a022d (diff) | |
download | pkgsrc-e63414c0682bde79a3735542f33ac8c5a84eacae.tar.gz |
inkscape: get this closer to building with poppler-0.72
More work to do.
Diffstat (limited to 'graphics')
3 files changed, 81 insertions, 8 deletions
diff --git a/graphics/inkscape/distinfo b/graphics/inkscape/distinfo index 0d2c99cb186..5dca554d07f 100644 --- a/graphics/inkscape/distinfo +++ b/graphics/inkscape/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.65 2018/06/28 11:18:58 jperkin Exp $ +$NetBSD: distinfo,v 1.66 2018/12/21 08:46:16 wiz Exp $ SHA1 (inkscape-0.92.2.tar.bz2) = c620d7aac594a0f839f2f7840d57e26f00991d16 RMD160 (inkscape-0.92.2.tar.bz2) = 5508b38c47ed0a860a734eef8f8ca8e53f4e923a @@ -17,8 +17,8 @@ SHA1 (patch-src_extension_internal_emf-inout.cpp) = 4fe6c24007b54d55d11502876e75 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-input.cpp) = 437cb3a461df047fef3c91e86c89cdcf15ef9965 -SHA1 (patch-src_extension_internal_pdfinput_pdf-parser.cpp) = a15b784ff4941807c31958643d671961fff248ac -SHA1 (patch-src_extension_internal_pdfinput_pdf-parser.h) = ba408f45544853f9323f8bd879bd55604072bb7a +SHA1 (patch-src_extension_internal_pdfinput_pdf-parser.cpp) = e81a411cbddc3e061aa65b4ecdac2a16883cf1d5 +SHA1 (patch-src_extension_internal_pdfinput_pdf-parser.h) = 46caec54768a353fc9f9b781373d3b231dfc8392 SHA1 (patch-src_extension_internal_pdfinput_svg-builder.cpp) = d7bfff0d3a1309b96eb70bc75b08d5d1ddf400da SHA1 (patch-src_extension_internal_wmf-inout.cpp) = b49b504d1cf9388d2ad7e1c91c339e7c3d5ffdf5 SHA1 (patch-src_extension_internal_wmf-print.cpp) = b658d7a0697aaed55671507fe88ce93619ef1070 diff --git a/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-parser.cpp b/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-parser.cpp index 1be83af2ca5..1c705c6acee 100644 --- a/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-parser.cpp +++ b/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-parser.cpp @@ -1,4 +1,4 @@ -$NetBSD: patch-src_extension_internal_pdfinput_pdf-parser.cpp,v 1.8 2018/06/21 10:25:35 wiz Exp $ +$NetBSD: patch-src_extension_internal_pdfinput_pdf-parser.cpp,v 1.9 2018/12/21 08:46:16 wiz Exp $ - Object.h is included in pdf-parser.h -- see patch for pdf-parser.h. - Support poppler 0.58 @@ -19,6 +19,15 @@ $NetBSD: patch-src_extension_internal_pdfinput_pdf-parser.cpp,v 1.8 2018/06/21 1 #include "Array.h" #include "Dict.h" #include "Stream.h" +@@ -318,7 +317,7 @@ PdfParser::PdfParser(XRef *xrefA, + builder->setDocumentSize(Inkscape::Util::Quantity::convert(state->getPageWidth(), "pt", "px"), + Inkscape::Util::Quantity::convert(state->getPageHeight(), "pt", "px")); + +- double *ctm = state->getCTM(); ++ _POPPLER_CONST double *ctm = state->getCTM(); + double scaledCTM[6]; + for (int i = 0; i < 6; ++i) { + baseMatrix[i] = ctm[i]; @@ -414,13 +413,21 @@ void PdfParser::parse(Object *obj, GBool if (obj->isArray()) { @@ -107,6 +116,17 @@ $NetBSD: patch-src_extension_internal_pdfinput_pdf-parser.cpp,v 1.8 2018/06/21 1 } } +@@ -543,8 +570,8 @@ const char *PdfParser::getPreviousOperat + } + + void PdfParser::execOp(Object *cmd, Object args[], int numArgs) { +- PdfOperator *op; +- char *name; ++ _POPPLER_CONST PdfOperator *op; ++ _POPPLER_CONST char *name; + Object *argPtr; + int i; + @@ -692,9 +719,13 @@ void PdfParser::opSetDash(Object args[], if (length != 0) { dash = (double *)gmallocn(length, sizeof(double)); @@ -509,6 +529,33 @@ $NetBSD: patch-src_extension_internal_pdfinput_pdf-parser.cpp,v 1.8 2018/06/21 1 if (colorSpace) { GfxColor color; state->setStrokeColorSpace(colorSpace); +@@ -1572,7 +1751,7 @@ void PdfParser::doShadingPatternFillFall + GBool stroke, GBool eoFill) { + GfxShading *shading; + GfxPath *savedPath; +- double *ctm, *btm, *ptm; ++ _POPPLER_CONST double *ctm, *btm, *ptm; + double m[6], ictm[6], m1[6]; + double xMin, yMin, xMax, yMax; + double det; +@@ -1814,7 +1993,7 @@ void PdfParser::doFunctionShFill1(GfxFun + GfxColor color0M, color1M, colorM0, colorM1, colorMM; + GfxColor colors2[4]; + double functionColorDelta = colorDeltas[pdfFunctionShading-1]; +- double *matrix; ++ _POPPLER_CONST double *matrix; + double xM, yM; + int nComps, i, j; + +@@ -1994,7 +2173,7 @@ void PdfParser::doPatchMeshShFill(GfxPat + } + } + +-void PdfParser::fillPatch(GfxPatch *patch, int nComps, int depth) { ++void PdfParser::fillPatch(_POPPLER_CONST GfxPatch *patch, int nComps, int depth) { + GfxPatch patch00 = blankPatch(); + GfxPatch patch01 = blankPatch(); + GfxPatch patch10 = blankPatch(); @@ -2310,7 +2489,7 @@ void PdfParser::opShowText(Object args[] builder->updateFont(state); fontChanged = gFalse; @@ -563,6 +610,20 @@ $NetBSD: patch-src_extension_internal_pdfinput_pdf-parser.cpp,v 1.8 2018/06/21 1 } } +@@ -2405,11 +2590,11 @@ void PdfParser::doShowText(GooString *s) + double x, y, dx, dy, tdx, tdy; + double originX, originY, tOriginX, tOriginY; + double oldCTM[6], newCTM[6]; +- double *mat; ++ const double *mat; + Object charProc; + Dict *resDict; + Parser *oldParser; +- char *p; ++ _POPPLER_CONST char *p; + int len, n, uLen; + + font = state->getFont(); @@ -2465,7 +2650,11 @@ void PdfParser::doShowText(GooString *s) //out->updateCTM(state, 1, 0, 0, 1, 0, 0); if (0){ /*!out->beginType3Char(state, curX + riseX, curY + riseY, tdx, tdy, diff --git a/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-parser.h b/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-parser.h index a72850c32d8..b9e8c6da770 100644 --- a/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-parser.h +++ b/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-parser.h @@ -1,15 +1,27 @@ -$NetBSD: patch-src_extension_internal_pdfinput_pdf-parser.h,v 1.2 2015/02/03 13:55:12 adam Exp $ +$NetBSD: patch-src_extension_internal_pdfinput_pdf-parser.h,v 1.3 2018/12/21 08:46:16 wiz Exp $ Explicitly include poppler/Object.h; otherwise Python's Object.h gets included. ---- src/extension/internal/pdfinput/pdf-parser.h.orig 2012-11-18 14:42:04.000000000 +0000 +--- src/extension/internal/pdfinput/pdf-parser.h.orig 2017-08-06 20:44:00.000000000 +0000 +++ src/extension/internal/pdfinput/pdf-parser.h -@@ -26,7 +26,7 @@ namespace Inkscape { +@@ -25,8 +25,18 @@ namespace Inkscape { + // TODO clean up and remove using: using Inkscape::Extension::Internal::SvgBuilder; - #include "goo/gtypes.h" +-#include "goo/gtypes.h" -#include "Object.h" +#include "poppler/Object.h" ++ ++// poppler 0.72 ++#define getCString c_str ++ ++// poppler 0.71 ++typedef bool GBool; ++#define gTrue true ++#define gFalse false ++ ++// poppler 0.70 ++#define _POPPLER_CONST const class GooString; class XRef; |