1 |
commit: 9005e78b82e88f88b1685d2453de977b20818e62 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jan 8 00:16:23 2019 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jan 8 00:17:15 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9005e78b |
7 |
|
8 |
app-office/libreoffice: Fix build with poppler-0.71, poppler-0.72 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/670692 |
11 |
Package-Manager: Portage-2.3.54, Repoman-2.3.12 |
12 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
13 |
|
14 |
.../files/libreoffice-6.2.0.1-poppler-0.71-1.patch | 164 +++++++++++++++++++++ |
15 |
.../files/libreoffice-6.2.0.1-poppler-0.71-2.patch | 72 +++++++++ |
16 |
.../files/libreoffice-6.2.0.1-poppler-0.72.patch | 26 ++++ |
17 |
app-office/libreoffice/libreoffice-6.2.9999.ebuild | 9 +- |
18 |
4 files changed, 270 insertions(+), 1 deletion(-) |
19 |
|
20 |
diff --git a/app-office/libreoffice/files/libreoffice-6.2.0.1-poppler-0.71-1.patch b/app-office/libreoffice/files/libreoffice-6.2.0.1-poppler-0.71-1.patch |
21 |
new file mode 100644 |
22 |
index 00000000000..9899f5864ca |
23 |
--- /dev/null |
24 |
+++ b/app-office/libreoffice/files/libreoffice-6.2.0.1-poppler-0.71-1.patch |
25 |
@@ -0,0 +1,164 @@ |
26 |
+From 5e8bdd9203dd642111c62a6668ee665a20d4ba19 Mon Sep 17 00:00:00 2001 |
27 |
+From: Mike Kaganski <mike.kaganski@×××××××××.com> |
28 |
+Date: Tue, 20 Nov 2018 08:45:38 +0100 |
29 |
+Subject: poppler dropped GBool since 0.71 |
30 |
+ |
31 |
+See https://lists.freedesktop.org/archives/libreoffice/2018-November/081410.html |
32 |
+ |
33 |
+Change-Id: I258e08894486a925bed50a3a4232b6e805af6784 |
34 |
+Reviewed-on: https://gerrit.libreoffice.org/63625 |
35 |
+Tested-by: Jenkins |
36 |
+Reviewed-by: Stephan Bergmann <sbergman@××××××.com> |
37 |
+--- |
38 |
+ .../pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 21 +++++++------ |
39 |
+ .../pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 35 +++++++++++++--------- |
40 |
+ 2 files changed, 31 insertions(+), 25 deletions(-) |
41 |
+ |
42 |
+diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx |
43 |
+index 575a90a..ab74b36 100644 |
44 |
+--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx |
45 |
++++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx |
46 |
+@@ -514,7 +514,7 @@ void PDFOutDev::printPath( GfxPath* pPath ) |
47 |
+ PDFOutDev::PDFOutDev( PDFDoc* pDoc ) : |
48 |
+ m_pDoc( pDoc ), |
49 |
+ m_aFontMap(), |
50 |
+- m_pUtf8Map( new UnicodeMap("UTF-8", gTrue, &mapUTF8) ), |
51 |
++ m_pUtf8Map( new UnicodeMap("UTF-8", true, &mapUTF8) ), |
52 |
+ m_bSkipImages(false) |
53 |
+ { |
54 |
+ } |
55 |
+@@ -939,9 +939,9 @@ void PDFOutDev::endTextObject(GfxState*) |
56 |
+ } |
57 |
+ |
58 |
+ void PDFOutDev::drawImageMask(GfxState* pState, Object*, Stream* str, |
59 |
+- int width, int height, GBool invert, |
60 |
+- GBool /*interpolate*/, |
61 |
+- GBool /*inlineImg*/ ) |
62 |
++ int width, int height, poppler_bool invert, |
63 |
++ poppler_bool /*interpolate*/, |
64 |
++ poppler_bool /*inlineImg*/ ) |
65 |
+ { |
66 |
+ if (m_bSkipImages) |
67 |
+ return; |
68 |
+@@ -969,8 +969,8 @@ void PDFOutDev::drawImageMask(GfxState* pState, Object*, Stream* str, |
69 |
+ |
70 |
+ void PDFOutDev::drawImage(GfxState*, Object*, Stream* str, |
71 |
+ int width, int height, GfxImageColorMap* colorMap, |
72 |
+- GBool /*interpolate*/, |
73 |
+- int* maskColors, GBool /*inlineImg*/ ) |
74 |
++ poppler_bool /*interpolate*/, |
75 |
++ int* maskColors, poppler_bool /*inlineImg*/ ) |
76 |
+ { |
77 |
+ if (m_bSkipImages) |
78 |
+ return; |
79 |
+@@ -1018,11 +1018,10 @@ void PDFOutDev::drawImage(GfxState*, Object*, Stream* str, |
80 |
+ void PDFOutDev::drawMaskedImage(GfxState*, Object*, Stream* str, |
81 |
+ int width, int height, |
82 |
+ GfxImageColorMap* colorMap, |
83 |
+- GBool /*interpolate*/, |
84 |
++ poppler_bool /*interpolate*/, |
85 |
+ Stream* maskStr, |
86 |
+ int maskWidth, int maskHeight, |
87 |
+- GBool maskInvert |
88 |
+- , GBool /*maskInterpolate*/ |
89 |
++ poppler_bool maskInvert, poppler_bool /*maskInterpolate*/ |
90 |
+ ) |
91 |
+ { |
92 |
+ if (m_bSkipImages) |
93 |
+@@ -1036,11 +1035,11 @@ void PDFOutDev::drawMaskedImage(GfxState*, Object*, Stream* str, |
94 |
+ void PDFOutDev::drawSoftMaskedImage(GfxState*, Object*, Stream* str, |
95 |
+ int width, int height, |
96 |
+ GfxImageColorMap* colorMap, |
97 |
+- GBool /*interpolate*/, |
98 |
++ poppler_bool /*interpolate*/, |
99 |
+ Stream* maskStr, |
100 |
+ int maskWidth, int maskHeight, |
101 |
+ GfxImageColorMap* maskColorMap |
102 |
+- , GBool /*maskInterpolate*/ |
103 |
++ , poppler_bool /*maskInterpolate*/ |
104 |
+ ) |
105 |
+ { |
106 |
+ if (m_bSkipImages) |
107 |
+diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx |
108 |
+index da021a2a..a6135fa 100644 |
109 |
+--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx |
110 |
++++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx |
111 |
+@@ -130,6 +130,13 @@ namespace pdfi |
112 |
+ { return const_cast<GooString &>(familyName); } |
113 |
+ }; |
114 |
+ |
115 |
++ // Versions before 0.15 defined GBool as int; 0.15 redefined it as bool; 0.71 dropped GBool |
116 |
++#if POPPLER_VERSION_MAJOR == 0 && POPPLER_VERSION_MINOR < 71 |
117 |
++ typedef GBool poppler_bool; |
118 |
++#else |
119 |
++ typedef bool poppler_bool; |
120 |
++#endif |
121 |
++ |
122 |
+ class PDFOutDev : public OutputDev |
123 |
+ { |
124 |
+ // not owned by this class |
125 |
+@@ -151,17 +158,17 @@ namespace pdfi |
126 |
+ |
127 |
+ // Does this device use upside-down coordinates? |
128 |
+ // (Upside-down means (0,0) is the top left corner of the page.) |
129 |
+- virtual GBool upsideDown() override { return gTrue; } |
130 |
++ virtual poppler_bool upsideDown() override { return true; } |
131 |
+ |
132 |
+ // Does this device use drawChar() or drawString()? |
133 |
+- virtual GBool useDrawChar() override { return gTrue; } |
134 |
++ virtual poppler_bool useDrawChar() override { return true; } |
135 |
+ |
136 |
+ // Does this device use beginType3Char/endType3Char? Otherwise, |
137 |
+ // text in Type 3 fonts will be drawn with drawChar/drawString. |
138 |
+- virtual GBool interpretType3Chars() override { return gFalse; } |
139 |
++ virtual poppler_bool interpretType3Chars() override { return false; } |
140 |
+ |
141 |
+ // Does this device need non-text content? |
142 |
+- virtual GBool needNonText() override { return gTrue; } |
143 |
++ virtual poppler_bool needNonText() override { return true; } |
144 |
+ |
145 |
+ //----- initialization and control |
146 |
+ |
147 |
+@@ -233,29 +240,29 @@ namespace pdfi |
148 |
+ |
149 |
+ //----- image drawing |
150 |
+ virtual void drawImageMask(GfxState *state, Object *ref, Stream *str, |
151 |
+- int width, int height, GBool invert, |
152 |
+- GBool interpolate, |
153 |
+- GBool inlineImg) override; |
154 |
++ int width, int height, poppler_bool invert, |
155 |
++ poppler_bool interpolate, |
156 |
++ poppler_bool inlineImg) override; |
157 |
+ virtual void drawImage(GfxState *state, Object *ref, Stream *str, |
158 |
+ int width, int height, GfxImageColorMap *colorMap, |
159 |
+- GBool interpolate, |
160 |
+- int *maskColors, GBool inlineImg) override; |
161 |
++ poppler_bool interpolate, |
162 |
++ int* maskColors, poppler_bool inlineImg) override; |
163 |
+ virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str, |
164 |
+ int width, int height, |
165 |
+ GfxImageColorMap *colorMap, |
166 |
+- GBool interpolate, |
167 |
++ poppler_bool interpolate, |
168 |
+ Stream *maskStr, int maskWidth, int maskHeight, |
169 |
+- GBool maskInvert |
170 |
+- , GBool maskInterpolate |
171 |
++ poppler_bool maskInvert, |
172 |
++ poppler_bool maskInterpolate |
173 |
+ ) override; |
174 |
+ virtual void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str, |
175 |
+ int width, int height, |
176 |
+ GfxImageColorMap *colorMap, |
177 |
+- GBool interpolate, |
178 |
++ poppler_bool interpolate, |
179 |
+ Stream *maskStr, |
180 |
+ int maskWidth, int maskHeight, |
181 |
+ GfxImageColorMap *maskColorMap |
182 |
+- , GBool maskInterpolate |
183 |
++ , poppler_bool maskInterpolate |
184 |
+ ) override; |
185 |
+ |
186 |
+ static void setPageNum( int nNumPages ); |
187 |
+-- |
188 |
+cgit v1.1 |
189 |
+ |
190 |
|
191 |
diff --git a/app-office/libreoffice/files/libreoffice-6.2.0.1-poppler-0.71-2.patch b/app-office/libreoffice/files/libreoffice-6.2.0.1-poppler-0.71-2.patch |
192 |
new file mode 100644 |
193 |
index 00000000000..37b44556219 |
194 |
--- /dev/null |
195 |
+++ b/app-office/libreoffice/files/libreoffice-6.2.0.1-poppler-0.71-2.patch |
196 |
@@ -0,0 +1,72 @@ |
197 |
+From 8ff41a26caf51544699863c89598d37d93dc1b21 Mon Sep 17 00:00:00 2001 |
198 |
+From: Aleksei Nikiforov <darktemplar@×××××××.ru> |
199 |
+Date: Thu, 22 Nov 2018 17:54:00 +0300 |
200 |
+Subject: Fix build with poppler 0.71 |
201 |
+ |
202 |
+Change-Id: I470ece9dc4766e10e1ccb5e99b25a8d8cc4cbf38 |
203 |
+Reviewed-on: https://gerrit.libreoffice.org/63860 |
204 |
+Tested-by: Jenkins |
205 |
+Reviewed-by: Stephan Bergmann <sbergman@××××××.com> |
206 |
+--- |
207 |
+ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 4 ++++ |
208 |
+ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 4 ++++ |
209 |
+ sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx | 4 ++-- |
210 |
+ 3 files changed, 10 insertions(+), 2 deletions(-) |
211 |
+ |
212 |
+diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx |
213 |
+index ab74b36..101e3be 100644 |
214 |
+--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx |
215 |
++++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx |
216 |
+@@ -578,7 +578,11 @@ void PDFOutDev::restoreState(GfxState*) |
217 |
+ printf( "restoreState\n" ); |
218 |
+ } |
219 |
+ |
220 |
++#if POPPLER_CHECK_VERSION(0, 71, 0) |
221 |
++void PDFOutDev::setDefaultCTM(const double *pMat) |
222 |
++#else |
223 |
+ void PDFOutDev::setDefaultCTM(double *pMat) |
224 |
++#endif |
225 |
+ { |
226 |
+ assert(pMat); |
227 |
+ |
228 |
+diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx |
229 |
+index a6135fa..98d8ede 100644 |
230 |
+--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx |
231 |
++++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx |
232 |
+@@ -173,7 +173,11 @@ namespace pdfi |
233 |
+ //----- initialization and control |
234 |
+ |
235 |
+ // Set default transform matrix. |
236 |
++#if POPPLER_CHECK_VERSION(0, 71, 0) |
237 |
++ virtual void setDefaultCTM(const double *ctm) override; |
238 |
++#else |
239 |
+ virtual void setDefaultCTM(double *ctm) override; |
240 |
++#endif |
241 |
+ |
242 |
+ // Start a page. |
243 |
+ virtual void startPage(int pageNum, GfxState *state |
244 |
+diff --git a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx |
245 |
+index 0f4a35b..b0a6ac4 100644 |
246 |
+--- a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx |
247 |
++++ b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx |
248 |
+@@ -69,7 +69,7 @@ int main(int argc, char **argv) |
249 |
+ |
250 |
+ // read config file |
251 |
+ globalParams = new GlobalParams(); |
252 |
+- globalParams->setErrQuiet(gTrue); |
253 |
++ globalParams->setErrQuiet(true); |
254 |
+ #if defined(_MSC_VER) |
255 |
+ globalParams->setupBaseFonts(nullptr); |
256 |
+ #endif |
257 |
+@@ -145,7 +145,7 @@ int main(int argc, char **argv) |
258 |
+ i, |
259 |
+ PDFI_OUTDEV_RESOLUTION, |
260 |
+ PDFI_OUTDEV_RESOLUTION, |
261 |
+- 0, gTrue, gTrue, gTrue); |
262 |
++ 0, true, true, true); |
263 |
+ rDoc.processLinks(&aOutDev, i); |
264 |
+ } |
265 |
+ |
266 |
+-- |
267 |
+cgit v1.1 |
268 |
+ |
269 |
|
270 |
diff --git a/app-office/libreoffice/files/libreoffice-6.2.0.1-poppler-0.72.patch b/app-office/libreoffice/files/libreoffice-6.2.0.1-poppler-0.72.patch |
271 |
new file mode 100644 |
272 |
index 00000000000..07e7a17d2f2 |
273 |
--- /dev/null |
274 |
+++ b/app-office/libreoffice/files/libreoffice-6.2.0.1-poppler-0.72.patch |
275 |
@@ -0,0 +1,26 @@ |
276 |
+--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx 2019-01-07 23:10:04.301278414 +0100 |
277 |
++++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx 2019-01-07 23:29:11.653479068 +0100 |
278 |
+@@ -555,7 +555,11 @@ |
279 |
+ LinkAction* pAction = link->getAction(); |
280 |
+ if (pAction && pAction->getKind() == actionURI) |
281 |
+ { |
282 |
++#if POPPLER_CHECK_VERSION(0, 72, 0) |
283 |
++ const char* pURI = static_cast<LinkURI*>(pAction)->getURI()->c_str(); |
284 |
++#else |
285 |
+ const char* pURI = static_cast<LinkURI*>(pAction)->getURI()->getCString(); |
286 |
++#endif |
287 |
+ |
288 |
+ std::vector<char> aEsc( lcl_escapeLineFeeds(pURI) ); |
289 |
+ |
290 |
+@@ -757,7 +761,11 @@ |
291 |
+ |
292 |
+ aFont = it->second; |
293 |
+ |
294 |
++#if POPPLER_CHECK_VERSION(0, 72, 0) |
295 |
++ std::vector<char> aEsc( lcl_escapeLineFeeds(aFont.familyName.c_str()) ); |
296 |
++#else |
297 |
+ std::vector<char> aEsc( lcl_escapeLineFeeds(aFont.familyName.getCString()) ); |
298 |
++#endif |
299 |
+ printf( " %d %d %d %d %f %d %s", |
300 |
+ aFont.isEmbedded, |
301 |
+ aFont.isBold, |
302 |
|
303 |
diff --git a/app-office/libreoffice/libreoffice-6.2.9999.ebuild b/app-office/libreoffice/libreoffice-6.2.9999.ebuild |
304 |
index b75bd717a25..f50c9dc3071 100644 |
305 |
--- a/app-office/libreoffice/libreoffice-6.2.9999.ebuild |
306 |
+++ b/app-office/libreoffice/libreoffice-6.2.9999.ebuild |
307 |
@@ -1,4 +1,4 @@ |
308 |
-# Copyright 1999-2018 Gentoo Authors |
309 |
+# Copyright 1999-2019 Gentoo Authors |
310 |
# Distributed under the terms of the GNU General Public License v2 |
311 |
|
312 |
EAPI=6 |
313 |
@@ -251,6 +251,13 @@ PATCHES=( |
314 |
"${FILESDIR}/${PN}-5.4-system-pyuno.patch" |
315 |
"${FILESDIR}/${PN}-5.3.4.2-kioclient5.patch" |
316 |
"${FILESDIR}/${PN}-6.1-nomancompress.patch" |
317 |
+ |
318 |
+ # master branch |
319 |
+ "${FILESDIR}/${PN}-6.2.0.1-poppler-0.71-1.patch" |
320 |
+ "${FILESDIR}/${PN}-6.2.0.1-poppler-0.71-2.patch" |
321 |
+ |
322 |
+ # pending upstream |
323 |
+ "${FILESDIR}/${PN}-6.2.0.1-poppler-0.72.patch" |
324 |
) |
325 |
|
326 |
S="${WORKDIR}/${PN}-${MY_PV}" |