app-office/scribus: Fix build with poppler-0.82.0
authorAndreas Sturmlechner <asturm@gentoo.org>
Fri, 1 Nov 2019 15:52:41 +0000 (16:52 +0100)
committerAndreas Sturmlechner <asturm@gentoo.org>
Fri, 1 Nov 2019 18:39:18 +0000 (19:39 +0100)
Package-Manager: Portage-2.3.78, Repoman-2.3.17
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
app-office/scribus/files/scribus-1.5.5-poppler-0.82.patch [new file with mode: 0644]
app-office/scribus/scribus-1.5.5.ebuild

diff --git a/app-office/scribus/files/scribus-1.5.5-poppler-0.82.patch b/app-office/scribus/files/scribus-1.5.5-poppler-0.82.patch
new file mode 100644 (file)
index 0000000..f1eb1e8
--- /dev/null
@@ -0,0 +1,89 @@
+From 615b6185c70c70928cab1aab6e1340ba5f80c174 Mon Sep 17 00:00:00 2001
+From: Craig Bradney <mrb@scribus.info>
+Date: Mon, 28 Oct 2019 22:11:56 +0000
+Subject: [PATCH] Work around poppler 0.82 signature changes
+
+git-svn-id: svn://scribus.net/trunk/Scribus@23287 11d20701-8431-0410-a711-e3c959e3b870
+
+Use same mechanism as with previous poppler versions to support change of constness in function signatures
+
+git-svn-id: svn://scribus.net/trunk/Scribus@23289 11d20701-8431-0410-a711-e3c959e3b870
+---
+ scribus/plugins/import/pdf/importpdfconfig.h | 6 ++++++
+ scribus/plugins/import/pdf/slaoutput.cpp     | 6 +++---
+ scribus/plugins/import/pdf/slaoutput.h       | 6 +++---
+ 3 files changed, 12 insertions(+), 6 deletions(-)
+
+diff --git a/scribus/plugins/import/pdf/importpdfconfig.h b/scribus/plugins/import/pdf/importpdfconfig.h
+index 2a13b0d10..9913ee382 100644
+--- a/scribus/plugins/import/pdf/importpdfconfig.h
++++ b/scribus/plugins/import/pdf/importpdfconfig.h
+@@ -52,4 +52,10 @@ for which a new license (GPL+exception) is in place.
+ #define POPPLER_REF\r
+ #endif\r
\r
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 82, 0)\r
++#define POPPLER_CONST_082 const\r
++#else\r
++#define POPPLER_CONST_082\r
++#endif\r
++\r
+ #endif\r
+diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp
+index 6094f3d9e..520474f65 100644
+--- a/scribus/plugins/import/pdf/slaoutput.cpp
++++ b/scribus/plugins/import/pdf/slaoutput.cpp
+@@ -2784,7 +2784,7 @@ void SlaOutputDev::drawMaskedImage(GfxState *state, Object *ref, Stream *str,  i
+       delete[] mbuffer;\r
+ }\r
\r
+-void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, int *maskColors, GBool inlineImg)\r
++void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, POPPLER_CONST_082 int* maskColors, GBool inlineImg)\r
+ {\r
+       ImageStream * imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), colorMap->getBits());\r
+ //    qDebug() << "Image Components" << colorMap->getNumPixelComps() << "Mask" << maskColors;\r
+@@ -3365,7 +3365,7 @@ err1:
+               fontsrc->unref();\r
+ }\r
\r
+-void SlaOutputDev::drawChar(GfxState *state, double x, double y, double dx, double dy, double originX, double originY, CharCode code, int nBytes, Unicode *u, int uLen)\r
++void SlaOutputDev::drawChar(GfxState *state, double x, double y, double dx, double dy, double originX, double originY, CharCode code, int nBytes, POPPLER_CONST_082 Unicode *u, int uLen)\r
+ {\r
+       double x1, y1, x2, y2;\r
+       int render;\r
+@@ -3452,7 +3452,7 @@ void SlaOutputDev::drawChar(GfxState *state, double x, double y, double dx, doub
+       }\r
+ }\r
\r
+-GBool SlaOutputDev::beginType3Char(GfxState *state, double x, double y, double dx, double dy, CharCode code, Unicode *u, int uLen)\r
++GBool SlaOutputDev::beginType3Char(GfxState *state, double x, double y, double dx, double dy, CharCode code, POPPLER_CONST_082 Unicode *u, int uLen)\r
+ {\r
+ //    qDebug() << "beginType3Char";\r
+       GfxFont *gfxFont;\r
+diff --git a/scribus/plugins/import/pdf/slaoutput.h b/scribus/plugins/import/pdf/slaoutput.h
+index bc4350a03..14a590d55 100644
+--- a/scribus/plugins/import/pdf/slaoutput.h
++++ b/scribus/plugins/import/pdf/slaoutput.h
+@@ -229,7 +229,7 @@ public:
\r
+       //----- image drawing\r
+       void drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, GBool invert, GBool interpolate, GBool inlineImg) override;\r
+-      void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, int *maskColors, GBool inlineImg) override;\r
++      void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, POPPLER_CONST_082 int *maskColors, GBool inlineImg) override;\r
+       void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,\r
+                                  int width, int height,\r
+                                  GfxImageColorMap *colorMap,\r
+@@ -261,8 +261,8 @@ public:
+       //----- text drawing\r
+       void  beginTextObject(GfxState *state) override;\r
+       void  endTextObject(GfxState *state) override;\r
+-      void  drawChar(GfxState *state, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, double /*originX*/, double /*originY*/, CharCode /*code*/, int /*nBytes*/, Unicode * /*u*/, int /*uLen*/) override;\r
+-      GBool beginType3Char(GfxState * /*state*/, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, CharCode /*code*/, Unicode * /*u*/, int /*uLen*/) override;\r
++      void  drawChar(GfxState *state, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, double /*originX*/, double /*originY*/, CharCode /*code*/, int /*nBytes*/, POPPLER_CONST_082 Unicode * /*u*/, int /*uLen*/) override;\r
++      GBool beginType3Char(GfxState * /*state*/, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, CharCode /*code*/, POPPLER_CONST_082 Unicode * /*u*/, int /*uLen*/) override;\r
+       void  endType3Char(GfxState * /*state*/) override;\r
+       void  type3D0(GfxState * /*state*/, double /*wx*/, double /*wy*/) override;\r
+       void  type3D1(GfxState * /*state*/, double /*wx*/, double /*wy*/, double /*llx*/, double /*lly*/, double /*urx*/, double /*ury*/) override;\r
+-- 
+2.23.0
+
index a2c649ca8194f781c1efe765afc2ccc3d32c9084..011cbdfc82ab95a78f1470dd037c7a3330edef88 100644 (file)
@@ -67,6 +67,9 @@ RDEPEND="${DEPEND}
 "
 
 PATCHES=(
+       # upstream svn trunk
+       "${FILESDIR}"/${P}-poppler-0.82.patch
+       # non(?)-upstreamable
        "${FILESDIR}"/${PN}-1.5.3-fpic.patch
        "${FILESDIR}"/${P}-docdir.patch
        "${FILESDIR}"/${P}-findhyphen.patch