From cb97fc81f76e482a95a2c79b404ac8eeaa1ab1cb085feeac0cfa9db943b2f3fd Mon Sep 17 00:00:00 2001 From: Christophe Giboudeaux Date: Fri, 19 Mar 2021 16:46:37 +0000 Subject: [PATCH] Accepting request 880150 from home:alarrosa:branches:KDE:Extra This fixes scribus build with poppler 21.03.0 (currently failing to build in Staging:O) - Add patches from upstream to fix build with popper 21.03.0: * 0001-fix-build-of-pdf-import-plugin-with-poppler-21.03.0.patch * 0002-fix-build-of-pdf-import-plugin-with-poppler-21.03.0.patch OBS-URL: https://build.opensuse.org/request/show/880150 OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/scribus?expand=0&rev=63 --- ...f-import-plugin-with-poppler-21.03.0.patch | 53 +++++++++++++++++++ ...f-import-plugin-with-poppler-21.03.0.patch | 27 ++++++++++ scribus.changes | 7 +++ scribus.spec | 5 +- 4 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 0001-fix-build-of-pdf-import-plugin-with-poppler-21.03.0.patch create mode 100644 0002-fix-build-of-pdf-import-plugin-with-poppler-21.03.0.patch diff --git a/0001-fix-build-of-pdf-import-plugin-with-poppler-21.03.0.patch b/0001-fix-build-of-pdf-import-plugin-with-poppler-21.03.0.patch new file mode 100644 index 0000000..b28e520 --- /dev/null +++ b/0001-fix-build-of-pdf-import-plugin-with-poppler-21.03.0.patch @@ -0,0 +1,53 @@ +From 7ce0ac16fd42d61ef9082b27822c7d9d79c7fef7 Mon Sep 17 00:00:00 2001 +From: Jean Ghali +Date: Mon, 1 Mar 2021 21:52:54 +0000 +Subject: [PATCH] Attempt to fix build of pdf import plugin with poppler + 21.03.0 + +git-svn-id: svn://scribus.net/trunk/Scribus@24537 11d20701-8431-0410-a711-e3c959e3b870 +--- + scribus/plugins/import/pdf/slaoutput.cpp | 12 +++++++++++- + scribus/plugins/import/pdf/slaoutput.h | 4 ++++ + 2 files changed, 15 insertions(+), 1 deletion(-) + +diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp +index 7cbc73e8d4..d1b37a0c21 100644 +--- a/scribus/plugins/import/pdf/slaoutput.cpp ++++ b/scribus/plugins/import/pdf/slaoutput.cpp +@@ -2291,9 +2291,19 @@ GBool SlaOutputDev::patchMeshShadedFill(GfxState *state, GfxPatchMeshShading *sh + return gTrue; + } + +-GBool SlaOutputDev::tilingPatternFill(GfxState *state, Gfx * /*gfx*/, Catalog *cat, Object *str, POPPLER_CONST_070 double *pmat, int paintType, int tilingType, Dict *resDict, POPPLER_CONST_070 double *mat, POPPLER_CONST_070 double *bbox, int x0, int y0, int x1, int y1, double xStep, double yStep) ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(21, 3, 0) ++bool SlaOutputDev::tilingPatternFill(GfxState *state, Gfx * /*gfx*/, Catalog *cat, GfxTilingPattern *tPat, const double *mat, int x0, int y0, int x1, int y1, double xStep, double yStep) ++#else ++GBool SlaOutputDev::tilingPatternFill(GfxState *state, Gfx * /*gfx*/, Catalog *cat, Object *str, POPPLER_CONST_070 double *pmat, int /*paintType*/, int /*tilingType*/, Dict *resDict, POPPLER_CONST_070 double *mat, POPPLER_CONST_070 double *bbox, int x0, int y0, int x1, int y1, double xStep, double yStep) ++#endif + { + // qDebug() << "SlaOutputDev::tilingPatternFill"; ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(21, 3, 0) ++ const double *bbox = tPat->getBBox(); ++ const double *pmat = tPat->getMatrix(); ++ Dict *resDict = tPat->getResDict(); ++#endif ++ + PDFRectangle box; + Gfx *gfx; + QString id; +diff --git a/scribus/plugins/import/pdf/slaoutput.h b/scribus/plugins/import/pdf/slaoutput.h +index 5149f19e31..66c34203ae 100644 +--- a/scribus/plugins/import/pdf/slaoutput.h ++++ b/scribus/plugins/import/pdf/slaoutput.h +@@ -196,7 +196,11 @@ class SlaOutputDev : public OutputDev + void stroke(GfxState *state) override; + void fill(GfxState *state) override; + void eoFill(GfxState *state) override; ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(21, 3, 0) ++ bool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, GfxTilingPattern *tPat, const double *mat, int x0, int y0, int x1, int y1, double xStep, double yStep) override; ++#else + GBool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str, POPPLER_CONST_070 double *pmat, int paintType, int tilingType, Dict *resDict, POPPLER_CONST_070 double *mat, POPPLER_CONST_070 double *bbox, int x0, int y0, int x1, int y1, double xStep, double yStep) override; ++#endif + GBool functionShadedFill(GfxState * /*state*/, GfxFunctionShading * /*shading*/) override { qDebug() << "Function Shaded Fill"; return gFalse; } + GBool axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax) override; + GBool axialShadedSupportExtend(GfxState *state, GfxAxialShading *shading) override { return (shading->getExtend0() == shading->getExtend1()); } diff --git a/0002-fix-build-of-pdf-import-plugin-with-poppler-21.03.0.patch b/0002-fix-build-of-pdf-import-plugin-with-poppler-21.03.0.patch new file mode 100644 index 0000000..f7987dd --- /dev/null +++ b/0002-fix-build-of-pdf-import-plugin-with-poppler-21.03.0.patch @@ -0,0 +1,27 @@ +From 6b9ff916959bcb941866f0bd86da639a421337f8 Mon Sep 17 00:00:00 2001 +From: Jean Ghali +Date: Mon, 1 Mar 2021 22:00:02 +0000 +Subject: [PATCH] Attempt to fix build of pdf import plugin with poppler + 21.03.0 + +git-svn-id: svn://scribus.net/trunk/Scribus@24538 11d20701-8431-0410-a711-e3c959e3b870 +--- + scribus/plugins/import/pdf/slaoutput.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp +index d1b37a0c21..de0a4145ef 100644 +--- a/scribus/plugins/import/pdf/slaoutput.cpp ++++ b/scribus/plugins/import/pdf/slaoutput.cpp +@@ -2335,7 +2335,11 @@ GBool SlaOutputDev::tilingPatternFill(GfxState *state, Gfx * /*gfx*/, Catalog *c + // Unset the clip path as it is unrelated to the pattern's coordinate space. + QPainterPath savedClip = m_currentClipPath; + m_currentClipPath = QPainterPath(); ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(21, 3, 0) ++ gfx->display(tPat->getContentStream()); ++#else + gfx->display(str); ++#endif + m_currentClipPath = savedClip; + inPattern--; + gElements = m_groupStack.pop(); diff --git a/scribus.changes b/scribus.changes index 105b863..5d1f54e 100644 --- a/scribus.changes +++ b/scribus.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Mar 19 15:59:13 UTC 2021 - Antonio Larrosa + +- Add patches from upstream to fix build with popper 21.03.0: + * 0001-fix-build-of-pdf-import-plugin-with-poppler-21.03.0.patch + * 0002-fix-build-of-pdf-import-plugin-with-poppler-21.03.0.patch + ------------------------------------------------------------------- Sun Nov 15 15:36:44 UTC 2020 - Wolfgang Bauer diff --git a/scribus.spec b/scribus.spec index 487f059..10fdc60 100644 --- a/scribus.spec +++ b/scribus.spec @@ -1,7 +1,7 @@ # # spec file for package scribus # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # Copyright (c) Peter Linnell and 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties @@ -28,6 +28,9 @@ URL: https://www.scribus.net/ Source: %{name}-%{version}.tar.xz # PATCH-FIX-OPENSUSE Patch0: 0001-Make-sure-information-displayed-on-the-about-window-.patch +# PATCH-FIX-UPSTREAM +Patch1: 0001-fix-build-of-pdf-import-plugin-with-poppler-21.03.0.patch +Patch2: 0002-fix-build-of-pdf-import-plugin-with-poppler-21.03.0.patch BuildRequires: cmake >= 3.12.0 BuildRequires: cups-devel BuildRequires: dos2unix