[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/27: gnu: inkscape: Fix build with Poppler 22.9.0.
From: |
guix-commits |
Subject: |
02/27: gnu: inkscape: Fix build with Poppler 22.9.0. |
Date: |
Fri, 9 Sep 2022 11:08:13 -0400 (EDT) |
mbakke pushed a commit to branch core-updates
in repository guix.
commit 135ad8988a94bf4ec14a83f20938a95ca7767106
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Fri Sep 9 12:49:37 2022 +0200
gnu: inkscape: Fix build with Poppler 22.9.0.
This fixes a regression introduced in
c37a31e9abbc54d284096e4684f6dc2e094dbd7d.
* gnu/packages/patches/inkscape-poppler-compat.patch: New file.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
* gnu/packages/inkscape.scm (inkscape/stable)[source](patches): New field.
---
gnu/local.mk | 1 +
gnu/packages/inkscape.scm | 1 +
gnu/packages/patches/inkscape-poppler-compat.patch | 45 ++++++++++++++++++++++
3 files changed, 47 insertions(+)
diff --git a/gnu/local.mk b/gnu/local.mk
index a74c714475..faf2e35003 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1305,6 +1305,7 @@ dist_patch_DATA =
\
%D%/packages/patches/imagemagick-ReadDCMImage-fix.patch \
%D%/packages/patches/imagemagick-ReadDCMPixels-fix.patch \
%D%/packages/patches/imagemagick-WriteTHUMBNAILImage-fix.patch \
+ %D%/packages/patches/inkscape-poppler-compat.patch \
%D%/packages/patches/instead-use-games-path.patch \
%D%/packages/patches/intel-xed-fix-nondeterminism.patch \
%D%/packages/patches/intltool-perl-compatibility.patch \
diff --git a/gnu/packages/inkscape.scm b/gnu/packages/inkscape.scm
index 0342d4c56d..ba9ef8b1d1 100644
--- a/gnu/packages/inkscape.scm
+++ b/gnu/packages/inkscape.scm
@@ -68,6 +68,7 @@
(uri (string-append "https://media.inkscape.org/dl/"
"resources/file/"
"inkscape-" version ".tar.xz"))
+ (patches (search-patches "inkscape-poppler-compat.patch"))
(sha256
(base32 "06scilds4p4bw337ss22nfdxy2kynv5yjw6vq6nlpjm7xfh7vkj6"))
(modules '((guix build utils)
diff --git a/gnu/packages/patches/inkscape-poppler-compat.patch
b/gnu/packages/patches/inkscape-poppler-compat.patch
new file mode 100644
index 0000000000..cb7d1c8eb3
--- /dev/null
+++ b/gnu/packages/patches/inkscape-poppler-compat.patch
@@ -0,0 +1,45 @@
+Fix build with Poppler 22.9.0.
+
+Taken from upstream:
+
+
https://gitlab.com/inkscape/inkscape/-/commit/fb00794923d19cfbb2ca4adca3ae8971553a06be
+
+diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp
b/src/extension/internal/pdfinput/pdf-parser.cpp
+index
cca1e840966c7940a1af472025535042b07e3e0f..80d64c9b866d5d3dd095636a9a02571b89061af1
100644
+--- a/src/extension/internal/pdfinput/pdf-parser.cpp
++++ b/src/extension/internal/pdfinput/pdf-parser.cpp
+@@ -697,7 +697,11 @@ void PdfParser::opSetDash(Object args[], int /*numArgs*/)
+ _POPPLER_FREE(obj);
+ }
+ }
++#if POPPLER_CHECK_VERSION(22, 9, 0)
++ state->setLineDash(std::vector<double> (dash, dash + length),
args[1].getNum());
++#else
+ state->setLineDash(dash, length, args[1].getNum());
++#endif
+ builder->updateStyle(state);
+ }
+
+diff --git a/src/extension/internal/pdfinput/svg-builder.cpp
b/src/extension/internal/pdfinput/svg-builder.cpp
+index
12f71dd9214b95dbad6fdf7642a96cdd57f2c64a..9fc56fe63c2feee986ad1ff5018e679a0bacb665
100644
+--- a/src/extension/internal/pdfinput/svg-builder.cpp
++++ b/src/extension/internal/pdfinput/svg-builder.cpp
+@@ -389,10 +389,17 @@ void SvgBuilder::_setStrokeStyle(SPCSSAttr *css,
GfxState *state) {
+ sp_repr_css_set_property(css, "stroke-miterlimit", os_ml.str().c_str());
+
+ // Line dash
+- double *dash_pattern;
+ int dash_length;
+ double dash_start;
++#if POPPLER_CHECK_VERSION(22, 9, 0)
++ const double *dash_pattern;
++ const std::vector<double> &dash = state->getLineDash(&dash_start);
++ dash_pattern = dash.data();
++ dash_length = dash.size();
++#else
++ double *dash_pattern;
+ state->getLineDash(&dash_pattern, &dash_length, &dash_start);
++#endif
+ if ( dash_length > 0 ) {
+ Inkscape::CSSOStringStream os_array;
+ for ( int i = 0 ; i < dash_length ; i++ ) {
- branch core-updates updated (8ea970a945 -> 5fcbbe37c0), guix-commits, 2022/09/09
- 01/27: gnu: QPDF: Fix build with grep 3.8., guix-commits, 2022/09/09
- 02/27: gnu: inkscape: Fix build with Poppler 22.9.0.,
guix-commits <=
- 09/27: gnu: python-exceptiongroup: Disable tests., guix-commits, 2022/09/09
- 10/27: gnu: python-hypothesis: Update to 6.54.5., guix-commits, 2022/09/09
- 13/27: gnu: python-coverage: Update to 6.4.3., guix-commits, 2022/09/09
- 12/27: gnu: python-pytest: Use G-expression., guix-commits, 2022/09/09
- 03/27: gnu: gjs: Update to 1.73.2., guix-commits, 2022/09/09
- 04/27: gnu: serf: Build with the default scons., guix-commits, 2022/09/09
- 18/27: gnu: Remove python-pytest-forked-next., guix-commits, 2022/09/09
- 21/27: gnu: python-pytest-mock: Update to 3.8.2., guix-commits, 2022/09/09
- 07/27: gnu: python-pytest: Update to 7.1.3., guix-commits, 2022/09/09
- 16/27: gnu: python-pytest-xdist: Add extra test input, don't propagate pytest., guix-commits, 2022/09/09