pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/print FIx build with poppler-0.71
details: https://anonhg.NetBSD.org/pkgsrc/rev/ac07a97ffd35
branches: trunk
changeset: 316097:ac07a97ffd35
user: ryoon <ryoon%pkgsrc.org@localhost>
date: Tue Dec 04 13:00:41 2018 +0000
description:
FIx build with poppler-0.71
diffstat:
print/luatex/distinfo | 6 +-
print/luatex/patches/patch-texk_web2c_luatexdir_image_pdftoepdf.w | 84 ++++-
print/luatex/patches/patch-texk_web2c_luatexdir_lua_lepdflib.cc | 177 +++++++++-
print/web2c/distinfo | 8 +-
print/web2c/patches/patch-pdftexdir_pdftex-common.h | 13 +
print/web2c/patches/patch-pdftexdir_pdftoepdf-newpoppler.cc | 109 +++++-
print/web2c/patches/patch-pdftexdir_pdftosrc-newpoppler.cc | 16 +-
print/web2c/patches/patch-pdftexdir_writeenc.c | 13 +
8 files changed, 406 insertions(+), 20 deletions(-)
diffs (truncated from 531 to 300 lines):
diff -r 07766de4cc8a -r ac07a97ffd35 print/luatex/distinfo
--- a/print/luatex/distinfo Tue Dec 04 13:00:35 2018 +0000
+++ b/print/luatex/distinfo Tue Dec 04 13:00:41 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.31 2018/11/01 10:59:15 markd Exp $
+$NetBSD: distinfo,v 1.32 2018/12/04 13:00:41 ryoon Exp $
SHA1 (texlive-20180414-source.tar.xz) = 81bdd9999b6ab860d1d3c388cf27062aba960255
RMD160 (texlive-20180414-source.tar.xz) = 0ff63bbd7f8a0fb6417089f5d1ae1e4124a1dd95
@@ -8,5 +8,5 @@
SHA1 (patch-libs_luajit_LuaJIT-src_src_host_buildvm__asm.c) = 34fa742ed696f97df637c5086bf1faf3d718cb69
SHA1 (patch-libs_luajit_LuaJIT-src_src_vm__x86.dasc) = 491d33adbbaab8b2b81a65a8d7ba30aee775b75f
SHA1 (patch-texk_web2c_luatexdir_font_writet1.w) = c5d9b0bf411ff67028cbeee629bebc95f05c94e3
-SHA1 (patch-texk_web2c_luatexdir_image_pdftoepdf.w) = 9b6d637abe2fbb246a2435caf8aec5070abd1c5f
-SHA1 (patch-texk_web2c_luatexdir_lua_lepdflib.cc) = 24052cbff1a087badbeefe8b58bf7ce97e4ab4fb
+SHA1 (patch-texk_web2c_luatexdir_image_pdftoepdf.w) = fde688aeb1bc27dcdc7a1db959429e9200de41cf
+SHA1 (patch-texk_web2c_luatexdir_lua_lepdflib.cc) = 9f624ea72bbe83efc4aba8fcef1c92f034830a5c
diff -r 07766de4cc8a -r ac07a97ffd35 print/luatex/patches/patch-texk_web2c_luatexdir_image_pdftoepdf.w
--- a/print/luatex/patches/patch-texk_web2c_luatexdir_image_pdftoepdf.w Tue Dec 04 13:00:35 2018 +0000
+++ b/print/luatex/patches/patch-texk_web2c_luatexdir_image_pdftoepdf.w Tue Dec 04 13:00:41 2018 +0000
@@ -1,9 +1,16 @@
-$NetBSD: patch-texk_web2c_luatexdir_image_pdftoepdf.w,v 1.5 2018/05/13 12:46:27 markd Exp $
-
-Build with poppler 0.64
+$NetBSD: patch-texk_web2c_luatexdir_image_pdftoepdf.w,v 1.6 2018/12/04 13:00:42 ryoon Exp $
--- texk/web2c/luatexdir/image/pdftoepdf.w.orig 2018-01-17 18:00:12.000000000 +0000
+++ texk/web2c/luatexdir/image/pdftoepdf.w
+@@ -35,7 +35,7 @@
+
+ extern void md5(Guchar *msg, int msgLen, Guchar *digest);
+
+-static GBool isInit = gFalse;
++static bool isInit = false;
+
+ /* Maintain AVL tree of all PDF files for embedding */
+
@@ -361,9 +361,9 @@ void copyReal(PDF pdf, double d)
pdf->cave = true;
}
@@ -25,3 +32,74 @@
{
pdf_out(pdf, '/');
for (; *s != 0; s++) {
+@@ -468,7 +468,7 @@ static void copyObject(PDF pdf, PdfDocum
+ break;
+ /*
+ case objNum:
+- GBool isNum() { return type == objInt || type == objReal; }
++ bool isNum() { return type == objInt || type == objReal; }
+ break;
+ */
+ case objString:
+@@ -529,26 +529,30 @@ static void writeRefs(PDF pdf, PdfDocume
+
+ static PDFRectangle *get_pagebox(Page * page, int pagebox_spec)
+ {
++ const PDFRectangle *ret;
++
+ switch (pagebox_spec) {
+ case PDF_BOX_SPEC_MEDIA:
+- return page->getMediaBox();
++ ret = page->getMediaBox();
+ break;
+ case PDF_BOX_SPEC_CROP:
+- return page->getCropBox();
++ ret = page->getCropBox();
+ break;
+ case PDF_BOX_SPEC_BLEED:
+- return page->getBleedBox();
++ ret = page->getBleedBox();
+ break;
+ case PDF_BOX_SPEC_TRIM:
+- return page->getTrimBox();
++ ret = page->getTrimBox();
+ break;
+ case PDF_BOX_SPEC_ART:
+- return page->getArtBox();
++ ret = page->getArtBox();
+ break;
+ default:
+- return page->getMediaBox();
++ ret = page->getMediaBox();
+ break;
+ }
++
++ return const_cast<PDFRectangle *>(ret);
+ }
+
+ /*
+@@ -587,11 +591,11 @@ void read_pdf_info(image_dict * idict)
+ PDFRectangle *pagebox;
+ int pdf_major_version_found, pdf_minor_version_found;
+ float xsize, ysize, xorig, yorig;
+- if (isInit == gFalse) {
++ if (isInit == false) {
+ if (!(globalParams))
+ globalParams = new GlobalParams();
+- globalParams->setErrQuiet(gFalse);
+- isInit = gTrue;
++ globalParams->setErrQuiet(false);
++ isInit = true;
+ }
+ if (img_type(idict) == IMG_TYPE_PDF)
+ pdf_doc = refPdfDocument(img_filepath(idict), FE_FAIL);
+@@ -966,7 +970,7 @@ void epdf_free()
+ if (PdfDocumentTree != NULL)
+ avl_destroy(PdfDocumentTree, destroyPdfDocument);
+ PdfDocumentTree = NULL;
+- if (isInit == gTrue)
++ if (isInit == true)
+ delete globalParams;
+- isInit = gFalse;
++ isInit = false;
+ }
diff -r 07766de4cc8a -r ac07a97ffd35 print/luatex/patches/patch-texk_web2c_luatexdir_lua_lepdflib.cc
--- a/print/luatex/patches/patch-texk_web2c_luatexdir_lua_lepdflib.cc Tue Dec 04 13:00:35 2018 +0000
+++ b/print/luatex/patches/patch-texk_web2c_luatexdir_lua_lepdflib.cc Tue Dec 04 13:00:41 2018 +0000
@@ -1,10 +1,53 @@
-$NetBSD: patch-texk_web2c_luatexdir_lua_lepdflib.cc,v 1.5 2018/05/13 12:46:27 markd Exp $
-
-Build with poppler 0.64
+$NetBSD: patch-texk_web2c_luatexdir_lua_lepdflib.cc,v 1.6 2018/12/04 13:00:42 ryoon Exp $
--- texk/web2c/luatexdir/lua/lepdflib.cc.orig 2018-02-14 14:44:38.000000000 +0000
+++ texk/web2c/luatexdir/lua/lepdflib.cc
-@@ -669,7 +669,7 @@ static int m_##in##_##function(lua_State
+@@ -221,6 +221,7 @@ static int l_new_Attribute(lua_State * L
+ const char *n;
+ int nlen;
+ udstruct *uobj, *uout;
++ GooString *gs;
+
+ if (lua_type(L,1)==LUA_TNUMBER) {
+ uobj = (udstruct *) luaL_checkudata(L, 2, M_Object);
+@@ -240,7 +241,8 @@ static int l_new_Attribute(lua_State * L
+ if (uobj->pd != NULL && uobj->pd->pc != uobj->pc)
+ pdfdoc_changed_error(L);
+ uout = new_Attribute_userdata(L);
+- uout->d = new Attribute(n, nlen, (Object *)uobj->d);
++ gs = new GooString(n, nlen);
++ uout->d = new Attribute(std::move(*gs), (Object *)uobj->d);
+ uout->atype = ALLOC_LEPDF;
+ uout->pc = uobj->pc;
+ uout->pd = uobj->pd;
+@@ -439,7 +441,7 @@ static int l_new_Object(lua_State * L)
+ break;
+ case 1:
+ if (lua_isboolean (L,1)) {
+- uout->d = new Object(lua_toboolean(L, 1)? gTrue : gFalse);
++ uout->d = new Object(lua_toboolean(L, 1)? true : false);
+ uout->atype = ALLOC_LEPDF;
+ uout->pc = 0;
+ uout->pd = NULL;
+@@ -591,7 +593,7 @@ static const struct luaL_Reg epdflib_f[]
+ #define m_poppler_get_poppler(in, out, function) \
+ static int m_##in##_##function(lua_State * L) \
+ { \
+- out *o; \
++ const out *o; \
+ udstruct *uin, *uout; \
+ uin = (udstruct *) luaL_checkudata(L, 1, M_##in); \
+ if (uin->pd != NULL && uin->pd->pc != uin->pc) \
+@@ -599,7 +601,7 @@ static int m_##in##_##function(lua_State
+ o = ((in *) uin->d)->function(); \
+ if (o != NULL) { \
+ uout = new_##out##_userdata(L); \
+- uout->d = o; \
++ uout->d = const_cast<out *>(o); \
+ uout->pc = uin->pc; \
+ uout->pd = uin->pd; \
+ } else \
+@@ -669,7 +671,7 @@ static int m_##in##_##function(lua_State
#define m_poppler_get_GOOSTRING(in, function) \
static int m_##in##_##function(lua_State * L) \
{ \
@@ -13,7 +56,28 @@
udstruct *uin; \
uin = (udstruct *) luaL_checkudata(L, 1, M_##in); \
if (uin->pd != NULL && uin->pd->pc != uin->pc) \
-@@ -1807,7 +1807,7 @@ static int m_Object_getNum(lua_State * L
+@@ -1125,7 +1127,7 @@ m_poppler_get_INT(Dict, getLength);
+
+ static int m_Dict_add(lua_State * L)
+ {
+- char *s;
++ const char *s;
+ udstruct *uin, *uobj;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Dict);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+@@ -1527,9 +1529,9 @@ static int m_Object_initBool(lua_State *
+ pdfdoc_changed_error(L);
+ luaL_checktype(L, 2, LUA_TBOOLEAN);
+ if (lua_toboolean(L, 2) != 0)
+- *((Object *) uin->d) = Object(gTrue);
++ *((Object *) uin->d) = Object(true);
+ else
+- *((Object *) uin->d) = Object(gFalse);
++ *((Object *) uin->d) = Object(false);
+ return 0;
+ }
+
+@@ -1807,7 +1809,7 @@ static int m_Object_getNum(lua_State * L
static int m_Object_getString(lua_State * L)
{
@@ -22,3 +86,106 @@
udstruct *uin;
uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
if (uin->pd != NULL && uin->pd->pc != uin->pc)
+@@ -2051,7 +2053,7 @@ static int m_Object_dictAdd(lua_State *
+ pdfdoc_changed_error(L);
+ if (!((Object *) uin->d)->isDict())
+ luaL_error(L, "Object is not a Dict");
+- ((Object *) uin->d)->dictAdd(copyString(s), std::move(*((Object *) uobj->d)));
++ ((Object *) uin->d)->dictAdd(s, std::move(*((Object *) uobj->d)));
+ return 0;
+ }
+
+@@ -2465,7 +2467,7 @@ m_PDFDoc_INT(getErrorCode);
+
+ static int m_PDFDoc_getFileName(lua_State * L)
+ {
+- GooString *gs;
++ const GooString *gs;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_PDFDoc);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+@@ -2553,7 +2555,7 @@ m_PDFDoc_INT(getNumPages);
+
+ static int m_PDFDoc_readMetadata(lua_State * L)
+ {
+- GooString *gs;
++ const GooString *gs;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_PDFDoc);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+@@ -2571,7 +2573,7 @@ static int m_PDFDoc_readMetadata(lua_Sta
+
+ static int m_PDFDoc_getStructTreeRoot(lua_State * L)
+ {
+- StructTreeRoot *obj;
++ const StructTreeRoot *obj;
+ udstruct *uin, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_PDFDoc);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+@@ -2579,7 +2581,7 @@ static int m_PDFDoc_getStructTreeRoot(lu
+ if (((PdfDocument *) uin->d)->doc->getCatalog()->isOk()) {
+ obj = ((PdfDocument *) uin->d)->doc->getStructTreeRoot();
+ uout = new_StructTreeRoot_userdata(L);
+- uout->d = obj;
++ uout->d = const_cast<StructTreeRoot *>(obj);
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ } else
+@@ -3038,12 +3040,12 @@ m_poppler_get_BOOL(Attribute, isHidden);
+
+ static int m_Attribute_setHidden(lua_State * L)
+ {
+- GBool i;
++ bool i;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Attribute);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+- i = (GBool) lua_toboolean(L, 2);
++ i = (bool) lua_toboolean(L, 2);
+ ((Attribute *) uin->d)->setHidden(i);
+ return 0;
+ }
+@@ -3180,7 +3182,7 @@ static int m_StructElement_getParentRef(
+ // Ref is false if the C++ functione return false
+ static int m_StructElement_getPageRef(lua_State * L)
+ {
+- GBool b;
++ bool b;
+ Ref *r;
+ udstruct *uin, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_StructElement);
+@@ -3226,13 +3228,13 @@ static int m_StructElement_setRevision(l
+
+ static int m_StructElement_getText(lua_State * L)
+ {
+- GBool i;
++ bool i;
+ GooString *gs;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_StructElement);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+- i = (GBool) lua_toboolean(L, 2);
++ i = (bool) lua_toboolean(L, 2);
+ gs = ((StructElement *) uin->d)->getText(i);
+ if (gs != NULL)
+ lua_pushlstring(L, gs->getCString(), gs->getLength());
+@@ -3321,7 +3323,7 @@ static int m_StructElement_findAttribute
+ {
+ Attribute::Type t;
+ Attribute::Owner o;
+- GBool g;
Home |
Main Index |
Thread Index |
Old Index