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:   wiz
Date:           Wed Jun 24 21:57:17 UTC 2026

Modified Files:
        pkgsrc/graphics/inkscape: Makefile distinfo
        pkgsrc/graphics/inkscape/patches:
            patch-CMakeScripts_DefineDependsandFlags.cmake
Added Files:
        pkgsrc/graphics/inkscape/patches:
            patch-src_extension_internal_pdfinput_pdf-input.cpp
            patch-src_extension_internal_pdfinput_pdf-parser.cpp
            patch-src_extension_internal_pdfinput_pdf-parser.h
            patch-src_extension_internal_pdfinput_pdf-utils.cpp
            patch-src_extension_internal_pdfinput_pdf-utils.h
            patch-src_extension_internal_pdfinput_poppler-cairo-font-engine.cpp
            patch-src_extension_internal_pdfinput_poppler-transition-api.h
            patch-src_extension_internal_pdfinput_poppler-utils.cpp
            patch-src_extension_internal_pdfinput_svg-builder.cpp
            patch-src_extension_internal_pdfinput_svg-builder.h

Log Message:
inkscape: fix build with poppler 26.06.0

Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.327 -r1.328 pkgsrc/graphics/inkscape/Makefile
cvs rdiff -u -r1.107 -r1.108 pkgsrc/graphics/inkscape/distinfo
cvs rdiff -u -r1.5 -r1.6 \
    pkgsrc/graphics/inkscape/patches/patch-CMakeScripts_DefineDependsandFlags.cmake
cvs rdiff -u -r0 -r1.8 \
    pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-input.cpp
cvs rdiff -u -r0 -r1.25 \
    pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-parser.cpp
cvs rdiff -u -r0 -r1.10 \
    pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-parser.h
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-utils.cpp \
    pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-utils.h \
    pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_poppler-utils.cpp
cvs rdiff -u -r0 -r1.3 \
    pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_poppler-cairo-font-engine.cpp
cvs rdiff -u -r0 -r1.9 \
    pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_poppler-transition-api.h
cvs rdiff -u -r0 -r1.12 \
    pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_svg-builder.cpp
cvs rdiff -u -r0 -r1.5 \
    pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_svg-builder.h

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/Makefile
diff -u pkgsrc/graphics/inkscape/Makefile:1.327 pkgsrc/graphics/inkscape/Makefile:1.328
--- pkgsrc/graphics/inkscape/Makefile:1.327     Thu Jun 11 07:17:06 2026
+++ pkgsrc/graphics/inkscape/Makefile   Wed Jun 24 21:57:17 2026
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.327 2026/06/11 07:17:06 wiz Exp $
+# $NetBSD: Makefile,v 1.328 2026/06/24 21:57:17 wiz Exp $
 
 DISTNAME=      inkscape-1.4.4
-PKGREVISION=   3
+PKGREVISION=   4
 CATEGORIES=    graphics
 MASTER_SITES=  https://media.inkscape.org/dl/resources/file/
 EXTRACT_SUFX=  .tar.xz

Index: pkgsrc/graphics/inkscape/distinfo
diff -u pkgsrc/graphics/inkscape/distinfo:1.107 pkgsrc/graphics/inkscape/distinfo:1.108
--- pkgsrc/graphics/inkscape/distinfo:1.107     Thu May  7 08:46:54 2026
+++ pkgsrc/graphics/inkscape/distinfo   Wed Jun 24 21:57:17 2026
@@ -1,10 +1,20 @@
-$NetBSD: distinfo,v 1.107 2026/05/07 08:46:54 wiz Exp $
+$NetBSD: distinfo,v 1.108 2026/06/24 21:57:17 wiz Exp $
 
 BLAKE2s (inkscape-1.4.4.tar.xz) = ae725108a91a427e3f6425f27d846663f35e1109160823ee6374f8289dba8f55
 SHA512 (inkscape-1.4.4.tar.xz) = 6ccaad4c63f8f654529a801dfe649501afd8b1243094e0222afbf8141258ab139f418efc112c0a2061a1bba7230ae13a0fc9fdc55ce9052630607a94500c9edd
 Size (inkscape-1.4.4.tar.xz) = 53861940 bytes
-SHA1 (patch-CMakeScripts_DefineDependsandFlags.cmake) = 6638a97615ca37bcdc20463b37cd859d723f66d6
+SHA1 (patch-CMakeScripts_DefineDependsandFlags.cmake) = b88c1980a4ab2d844edb936d7f4cd76d104eb512
 SHA1 (patch-src_extension_implementation_script.cpp) = da46549f688da5c9c0ecbeaeac7962e4f261cae4
+SHA1 (patch-src_extension_internal_pdfinput_pdf-input.cpp) = 76a949ea3698fc0b9ef7275690538a816ee33380
+SHA1 (patch-src_extension_internal_pdfinput_pdf-parser.cpp) = 008a5d53af5167863fd5d7001794b00cd5f7713f
+SHA1 (patch-src_extension_internal_pdfinput_pdf-parser.h) = d224141d0960f2415200aebd7d8304d412ae09bd
+SHA1 (patch-src_extension_internal_pdfinput_pdf-utils.cpp) = 7788b29ab9eb5202e07edb8a14862bc818786a4a
+SHA1 (patch-src_extension_internal_pdfinput_pdf-utils.h) = 5671ed14bccd1e4b85401aaae9a07ee9e0f0ab60
+SHA1 (patch-src_extension_internal_pdfinput_poppler-cairo-font-engine.cpp) = f771b03f72c81b2e792fc72af8bf4775536db214
+SHA1 (patch-src_extension_internal_pdfinput_poppler-transition-api.h) = 8aad92e664378bafafb8dbeb3048249d89baa6d7
+SHA1 (patch-src_extension_internal_pdfinput_poppler-utils.cpp) = 8d59a164f3f52b613390a725a49b814df980da22
+SHA1 (patch-src_extension_internal_pdfinput_svg-builder.cpp) = f744b9ecc3fd6e0e0933b380b980bf3b083f278f
+SHA1 (patch-src_extension_internal_pdfinput_svg-builder.h) = e9c93779954bc8c53cc3d8b6b145dc55a4277369
 SHA1 (patch-src_path_splinefit_splinefit.c) = 6c4482891567215a9b2cb5b2a4fb63ca54b24f9f
 SHA1 (patch-src_path_splinefit_splinefont.c) = 43f67ea3c25d64d323899718d6adf26225f24da0
 SHA1 (patch-src_path_splinefit_splinefont.h) = 170bec433cfbf98f54717e09433f6def5a7a9afe

Index: pkgsrc/graphics/inkscape/patches/patch-CMakeScripts_DefineDependsandFlags.cmake
diff -u pkgsrc/graphics/inkscape/patches/patch-CMakeScripts_DefineDependsandFlags.cmake:1.5 pkgsrc/graphics/inkscape/patches/patch-CMakeScripts_DefineDependsandFlags.cmake:1.6
--- pkgsrc/graphics/inkscape/patches/patch-CMakeScripts_DefineDependsandFlags.cmake:1.5 Sun Aug 13 14:13:23 2023
+++ pkgsrc/graphics/inkscape/patches/patch-CMakeScripts_DefineDependsandFlags.cmake     Wed Jun 24 21:57:17 2026
@@ -1,18 +1,17 @@
-$NetBSD: patch-CMakeScripts_DefineDependsandFlags.cmake,v 1.5 2023/08/13 14:13:23 ryoon Exp $
+$NetBSD: patch-CMakeScripts_DefineDependsandFlags.cmake,v 1.6 2026/06/24 21:57:17 wiz Exp $
 
 NetBSD 9 has gcc7 without -lstdc++fs.
 
---- CMakeScripts/DefineDependsandFlags.cmake.orig      2023-03-26 17:06:46.000000000 +0000
+--- CMakeScripts/DefineDependsandFlags.cmake.orig      2025-12-13 00:49:28.000000000 +0000
 +++ CMakeScripts/DefineDependsandFlags.cmake
-@@ -320,9 +320,11 @@ set(CMAKE_ENABLE_EXPORTS ON)
+@@ -324,8 +324,10 @@ set(CMAKE_ENABLE_EXPORTS ON)
  
  
  
 +if (NOT (${CMAKE_SYSTEM_NAME} STREQUAL "NetBSD"))
  if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9)
      list(APPEND INKSCAPE_LIBS "-lstdc++fs")
- endif()
 +endif()
+ endif()
  
  list(APPEND INKSCAPE_INCS_SYS ${Boost_INCLUDE_DIRS})
- # list(APPEND INKSCAPE_LIBS ${Boost_LIBRARIES})

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.8
--- /dev/null   Wed Jun 24 21:57:17 2026
+++ pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-input.cpp        Wed Jun 24 21:57:17 2026
@@ -0,0 +1,38 @@
+$NetBSD: patch-src_extension_internal_pdfinput_pdf-input.cpp,v 1.8 2026/06/24 21:57:17 wiz Exp $
+
+poppler 26.6 support.
+https://gitlab.com/inkscape/inkscape/-/merge_requests/7919
+https://gitlab.com/inkscape/inkscape/-/work_items/6210
+
+--- src/extension/internal/pdfinput/pdf-input.cpp.orig 2026-04-23 22:59:59.000000000 +0000
++++ src/extension/internal/pdfinput/pdf-input.cpp
+@@ -808,7 +808,11 @@ PdfInput::add_builder_page(std::shared_ptr<PDFDoc>pdf_
+     }
+ 
+     // Apply crop settings
++#if POPPLER_CHECK_VERSION(26, 2, 0)
++    std::optional<PDFRectangle> clipToBox;
++#else
+     _POPPLER_CONST PDFRectangle *clipToBox = nullptr;
++#endif
+ 
+     if (crop_to == "media-box") {
+         clipToBox = page->getMediaBox();
+@@ -822,8 +826,16 @@ PdfInput::add_builder_page(std::shared_ptr<PDFDoc>pdf_
+         clipToBox = page->getArtBox();
+     }
+ 
++    std::optional<PDFRectangle> cropBox;
++#if POPPLER_CHECK_VERSION(26, 2, 0)
++    cropBox = clipToBox;
++#else
++    if (clipToBox) {
++        cropBox = *clipToBox;
++    }
++#endif
+     // Create parser  (extension/internal/pdfinput/pdf-parser.h)
+-    auto pdf_parser = PdfParser(pdf_doc, builder, page, clipToBox);
++    auto pdf_parser = PdfParser(pdf_doc, builder, page, cropBox);
+ 
+     // Set up approximation precision for parser. Used for converting Mesh Gradients into tiles.
+     if ( color_delta <= 0.0 ) {

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.25
--- /dev/null   Wed Jun 24 21:57:17 2026
+++ pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-parser.cpp       Wed Jun 24 21:57:17 2026
@@ -0,0 +1,198 @@
+$NetBSD: patch-src_extension_internal_pdfinput_pdf-parser.cpp,v 1.25 2026/06/24 21:57:17 wiz Exp $
+
+poppler 26.6 support.
+https://gitlab.com/inkscape/inkscape/-/merge_requests/7919
+https://gitlab.com/inkscape/inkscape/-/work_items/6210
+
+--- src/extension/internal/pdfinput/pdf-parser.cpp.orig        2026-04-23 22:59:59.000000000 +0000
++++ src/extension/internal/pdfinput/pdf-parser.cpp
+@@ -43,6 +43,7 @@
+ #include <poppler/GlobalParams.h>
+ #include <poppler/Lexer.h>
+ #include <poppler/Object.h>
++#include <poppler/OptionalContent.h>
+ #include <poppler/OutputDev.h>
+ #include <poppler/PDFDoc.h>
+ #include <poppler/Page.h>
+@@ -266,7 +267,7 @@ PdfParser::PdfParser(std::shared_ptr<PDFDoc> pdf_doc, 
+ //------------------------------------------------------------------------
+ 
+ PdfParser::PdfParser(std::shared_ptr<PDFDoc> pdf_doc, Inkscape::Extension::Internal::SvgBuilder *builderA, Page *page,
+-                     _POPPLER_CONST PDFRectangle *cropBox)
++                     const std::optional<PDFRectangle> &cropBox)
+     : _pdf_doc(pdf_doc)
+     , xref(pdf_doc->getXRef())
+     , builder(builderA)
+@@ -307,8 +308,8 @@ PdfParser::PdfParser(std::shared_ptr<PDFDoc> pdf_doc, 
+     builder->setMargins(getRect(page->getTrimBox()) * scale,
+                         getRect(page->getArtBox()) * scale,
+                         getRect(page->getBleedBox()) * scale);
+-    if (cropBox && getRect(cropBox) != page_box) {
+-        builder->cropPage(getRect(cropBox) * scale);
++    if (cropBox && getRect(*cropBox) != page_box) {
++        builder->cropPage(getRect(*cropBox) * scale);
+     }
+ 
+     saveState();
+@@ -325,7 +326,7 @@ PdfParser::PdfParser(XRef *xrefA, Inkscape::Extension:
+     , printCommands(false)
+     , res(new GfxResources(xref, resDict, nullptr))
+     , // start the resource stack
+-    state(new GfxState(72, 72, box, 0, false))
++    state(new _POPPLER_GFX_STATE(72, 72, *box, 0, false))
+     , fontChanged(gFalse)
+     , clip(clipNone)
+     , ignoreUndef(0)
+@@ -992,7 +993,7 @@ void PdfParser::opSetFillGray(Object args[], int /*num
+   state->setFillPattern(nullptr);
+   state->setFillColorSpace(_POPPLER_CONSUME_UNIQPTR_ARG(std::make_unique<GfxDeviceGrayColorSpace>()));
+   color.c[0] = dblToCol(args[0].getNum());
+-  state->setFillColor(&color);
++  state->_POPPLER_SET_FILL_COLOR(color);
+   builder->updateStyle(state);
+ }
+ 
+@@ -1004,7 +1005,7 @@ void PdfParser::opSetStrokeGray(Object args[], int /*n
+   state->setStrokePattern(nullptr);
+   state->setStrokeColorSpace(_POPPLER_CONSUME_UNIQPTR_ARG(std::make_unique<GfxDeviceGrayColorSpace>()));
+   color.c[0] = dblToCol(args[0].getNum());
+-  state->setStrokeColor(&color);
++  state->_POPPLER_SET_STROKE_COLOR(color);
+   builder->updateStyle(state);
+ }
+ 
+@@ -1019,7 +1020,7 @@ void PdfParser::opSetFillCMYKColor(Object args[], int 
+   for (i = 0; i < 4; ++i) {
+     color.c[i] = dblToCol(args[i].getNum());
+   }
+-  state->setFillColor(&color);
++  state->_POPPLER_SET_FILL_COLOR(color);
+   builder->updateStyle(state);
+ }
+ 
+@@ -1033,7 +1034,7 @@ void PdfParser::opSetStrokeCMYKColor(Object args[], in
+   for (int i = 0; i < 4; ++i) {
+     color.c[i] = dblToCol(args[i].getNum());
+   }
+-  state->setStrokeColor(&color);
++  state->_POPPLER_SET_STROKE_COLOR(color);
+   builder->updateStyle(state);
+ }
+ 
+@@ -1047,7 +1048,7 @@ void PdfParser::opSetFillRGBColor(Object args[], int /
+   for (int i = 0; i < 3; ++i) {
+     color.c[i] = dblToCol(args[i].getNum());
+   }
+-  state->setFillColor(&color);
++  state->_POPPLER_SET_FILL_COLOR(color);
+   builder->updateStyle(state);
+ }
+ 
+@@ -1060,7 +1061,7 @@ void PdfParser::opSetStrokeRGBColor(Object args[], int
+   for (int i = 0; i < 3; ++i) {
+     color.c[i] = dblToCol(args[i].getNum());
+   }
+-  state->setStrokeColor(&color);
++  state->_POPPLER_SET_STROKE_COLOR(color);
+   builder->updateStyle(state);
+ }
+ 
+@@ -1076,7 +1077,7 @@ void PdfParser::opSetFillColorSpace(Object args[], int
+     GfxColor color;
+     colorSpace->getDefaultColor(&color);
+     state->setFillColorSpace(_POPPLER_CONSUME_UNIQPTR_ARG(colorSpace));
+-    state->setFillColor(&color);
++    state->_POPPLER_SET_FILL_COLOR(color);
+     builder->updateStyle(state);
+   } else {
+     error(errSyntaxError, getPos(), "Bad color space (fill)");
+@@ -1097,7 +1098,7 @@ void PdfParser::opSetStrokeColorSpace(Object args[], i
+     GfxColor color;
+     colorSpace->getDefaultColor(&color);
+     state->setStrokeColorSpace(_POPPLER_CONSUME_UNIQPTR_ARG(colorSpace));
+-    state->setStrokeColor(&color);
++    state->_POPPLER_SET_STROKE_COLOR(color);
+     builder->updateStyle(state);
+   } else {
+     error(errSyntaxError, getPos(), "Bad color space (stroke)");
+@@ -1117,7 +1118,7 @@ void PdfParser::opSetFillColor(Object args[], int numA
+   for (i = 0; i < numArgs; ++i) {
+     color.c[i] = dblToCol(args[i].getNum());
+   }
+-  state->setFillColor(&color);
++  state->_POPPLER_SET_FILL_COLOR(color);
+   builder->updateStyle(state);
+ }
+ 
+@@ -1134,7 +1135,7 @@ void PdfParser::opSetStrokeColor(Object args[], int nu
+   for (i = 0; i < numArgs; ++i) {
+     color.c[i] = dblToCol(args[i].getNum());
+   }
+-  state->setStrokeColor(&color);
++  state->_POPPLER_SET_STROKE_COLOR(color);
+   builder->updateStyle(state);
+ }
+ 
+@@ -1155,7 +1156,7 @@ void PdfParser::opSetFillColorN(Object args[], int num
+         color.c[i] = dblToCol(args[i].getNum());
+       }
+       }
+-      state->setFillColor(&color);
++      state->_POPPLER_SET_FILL_COLOR(color);
+       builder->updateStyle(state);
+     }
+     if (auto pattern = lookupPattern(&(args[numArgs - 1]), state)) {
+@@ -1174,7 +1175,7 @@ void PdfParser::opSetFillColorN(Object args[], int num
+       color.c[i] = dblToCol(args[i].getNum());
+       }
+     }
+-    state->setFillColor(&color);
++    state->_POPPLER_SET_FILL_COLOR(color);
+     builder->updateStyle(state);
+   }
+ }
+@@ -1198,7 +1199,7 @@ void PdfParser::opSetStrokeColorN(Object args[], int n
+         color.c[i] = dblToCol(args[i].getNum());
+       }
+       }
+-      state->setStrokeColor(&color);
++      state->_POPPLER_SET_STROKE_COLOR(color);
+       builder->updateStyle(state);
+     }
+     if (auto pattern = lookupPattern(&(args[numArgs - 1]), state)) {
+@@ -1217,7 +1218,7 @@ void PdfParser::opSetStrokeColorN(Object args[], int n
+       color.c[i] = dblToCol(args[i].getNum());
+       }
+     }
+-    state->setStrokeColor(&color);
++    state->_POPPLER_SET_STROKE_COLOR(color);
+     builder->updateStyle(state);
+   }
+ }
+@@ -1700,7 +1701,7 @@ void PdfParser::doFunctionShFill1(GfxFunctionShading *
+ 
+     // use the center color
+     shading->getColor(xM, yM, &fillColor);
+-    state->setFillColor(&fillColor);
++    state->_POPPLER_SET_FILL_COLOR(fillColor);
+ 
+     // fill the rectangle
+     state->moveTo(x0 * matrix[0] + y0 * matrix[2] + matrix[4],
+@@ -1799,7 +1800,7 @@ void PdfParser::gouraudFillTriangle(double x0, double 
+     }
+   }
+   if (i == nComps || depth == maxDepths[pdfGouraudTriangleShading-1]) {
+-    state->setFillColor(color0);
++    state->_POPPLER_SET_FILL_COLOR(*color0);
+     state->moveTo(x0, y0);
+     state->lineTo(x1, y1);
+     state->lineTo(x2, y2);
+@@ -1877,7 +1878,7 @@ void PdfParser::fillPatch(_POPPLER_CONST GfxPatch *pat
+     color.c[i] = GfxColorComp(patch->color[0][0].c[i]);
+   }
+   if (i == nComps || depth == maxDepths[pdfPatchMeshShading-1]) {
+-    state->setFillColor(&color);
++    state->_POPPLER_SET_FILL_COLOR(color);
+     state->moveTo(patch->x[0][0], patch->y[0][0]);
+     state->curveTo(patch->x[0][1], patch->y[0][1],
+                  patch->x[0][2], patch->y[0][2],

Index: pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-parser.h
diff -u /dev/null pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-parser.h:1.10
--- /dev/null   Wed Jun 24 21:57:17 2026
+++ pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-parser.h Wed Jun 24 21:57:17 2026
@@ -0,0 +1,19 @@
+$NetBSD: patch-src_extension_internal_pdfinput_pdf-parser.h,v 1.10 2026/06/24 21:57:17 wiz Exp $
+
+poppler 26.6 support.
+https://gitlab.com/inkscape/inkscape/-/merge_requests/7919
+https://gitlab.com/inkscape/inkscape/-/work_items/6210
+
+--- src/extension/internal/pdfinput/pdf-parser.h.orig  2026-04-23 22:59:59.000000000 +0000
++++ src/extension/internal/pdfinput/pdf-parser.h
+@@ -112,8 +112,8 @@ class PdfParser { (public)
+ class PdfParser {
+ public:
+ 
+-  // Constructor for regular output.
+-    PdfParser(std::shared_ptr<PDFDoc> pdf_doc, SvgBuilder *builderA, Page *page, _POPPLER_CONST PDFRectangle *cropBox);
++    // Constructor for regular output.
++    PdfParser(std::shared_ptr<PDFDoc> pdf_doc, SvgBuilder *builderA, Page *page, const std::optional<PDFRectangle> &cropBox);
+     // Constructor for a sub-page object.
+     PdfParser(XRef *xrefA, SvgBuilder *builderA, Dict *resDict, _POPPLER_CONST PDFRectangle *box);
+ 

Index: pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-utils.cpp
diff -u /dev/null pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-utils.cpp:1.1
--- /dev/null   Wed Jun 24 21:57:17 2026
+++ pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-utils.cpp        Wed Jun 24 21:57:17 2026
@@ -0,0 +1,20 @@
+$NetBSD: patch-src_extension_internal_pdfinput_pdf-utils.cpp,v 1.1 2026/06/24 21:57:17 wiz Exp $
+
+poppler 26.6 support.
+https://gitlab.com/inkscape/inkscape/-/merge_requests/7919
+https://gitlab.com/inkscape/inkscape/-/work_items/6210
+
+--- src/extension/internal/pdfinput/pdf-utils.cpp.orig 2025-12-13 00:49:29.000000000 +0000
++++ src/extension/internal/pdfinput/pdf-utils.cpp
+@@ -133,6 +133,11 @@ Geom::Rect getRect(_POPPLER_CONST PDFRectangle *box)
+     return Geom::Rect(box->x1, box->y1, box->x2, box->y2);
+ }
+ 
++Geom::Rect getRect(const PDFRectangle &box)
++{
++    return Geom::Rect(box.x1, box.y1, box.x2, box.y2);
++}
++
+ Geom::PathVector getPathV(GfxPath *path) 
+ {
+     if (!path) {
Index: pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-utils.h
diff -u /dev/null pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-utils.h:1.1
--- /dev/null   Wed Jun 24 21:57:17 2026
+++ pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_pdf-utils.h  Wed Jun 24 21:57:17 2026
@@ -0,0 +1,18 @@
+$NetBSD: patch-src_extension_internal_pdfinput_pdf-utils.h,v 1.1 2026/06/24 21:57:17 wiz Exp $
+
+poppler 26.6 support.
+https://gitlab.com/inkscape/inkscape/-/merge_requests/7919
+https://gitlab.com/inkscape/inkscape/-/work_items/6210
+
+--- src/extension/internal/pdfinput/pdf-utils.h.orig   2025-12-13 00:49:29.000000000 +0000
++++ src/extension/internal/pdfinput/pdf-utils.h
+@@ -59,6 +59,9 @@ Geom::Rect getRect(_POPPLER_CONST PDFRectangle *box);
+ };
+ 
+ Geom::Rect getRect(_POPPLER_CONST PDFRectangle *box);
++Geom::Rect getRect(_POPPLER_CONST PDFRectangle &box);
+ Geom::PathVector getPathV(GfxPath *gPath);
++Geom::PathVector maybeIntersect(Geom::PathVector const &v1, Geom::PathVector const &v2,
++                                FillRule fill1 = FillRule::fill_nonZero, FillRule fill2 = FillRule::fill_nonZero);
+ 
+ #endif /* PDF_UTILS_H */
Index: pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_poppler-utils.cpp
diff -u /dev/null pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_poppler-utils.cpp:1.1
--- /dev/null   Wed Jun 24 21:57:17 2026
+++ pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_poppler-utils.cpp    Wed Jun 24 21:57:17 2026
@@ -0,0 +1,35 @@
+$NetBSD: patch-src_extension_internal_pdfinput_poppler-utils.cpp,v 1.1 2026/06/24 21:57:17 wiz Exp $
+
+poppler 26.6 support.
+https://gitlab.com/inkscape/inkscape/-/merge_requests/7919
+https://gitlab.com/inkscape/inkscape/-/work_items/6210
+
+--- src/extension/internal/pdfinput/poppler-utils.cpp.orig     2026-04-23 22:59:59.000000000 +0000
++++ src/extension/internal/pdfinput/poppler-utils.cpp
+@@ -195,15 +195,17 @@ void InkFontDict::hashFontObject1(const Object *obj, F
+                 hashFontObject1(&obj2, h);
+             }
+             break;
+-        case objDict:
+-            h->hash('d');
+-            n = obj->dictGetLength();
+-            h->hash((char *)&n, sizeof(int));
+-            for (i = 0; i < n; ++i) {
+-                p = obj->dictGetKey(i);
+-                h->hash(p, (int)strlen(p));
+-                const Object &obj2 = obj->dictGetValNF(i);
+-                hashFontObject1(&obj2, h);
++        case objDict: {
++                h->hash('d');
++                auto objdict = obj->getDict();
++                n = objdict->getLength();
++                h->hash((char *)&n, sizeof(int));
++                for (i = 0; i < n; ++i) {
++                    auto p = std::string(objdict->getKey(i));
++                    h->hash(p.c_str(), p.length());
++                    const Object &obj2 = objdict->getValNF(i);
++                    hashFontObject1(&obj2, h);
++                }
+             }
+             break;
+         case objStream:

Index: pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_poppler-cairo-font-engine.cpp
diff -u /dev/null pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_poppler-cairo-font-engine.cpp:1.3
--- /dev/null   Wed Jun 24 21:57:17 2026
+++ pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_poppler-cairo-font-engine.cpp        Wed Jun 24 21:57:17 2026
@@ -0,0 +1,60 @@
+$NetBSD: patch-src_extension_internal_pdfinput_poppler-cairo-font-engine.cpp,v 1.3 2026/06/24 21:57:17 wiz Exp $
+
+poppler 26.6 support.
+https://gitlab.com/inkscape/inkscape/-/merge_requests/7919
+https://gitlab.com/inkscape/inkscape/-/work_items/6210
+
+--- src/extension/internal/pdfinput/poppler-cairo-font-engine.cpp.orig 2025-12-13 00:49:29.000000000 +0000
++++ src/extension/internal/pdfinput/poppler-cairo-font-engine.cpp
+@@ -313,7 +313,11 @@ CairoFreeTypeFont *CairoFreeTypeFont::create(GfxFont *
+ #else
+     GfxFontLoc *fontLoc;
+ #endif
++#if POPPLER_CHECK_VERSION(26, 5, 0)
++    const char * const *enc;
++#else
+     char **enc;
++#endif
+     const char *name;
+ #if POPPLER_CHECK_VERSION(25, 7, 0)
+     std::unique_ptr<FoFiType1C> ff1c;
+@@ -385,7 +389,11 @@ CairoFreeTypeFont *CairoFreeTypeFont::create(GfxFont *
+                 goto err2;
+             }
+ 
++#if POPPLER_CHECK_VERSION(26, 5, 0)
++            enc = gfx8bit->getEncoding().data();
++#else
+             enc = gfx8bit->getEncoding();
++#endif
+ 
+             codeToGID.resize(256);
+             for (i = 0; i < 256; ++i) {
+@@ -677,7 +685,7 @@ CairoType3Font *CairoType3Font::create(GfxFont *gfxFon
+ #endif
+ 
+     std::vector<int> codeToGID;
+-    char *name;
++    const char *name;
+ 
+     Dict *charProcs = gfx8bit->getCharProcs();
+     Ref ref = *gfxFont->getID();
+@@ -694,13 +702,17 @@ CairoType3Font *CairoType3Font::create(GfxFont *gfxFon
+ 
+     cairo_font_face_set_user_data(font_face, &type3_font_key, (void *)info, _free_type3_font_info);
+ 
++#if POPPLER_CHECK_VERSION(26, 5, 0)
++    const char * const *enc = gfx8bit->getEncoding().data();
++#else
+     char **enc = gfx8bit->getEncoding();
++#endif
+     codeToGID.resize(256);
+     for (int i = 0; i < 256; ++i) {
+         codeToGID[i] = 0;
+         if (charProcs && (name = enc[i])) {
+             for (int j = 0; j < charProcs->getLength(); j++) {
+-                if (strcmp(name, charProcs->getKey(j)) == 0) {
++                if (std::string(charProcs->getKey(j)).compare(name) == 0) {
+                     codeToGID[i] = j;
+                 }
+             }

Index: pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_poppler-transition-api.h
diff -u /dev/null pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_poppler-transition-api.h:1.9
--- /dev/null   Wed Jun 24 21:57:17 2026
+++ pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_poppler-transition-api.h     Wed Jun 24 21:57:17 2026
@@ -0,0 +1,31 @@
+$NetBSD: patch-src_extension_internal_pdfinput_poppler-transition-api.h,v 1.9 2026/06/24 21:57:17 wiz Exp $
+
+poppler 26.6 support.
+https://gitlab.com/inkscape/inkscape/-/merge_requests/7919
+https://gitlab.com/inkscape/inkscape/-/work_items/6210
+
+--- src/extension/internal/pdfinput/poppler-transition-api.h.orig      2026-04-23 22:59:59.000000000 +0000
++++ src/extension/internal/pdfinput/poppler-transition-api.h
+@@ -15,6 +15,22 @@
+ #include <glib/poppler-features.h>
+ #include <poppler/UTF.h>
+ 
++#if POPPLER_CHECK_VERSION(26, 6, 0)
++#define _POPPLER_GET_GRAY(color, gray) getGray(color, gray)
++#define _POPPLER_GET_RGB(color, rgb) getRGB(color, rgb)
++#define _POPPLER_GET_CMYK(color, cmyk) getCMYK(color, cmyk)
++#define _POPPLER_SET_FILL_COLOR(color) setFillColor(color)
++#define _POPPLER_SET_STROKE_COLOR(color) setStrokeColor(color)
++#define _POPPLER_GFX_STATE(h, v, Rect, rotateA, upsideDown) GfxState(h, v, Rect, rotateA, upsideDown)
++#else
++#define _POPPLER_GET_GRAY(color, gray) getGray(&color, gray)
++#define _POPPLER_GET_RGB(color, rgb) getRGB(&color, rgb)
++#define _POPPLER_GET_CMYK(color, cmyk) getCMYK(&color, cmyk)
++#define _POPPLER_SET_FILL_COLOR(color) setFillColor(&color)
++#define _POPPLER_SET_STROKE_COLOR(color) setStrokeColor(&color)
++#define _POPPLER_GFX_STATE(h, v, Rect, rotateA, upsideDown) GfxState(h, v, &Rect, rotateA, upsideDown)
++#endif
++
+ #if POPPLER_CHECK_VERSION(26, 2, 0)
+ #define _POPPLER_WMODE GfxFont::WritingMode
+ #define _POPPLER_WMODE_HORIZONTAL GfxFont::WritingMode::Horizontal

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.12
--- /dev/null   Wed Jun 24 21:57:17 2026
+++ pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_svg-builder.cpp      Wed Jun 24 21:57:17 2026
@@ -0,0 +1,104 @@
+$NetBSD: patch-src_extension_internal_pdfinput_svg-builder.cpp,v 1.12 2026/06/24 21:57:17 wiz Exp $
+
+poppler 26.6 support.
+https://gitlab.com/inkscape/inkscape/-/merge_requests/7919
+https://gitlab.com/inkscape/inkscape/-/work_items/6210
+
+--- src/extension/internal/pdfinput/svg-builder.cpp.orig       2026-04-23 22:59:59.000000000 +0000
++++ src/extension/internal/pdfinput/svg-builder.cpp
+@@ -384,6 +384,7 @@ static gchar *svgConvertRGBToText(double r, double g, 
+     return (gchar *)&tmp;
+ }
+ 
++// for poppler < 26.06.0
+ static std::string svgConvertGfxRGB(GfxRGB *color)
+ {
+     double r = (double)color->r / 65535.0;
+@@ -394,6 +395,14 @@ std::string SvgBuilder::convertGfxColor(const GfxColor
+ 
+ std::string SvgBuilder::convertGfxColor(const GfxColor *color, GfxColorSpace *space)
+ {
++    if (!color) {
++        return "";
++    }
++    return convertGfxColor(*color, space);
++}
++
++std::string SvgBuilder::convertGfxColor(const GfxColor &color, GfxColorSpace *space)
++{
+     std::string icc = "";
+     switch (space->getMode()) {
+         case csDeviceGray:
+@@ -412,14 +421,14 @@ std::string SvgBuilder::convertGfxColor(const GfxColor
+     }
+ 
+     GfxRGB rgb;
+-    space->getRGB(color, &rgb);
++    space->_POPPLER_GET_RGB(color, &rgb);
+     auto rgb_color = svgConvertGfxRGB(&rgb);
+ 
+     if (!icc.empty()) {
+         Inkscape::CSSOStringStream icc_color;
+         icc_color << rgb_color << " icc-color(" << icc;
+         for (int i = 0; i < space->getNComps(); ++i) {
+-            icc_color << ", " << colToDbl((*color).c[i]);
++            icc_color << ", " << colToDbl((color).c[i]);
+         }
+         icc_color << ");";
+         return icc_color.str();
+@@ -1204,7 +1213,7 @@ gchar *SvgBuilder::_createGradient(GfxShading *shading
+ /**
+  * \brief Adds a stop with the given properties to the gradient's representation
+  */
+-void SvgBuilder::_addStopToGradient(Inkscape::XML::Node *gradient, double offset, GfxColor *color, GfxColorSpace *space,
++void SvgBuilder::_addStopToGradient(Inkscape::XML::Node *gradient, double offset, GfxColor &color, GfxColorSpace *space,
+                                     double opacity)
+ {
+     Inkscape::XML::Node *stop = _xml_doc->createElement("svg:stop");
+@@ -1214,7 +1223,7 @@ void SvgBuilder::_addStopToGradient(Inkscape::XML::Nod
+     if (space->getMode() == csDeviceGray) {
+         // This is a transparency mask.
+         GfxRGB rgb;
+-        space->getRGB(color, &rgb);
++        space->_POPPLER_GET_RGB(color, &rgb);
+         double gray = (double)rgb.r / 65535.0;
+         gray = CLAMP(gray, 0.0, 1.0);
+         os_opacity << gray;
+@@ -1255,8 +1264,8 @@ bool SvgBuilder::_addGradientStops(Inkscape::XML::Node
+         if (!svgGetShadingColor(shading, 0.0, &stop1) || !svgGetShadingColor(shading, 1.0, &stop2)) {
+             return false;
+         } else {
+-            _addStopToGradient(gradient, 0.0, &stop1, space, 1.0);
+-            _addStopToGradient(gradient, 1.0, &stop2, space, 1.0);
++            _addStopToGradient(gradient, 0.0, stop1, space, 1.0);
++            _addStopToGradient(gradient, 1.0, stop2, space, 1.0);
+         }
+     } else if (type == _POPPLER_FUNCTION_TYPE_STITCHING) {
+         auto stitchingFunc = static_cast<_POPPLER_CONST StitchingFunction*>(func);
+@@ -1269,7 +1278,7 @@ bool SvgBuilder::_addGradientStops(Inkscape::XML::Node
+         // Add stops from all the stitched functions
+         GfxColor prev_color, color;
+         svgGetShadingColor(shading, bounds[0], &prev_color);
+-        _addStopToGradient(gradient, bounds[0], &prev_color, space, 1.0);
++        _addStopToGradient(gradient, bounds[0], prev_color, space, 1.0);
+         for ( int i = 0 ; i < num_funcs ; i++ ) {
+             svgGetShadingColor(shading, bounds[i + 1], &color);
+             // Add stops
+@@ -1279,14 +1288,14 @@ bool SvgBuilder::_addGradientStops(Inkscape::XML::Node
+                     expE = (bounds[i + 1] - bounds[i])/expE;    // approximate exponential as a single straight line at x=1
+                     if (encode[2*i] == 0) {    // normal sequence
+                         auto offset = (bounds[i + 1] - expE) / max_bound;
+-                        _addStopToGradient(gradient, offset, &prev_color, space, 1.0);
++                        _addStopToGradient(gradient, offset, prev_color, space, 1.0);
+                     } else {                   // reflected sequence
+                         auto offset = (bounds[i] + expE) / max_bound;
+-                        _addStopToGradient(gradient, offset, &color, space, 1.0);
++                        _addStopToGradient(gradient, offset, color, space, 1.0);
+                     }
+                 }
+             }
+-            _addStopToGradient(gradient, bounds[i + 1] / max_bound, &color, space, 1.0);
++            _addStopToGradient(gradient, bounds[i + 1] / max_bound, color, space, 1.0);
+             prev_color = color;
+         }
+     } else { // Unsupported function type

Index: pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_svg-builder.h
diff -u /dev/null pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_svg-builder.h:1.5
--- /dev/null   Wed Jun 24 21:57:17 2026
+++ pkgsrc/graphics/inkscape/patches/patch-src_extension_internal_pdfinput_svg-builder.h        Wed Jun 24 21:57:17 2026
@@ -0,0 +1,25 @@
+$NetBSD: patch-src_extension_internal_pdfinput_svg-builder.h,v 1.5 2026/06/24 21:57:17 wiz Exp $
+
+poppler 26.6 support.
+https://gitlab.com/inkscape/inkscape/-/merge_requests/7919
+https://gitlab.com/inkscape/inkscape/-/work_items/6210
+
+--- src/extension/internal/pdfinput/svg-builder.h.orig 2025-12-13 00:49:29.000000000 +0000
++++ src/extension/internal/pdfinput/svg-builder.h
+@@ -186,7 +186,7 @@ class SvgBuilder { (private)
+     // Pattern creation
+     gchar *_createPattern(GfxPattern *pattern, GfxState *state, bool is_stroke=false);
+     gchar *_createGradient(GfxShading *shading, const Geom::Affine pat_matrix, bool for_shading = false);
+-    void _addStopToGradient(Inkscape::XML::Node *gradient, double offset, GfxColor *color, GfxColorSpace *space,
++    void _addStopToGradient(Inkscape::XML::Node *gradient, double offset, GfxColor &color, GfxColorSpace *space,
+                             double opacity);
+     bool _addGradientStops(Inkscape::XML::Node *gradient, GfxShading *shading,
+                            _POPPLER_CONST Function *func);
+@@ -239,6 +239,7 @@ class SvgBuilder { (private)
+     static bool _attrEqual(Inkscape::XML::Node *a, Inkscape::XML::Node *b, char const *attr);
+ 
+     // Colors
++    std::string convertGfxColor(const GfxColor &color, GfxColorSpace *space);
+     std::string convertGfxColor(const GfxColor *color, GfxColorSpace *space);
+     std::string _getColorProfile(cmsHPROFILE hp);
+ 



Home | Main Index | Thread Index | Old Index