From b75ef7c58389c9e0296e7df34e6ce058b4cbc7e62d464dcb0fd5bf6ba7fb7f5a Mon Sep 17 00:00:00 2001 From: Christophe Giboudeaux Date: Tue, 20 Sep 2022 10:46:56 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/scribus?expand=0&rev=79 --- scribus-1.5.8-poppler-22.09.0.patch | 26 ++++++++++++++++++++++++++ scribus.changes | 6 ++++++ scribus.spec | 2 ++ 3 files changed, 34 insertions(+) create mode 100644 scribus-1.5.8-poppler-22.09.0.patch diff --git a/scribus-1.5.8-poppler-22.09.0.patch b/scribus-1.5.8-poppler-22.09.0.patch new file mode 100644 index 0000000..1a2ab95 --- /dev/null +++ b/scribus-1.5.8-poppler-22.09.0.patch @@ -0,0 +1,26 @@ +poppler 22.09 compatibility. +Origin: archlinux +https://github.com/archlinux/svntogit-community/blob/packages/scribus/trunk/scribus-1.5.8-poppler-22.09.0.patch +diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp +index 8723b36..0f75cec 100644 +--- a/scribus/plugins/import/pdf/slaoutput.cpp ++++ b/scribus/plugins/import/pdf/slaoutput.cpp +@@ -3627,9 +3627,16 @@ void SlaOutputDev::getPenState(GfxState *state) + break; + } + double lw = state->getLineWidth(); +- double *dashPattern; + int dashLength; +- state->getLineDash(&dashPattern, &dashLength, &DashOffset); ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 9, 0) ++ const double *dashPattern; ++ const std::vector &dash = state->getLineDash(&DashOffset); ++ dashPattern = dash.data(); ++ dashLength = dash.size(); ++#else ++ double *dashPattern; ++ state->getLineDash(&dashPattern, &dashLength, &DashOffset); ++#endif + QVector pattern(dashLength); + for (int i = 0; i < dashLength; ++i) + { diff --git a/scribus.changes b/scribus.changes index 8ccaece..a3a981b 100644 --- a/scribus.changes +++ b/scribus.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Sep 20 10:46:04 UTC 2022 - Christophe Giboudeaux + +- Add poppler 22.09 compatibility patch: + * scribus-1.5.8-poppler-22.09.0.patch + ------------------------------------------------------------------- Fri Apr 22 08:33:17 UTC 2022 - Christophe Giboudeaux diff --git a/scribus.spec b/scribus.spec index 06f72aa..1588adb 100644 --- a/scribus.spec +++ b/scribus.spec @@ -41,6 +41,8 @@ Patch4: 0001-Enforce-poppler-version-0.86.0.patch Patch5: 0001-16764-Better-patch-avoid-a-memory-leak.patch # PATCH-FIX-UPSTREAM Patch6: 0001-Fix-build-with-poppler-22.04.0.patch +# PATCH-FIX-UPSTREAM +Patch7: scribus-1.5.8-poppler-22.09.0.patch BuildRequires: cmake >= 3.14.0 BuildRequires: cups-devel BuildRequires: dos2unix