SHA256
1
0
forked from pool/scribus

Accepting request 1004934 from KDE:Extra

- Add poppler 22.09 compatibility patch:
  * scribus-1.5.8-poppler-22.09.0.patch

OBS-URL: https://build.opensuse.org/request/show/1004934
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/scribus?expand=0&rev=82
This commit is contained in:
Dominique Leuenberger 2022-09-21 12:41:43 +00:00 committed by Git OBS Bridge
commit c53aa58359
3 changed files with 34 additions and 0 deletions

View File

@ -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<double> &dash = state->getLineDash(&DashOffset);
+ dashPattern = dash.data();
+ dashLength = dash.size();
+#else
+ double *dashPattern;
+ state->getLineDash(&dashPattern, &dashLength, &DashOffset);
+#endif
QVector<double> pattern(dashLength);
for (int i = 0; i < dashLength; ++i)
{

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Sep 20 10:46:04 UTC 2022 - Christophe Giboudeaux <christophe@krop.fr>
- 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 <christophe@krop.fr>

View File

@ -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