From b3133f72fa8ed9388304a9b8fd39e013e083a68b Mon Sep 17 00:00:00 2001 From: Marek Kasik Date: Mon, 6 Feb 2023 18:34:00 +0100 Subject: [PATCH] Rebuild for poppler-23.02.0 Backported handling of new API of getLineDash() --- scribus-1.5.8-poppler-22.09.0.patch | 27 +++++++++++++++++++++++++++ scribus.spec | 7 ++++++- 2 files changed, 33 insertions(+), 1 deletion(-) 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..b11cef0 --- /dev/null +++ b/scribus-1.5.8-poppler-22.09.0.patch @@ -0,0 +1,27 @@ +--- scribus-1.5.8/scribus/plugins/import/pdf/slaoutput.cpp ++++ scribus-1.5.8/scribus/plugins/import/pdf/slaoutput.cpp +@@ -3762,15 +3762,21 @@ void SlaOutputDev::getPenState(GfxState + break; + } + double lw = state->getLineWidth(); +- double *dashPattern; ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 9, 0) ++ const auto& dashPattern = state->getLineDash(&DashOffset); ++ QVector pattern(dashPattern.size()); ++ for (size_t i = 0; i < dashPattern.size(); ++i) ++ pattern[i] = dashPattern[i] / lw; ++ DashValues = pattern; ++#else ++ double* dashPattern; + int dashLength; + state->getLineDash(&dashPattern, &dashLength, &DashOffset); + QVector pattern(dashLength); + for (int i = 0; i < dashLength; ++i) +- { + pattern[i] = dashPattern[i] / lw; +- } + DashValues = pattern; ++#endif + } + + int SlaOutputDev::getBlendMode(GfxState *state) diff --git a/scribus.spec b/scribus.spec index 3025aa4..cd71d5d 100644 --- a/scribus.spec +++ b/scribus.spec @@ -1,6 +1,6 @@ Name: scribus Version: 1.5.8 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Desktop Publishing application written in Qt # swatches bring in the fun licenses License: GPLv2+ and OGL and CC0 and CC-BY and CC-BY-SA and Public Domain and ASL 2.0 and LGPLv2+ @@ -15,6 +15,7 @@ Source0: %{name}-%{version}-free.tar.xz #Source1: http://downloads.sourceforge.net/%%{name}/%%{name}-%%{version}.tar.xz.asc Patch0: scribus-1.5.8-poppler-22.08.0.patch +Patch1: scribus-1.5.8-poppler-22.09.0.patch BuildRequires: boost-devel BuildRequires: cmake @@ -139,6 +140,10 @@ appstream-util validate-relax --nonet \ %changelog +* Mon Feb 06 2023 Marek Kasik - 1.5.8-9 +- Rebuild for poppler-23.02.0 +- Backported handling of new API of getLineDash() + * Sat Jan 21 2023 Fedora Release Engineering - 1.5.8-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild