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.64.0
details: https://anonhg.NetBSD.org/pkgsrc/rev/b03228ff8a3f
branches: trunk
changeset: 306953:b03228ff8a3f
user: ryoon <ryoon%pkgsrc.org@localhost>
date: Sun Apr 29 20:57:26 2018 +0000
description:
Fix build with poppler 0.64.0
diffstat:
print/luatex/distinfo | 6 +-
print/luatex/patches/patch-texk_web2c_luatexdir_image_pdftoepdf.w | 15 +++-
print/luatex/patches/patch-texk_web2c_luatexdir_lua_lepdflib.cc | 42 +++++++--
print/web2c/distinfo | 6 +-
print/web2c/patches/patch-pdftexdir_pdftoepdf.cc | 28 +++++-
print/web2c/patches/patch-pdftexdir_pdftosrc.cc | 8 +-
6 files changed, 77 insertions(+), 28 deletions(-)
diffs (300 lines):
diff -r 1aef15ffb7b3 -r b03228ff8a3f print/luatex/distinfo
--- a/print/luatex/distinfo Sun Apr 29 20:53:39 2018 +0000
+++ b/print/luatex/distinfo Sun Apr 29 20:57:26 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.28 2017/12/31 00:41:19 markd Exp $
+$NetBSD: distinfo,v 1.29 2018/04/29 20:57:26 ryoon Exp $
SHA1 (texlive-20170524-source.tar.xz) = 1c1383ddb1b871c6b8ce49a4ae3c1a33d454a7b6
RMD160 (texlive-20170524-source.tar.xz) = a8430c19fe1727cf308fe03e5838105260c0d71e
@@ -7,8 +7,8 @@
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_image_pdftoepdf.w) = 7ce1ce5fd8cb277229d43c1408d34189ae741657
-SHA1 (patch-texk_web2c_luatexdir_lua_lepdflib.cc) = 2077e2f681d63d48b54eac5ef9751447dcc3ea8f
+SHA1 (patch-texk_web2c_luatexdir_image_pdftoepdf.w) = ef0950aeeba70fdb286835dd5eab85555fd1131a
+SHA1 (patch-texk_web2c_luatexdir_lua_lepdflib.cc) = 0758888fd2bf23e339a858fdde84c0aa111a7350
SHA1 (patch-texk_web2c_luatexdir_lua_lpdfscannerlib.cc) = ddb11816de22cc7b3f286b3a7838dcf6debbf892
SHA1 (patch-texk_web2c_luatexdir_luaffi_ctype.c) = 57d51564d5dd0200be10154216158fe801d7c630
SHA1 (patch-texk_web2c_luatexdir_luaffi_ffi.h) = 2fbf91152fc3438d8e989d5f5f95877faaec6790
diff -r 1aef15ffb7b3 -r b03228ff8a3f print/luatex/patches/patch-texk_web2c_luatexdir_image_pdftoepdf.w
--- a/print/luatex/patches/patch-texk_web2c_luatexdir_image_pdftoepdf.w Sun Apr 29 20:53:39 2018 +0000
+++ b/print/luatex/patches/patch-texk_web2c_luatexdir_image_pdftoepdf.w Sun Apr 29 20:57:26 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-texk_web2c_luatexdir_image_pdftoepdf.w,v 1.3 2017/12/31 00:41:19 markd Exp $
+$NetBSD: patch-texk_web2c_luatexdir_image_pdftoepdf.w,v 1.4 2018/04/29 20:57:26 ryoon Exp $
The ctangle tex-to-C generator strips whitespace, resulting in "C++11 requires
a space between literal and identifier" failures. Pull in hacky patch from
@@ -52,6 +52,19 @@
}
pdf_end_dict(pdf);
}
+@@ -470,10 +472,10 @@ static void copyObject(PDF pdf, PdfDocum
+ break;
+ */
+ case objString:
+- copyString(pdf, obj->getString());
++ copyString(pdf, const_cast<GooString*>(obj->getString()));
+ break;
+ case objName:
+- copyName(pdf, obj->getName());
++ copyName(pdf, const_cast<char*>(obj->getName()));
+ break;
+ case objNull:
+ pdf_add_null(pdf);
@@ -510,13 +512,12 @@ static void writeRefs(PDF pdf, PdfDocume
PDFDoc *doc = pdf_doc->doc;
xref = doc->getXRef();
diff -r 1aef15ffb7b3 -r b03228ff8a3f print/luatex/patches/patch-texk_web2c_luatexdir_lua_lepdflib.cc
--- a/print/luatex/patches/patch-texk_web2c_luatexdir_lua_lepdflib.cc Sun Apr 29 20:53:39 2018 +0000
+++ b/print/luatex/patches/patch-texk_web2c_luatexdir_lua_lepdflib.cc Sun Apr 29 20:57:26 2018 +0000
@@ -1,9 +1,18 @@
-$NetBSD: patch-texk_web2c_luatexdir_lua_lepdflib.cc,v 1.3 2017/12/31 00:41:19 markd Exp $
+$NetBSD: patch-texk_web2c_luatexdir_lua_lepdflib.cc,v 1.4 2018/04/29 20:57:26 ryoon Exp $
Add support for newer poppler's from ArchLinux
--- texk/web2c/luatexdir/lua/lepdflib.cc.orig 2017-03-11 01:04:06.000000000 +0000
+++ texk/web2c/luatexdir/lua/lepdflib.cc
+@@ -521,7 +521,7 @@ static int m_##in##_##function(lua_State
+ uin = (udstruct *) luaL_checkudata(L, 1, M_##in); \
+ if (uin->pd != NULL && uin->pd->pc != uin->pc) \
+ pdfdoc_changed_error(L); \
+- gs = ((in *) uin->d)->function(); \
++ gs = const_cast<GooString*>(((in *) uin->d)->function()); \
+ if (gs != NULL) \
+ lua_pushlstring(L, gs->getCString(), gs->getLength()); \
+ else \
@@ -538,7 +538,7 @@ static int m_##in##_##function(lua_State
pdfdoc_changed_error(L); \
uout = new_Object_userdata(L); \
@@ -13,7 +22,7 @@
uout->atype = ALLOC_LEPDF; \
uout->pc = uin->pc; \
uout->pd = uin->pd; \
-@@ -668,13 +668,11 @@ static const struct luaL_Reg Annots_m[]
+@@ -668,13 +668,11 @@ static const struct luaL_Reg Annots_m[]
static int m_Array_incRef(lua_State * L)
{
@@ -159,7 +168,7 @@
return 0;
}
-@@ -1395,7 +1388,7 @@ static int m_Object_initInt(lua_State *
+@@ -1395,7 +1388,7 @@ static int m_Object_initInt(lua_State *
if (uin->pd != NULL && uin->pd->pc != uin->pc)
pdfdoc_changed_error(L);
i = luaL_checkint(L, 2);
@@ -211,7 +220,7 @@
uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
uxref = (udstruct *) luaL_checkudata(L, 2, M_XRef);
if (uin->pd != NULL && uxref->pd != NULL && uin->pd != uxref->pd)
-@@ -1458,7 +1452,8 @@ static int m_Object_initArray(lua_State
+@@ -1458,7 +1452,8 @@ static int m_Object_initArray(lua_State
if ((uin->pd != NULL && uin->pd->pc != uin->pc)
|| (uxref->pd != NULL && uxref->pd->pc != uxref->pc))
pdfdoc_changed_error(L);
@@ -221,7 +230,7 @@
return 0;
}
-@@ -1469,6 +1464,7 @@ static int m_Object_initArray(lua_State
+@@ -1469,6 +1464,7 @@ static int m_Object_initArray(lua_State
static int m_Object_initDict(lua_State * L)
{
udstruct *uin, *uxref;
@@ -248,7 +257,7 @@
return 0;
}
-@@ -1503,7 +1500,7 @@ static int m_Object_initRef(lua_State *
+@@ -1503,7 +1500,7 @@ static int m_Object_initRef(lua_State *
pdfdoc_changed_error(L);
num = luaL_checkint(L, 2);
gen = luaL_checkint(L, 3);
@@ -257,7 +266,7 @@
return 0;
}
-@@ -1515,7 +1512,7 @@ static int m_Object_initCmd(lua_State *
+@@ -1515,7 +1512,7 @@ static int m_Object_initCmd(lua_State *
if (uin->pd != NULL && uin->pd->pc != uin->pc)
pdfdoc_changed_error(L);
s = luaL_checkstring(L, 2);
@@ -266,7 +275,7 @@
return 0;
}
-@@ -1525,7 +1522,7 @@ static int m_Object_initError(lua_State
+@@ -1525,7 +1522,7 @@ static int m_Object_initError(lua_State
uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
if (uin->pd != NULL && uin->pd->pc != uin->pc)
pdfdoc_changed_error(L);
@@ -275,7 +284,7 @@
return 0;
}
-@@ -1535,7 +1532,7 @@ static int m_Object_initEOF(lua_State *
+@@ -1535,7 +1532,7 @@ static int m_Object_initEOF(lua_State *
uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
if (uin->pd != NULL && uin->pd->pc != uin->pc)
pdfdoc_changed_error(L);
@@ -293,6 +302,15 @@
uout->atype = ALLOC_LEPDF;
uout->pc = uin->pc;
uout->pd = uin->pd;
+@@ -1659,7 +1656,7 @@ static int m_Object_getString(lua_State
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ if (((Object *) uin->d)->isString()) {
+- gs = ((Object *) uin->d)->getString();
++ gs = const_cast<GooString*>(((Object *) uin->d)->getString());
+ lua_pushlstring(L, gs->getCString(), gs->getLength());
+ } else
+ lua_pushnil(L);
@@ -1816,7 +1813,7 @@ static int m_Object_arrayAdd(lua_State *
pdfdoc_changed_error(L);
if (!((Object *) uin->d)->isArray())
@@ -320,7 +338,7 @@
uout->atype = ALLOC_LEPDF;
uout->pc = uin->pc;
uout->pd = uin->pd;
-@@ -1897,7 +1894,7 @@ static int m_Object_dictAdd(lua_State *
+@@ -1897,7 +1894,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");
@@ -329,7 +347,7 @@
return 0;
}
-@@ -1915,7 +1912,7 @@ static int m_Object_dictSet(lua_State *
+@@ -1915,7 +1912,7 @@ static int m_Object_dictSet(lua_State *
pdfdoc_changed_error(L);
if (!((Object *) uin->d)->isDict())
luaL_error(L, "Object is not a Dict");
@@ -383,7 +401,7 @@
m_poppler_get_OBJECT(Page, getContents);
-@@ -2270,7 +2267,7 @@ static const struct luaL_Reg Page_m[] =
+@@ -2270,7 +2267,7 @@ static const struct luaL_Reg Page_m[] =
{"getPieceInfo", m_Page_getPieceInfo},
{"getSeparationInfo", m_Page_getSeparationInfo},
{"getResourceDict", m_Page_getResourceDict},
diff -r 1aef15ffb7b3 -r b03228ff8a3f print/web2c/distinfo
--- a/print/web2c/distinfo Sun Apr 29 20:53:39 2018 +0000
+++ b/print/web2c/distinfo Sun Apr 29 20:57:26 2018 +0000
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.24 2017/12/31 00:44:32 markd Exp $
+$NetBSD: distinfo,v 1.25 2018/04/29 20:58:29 ryoon Exp $
SHA1 (texlive-20170524-source.tar.xz) = 1c1383ddb1b871c6b8ce49a4ae3c1a33d454a7b6
RMD160 (texlive-20170524-source.tar.xz) = a8430c19fe1727cf308fe03e5838105260c0d71e
SHA512 (texlive-20170524-source.tar.xz) = 18c18940992ab94ce22e22ccd4ad798253ea14ac2ab296a10ea5e9a8da9f33989f2e2641b42b564d1d5fb53bd371da3e68726b676d706b469016ad146cd19daa
Size (texlive-20170524-source.tar.xz) = 63483372 bytes
SHA1 (patch-am) = b7b81b1161a2117e756b25b80f9a676575267bdd
-SHA1 (patch-pdftexdir_pdftoepdf.cc) = c4258903e6369d3471022b96b96a64c014dfea2f
-SHA1 (patch-pdftexdir_pdftosrc.cc) = c428c847f1fc5cbdeefbdddd0c6fa38ef305691f
+SHA1 (patch-pdftexdir_pdftoepdf.cc) = 24ff0639b236c87aa24b4ffb8f90520d9a4e092f
+SHA1 (patch-pdftexdir_pdftosrc.cc) = d951a2c83adfc28e58e6963f38e4ce5f35fc5bb8
diff -r 1aef15ffb7b3 -r b03228ff8a3f print/web2c/patches/patch-pdftexdir_pdftoepdf.cc
--- a/print/web2c/patches/patch-pdftexdir_pdftoepdf.cc Sun Apr 29 20:53:39 2018 +0000
+++ b/print/web2c/patches/patch-pdftexdir_pdftoepdf.cc Sun Apr 29 20:57:26 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-pdftexdir_pdftoepdf.cc,v 1.3 2017/12/31 00:44:32 markd Exp $
+$NetBSD: patch-pdftexdir_pdftoepdf.cc,v 1.4 2018/04/29 20:58:29 ryoon Exp $
Allow recent poppler - from ArchLinux
@@ -36,7 +36,7 @@
// When copying the Resources of the selected page, all objects are copied
// recusively top-down. Indirect objects however are not fetched during
// copying, but get a new object number from pdfTeX and then will be
-@@ -212,18 +187,6 @@ static void delete_document(PdfDocument
+@@ -212,18 +187,6 @@ static void delete_document(PdfDocument
delete pdf_doc;
}
@@ -87,7 +87,7 @@
- procset->getTypeName());
- copyName(procset->getName());
+ procset.getTypeName());
-+ copyName(procset.getName());
++ copyName(const_cast<char*>(procset.getName()));
pdf_puts(" ");
}
pdf_puts("]\n");
@@ -157,7 +157,7 @@
+ && fontdescRef.isRef()
+ && fontdesc.isDict()
+ && embeddableFont(&fontdesc)
-+ && (fontmap = lookup_fontmap(basefont.getName())) != NULL) {
++ && (fontmap = lookup_fontmap(const_cast<char*>(basefont.getName()))) != NULL) {
// round /StemV value, since the PDF input is a float
// (see Font Descriptors in PDF reference), but we only store an
// integer, since we don't want to change the struct.
@@ -171,7 +171,7 @@
+ charset = fontdesc.dictLookup("CharSet");
+ if (!charset.isNull() &&
+ charset.isString() && is_subsetable(fontmap))
-+ epdf_mark_glyphs(fd, charset.getString()->getCString());
++ epdf_mark_glyphs(fd, const_cast<char*>(charset.getString()->getCString()));
else
embed_whole_font(fd);
- addFontDesc(fontdescRef->getRef(), fd);
@@ -222,7 +222,23 @@
int i, l, c;
Ref ref;
char *p;
-@@ -601,8 +589,8 @@ static void copyObject(Object * obj)
+@@ -571,7 +559,7 @@ static void copyObject(Object * obj)
+ } else if (obj->isNum()) {
+ pdf_printf("%s", convertNumToPDF(obj->getNum()));
+ } else if (obj->isString()) {
+- s = obj->getString();
++ s = const_cast<GooString*>(obj->getString());
+ p = s->getCString();
+ l = s->getLength();
+ if (strlen(p) == (unsigned int) l) {
+@@ -595,14 +583,14 @@ static void copyObject(Object * obj)
+ pdf_puts(">");
+ }
+ } else if (obj->isName()) {
+- copyName(obj->getName());
++ copyName(const_cast<char*>(obj->getName()));
+ } else if (obj->isNull()) {
+ pdf_puts("null");
} else if (obj->isArray()) {
pdf_puts("[");
for (i = 0, l = obj->arrayGetLength(); i < l; ++i) {
diff -r 1aef15ffb7b3 -r b03228ff8a3f print/web2c/patches/patch-pdftexdir_pdftosrc.cc
--- a/print/web2c/patches/patch-pdftexdir_pdftosrc.cc Sun Apr 29 20:53:39 2018 +0000
+++ b/print/web2c/patches/patch-pdftexdir_pdftosrc.cc Sun Apr 29 20:57:26 2018 +0000
@@ -1,10 +1,10 @@
-$NetBSD: patch-pdftexdir_pdftosrc.cc,v 1.3 2017/12/31 00:44:32 markd Exp $
+$NetBSD: patch-pdftexdir_pdftosrc.cc,v 1.4 2018/04/29 20:58:29 ryoon Exp $
Allow recent poppler - from ArchLinux
--- pdftexdir/pdftosrc.cc.orig 2016-11-25 18:09:21.000000000 +0000
+++ pdftexdir/pdftosrc.cc
-@@ -86,22 +86,20 @@ int main(int argc, char *argv[])
+@@ -86,31 +86,29 @@ int main(int argc, char *argv[])
objgen = atoi(argv[3]);
}
xref = doc->getXRef();
@@ -31,7 +31,9 @@
if (!srcName.isString()) {
fprintf(stderr, "No SourceName found\n");
exit(1);
-@@ -110,7 +108,7 @@ int main(int argc, char *argv[])
+ }
+- outname = srcName.getString()->getCString();
++ outname = const_cast<char*>(srcName.getString()->getCString());
// We cannot free srcName, as objname shares its string.
// srcName.free();
} else if (objnum > 0) {
Home |
Main Index |
Thread Index |
Old Index