summaryrefslogtreecommitdiff
path: root/print/luatex
diff options
context:
space:
mode:
authorryoon <ryoon@pkgsrc.org>2018-12-04 13:00:41 +0000
committerryoon <ryoon@pkgsrc.org>2018-12-04 13:00:41 +0000
commit1301a1c309e2cd449288c78f9aa65e5fde49fe3c (patch)
tree20f34e94d754e62b91c673d51c9806d98c998879 /print/luatex
parente67b9cdd71a02d43226ea50a89e717f59be85ab2 (diff)
downloadpkgsrc-1301a1c309e2cd449288c78f9aa65e5fde49fe3c.tar.gz
FIx build with poppler-0.71
Diffstat (limited to 'print/luatex')
-rw-r--r--print/luatex/distinfo6
-rw-r--r--print/luatex/patches/patch-texk_web2c_luatexdir_image_pdftoepdf.w84
-rw-r--r--print/luatex/patches/patch-texk_web2c_luatexdir_lua_lepdflib.cc177
3 files changed, 256 insertions, 11 deletions
diff --git a/print/luatex/distinfo b/print/luatex/distinfo
index 4df6292913a..1242d8681dd 100644
--- a/print/luatex/distinfo
+++ b/print/luatex/distinfo
@@ -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-ac) = 1ee83833a03eace2eada892130ddb2198e829f3d
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 --git a/print/luatex/patches/patch-texk_web2c_luatexdir_image_pdftoepdf.w b/print/luatex/patches/patch-texk_web2c_luatexdir_image_pdftoepdf.w
index 5e6dc8bbdee..4d693352f37 100644
--- a/print/luatex/patches/patch-texk_web2c_luatexdir_image_pdftoepdf.w
+++ b/print/luatex/patches/patch-texk_web2c_luatexdir_image_pdftoepdf.w
@@ -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 @@ Build with poppler 0.64
{
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 --git a/print/luatex/patches/patch-texk_web2c_luatexdir_lua_lepdflib.cc b/print/luatex/patches/patch-texk_web2c_luatexdir_lua_lepdflib.cc
index 8b7b585e9cf..bfd0abc15fc 100644
--- a/print/luatex/patches/patch-texk_web2c_luatexdir_lua_lepdflib.cc
+++ b/print/luatex/patches/patch-texk_web2c_luatexdir_lua_lepdflib.cc
@@ -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 @@ Build with poppler 0.64
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 @@ Build with poppler 0.64
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;
++ bool g;
+ udstruct *uin, *uout;
+ const Attribute *a;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_StructElement);
+@@ -3329,7 +3331,7 @@ static int m_StructElement_findAttribute
+ pdfdoc_changed_error(L);
+ t = (Attribute::Type) luaL_checkint(L,1);
+ o = (Attribute::Owner) luaL_checkint(L,2);
+- g = (GBool) lua_toboolean(L, 3);
++ g = (bool) lua_toboolean(L, 3);
+ a = ((StructElement *) uin->d)->findAttribute(t,g,o);
+
+ if (a!=NULL){