1 |
commit: a2fce90a0cb751294b36db4cfa639e9307be38fc |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jan 12 20:50:53 2019 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Feb 16 21:44:56 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a2fce90a |
7 |
|
8 |
app-text/texlive-core: Fix build with poppler-0.71 and poppler-0.72 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/672854 |
11 |
Package-Manager: Portage-2.3.55, Repoman-2.3.12 |
12 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
13 |
|
14 |
.../files/texlive-core-2017-poppler069.patch | 216 ++++++++++++++++ |
15 |
.../files/texlive-core-2017-poppler071.patch | 281 +++++++++++++++++++++ |
16 |
.../files/texlive-core-2017-poppler072.patch | 157 ++++++++++++ |
17 |
app-text/texlive-core/texlive-core-2017-r4.ebuild | 6 +- |
18 |
4 files changed, 659 insertions(+), 1 deletion(-) |
19 |
|
20 |
diff --git a/app-text/texlive-core/files/texlive-core-2017-poppler069.patch b/app-text/texlive-core/files/texlive-core-2017-poppler069.patch |
21 |
new file mode 100644 |
22 |
index 00000000000..30934170500 |
23 |
--- /dev/null |
24 |
+++ b/app-text/texlive-core/files/texlive-core-2017-poppler069.patch |
25 |
@@ -0,0 +1,216 @@ |
26 |
+From 29f2412e10523158f5e601f32482d3d233a934fc Mon Sep 17 00:00:00 2001 |
27 |
+From: Andreas Sturmlechner <andreas.sturmlechner@×××××.com> |
28 |
+Date: Sat, 12 Jan 2019 21:42:09 +0100 |
29 |
+Subject: [PATCH 1/2] Fix build with poppler-0.69.0 |
30 |
+ |
31 |
+--- |
32 |
+ texk/web2c/luatexdir/image/epdf.h | 1 + |
33 |
+ texk/web2c/luatexdir/image/pdftoepdf.w | 14 +++++++------- |
34 |
+ texk/web2c/luatexdir/lua/lepdflib.cc | 18 +++++++++--------- |
35 |
+ texk/web2c/luatexdir/lua/lpdfscannerlib.cc | 1 + |
36 |
+ texk/web2c/pdftexdir/pdftoepdf.cc | 7 ++++--- |
37 |
+ texk/web2c/pdftexdir/pdftosrc.cc | 5 +++-- |
38 |
+ 6 files changed, 25 insertions(+), 21 deletions(-) |
39 |
+ |
40 |
+diff --git a/texk/web2c/luatexdir/image/epdf.h b/texk/web2c/luatexdir/image/epdf.h |
41 |
+index 57bb2e39..ebc83bdb 100644 |
42 |
+--- a/texk/web2c/luatexdir/image/epdf.h |
43 |
++++ b/texk/web2c/luatexdir/image/epdf.h |
44 |
+@@ -39,6 +39,7 @@ extern "C" { |
45 |
+ # include <goo/GooString.h> |
46 |
+ # include <goo/gmem.h> |
47 |
+ # include <goo/gfile.h> |
48 |
++# include <goo/gdir.h> |
49 |
+ # include <Object.h> |
50 |
+ # include <Stream.h> |
51 |
+ # include <Gfx.h> |
52 |
+diff --git a/texk/web2c/luatexdir/image/pdftoepdf.w b/texk/web2c/luatexdir/image/pdftoepdf.w |
53 |
+index 3aebf009..0a23b201 100644 |
54 |
+--- a/texk/web2c/luatexdir/image/pdftoepdf.w |
55 |
++++ b/texk/web2c/luatexdir/image/pdftoepdf.w |
56 |
+@@ -31,7 +31,7 @@ |
57 |
+ |
58 |
+ extern void md5(Guchar *msg, int msgLen, Guchar *digest); |
59 |
+ |
60 |
+-static GBool isInit = gFalse; |
61 |
++static bool isInit = false; |
62 |
+ |
63 |
+ /* Maintain AVL tree of all PDF files for embedding */ |
64 |
+ |
65 |
+@@ -468,7 +468,7 @@ static void copyObject(PDF pdf, PdfDocument * pdf_doc, Object * obj) |
66 |
+ break; |
67 |
+ /* |
68 |
+ case objNum: |
69 |
+- GBool isNum() { return type == objInt || type == objReal; } |
70 |
++ bool isNum() { return type == objInt || type == objReal; } |
71 |
+ break; |
72 |
+ */ |
73 |
+ case objString: |
74 |
+@@ -587,11 +587,11 @@ void read_pdf_info(image_dict * idict) |
75 |
+ PDFRectangle *pagebox; |
76 |
+ int pdf_major_version_found, pdf_minor_version_found; |
77 |
+ float xsize, ysize, xorig, yorig; |
78 |
+- if (isInit == gFalse) { |
79 |
++ if (isInit == false) { |
80 |
+ if (!(globalParams)) |
81 |
+ globalParams = new GlobalParams(); |
82 |
+- globalParams->setErrQuiet(gFalse); |
83 |
+- isInit = gTrue; |
84 |
++ globalParams->setErrQuiet(false); |
85 |
++ isInit = true; |
86 |
+ } |
87 |
+ if (img_type(idict) == IMG_TYPE_PDF) |
88 |
+ pdf_doc = refPdfDocument(img_filepath(idict), FE_FAIL); |
89 |
+@@ -960,7 +960,7 @@ void epdf_free() |
90 |
+ if (PdfDocumentTree != NULL) |
91 |
+ avl_destroy(PdfDocumentTree, destroyPdfDocument); |
92 |
+ PdfDocumentTree = NULL; |
93 |
+- if (isInit == gTrue) |
94 |
++ if (isInit == true) |
95 |
+ delete globalParams; |
96 |
+- isInit = gFalse; |
97 |
++ isInit = false; |
98 |
+ } |
99 |
+diff --git a/texk/web2c/luatexdir/lua/lepdflib.cc b/texk/web2c/luatexdir/lua/lepdflib.cc |
100 |
+index 14558510..d47ec941 100644 |
101 |
+--- a/texk/web2c/luatexdir/lua/lepdflib.cc |
102 |
++++ b/texk/web2c/luatexdir/lua/lepdflib.cc |
103 |
+@@ -1374,9 +1374,9 @@ static int m_Object_initBool(lua_State * L) |
104 |
+ pdfdoc_changed_error(L); |
105 |
+ luaL_checktype(L, 2, LUA_TBOOLEAN); |
106 |
+ if (lua_toboolean(L, 2) != 0) |
107 |
+- *((Object *) uin->d) = Object(gTrue); |
108 |
++ *((Object *) uin->d) = Object(true); |
109 |
+ else |
110 |
+- *((Object *) uin->d) = Object(gFalse); |
111 |
++ *((Object *) uin->d) = Object(false); |
112 |
+ return 0; |
113 |
+ } |
114 |
+ |
115 |
+@@ -2881,12 +2881,12 @@ m_poppler_get_BOOL(Attribute, isHidden); |
116 |
+ |
117 |
+ static int m_Attribute_setHidden(lua_State * L) |
118 |
+ { |
119 |
+- GBool i; |
120 |
++ bool i; |
121 |
+ udstruct *uin; |
122 |
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Attribute); |
123 |
+ if (uin->pd != NULL && uin->pd->pc != uin->pc) |
124 |
+ pdfdoc_changed_error(L); |
125 |
+- i = (GBool) lua_toboolean(L, 2); |
126 |
++ i = (bool) lua_toboolean(L, 2); |
127 |
+ ((Attribute *) uin->d)->setHidden(i); |
128 |
+ return 0; |
129 |
+ } |
130 |
+@@ -3023,7 +3023,7 @@ static int m_StructElement_getParentRef(lua_State * L) |
131 |
+ // Ref is false if the C++ functione return false |
132 |
+ static int m_StructElement_getPageRef(lua_State * L) |
133 |
+ { |
134 |
+- GBool b; |
135 |
++ bool b; |
136 |
+ Ref *r; |
137 |
+ udstruct *uin, *uout; |
138 |
+ uin = (udstruct *) luaL_checkudata(L, 1, M_StructElement); |
139 |
+@@ -3069,13 +3069,13 @@ static int m_StructElement_setRevision(lua_State * L) |
140 |
+ |
141 |
+ static int m_StructElement_getText(lua_State * L) |
142 |
+ { |
143 |
+- GBool i; |
144 |
++ bool i; |
145 |
+ GooString *gs; |
146 |
+ udstruct *uin; |
147 |
+ uin = (udstruct *) luaL_checkudata(L, 1, M_StructElement); |
148 |
+ if (uin->pd != NULL && uin->pd->pc != uin->pc) |
149 |
+ pdfdoc_changed_error(L); |
150 |
+- i = (GBool) lua_toboolean(L, 2); |
151 |
++ i = (bool) lua_toboolean(L, 2); |
152 |
+ gs = ((StructElement *) uin->d)->getText(i); |
153 |
+ if (gs != NULL) |
154 |
+ lua_pushlstring(L, gs->getCString(), gs->getLength()); |
155 |
+@@ -3164,7 +3164,7 @@ static int m_StructElement_findAttribute(lua_State * L) |
156 |
+ { |
157 |
+ Attribute::Type t; |
158 |
+ Attribute::Owner o; |
159 |
+- GBool g; |
160 |
++ bool g; |
161 |
+ udstruct *uin, *uout; |
162 |
+ const Attribute *a; |
163 |
+ uin = (udstruct *) luaL_checkudata(L, 1, M_StructElement); |
164 |
+@@ -3172,7 +3172,7 @@ static int m_StructElement_findAttribute(lua_State * L) |
165 |
+ pdfdoc_changed_error(L); |
166 |
+ t = (Attribute::Type) luaL_checkint(L,1); |
167 |
+ o = (Attribute::Owner) luaL_checkint(L,2); |
168 |
+- g = (GBool) lua_toboolean(L, 3); |
169 |
++ g = (bool) lua_toboolean(L, 3); |
170 |
+ a = ((StructElement *) uin->d)->findAttribute(t,g,o); |
171 |
+ |
172 |
+ if (a!=NULL){ |
173 |
+diff --git a/texk/web2c/luatexdir/lua/lpdfscannerlib.cc b/texk/web2c/luatexdir/lua/lpdfscannerlib.cc |
174 |
+index eb881b63..a2d39b83 100644 |
175 |
+--- a/texk/web2c/luatexdir/lua/lpdfscannerlib.cc |
176 |
++++ b/texk/web2c/luatexdir/lua/lpdfscannerlib.cc |
177 |
+@@ -34,6 +34,7 @@ extern "C" { |
178 |
+ # include <goo/GooString.h> |
179 |
+ # include <goo/gmem.h> |
180 |
+ # include <goo/gfile.h> |
181 |
++# include <goo/gdir.h> |
182 |
+ # include <Object.h> |
183 |
+ # include <Stream.h> |
184 |
+ # include <Gfx.h> |
185 |
+diff --git a/texk/web2c/pdftexdir/pdftoepdf.cc b/texk/web2c/pdftexdir/pdftoepdf.cc |
186 |
+index 0ffc3e19..af12c74e 100644 |
187 |
+--- a/texk/web2c/pdftexdir/pdftoepdf.cc |
188 |
++++ b/texk/web2c/pdftexdir/pdftoepdf.cc |
189 |
+@@ -37,6 +37,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>. |
190 |
+ #include <goo/GooString.h> |
191 |
+ #include <goo/gmem.h> |
192 |
+ #include <goo/gfile.h> |
193 |
++#include <goo/gdir.h> |
194 |
+ #define GString GooString |
195 |
+ #else |
196 |
+ #include <aconf.h> |
197 |
+@@ -114,7 +115,7 @@ struct UsedEncoding { |
198 |
+ |
199 |
+ static InObj *inObjList; |
200 |
+ static UsedEncoding *encodingList; |
201 |
+-static GBool isInit = gFalse; |
202 |
++static bool isInit = false; |
203 |
+ |
204 |
+ // -------------------------------------------------------------------- |
205 |
+ // Maintain list of open embedded PDF files |
206 |
+@@ -718,8 +719,8 @@ read_pdf_info(char *image_name, char *page_name, int page_num, |
207 |
+ // initialize |
208 |
+ if (!isInit) { |
209 |
+ globalParams = new GlobalParams(); |
210 |
+- globalParams->setErrQuiet(gFalse); |
211 |
+- isInit = gTrue; |
212 |
++ globalParams->setErrQuiet(false); |
213 |
++ isInit = true; |
214 |
+ } |
215 |
+ // open PDF file |
216 |
+ pdf_doc = find_add_document(image_name); |
217 |
+diff --git a/texk/web2c/pdftexdir/pdftosrc.cc b/texk/web2c/pdftexdir/pdftosrc.cc |
218 |
+index ead9f209..22ab6bdc 100644 |
219 |
+--- a/texk/web2c/pdftexdir/pdftosrc.cc |
220 |
++++ b/texk/web2c/pdftexdir/pdftosrc.cc |
221 |
+@@ -31,6 +31,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>. |
222 |
+ #include <goo/GooString.h> |
223 |
+ #include <goo/gmem.h> |
224 |
+ #include <goo/gfile.h> |
225 |
++#include <goo/gdir.h> |
226 |
+ #else |
227 |
+ #include <aconf.h> |
228 |
+ #include <GString.h> |
229 |
+@@ -167,8 +168,8 @@ int main(int argc, char *argv[]) |
230 |
+ |
231 |
+ // parse the header: object numbers and offsets |
232 |
+ objStr.streamReset(); |
233 |
+- str = new EmbedStream(objStr.getStream(), Object(objNull), gTrue, first); |
234 |
+- parser = new Parser(xref, new Lexer(xref, str), gFalse); |
235 |
++ str = new EmbedStream(objStr.getStream(), Object(objNull), true, first); |
236 |
++ parser = new Parser(xref, new Lexer(xref, str), false); |
237 |
+ for (n = 0; n < nObjects; ++n) { |
238 |
+ obj1 = parser->getObj(); |
239 |
+ obj2 = parser->getObj(); |
240 |
+-- |
241 |
+2.20.1 |
242 |
|
243 |
diff --git a/app-text/texlive-core/files/texlive-core-2017-poppler071.patch b/app-text/texlive-core/files/texlive-core-2017-poppler071.patch |
244 |
new file mode 100644 |
245 |
index 00000000000..6238002c2e5 |
246 |
--- /dev/null |
247 |
+++ b/app-text/texlive-core/files/texlive-core-2017-poppler071.patch |
248 |
@@ -0,0 +1,281 @@ |
249 |
+From 2f77decfd2340c9a241dc508ae984a93dfef2643 Mon Sep 17 00:00:00 2001 |
250 |
+From: Andreas Sturmlechner <andreas.sturmlechner@×××××.com> |
251 |
+Date: Sat, 12 Jan 2019 21:43:29 +0100 |
252 |
+Subject: [PATCH 2/2] Fix build with poppler-0.71.0 |
253 |
+ |
254 |
+Thanks-to: maurerpe <junk4me46806@×××××.com> |
255 |
+--- |
256 |
+ texk/web2c/luatexdir/image/pdftoepdf.w | 10 +++++----- |
257 |
+ texk/web2c/luatexdir/lua/lepdflib.cc | 18 +++++++++--------- |
258 |
+ texk/web2c/pdftexdir/pdftex-common.h | 2 +- |
259 |
+ texk/web2c/pdftexdir/pdftoepdf.cc | 20 ++++++++++---------- |
260 |
+ texk/web2c/pdftexdir/writeenc.c | 2 +- |
261 |
+ texk/web2c/xetexdir/pdfimage.cpp | 2 +- |
262 |
+ 6 files changed, 27 insertions(+), 27 deletions(-) |
263 |
+ |
264 |
+diff --git a/texk/web2c/luatexdir/image/pdftoepdf.w b/texk/web2c/luatexdir/image/pdftoepdf.w |
265 |
+index 0a23b201..aa1d7f25 100644 |
266 |
+--- a/texk/web2c/luatexdir/image/pdftoepdf.w |
267 |
++++ b/texk/web2c/luatexdir/image/pdftoepdf.w |
268 |
+@@ -363,7 +363,7 @@ void copyReal(PDF pdf, double d) |
269 |
+ |
270 |
+ static void copyString(PDF pdf, GooString * string) |
271 |
+ { |
272 |
+- char *p; |
273 |
++ const char *p; |
274 |
+ unsigned char c; |
275 |
+ size_t i, l; |
276 |
+ p = string->getCString(); |
277 |
+@@ -393,7 +393,7 @@ static void copyString(PDF pdf, GooString * string) |
278 |
+ pdf->cave = true; |
279 |
+ } |
280 |
+ |
281 |
+-static void copyName(PDF pdf, char *s) |
282 |
++static void copyName(PDF pdf, const char *s) |
283 |
+ { |
284 |
+ pdf_out(pdf, '/'); |
285 |
+ for (; *s != 0; s++) { |
286 |
+@@ -527,7 +527,7 @@ static void writeRefs(PDF pdf, PdfDocument * pdf_doc) |
287 |
+ |
288 |
+ /* get the pagebox coordinates according to the pagebox_spec */ |
289 |
+ |
290 |
+-static PDFRectangle *get_pagebox(Page * page, int pagebox_spec) |
291 |
++static const PDFRectangle *get_pagebox(Page * page, int pagebox_spec) |
292 |
+ { |
293 |
+ switch (pagebox_spec) { |
294 |
+ case PDF_BOX_SPEC_MEDIA: |
295 |
+@@ -584,7 +584,7 @@ void read_pdf_info(image_dict * idict) |
296 |
+ Catalog *catalog; |
297 |
+ Page *page; |
298 |
+ int rotate; |
299 |
+- PDFRectangle *pagebox; |
300 |
++ const PDFRectangle *pagebox; |
301 |
+ int pdf_major_version_found, pdf_minor_version_found; |
302 |
+ float xsize, ysize, xorig, yorig; |
303 |
+ if (isInit == false) { |
304 |
+@@ -721,7 +721,7 @@ void write_epdf(PDF pdf, image_dict * idict, int suppress_optional_info) |
305 |
+ Ref *pageref; |
306 |
+ Dict *pageDict; |
307 |
+ Object obj1, contents, pageobj, pagesobj1, pagesobj2, *op1, *op2, *optmp; |
308 |
+- PDFRectangle *pagebox; |
309 |
++ const PDFRectangle *pagebox; |
310 |
+ int i, l; |
311 |
+ double bbox[4]; |
312 |
+ /* char s[256]; */ |
313 |
+diff --git a/texk/web2c/luatexdir/lua/lepdflib.cc b/texk/web2c/luatexdir/lua/lepdflib.cc |
314 |
+index d47ec941..01f9415c 100644 |
315 |
+--- a/texk/web2c/luatexdir/lua/lepdflib.cc |
316 |
++++ b/texk/web2c/luatexdir/lua/lepdflib.cc |
317 |
+@@ -238,7 +238,7 @@ static int l_new_Attribute(lua_State * L) |
318 |
+ if (uobj->pd != NULL && uobj->pd->pc != uobj->pc) |
319 |
+ pdfdoc_changed_error(L); |
320 |
+ uout = new_Attribute_userdata(L); |
321 |
+- uout->d = new Attribute(n, nlen, (Object *)uobj->d); |
322 |
++ uout->d = new Attribute(GooString(n, nlen), (Object *)uobj->d); |
323 |
+ uout->atype = ALLOC_LEPDF; |
324 |
+ uout->pc = uobj->pc; |
325 |
+ uout->pd = uobj->pd; |
326 |
+@@ -443,7 +443,7 @@ static int m_##in##_##function(lua_State * L) \ |
327 |
+ uin = (udstruct *) luaL_checkudata(L, 1, M_##in); \ |
328 |
+ if (uin->pd != NULL && uin->pd->pc != uin->pc) \ |
329 |
+ pdfdoc_changed_error(L); \ |
330 |
+- o = ((in *) uin->d)->function(); \ |
331 |
++ o = (out *) ((in *) uin->d)->function(); \ |
332 |
+ if (o != NULL) { \ |
333 |
+ uout = new_##out##_userdata(L); \ |
334 |
+ uout->d = o; \ |
335 |
+@@ -972,12 +972,12 @@ m_poppler_get_INT(Dict, getLength); |
336 |
+ |
337 |
+ static int m_Dict_add(lua_State * L) |
338 |
+ { |
339 |
+- char *s; |
340 |
++ const char *s; |
341 |
+ udstruct *uin, *uobj; |
342 |
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Dict); |
343 |
+ if (uin->pd != NULL && uin->pd->pc != uin->pc) |
344 |
+ pdfdoc_changed_error(L); |
345 |
+- s = copyString(luaL_checkstring(L, 2)); |
346 |
++ s = luaL_checkstring(L, 2); |
347 |
+ uobj = (udstruct *) luaL_checkudata(L, 3, M_Object); |
348 |
+ ((Dict *) uin->d)->add(s, std::move(*((Object *) uobj->d))); |
349 |
+ return 0; |
350 |
+@@ -1894,7 +1894,7 @@ static int m_Object_dictAdd(lua_State * L) |
351 |
+ pdfdoc_changed_error(L); |
352 |
+ if (!((Object *) uin->d)->isDict()) |
353 |
+ luaL_error(L, "Object is not a Dict"); |
354 |
+- ((Object *) uin->d)->dictAdd(copyString(s), std::move(*((Object *) uobj->d))); |
355 |
++ ((Object *) uin->d)->dictAdd(s, std::move(*((Object *) uobj->d))); |
356 |
+ return 0; |
357 |
+ } |
358 |
+ |
359 |
+@@ -2308,7 +2308,7 @@ m_PDFDoc_INT(getErrorCode); |
360 |
+ |
361 |
+ static int m_PDFDoc_getFileName(lua_State * L) |
362 |
+ { |
363 |
+- GooString *gs; |
364 |
++ const GooString *gs; |
365 |
+ udstruct *uin; |
366 |
+ uin = (udstruct *) luaL_checkudata(L, 1, M_PDFDoc); |
367 |
+ if (uin->pd != NULL && uin->pd->pc != uin->pc) |
368 |
+@@ -2396,7 +2396,7 @@ m_PDFDoc_INT(getNumPages); |
369 |
+ |
370 |
+ static int m_PDFDoc_readMetadata(lua_State * L) |
371 |
+ { |
372 |
+- GooString *gs; |
373 |
++ const GooString *gs; |
374 |
+ udstruct *uin; |
375 |
+ uin = (udstruct *) luaL_checkudata(L, 1, M_PDFDoc); |
376 |
+ if (uin->pd != NULL && uin->pd->pc != uin->pc) |
377 |
+@@ -2414,7 +2414,7 @@ static int m_PDFDoc_readMetadata(lua_State * L) |
378 |
+ |
379 |
+ static int m_PDFDoc_getStructTreeRoot(lua_State * L) |
380 |
+ { |
381 |
+- StructTreeRoot *obj; |
382 |
++ const StructTreeRoot *obj; |
383 |
+ udstruct *uin, *uout; |
384 |
+ uin = (udstruct *) luaL_checkudata(L, 1, M_PDFDoc); |
385 |
+ if (uin->pd != NULL && uin->pd->pc != uin->pc) |
386 |
+@@ -2422,7 +2422,7 @@ static int m_PDFDoc_getStructTreeRoot(lua_State * L) |
387 |
+ if (((PdfDocument *) uin->d)->doc->getCatalog()->isOk()) { |
388 |
+ obj = ((PdfDocument *) uin->d)->doc->getStructTreeRoot(); |
389 |
+ uout = new_StructTreeRoot_userdata(L); |
390 |
+- uout->d = obj; |
391 |
++ uout->d = (StructTreeRoot *) obj; |
392 |
+ uout->pc = uin->pc; |
393 |
+ uout->pd = uin->pd; |
394 |
+ } else |
395 |
+diff --git a/texk/web2c/pdftexdir/pdftex-common.h b/texk/web2c/pdftexdir/pdftex-common.h |
396 |
+index 307ba64a..09741707 100644 |
397 |
+--- a/texk/web2c/pdftexdir/pdftex-common.h |
398 |
++++ b/texk/web2c/pdftexdir/pdftex-common.h |
399 |
+@@ -101,7 +101,7 @@ extern void tex_printf(const char *, ...); |
400 |
+ extern void write_epdf(void); |
401 |
+ |
402 |
+ /* writeenc.c */ |
403 |
+-extern void epdf_write_enc(char **, int); |
404 |
++extern void epdf_write_enc(const char **, int); |
405 |
+ |
406 |
+ /* writeimg.c */ |
407 |
+ extern float epdf_width; |
408 |
+diff --git a/texk/web2c/pdftexdir/pdftoepdf.cc b/texk/web2c/pdftexdir/pdftoepdf.cc |
409 |
+index af12c74e..e353b652 100644 |
410 |
+--- a/texk/web2c/pdftexdir/pdftoepdf.cc |
411 |
++++ b/texk/web2c/pdftexdir/pdftoepdf.cc |
412 |
+@@ -270,7 +270,7 @@ static int getNewObjectNumber(Ref ref) |
413 |
+ |
414 |
+ static void copyObject(Object *); |
415 |
+ |
416 |
+-static void copyName(char *s) |
417 |
++static void copyName(const char *s) |
418 |
+ { |
419 |
+ pdf_puts("/"); |
420 |
+ for (; *s != 0; s++) { |
421 |
+@@ -305,7 +305,7 @@ static void copyDict(Object * obj) |
422 |
+ static void copyFontDict(Object * obj, InObj * r) |
423 |
+ { |
424 |
+ int i, l; |
425 |
+- char *key; |
426 |
++ const char *key; |
427 |
+ if (!obj->isDict()) |
428 |
+ pdftex_fail("PDF inclusion: invalid dict type <%s>", |
429 |
+ obj->getTypeName()); |
430 |
+@@ -377,7 +377,7 @@ static bool embeddableFont(Object * fontdesc) |
431 |
+ return false; |
432 |
+ } |
433 |
+ |
434 |
+-static void copyFont(char *tag, Object * fontRef) |
435 |
++static void copyFont(const char *tag, Object * fontRef) |
436 |
+ { |
437 |
+ Object fontdict, subtype, basefont, fontdescRef, fontdesc, charset, |
438 |
+ stemV; |
439 |
+@@ -462,7 +462,7 @@ static void copyFontResources(Object * obj) |
440 |
+ pdf_puts(">>\n"); |
441 |
+ } |
442 |
+ |
443 |
+-static void copyOtherResources(Object * obj, char *key) |
444 |
++static void copyOtherResources(Object * obj, const char *key) |
445 |
+ { |
446 |
+ // copies all other resources (write_epdf handles Fonts and ProcSets), |
447 |
+ |
448 |
+@@ -549,7 +549,7 @@ static void copyObject(Object * obj) |
449 |
+ Object obj1; |
450 |
+ int i, l, c; |
451 |
+ Ref ref; |
452 |
+- char *p; |
453 |
++ const char *p; |
454 |
+ GString *s; |
455 |
+ if (obj->isBool()) { |
456 |
+ pdf_printf("%s", obj->getBool()? "true" : "false"); |
457 |
+@@ -650,7 +650,7 @@ static void writeRefs() |
458 |
+ static void writeEncodings() |
459 |
+ { |
460 |
+ UsedEncoding *r, *n; |
461 |
+- char *glyphNames[256], *s; |
462 |
++ const char *glyphNames[256], *s; |
463 |
+ int i; |
464 |
+ for (r = encodingList; r != 0; r = r->next) { |
465 |
+ for (i = 0; i < 256; i++) { |
466 |
+@@ -678,7 +678,7 @@ static void writeEncodings() |
467 |
+ } |
468 |
+ |
469 |
+ // get the pagebox according to the pagebox_spec |
470 |
+-static PDFRectangle *get_pagebox(Page * page, int pagebox_spec) |
471 |
++static const PDFRectangle *get_pagebox(Page * page, int pagebox_spec) |
472 |
+ { |
473 |
+ if (pagebox_spec == pdfboxspecmedia) |
474 |
+ return page->getMediaBox(); |
475 |
+@@ -710,7 +710,7 @@ read_pdf_info(char *image_name, char *page_name, int page_num, |
476 |
+ { |
477 |
+ PdfDocument *pdf_doc; |
478 |
+ Page *page; |
479 |
+- PDFRectangle *pagebox; |
480 |
++ const PDFRectangle *pagebox; |
481 |
+ #ifdef POPPLER_VERSION |
482 |
+ int pdf_major_version_found, pdf_minor_version_found; |
483 |
+ #else |
484 |
+@@ -829,7 +829,7 @@ void write_epdf(void) |
485 |
+ Object groupDict; |
486 |
+ bool writeSepGroup = false; |
487 |
+ Object info; |
488 |
+- char *key; |
489 |
++ const char *key; |
490 |
+ char s[256]; |
491 |
+ int i, l; |
492 |
+ int rotate; |
493 |
+@@ -856,7 +856,7 @@ void write_epdf(void) |
494 |
+ pageObj = xref->fetch(pageRef->num, pageRef->gen); |
495 |
+ pageDict = pageObj.getDict(); |
496 |
+ rotate = page->getRotate(); |
497 |
+- PDFRectangle *pagebox; |
498 |
++ const PDFRectangle *pagebox; |
499 |
+ // write the Page header |
500 |
+ pdf_puts("/Type /XObject\n"); |
501 |
+ pdf_puts("/Subtype /Form\n"); |
502 |
+diff --git a/texk/web2c/pdftexdir/writeenc.c b/texk/web2c/pdftexdir/writeenc.c |
503 |
+index bd55103f..08f44633 100644 |
504 |
+--- a/texk/web2c/pdftexdir/writeenc.c |
505 |
++++ b/texk/web2c/pdftexdir/writeenc.c |
506 |
+@@ -83,7 +83,7 @@ fe_entry *get_fe_entry(char *s) |
507 |
+ |
508 |
+ /**********************************************************************/ |
509 |
+ |
510 |
+-void epdf_write_enc(char **glyph_names, int fe_objnum) |
511 |
++void epdf_write_enc(const char **glyph_names, int fe_objnum) |
512 |
+ { |
513 |
+ int i, i_old; |
514 |
+ assert(glyph_names != NULL); |
515 |
+diff --git a/texk/web2c/xetexdir/pdfimage.cpp b/texk/web2c/xetexdir/pdfimage.cpp |
516 |
+index 85389136..ce46cae1 100644 |
517 |
+--- a/texk/web2c/xetexdir/pdfimage.cpp |
518 |
++++ b/texk/web2c/xetexdir/pdfimage.cpp |
519 |
+@@ -78,7 +78,7 @@ pdf_get_rect(char* filename, int page_num, int pdf_box, realrect* box) |
520 |
+ |
521 |
+ Page* page = doc->getCatalog()->getPage(page_num); |
522 |
+ |
523 |
+- PDFRectangle* r; |
524 |
++ const PDFRectangle* r; |
525 |
+ switch (pdf_box) { |
526 |
+ default: |
527 |
+ case pdfbox_crop: |
528 |
+-- |
529 |
+2.20.1 |
530 |
|
531 |
diff --git a/app-text/texlive-core/files/texlive-core-2017-poppler072.patch b/app-text/texlive-core/files/texlive-core-2017-poppler072.patch |
532 |
new file mode 100644 |
533 |
index 00000000000..489ff25fa00 |
534 |
--- /dev/null |
535 |
+++ b/app-text/texlive-core/files/texlive-core-2017-poppler072.patch |
536 |
@@ -0,0 +1,157 @@ |
537 |
+From 19462cf1b5628d7251cde91031a0635e636d890a Mon Sep 17 00:00:00 2001 |
538 |
+From: Andreas Sturmlechner <andreas.sturmlechner@×××××.com> |
539 |
+Date: Sat, 12 Jan 2019 21:59:07 +0100 |
540 |
+Subject: [PATCH] Fix build with poppler-0.72 |
541 |
+ |
542 |
+--- |
543 |
+ texk/web2c/luatexdir/image/pdftoepdf.w | 2 +- |
544 |
+ texk/web2c/luatexdir/lua/lepdflib.cc | 16 ++++++++-------- |
545 |
+ texk/web2c/pdftexdir/pdftoepdf.cc | 4 ++-- |
546 |
+ texk/web2c/pdftexdir/pdftosrc.cc | 6 +++--- |
547 |
+ 4 files changed, 14 insertions(+), 14 deletions(-) |
548 |
+ |
549 |
+diff --git a/texk/web2c/luatexdir/image/pdftoepdf.w b/texk/web2c/luatexdir/image/pdftoepdf.w |
550 |
+index aa1d7f25..2f143068 100644 |
551 |
+--- a/texk/web2c/luatexdir/image/pdftoepdf.w |
552 |
++++ b/texk/web2c/luatexdir/image/pdftoepdf.w |
553 |
+@@ -366,7 +366,7 @@ static void copyString(PDF pdf, GooString * string) |
554 |
+ const char *p; |
555 |
+ unsigned char c; |
556 |
+ size_t i, l; |
557 |
+- p = string->getCString(); |
558 |
++ p = string->c_str(); |
559 |
+ l = (size_t) string->getLength(); |
560 |
+ if (pdf->cave) |
561 |
+ pdf_out(pdf, ' '); |
562 |
+diff --git a/texk/web2c/luatexdir/lua/lepdflib.cc b/texk/web2c/luatexdir/lua/lepdflib.cc |
563 |
+index 01f9415c..6b24a39b 100644 |
564 |
+--- a/texk/web2c/luatexdir/lua/lepdflib.cc |
565 |
++++ b/texk/web2c/luatexdir/lua/lepdflib.cc |
566 |
+@@ -523,7 +523,7 @@ static int m_##in##_##function(lua_State * L) \ |
567 |
+ pdfdoc_changed_error(L); \ |
568 |
+ gs = (GooString *)((in *) uin->d)->function(); \ |
569 |
+ if (gs != NULL) \ |
570 |
+- lua_pushlstring(L, gs->getCString(), gs->getLength()); \ |
571 |
++ lua_pushlstring(L, gs->c_str(), gs->getLength()); \ |
572 |
+ else \ |
573 |
+ lua_pushnil(L); \ |
574 |
+ return 1; \ |
575 |
+@@ -758,7 +758,7 @@ static int m_Array_getString(lua_State * L) |
576 |
+ if (i > 0 && i <= len) { |
577 |
+ gs = new GooString(); |
578 |
+ if (((Array *) uin->d)->getString(i - 1, gs)) |
579 |
+- lua_pushlstring(L, gs->getCString(), gs->getLength()); |
580 |
++ lua_pushlstring(L, gs->c_str(), gs->getLength()); |
581 |
+ else |
582 |
+ lua_pushnil(L); |
583 |
+ delete gs; |
584 |
+@@ -910,7 +910,7 @@ static int m_Catalog_getJS(lua_State * L) |
585 |
+ if (i > 0 && i <= len) { |
586 |
+ gs = ((Catalog *) uin->d)->getJS(i - 1); |
587 |
+ if (gs != NULL) |
588 |
+- lua_pushlstring(L, gs->getCString(), gs->getLength()); |
589 |
++ lua_pushlstring(L, gs->c_str(), gs->getLength()); |
590 |
+ else |
591 |
+ lua_pushnil(L); |
592 |
+ delete gs; |
593 |
+@@ -1225,7 +1225,7 @@ static int m_GooString__tostring(lua_State * L) |
594 |
+ uin = (udstruct *) luaL_checkudata(L, 1, M_GooString); |
595 |
+ if (uin->pd != NULL && uin->pd->pc != uin->pc) |
596 |
+ pdfdoc_changed_error(L); |
597 |
+- lua_pushlstring(L, ((GooString *) uin->d)->getCString(), |
598 |
++ lua_pushlstring(L, ((GooString *) uin->d)->c_str(), |
599 |
+ ((GooString *) uin->d)->getLength()); |
600 |
+ return 1; |
601 |
+ } |
602 |
+@@ -1657,7 +1657,7 @@ static int m_Object_getString(lua_State * L) |
603 |
+ pdfdoc_changed_error(L); |
604 |
+ if (((Object *) uin->d)->isString()) { |
605 |
+ gs = (GooString *)((Object *) uin->d)->getString(); |
606 |
+- lua_pushlstring(L, gs->getCString(), gs->getLength()); |
607 |
++ lua_pushlstring(L, gs->c_str(), gs->getLength()); |
608 |
+ } else |
609 |
+ lua_pushnil(L); |
610 |
+ return 1; |
611 |
+@@ -2315,7 +2315,7 @@ static int m_PDFDoc_getFileName(lua_State * L) |
612 |
+ pdfdoc_changed_error(L); |
613 |
+ gs = ((PdfDocument *) uin->d)->doc->getFileName(); |
614 |
+ if (gs != NULL) |
615 |
+- lua_pushlstring(L, gs->getCString(), gs->getLength()); |
616 |
++ lua_pushlstring(L, gs->c_str(), gs->getLength()); |
617 |
+ else |
618 |
+ lua_pushnil(L); |
619 |
+ return 1; |
620 |
+@@ -2404,7 +2404,7 @@ static int m_PDFDoc_readMetadata(lua_State * L) |
621 |
+ if (((PdfDocument *) uin->d)->doc->getCatalog()->isOk()) { |
622 |
+ gs = ((PdfDocument *) uin->d)->doc->readMetadata(); |
623 |
+ if (gs != NULL) |
624 |
+- lua_pushlstring(L, gs->getCString(), gs->getLength()); |
625 |
++ lua_pushlstring(L, gs->c_str(), gs->getLength()); |
626 |
+ else |
627 |
+ lua_pushnil(L); |
628 |
+ } else |
629 |
+@@ -3078,7 +3078,7 @@ static int m_StructElement_getText(lua_State * L) |
630 |
+ i = (bool) lua_toboolean(L, 2); |
631 |
+ gs = ((StructElement *) uin->d)->getText(i); |
632 |
+ if (gs != NULL) |
633 |
+- lua_pushlstring(L, gs->getCString(), gs->getLength()); |
634 |
++ lua_pushlstring(L, gs->c_str(), gs->getLength()); |
635 |
+ else |
636 |
+ lua_pushnil(L); |
637 |
+ return 1; |
638 |
+diff --git a/texk/web2c/pdftexdir/pdftoepdf.cc b/texk/web2c/pdftexdir/pdftoepdf.cc |
639 |
+index e353b652..84e9f7ce 100644 |
640 |
+--- a/texk/web2c/pdftexdir/pdftoepdf.cc |
641 |
++++ b/texk/web2c/pdftexdir/pdftoepdf.cc |
642 |
+@@ -422,7 +422,7 @@ static void copyFont(const char *tag, Object * fontRef) |
643 |
+ charset = fontdesc.dictLookup("CharSet"); |
644 |
+ if (!charset.isNull() && |
645 |
+ charset.isString() && is_subsetable(fontmap)) |
646 |
+- epdf_mark_glyphs(fd, (char *)charset.getString()->getCString()); |
647 |
++ epdf_mark_glyphs(fd, (char *)charset.getString()->c_str()); |
648 |
+ else |
649 |
+ embed_whole_font(fd); |
650 |
+ addFontDesc(fontdescRef.getRef(), fd); |
651 |
+@@ -561,7 +561,7 @@ static void copyObject(Object * obj) |
652 |
+ pdf_printf("%s", convertNumToPDF(obj->getNum())); |
653 |
+ } else if (obj->isString()) { |
654 |
+ s = (GooString *)obj->getString(); |
655 |
+- p = s->getCString(); |
656 |
++ p = s->c_str(); |
657 |
+ l = s->getLength(); |
658 |
+ if (strlen(p) == (unsigned int) l) { |
659 |
+ pdf_puts("("); |
660 |
+diff --git a/texk/web2c/pdftexdir/pdftosrc.cc b/texk/web2c/pdftexdir/pdftosrc.cc |
661 |
+index 22ab6bdc..bad1b78f 100644 |
662 |
+--- a/texk/web2c/pdftexdir/pdftosrc.cc |
663 |
++++ b/texk/web2c/pdftexdir/pdftosrc.cc |
664 |
+@@ -105,7 +105,7 @@ int main(int argc, char *argv[]) |
665 |
+ fprintf(stderr, "No SourceName found\n"); |
666 |
+ exit(1); |
667 |
+ } |
668 |
+- outname = (char *)srcName.getString()->getCString(); |
669 |
++ outname = (char *)srcName.getString()->c_str(); |
670 |
+ // We cannot free srcName, as objname shares its string. |
671 |
+ // srcName.free(); |
672 |
+ } else if (objnum > 0) { |
673 |
+@@ -114,7 +114,7 @@ int main(int argc, char *argv[]) |
674 |
+ fprintf(stderr, "Not a Stream object\n"); |
675 |
+ exit(1); |
676 |
+ } |
677 |
+- sprintf(buf, "%s", fileName->getCString()); |
678 |
++ sprintf(buf, "%s", fileName->c_str()); |
679 |
+ if ((p = strrchr(buf, '.')) == 0) |
680 |
+ p = strchr(buf, 0); |
681 |
+ if (objgen == 0) |
682 |
+@@ -124,7 +124,7 @@ int main(int argc, char *argv[]) |
683 |
+ outname = buf; |
684 |
+ } else { // objnum < 0 means we are extracting the XRef table |
685 |
+ extract_xref_table = true; |
686 |
+- sprintf(buf, "%s", fileName->getCString()); |
687 |
++ sprintf(buf, "%s", fileName->c_str()); |
688 |
+ if ((p = strrchr(buf, '.')) == 0) |
689 |
+ p = strchr(buf, 0); |
690 |
+ sprintf(p, ".xref"); |
691 |
+-- |
692 |
+2.20.1 |
693 |
+ |
694 |
|
695 |
diff --git a/app-text/texlive-core/texlive-core-2017-r4.ebuild b/app-text/texlive-core/texlive-core-2017-r4.ebuild |
696 |
index 2123b45c914..6c88e065080 100644 |
697 |
--- a/app-text/texlive-core/texlive-core-2017-r4.ebuild |
698 |
+++ b/app-text/texlive-core/texlive-core-2017-r4.ebuild |
699 |
@@ -1,4 +1,4 @@ |
700 |
-# Copyright 1999-2018 Gentoo Authors |
701 |
+# Copyright 1999-2019 Gentoo Authors |
702 |
# Distributed under the terms of the GNU General Public License v2 |
703 |
|
704 |
EAPI=5 |
705 |
@@ -166,6 +166,10 @@ src_prepare() { |
706 |
# bug ? |
707 |
epatch "${FILESDIR}/${P}-poppler064.patch" |
708 |
|
709 |
+ if has_version ">=app-text/poppler-0.69.0"; then |
710 |
+ epatch "${FILESDIR}"/${P}-poppler0{69,71,72}.patch # bug #672854 |
711 |
+ fi |
712 |
+ |
713 |
sed -i \ |
714 |
-e "s,/usr/include /usr/local/include.*echo \$KPATHSEA_INCLUDES.*,${EPREFIX}/usr/include\"," \ |
715 |
texk/web2c/configure || die |