From 1c744274d1bc573bfd0fa3b94ee38ba70d8427286b3c3233fe8f7f063e07bf41 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Tue, 13 Sep 2022 10:37:21 +0000 Subject: [PATCH] Accepting request 1003289 from home:iznogood:branches:graphics - Add 2f3101417.patch: Fix build with Poppler 22.09.0. OBS-URL: https://build.opensuse.org/request/show/1003289 OBS-URL: https://build.opensuse.org/package/show/graphics/inkscape?expand=0&rev=95 --- 2f3101417.patch | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ inkscape.changes | 5 +++++ inkscape.spec | 3 +++ 3 files changed, 61 insertions(+) create mode 100644 2f3101417.patch diff --git a/2f3101417.patch b/2f3101417.patch new file mode 100644 index 0000000..929d8bc --- /dev/null +++ b/2f3101417.patch @@ -0,0 +1,53 @@ +From 2f3101417a04721c42b6b101dde07fa961a56f1b Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Tue, 6 Sep 2022 10:10:25 +0000 +Subject: [PATCH] Fix build with Poppler 22.09.0 + +Adapt to changes in Poppler's getLineDash/setLineDash interface to allow building with Poppler 22.09.0. +--- + src/extension/internal/pdfinput/pdf-parser.cpp | 4 ++++ + src/extension/internal/pdfinput/svg-builder.cpp | 9 ++++++++- + 2 files changed, 12 insertions(+), 1 deletion(-) + +diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extension/internal/pdfinput/pdf-parser.cpp +index cca1e84096..80d64c9b86 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 (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 12f71dd921..9fc56fe63c 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 &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++ ) { +-- +GitLab + diff --git a/inkscape.changes b/inkscape.changes index a5e22e5..4598d48 100644 --- a/inkscape.changes +++ b/inkscape.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Sep 13 10:19:29 UTC 2022 - Bjørn Lie + +- Add 2f3101417.patch: Fix build with Poppler 22.09.0. + ------------------------------------------------------------------- Sat Jul 16 16:30:42 UTC 2022 - thod_@gmx.de diff --git a/inkscape.spec b/inkscape.spec index 7fc359d..e1c120e 100644 --- a/inkscape.spec +++ b/inkscape.spec @@ -31,6 +31,9 @@ Source1: openSUSE.gpl Source2: inkscape-split-extensions-extra.py Source98: https://media.inkscape.org/media/resources/sigs/inkscape-%{_version}.tar.xz.sig Source99: https://inkscape.org/~MarcJeanmougin/gpg#/%name.keyring +# PATCH-FIX-UPSTREAM 2f3101417.patch -- Fix build with Poppler 22.09.0 +Patch0: https://gitlab.com/inkscape/inkscape/-/commit/2f3101417.patch + BuildRequires: cmake BuildRequires: double-conversion-devel BuildRequires: fdupes