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:           Sun Sep  4 07:55:03 UTC 2022

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

Log Message:
Adapt to new poppler API


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.92 pkgsrc/graphics/inkscape/distinfo
cvs rdiff -u -r0 -r1.19 \
    pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-parser.cpp
cvs rdiff -u -r0 -r1.8 \
    pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_svg-builder.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.91 pkgsrc/graphics/inkscape/distinfo:1.92
--- pkgsrc/graphics/inkscape/distinfo:1.91      Tue Aug  2 07:31:05 2022
+++ pkgsrc/graphics/inkscape/distinfo   Sun Sep  4 07:55:02 2022
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.91 2022/08/02 07:31:05 wiz Exp $
+$NetBSD: distinfo,v 1.92 2022/09/04 07:55:02 martin Exp $
 
 BLAKE2s (inkscape-1.2.1.tar.xz) = d044b582e20c274f04fb1f3fd8392d0e42798aa7aed284ad81d263cfa4d3926a
 SHA512 (inkscape-1.2.1.tar.xz) = 1f968cb20855e77ad8a1b16f8d4841e3279e139c7b1f41eccb7fbef9a7da092f3ffe7f123d032c395939a002725f68d6f1305b2a87ed68610a69a31052711521
@@ -6,3 +6,5 @@ Size (inkscape-1.2.1.tar.xz) = 98048464 
 SHA1 (patch-CMakeScripts_DefineDependsandFlags.cmake) = 26351c300629e28f6523fe2167a2eed5802435cf
 SHA1 (patch-src_actions_actions-edit.cpp) = 8f18d7889ba2d1d8e39b9ee6c87e0d3df905807d
 SHA1 (patch-src_extension_implementation_script.cpp) = da46549f688da5c9c0ecbeaeac7962e4f261cae4
+SHA1 (patch-src_extension_internal_pdfinput_pdf-parser.cpp) = 45d82e49593cad9de30fc34c78ddc5836b494136
+SHA1 (patch-src_extension_internal_pdfinput_svg-builder.cpp) = 083636dee58dc862fe26a1e81c380d4c508f2382

Added files:

Index: pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-parser.cpp
diff -u /dev/null pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-parser.cpp:1.19
--- /dev/null   Sun Sep  4 07:55:03 2022
+++ pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-parser.cpp       Sun Sep  4 07:55:02 2022
@@ -0,0 +1,29 @@
+$NetBSD: patch-src_extension_internal_pdfinput_pdf-parser.cpp,v 1.19 2022/09/04 07:55:02 martin Exp $
+
+Adapt to new poppler API
+
+--- src/extension/internal/pdfinput/pdf-parser.cpp.orig        2022-05-07 15:43:15.000000000 +0200
++++ src/extension/internal/pdfinput/pdf-parser.cpp     2022-09-04 09:43:47.958399506 +0200
+@@ -685,19 +685,18 @@ void PdfParser::opConcat(Object args[], 
+ // TODO not good that numArgs is ignored but args[] is used:
+ void PdfParser::opSetDash(Object args[], int /*numArgs*/)
+ {
+-  double *dash = nullptr;
++  std::vector<double> dash;
+ 
+   Array *a = args[0].getArray();
+   int length = a->getLength();
+   if (length != 0) {
+-    dash = (double *)gmallocn(length, sizeof(double));
+     for (int i = 0; i < length; ++i) {
+       Object obj;
+-      dash[i] = _POPPLER_CALL_ARGS_DEREF(obj, a->get, i).getNum();
++      dash.push_back(_POPPLER_CALL_ARGS_DEREF(obj, a->get, i).getNum());
+       _POPPLER_FREE(obj);
+     }
+   }
+-  state->setLineDash(dash, length, args[1].getNum());
++  state->setLineDash(std::move(dash), args[1].getNum());
+   builder->updateStyle(state);
+ }
+ 

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.8
--- /dev/null   Sun Sep  4 07:55:03 2022
+++ pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_svg-builder.cpp      Sun Sep  4 07:55:02 2022
@@ -0,0 +1,26 @@
+$NetBSD: patch-src_extension_internal_pdfinput_svg-builder.cpp,v 1.8 2022/09/04 07:55:02 martin Exp $
+
+Adapt to new poppler API
+
+--- src/extension/internal/pdfinput/svg-builder.cpp.orig       2022-05-07 15:43:15.000000000 +0200
++++ src/extension/internal/pdfinput/svg-builder.cpp    2022-09-04 09:46:02.599786816 +0200
+@@ -388,15 +388,13 @@ void SvgBuilder::_setStrokeStyle(SPCSSAt
+     sp_repr_css_set_property(css, "stroke-miterlimit", os_ml.str().c_str());
+ 
+     // Line dash
+-    double *dash_pattern;
+-    int dash_length;
+     double dash_start;
+-    state->getLineDash(&dash_pattern, &dash_length, &dash_start);
+-    if ( dash_length > 0 ) {
++    auto dash_pattern = state->getLineDash(&dash_start);
++    if ( !dash_pattern.empty() ) {
+         Inkscape::CSSOStringStream os_array;
+-        for ( int i = 0 ; i < dash_length ; i++ ) {
++        for ( size_t i = 0; i < dash_pattern.size(); i++ ) {
+             os_array << dash_pattern[i];
+-            if (i < (dash_length - 1)) {
++            if (i < (dash_pattern.size() - 1)) {
+                 os_array << ",";
+             }
+         }



Home | Main Index | Thread Index | Old Index