[arch-commits] Commit in inkscape/trunk (2 files)
Andreas Radke
andyrtr at gemini.archlinux.org
Fri Sep 2 06:31:51 UTC 2022
Date: Friday, September 2, 2022 @ 06:31:51
Author: andyrtr
Revision: 454895
upgpkg: inkscape 1.2.1-4: poppler 22.09.0 rebuild
Added:
inkscape/trunk/inkscape-1.2.1-poppler-22.09.0.patch
Modified:
inkscape/trunk/PKGBUILD
--------------------------------------+
PKGBUILD | 10 +++-
inkscape-1.2.1-poppler-22.09.0.patch | 73 +++++++++++++++++++++++++++++++++
2 files changed, 80 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-09-02 06:16:00 UTC (rev 454894)
+++ PKGBUILD 2022-09-02 06:31:51 UTC (rev 454895)
@@ -5,7 +5,7 @@
pkgname=inkscape
pkgver=1.2.1
_tag='9c6d41e4102d2e2e21a6d53ddba38ce202271001' # git rev-parse INKSCAPE_${pkgver/./_}
-pkgrel=3
+pkgrel=4
pkgdesc='Professional vector graphics editor'
url='https://inkscape.org/'
license=('GPL' 'LGPL')
@@ -45,8 +45,10 @@
)
#source=("https://media.inkscape.org/dl/resources/file/${pkgname}-${pkgver}.tar.bz2")
-source=("git+https://gitlab.com/inkscape/inkscape.git#tag=${_tag}")
-sha256sums=('SKIP')
+source=("git+https://gitlab.com/inkscape/inkscape.git#tag=${_tag}"
+ inkscape-1.2.1-poppler-22.09.0.patch)
+sha256sums=('SKIP'
+ 'd25ffb560c691398403fc93eb5dde358f4309f95fdce8fd34a57d540e84fc38f')
_backports=(
)
@@ -60,6 +62,8 @@
git log --oneline -1 "${_c}"
git cherry-pick -n "${_c}"
done
+
+ patch -Np1 -i ../inkscape-1.2.1-poppler-22.09.0.patch
}
build() {
Added: inkscape-1.2.1-poppler-22.09.0.patch
===================================================================
--- inkscape-1.2.1-poppler-22.09.0.patch (rev 0)
+++ inkscape-1.2.1-poppler-22.09.0.patch 2022-09-02 06:31:51 UTC (rev 454895)
@@ -0,0 +1,73 @@
+https://gitlab.com/inkscape/inkscape/-/merge_requests/4719
+
+From dce083204c62f1185ad079fc124f7fb40a1d0bb6 Mon Sep 17 00:00:00 2001
+From: Sam James <sam at gentoo.org>
+Date: Fri, 2 Sep 2022 06:21:28 +0100
+Subject: [PATCH] Fix build with Poppler 22.09.0
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+With Poppler 22.09.0, inkscape fails to build with:
+```
+/var/tmp/portage/media-gfx/inkscape-1.2.1/work/inkscape-1.2.1/src/extension/internal/pdfinput/svg-builder.cpp:394:23: error: no matching function for call to ‘GfxState::getLineDash(double**, int*, double*)’
+ 394 | state->getLineDash(&dash_pattern, &dash_length, &dash_start);
+ | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+In file included from /var/tmp/portage/media-gfx/inkscape-1.2.1/work/inkscape-1.2.1/src/extension/internal/pdfinput/svg-builder.cpp:44:
+/usr/include/poppler/GfxState.h:1506:32: note: candidate: ‘const std::vector<double>& GfxState::getLineDash(double*)’
+ 1506 | const std::vector<double> &getLineDash(double *start)
+ | ^~~~~~~~~~~
+[...]
+/var/tmp/portage/media-gfx/inkscape-1.2.1/work/inkscape-1.2.1/src/extension/internal/pdfinput/pdf-parser.cpp:700:21: error: no matching function for call to ‘GfxState::setLineDash(double*&, int&, double)’
+ 700 | state->setLineDash(dash, length, args[1].getNum());
+ | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+```
+
+Poppler changed the getLineDash interface:
+```
+- void getLineDash(double **dash, int *length, double *start)
++ const std::vector<double> &getLineDash(double *start)
+```
+
+... and the setLineDash interface:
+````
+- void setLineDash(double *dash, int length, double start);
++ void setLineDash(std::vector<double> &&dash, double start);
+```
+
+Signed-off-by: Sam James <sam at gentoo.org>
+--- 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, length), args[1].getNum());
++#else
+ state->setLineDash(dash, length, args[1].getNum());
++#endif
+ builder->updateStyle(state);
+ }
+
+--- a/src/extension/internal/pdfinput/svg-builder.cpp
++++ b/src/extension/internal/pdfinput/svg-builder.cpp
+@@ -388,10 +388,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++ ) {
More information about the arch-commits
mailing list