1 |
commit: 5883a4d0b2e598d4b4543d68f650e9503ccbebbc |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Nov 1 15:52:41 2019 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Nov 1 18:39:18 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5883a4d0 |
7 |
|
8 |
app-office/scribus: Fix build with poppler-0.82.0 |
9 |
|
10 |
Package-Manager: Portage-2.3.78, Repoman-2.3.17 |
11 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
12 |
|
13 |
.../scribus/files/scribus-1.5.5-poppler-0.82.patch | 89 ++++++++++++++++++++++ |
14 |
app-office/scribus/scribus-1.5.5.ebuild | 3 + |
15 |
2 files changed, 92 insertions(+) |
16 |
|
17 |
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 |
18 |
new file mode 100644 |
19 |
index 00000000000..f1eb1e887da |
20 |
--- /dev/null |
21 |
+++ b/app-office/scribus/files/scribus-1.5.5-poppler-0.82.patch |
22 |
@@ -0,0 +1,89 @@ |
23 |
+From 615b6185c70c70928cab1aab6e1340ba5f80c174 Mon Sep 17 00:00:00 2001 |
24 |
+From: Craig Bradney <mrb@×××××××.info> |
25 |
+Date: Mon, 28 Oct 2019 22:11:56 +0000 |
26 |
+Subject: [PATCH] Work around poppler 0.82 signature changes |
27 |
+ |
28 |
+git-svn-id: svn://scribus.net/trunk/Scribus@23287 11d20701-8431-0410-a711-e3c959e3b870 |
29 |
+ |
30 |
+Use same mechanism as with previous poppler versions to support change of constness in function signatures |
31 |
+ |
32 |
+git-svn-id: svn://scribus.net/trunk/Scribus@23289 11d20701-8431-0410-a711-e3c959e3b870 |
33 |
+--- |
34 |
+ scribus/plugins/import/pdf/importpdfconfig.h | 6 ++++++ |
35 |
+ scribus/plugins/import/pdf/slaoutput.cpp | 6 +++--- |
36 |
+ scribus/plugins/import/pdf/slaoutput.h | 6 +++--- |
37 |
+ 3 files changed, 12 insertions(+), 6 deletions(-) |
38 |
+ |
39 |
+diff --git a/scribus/plugins/import/pdf/importpdfconfig.h b/scribus/plugins/import/pdf/importpdfconfig.h |
40 |
+index 2a13b0d10..9913ee382 100644 |
41 |
+--- a/scribus/plugins/import/pdf/importpdfconfig.h |
42 |
++++ b/scribus/plugins/import/pdf/importpdfconfig.h |
43 |
+@@ -52,4 +52,10 @@ for which a new license (GPL+exception) is in place. |
44 |
+ #define POPPLER_REF |
45 |
+ #endif |
46 |
+ |
47 |
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 82, 0) |
48 |
++#define POPPLER_CONST_082 const |
49 |
++#else |
50 |
++#define POPPLER_CONST_082 |
51 |
++#endif |
52 |
++ |
53 |
+ #endif |
54 |
+diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp |
55 |
+index 6094f3d9e..520474f65 100644 |
56 |
+--- a/scribus/plugins/import/pdf/slaoutput.cpp |
57 |
++++ b/scribus/plugins/import/pdf/slaoutput.cpp |
58 |
+@@ -2784,7 +2784,7 @@ void SlaOutputDev::drawMaskedImage(GfxState *state, Object *ref, Stream *str, i |
59 |
+ delete[] mbuffer; |
60 |
+ } |
61 |
+ |
62 |
+-void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, int *maskColors, GBool inlineImg) |
63 |
++void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, POPPLER_CONST_082 int* maskColors, GBool inlineImg) |
64 |
+ { |
65 |
+ ImageStream * imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), colorMap->getBits()); |
66 |
+ // qDebug() << "Image Components" << colorMap->getNumPixelComps() << "Mask" << maskColors; |
67 |
+@@ -3365,7 +3365,7 @@ err1: |
68 |
+ fontsrc->unref(); |
69 |
+ } |
70 |
+ |
71 |
+-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) |
72 |
++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) |
73 |
+ { |
74 |
+ double x1, y1, x2, y2; |
75 |
+ int render; |
76 |
+@@ -3452,7 +3452,7 @@ void SlaOutputDev::drawChar(GfxState *state, double x, double y, double dx, doub |
77 |
+ } |
78 |
+ } |
79 |
+ |
80 |
+-GBool SlaOutputDev::beginType3Char(GfxState *state, double x, double y, double dx, double dy, CharCode code, Unicode *u, int uLen) |
81 |
++GBool SlaOutputDev::beginType3Char(GfxState *state, double x, double y, double dx, double dy, CharCode code, POPPLER_CONST_082 Unicode *u, int uLen) |
82 |
+ { |
83 |
+ // qDebug() << "beginType3Char"; |
84 |
+ GfxFont *gfxFont; |
85 |
+diff --git a/scribus/plugins/import/pdf/slaoutput.h b/scribus/plugins/import/pdf/slaoutput.h |
86 |
+index bc4350a03..14a590d55 100644 |
87 |
+--- a/scribus/plugins/import/pdf/slaoutput.h |
88 |
++++ b/scribus/plugins/import/pdf/slaoutput.h |
89 |
+@@ -229,7 +229,7 @@ public: |
90 |
+ |
91 |
+ //----- image drawing |
92 |
+ void drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, GBool invert, GBool interpolate, GBool inlineImg) override; |
93 |
+- void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, int *maskColors, GBool inlineImg) override; |
94 |
++ void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, POPPLER_CONST_082 int *maskColors, GBool inlineImg) override; |
95 |
+ void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str, |
96 |
+ int width, int height, |
97 |
+ GfxImageColorMap *colorMap, |
98 |
+@@ -261,8 +261,8 @@ public: |
99 |
+ //----- text drawing |
100 |
+ void beginTextObject(GfxState *state) override; |
101 |
+ void endTextObject(GfxState *state) override; |
102 |
+- 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; |
103 |
+- GBool beginType3Char(GfxState * /*state*/, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, CharCode /*code*/, Unicode * /*u*/, int /*uLen*/) override; |
104 |
++ 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; |
105 |
++ GBool beginType3Char(GfxState * /*state*/, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, CharCode /*code*/, POPPLER_CONST_082 Unicode * /*u*/, int /*uLen*/) override; |
106 |
+ void endType3Char(GfxState * /*state*/) override; |
107 |
+ void type3D0(GfxState * /*state*/, double /*wx*/, double /*wy*/) override; |
108 |
+ void type3D1(GfxState * /*state*/, double /*wx*/, double /*wy*/, double /*llx*/, double /*lly*/, double /*urx*/, double /*ury*/) override; |
109 |
+-- |
110 |
+2.23.0 |
111 |
+ |
112 |
|
113 |
diff --git a/app-office/scribus/scribus-1.5.5.ebuild b/app-office/scribus/scribus-1.5.5.ebuild |
114 |
index a2c649ca819..011cbdfc82a 100644 |
115 |
--- a/app-office/scribus/scribus-1.5.5.ebuild |
116 |
+++ b/app-office/scribus/scribus-1.5.5.ebuild |
117 |
@@ -67,6 +67,9 @@ RDEPEND="${DEPEND} |
118 |
" |
119 |
|
120 |
PATCHES=( |
121 |
+ # upstream svn trunk |
122 |
+ "${FILESDIR}"/${P}-poppler-0.82.patch |
123 |
+ # non(?)-upstreamable |
124 |
"${FILESDIR}"/${PN}-1.5.3-fpic.patch |
125 |
"${FILESDIR}"/${P}-docdir.patch |
126 |
"${FILESDIR}"/${P}-findhyphen.patch |