<pre style='margin:0'>
David B. Evans (dbevans) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/b158278ee1a5ce7684b1021ee1988b3a88dbaca6">https://github.com/macports/macports-ports/commit/b158278ee1a5ce7684b1021ee1988b3a88dbaca6</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new b158278ee1a inkscape: build fix for poppler 22.04.0
</span>b158278ee1a is described below
<span style='display:block; white-space:pre;color:#808000;'>commit b158278ee1a5ce7684b1021ee1988b3a88dbaca6
</span>Author: David B. Evans <devans@macports.org>
AuthorDate: Sat Apr 9 11:55:56 2022 -0700
<span style='display:block; white-space:pre;color:#404040;'> inkscape: build fix for poppler 22.04.0
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Patch backported from upstream branch 1.1.x.
</span><span style='display:block; white-space:pre;color:#404040;'> See https://gitlab.com/inkscape/inkscape/-/commit/08b2f3d93c08bcf1e363f4284112fd14a7cbd09c
</span>---
graphics/inkscape/Portfile | 5 +-
graphics/inkscape/files/poppler-22.04.0.patch | 150 ++++++++++++++++++++++++++
2 files changed, 153 insertions(+), 2 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/inkscape/Portfile b/graphics/inkscape/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 0170043be6c..37c24fca997 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/graphics/inkscape/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/inkscape/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -11,7 +11,7 @@ conflicts inkscape-devel
</span> set my_name inkscape
version 1.1.2
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 2
</span> license GPL-3+
maintainers {mascguy @mascguy} openmaintainer
categories graphics gnome
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -75,7 +75,8 @@ depends_lib-append port:desktop-file-utils \
</span> port:py${python_version}-lxml \
port:py${python_version}-numpy
<span style='display:block; white-space:pre;background:#ffe0e0;'>-patchfiles poppler-22.03.0.patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles poppler-22.03.0.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ poppler-22.04.0.patch
</span>
post-patch {
reinplace "s|\"python-interpreter\", *\{\"python3\"|\"python-interpreter\", \{\"python${python_major}.${python_minor}\"|g" ${worksrcpath}/src/extension/implementation/script.cpp
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/inkscape/files/poppler-22.04.0.patch b/graphics/inkscape/files/poppler-22.04.0.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..44cb6315109
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/inkscape/files/poppler-22.04.0.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,150 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 08b2f3d93c08bcf1e363f4284112fd14a7cbd09c Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: Rafael Siejakowski <rs@rs-math.net>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Mon, 4 Apr 2022 22:09:39 -0300
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] Compatibility with Poppler 22.04
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Replace vanilla pointers with std::shared_ptr for pointers to fonts;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+eliminate manual ref-counting.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Cherry-picked from 6a7b9ec0af088baa08b92fd76b33eca26537fb35.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Fixes https://gitlab.com/inkscape/inkscape/-/issues/3387
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/extension/internal/pdfinput/pdf-parser.cpp | 14 ++++++++------
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .../internal/pdfinput/poppler-transition-api.h | 6 ++++++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/extension/internal/pdfinput/svg-builder.cpp | 7 +------
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/extension/internal/pdfinput/svg-builder.h | 1 -
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 4 files changed, 15 insertions(+), 13 deletions(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extension/internal/pdfinput/pdf-parser.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index feecefa043..d6e2ede4f3 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/extension/internal/pdfinput/pdf-parser.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/extension/internal/pdfinput/pdf-parser.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -30,6 +30,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "Gfx.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "pdf-parser.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "util/units.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "poppler-transition-api.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "glib/poppler-features.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "goo/gmem.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2158,7 +2159,7 @@ void PdfParser::opSetCharSpacing(Object args[], int /*numArgs*/)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // TODO not good that numArgs is ignored but args[] is used:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void PdfParser::opSetFont(Object args[], int /*numArgs*/)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- GfxFont *font = res->lookupFont(args[0].getName());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ auto font = res->lookupFont(args[0].getName());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (!font) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // unsetting the font (drawing no text) is better than using the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2179,7 +2180,9 @@ void PdfParser::opSetFont(Object args[], int /*numArgs*/)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fflush(stdout);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if !POPPLER_CHECK_VERSION(22, 4, 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ font->incRefCnt();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ state->setFont(font, args[1].getNum());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fontChanged = gTrue;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2373,7 +2376,6 @@ void PdfParser::doShowText(const GooString *s) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void PdfParser::doShowText(GooString *s) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- GfxFont *font;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int wMode;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ double riseX, riseY;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CharCode code;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2392,7 +2394,7 @@ void PdfParser::doShowText(GooString *s) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int len, n, uLen;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- font = state->getFont();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ auto font = state->getFont();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ wMode = font->getWMode();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ builder->beginString(state);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2445,10 +2447,10 @@ void PdfParser::doShowText(GooString *s) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ //out->updateCTM(state, 1, 0, 0, 1, 0, 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (false){ /*!out->beginType3Char(state, curX + riseX, curY + riseY, tdx, tdy,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ code, u, uLen)) {*/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- _POPPLER_CALL_ARGS(charProc, ((Gfx8BitFont *)font)->getCharProc, code);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if ((resDict = ((Gfx8BitFont *)font)->getResources())) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ _POPPLER_CALL_ARGS(charProc, _POPPLER_FONTPTR_TO_GFX8(font)->getCharProc, code);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (resDict = _POPPLER_FONTPTR_TO_GFX8(font)->getResources()) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pushResources(resDict);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (charProc.isStream()) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ //parse(&charProc, gFalse); // TODO: parse into SVG font
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/src/extension/internal/pdfinput/poppler-transition-api.h b/src/extension/internal/pdfinput/poppler-transition-api.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 50b617c25c..dc9e47e45b 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/extension/internal/pdfinput/poppler-transition-api.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/extension/internal/pdfinput/poppler-transition-api.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -14,6 +14,18 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <glib/poppler-features.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if POPPLER_CHECK_VERSION(22, 4, 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define _POPPLER_FONTPTR_TO_GFX8(font_ptr) ((Gfx8BitFont *)font_ptr.get())
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define _POPPLER_FONTPTR_TO_GFX8(font_ptr) ((Gfx8BitFont *)font_ptr)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if POPPLER_CHECK_VERSION(22, 3, 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define _POPPLER_MAKE_SHARED_PDFDOC(uri) std::make_shared<PDFDoc>(std::make_unique<GooString>(uri))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define _POPPLER_MAKE_SHARED_PDFDOC(uri) std::make_shared<PDFDoc>(new GooString(uri), nullptr, nullptr, nullptr)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if POPPLER_CHECK_VERSION(0, 83, 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define _POPPLER_CONST_83 const
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/src/extension/internal/pdfinput/svg-builder.cpp b/src/extension/internal/pdfinput/svg-builder.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 461a4fb788..8ad0331b97 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/extension/internal/pdfinput/svg-builder.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/extension/internal/pdfinput/svg-builder.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -108,7 +108,6 @@ SvgBuilder::~SvgBuilder() = default;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void SvgBuilder::_init() {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _font_style = nullptr;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- _current_font = nullptr;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _font_specification = nullptr;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _font_scaling = 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _need_font_update = true;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1021,11 +1020,8 @@ void SvgBuilder::updateFont(GfxState *state) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _need_font_update = false;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ updateTextMatrix(state); // Ensure that we have a text matrix built
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (_font_style) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- //sp_repr_css_attr_unref(_font_style);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _font_style = sp_repr_css_attr_new();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- GfxFont *font = state->getFont();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ auto font = state->getFont();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // Store original name
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (font->getName()) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _font_specification = font->getName()->getCString();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1171,7 +1167,6 @@ void SvgBuilder::updateFont(GfxState *state) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sp_repr_css_set_property(_font_style, "writing-mode", "tb");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- _current_font = font;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _invalidated_style = true;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/src/extension/internal/pdfinput/svg-builder.h b/src/extension/internal/pdfinput/svg-builder.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 050465d4bf..9422a0e5ba 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/extension/internal/pdfinput/svg-builder.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/extension/internal/pdfinput/svg-builder.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -203,7 +203,6 @@ private:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ std::vector<SvgGraphicsState> _state_stack;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SPCSSAttr *_font_style; // Current font style
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- GfxFont *_current_font;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const char *_font_specification;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ double _font_scaling;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ bool _need_font_update;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+GitLab
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span></pre><pre style='margin:0'>
</pre>