[packages/scribus] - fix building with poopler 21.03 - rel 4

baggins baggins at pld-linux.org
Fri Apr 2 22:48:08 CEST 2021


commit f6b85c6fb3599361476cc0e6429f113a5e9ddfd2
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Fri Apr 2 22:47:47 2021 +0200

    - fix building with poopler 21.03
    - rel 4

 poppler.patch | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 scribus.spec  |  6 +++++-
 2 files changed, 53 insertions(+), 1 deletion(-)
---
diff --git a/scribus.spec b/scribus.spec
index e515951..7ca7ca9 100644
--- a/scribus.spec
+++ b/scribus.spec
@@ -11,12 +11,13 @@ Summary:	Scribus - Open Source Desktop Publishing
 Summary(pl.UTF-8):	Scribus - DTP dla Wolnego Oprogramowania
 Name:		scribus
 Version:	1.5.6.1
-Release:	3
+Release:	4
 License:	GPL v2+
 Group:		X11/Applications/Publishing
 Source0:	http://downloads.sourceforge.net/scribus/%{name}-%{version}.tar.xz
 # Source0-md5:	12700cd8c6f08ef02f50495d2ef2d3ce
 Patch0:		%{name}-docs.patch
+Patch1:		poppler.patch
 URL:		https://www.scribus.net/
 BuildRequires:	GraphicsMagick-devel
 BuildRequires:	Qt5Core-devel >= %{qt_ver}
@@ -91,6 +92,8 @@ BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define		specflags_ia32	-fomit-frame-pointer
 
+%define		_debugsource_packages	0
+
 %description
 Scribus is an open source desktop page layout program with the aim of
 producing commerical grade output in PDF and Postscript, primarily,
@@ -156,6 +159,7 @@ Domyślne szablony dokumentów dostarczane wraz ze Scribusem.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 mkdir -p build
diff --git a/poppler.patch b/poppler.patch
new file mode 100644
index 0000000..e9913ac
--- /dev/null
+++ b/poppler.patch
@@ -0,0 +1,48 @@
+--- scribus-1.5.6.1/scribus/plugins/import/pdf/slaoutput.cpp~	2020-11-14 23:37:11.000000000 +0100
++++ scribus-1.5.6.1/scribus/plugins/import/pdf/slaoutput.cpp	2021-04-02 22:18:18.385332709 +0200
+@@ -2291,9 +2291,18 @@
+ 	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;
+@@ -2325,7 +2334,11 @@
+ 	// 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();
+--- scribus-1.5.6.1/scribus/plugins/import/pdf/slaoutput.h~	2020-11-14 23:37:11.000000000 +0100
++++ scribus-1.5.6.1/scribus/plugins/import/pdf/slaoutput.h	2021-04-02 22:15:19.594513556 +0200
+@@ -196,7 +196,11 @@
+ 	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()); }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/scribus.git/commitdiff/f6b85c6fb3599361476cc0e6429f113a5e9ddfd2



More information about the pld-cvs-commit mailing list