summaryrefslogtreecommitdiff
path: root/print
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
parente67b9cdd71a02d43226ea50a89e717f59be85ab2 (diff)
downloadpkgsrc-1301a1c309e2cd449288c78f9aa65e5fde49fe3c.tar.gz
FIx build with poppler-0.71
Diffstat (limited to 'print')
-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
-rw-r--r--print/web2c/distinfo8
-rw-r--r--print/web2c/patches/patch-pdftexdir_pdftex-common.h13
-rw-r--r--print/web2c/patches/patch-pdftexdir_pdftoepdf-newpoppler.cc109
-rw-r--r--print/web2c/patches/patch-pdftexdir_pdftosrc-newpoppler.cc16
-rw-r--r--print/web2c/patches/patch-pdftexdir_writeenc.c13
8 files changed, 406 insertions, 20 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){
diff --git a/print/web2c/distinfo b/print/web2c/distinfo
index e183501006b..ff709ccc56a 100644
--- a/print/web2c/distinfo
+++ b/print/web2c/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.28 2018/11/01 11:02:34 markd Exp $
+$NetBSD: distinfo,v 1.29 2018/12/04 13:01:44 ryoon Exp $
SHA1 (texlive-20180414-source.tar.xz) = 81bdd9999b6ab860d1d3c388cf27062aba960255
RMD160 (texlive-20180414-source.tar.xz) = 0ff63bbd7f8a0fb6417089f5d1ae1e4124a1dd95
@@ -6,6 +6,8 @@ SHA512 (texlive-20180414-source.tar.xz) = ecac9b8203d2747be7ba7f82d68096d859fb35
Size (texlive-20180414-source.tar.xz) = 49770944 bytes
SHA1 (patch-Makefile.in) = 28e7ad00f3796b49f92c5cc3eb3c94bdf38b1364
SHA1 (patch-am) = b7b81b1161a2117e756b25b80f9a676575267bdd
-SHA1 (patch-pdftexdir_pdftoepdf-newpoppler.cc) = 6d778c1b493d1f498c07ea49a41a9f15d3f8d570
-SHA1 (patch-pdftexdir_pdftosrc-newpoppler.cc) = 6601ac14720cc36321d3da70359218182f98915b
+SHA1 (patch-pdftexdir_pdftex-common.h) = 59f32828de5dd032307467d83e43f21382a39330
+SHA1 (patch-pdftexdir_pdftoepdf-newpoppler.cc) = a2a177c8ad40fe0fce1b8cb88703e01b995eac97
+SHA1 (patch-pdftexdir_pdftosrc-newpoppler.cc) = 720471f420cbf1caf241e84be233e51c9237e8a3
+SHA1 (patch-pdftexdir_writeenc.c) = daf41fec97d3d3e46063d8cf4c559d96e1ec69bf
SHA1 (patch-pdftexdir_writet1.c) = 7d00d5d5d3f884bc1f9946cb3fbcaa7f224df9de
diff --git a/print/web2c/patches/patch-pdftexdir_pdftex-common.h b/print/web2c/patches/patch-pdftexdir_pdftex-common.h
new file mode 100644
index 00000000000..8da5d218588
--- /dev/null
+++ b/print/web2c/patches/patch-pdftexdir_pdftex-common.h
@@ -0,0 +1,13 @@
+$NetBSD: patch-pdftexdir_pdftex-common.h,v 1.1 2018/12/04 13:01:44 ryoon Exp $
+
+--- pdftexdir/pdftex-common.h.orig 2016-11-25 18:24:37.000000000 +0000
++++ pdftexdir/pdftex-common.h
+@@ -101,7 +101,7 @@ extern void tex_printf(const char *, ...
+ extern void write_epdf(void);
+
+ /* writeenc.c */
+-extern void epdf_write_enc(char **, int);
++extern void epdf_write_enc(const char **, int);
+
+ /* writeimg.c */
+ extern float epdf_width;
diff --git a/print/web2c/patches/patch-pdftexdir_pdftoepdf-newpoppler.cc b/print/web2c/patches/patch-pdftexdir_pdftoepdf-newpoppler.cc
index 1a76ac2bd1b..f7107ae9b7a 100644
--- a/print/web2c/patches/patch-pdftexdir_pdftoepdf-newpoppler.cc
+++ b/print/web2c/patches/patch-pdftexdir_pdftoepdf-newpoppler.cc
@@ -1,9 +1,16 @@
-$NetBSD: patch-pdftexdir_pdftoepdf-newpoppler.cc,v 1.1 2018/05/13 13:01:02 markd Exp $
-
-Build with poppler 0.64
+$NetBSD: patch-pdftexdir_pdftoepdf-newpoppler.cc,v 1.2 2018/12/04 13:01:44 ryoon Exp $
--- pdftexdir/pdftoepdf-newpoppler.cc.orig 2018-04-04 04:08:11.000000000 +0000
+++ pdftexdir/pdftoepdf-newpoppler.cc
+@@ -120,7 +120,7 @@ struct UsedEncoding {
+
+ static InObj *inObjList;
+ static UsedEncoding *encodingList;
+-static GBool isInit = gFalse;
++static bool isInit = false;
+
+ // --------------------------------------------------------------------
+ // Maintain list of open embedded PDF files
@@ -275,7 +275,7 @@ static int getNewObjectNumber(Ref ref)
static void copyObject(Object *);
@@ -13,6 +20,24 @@ Build with poppler 0.64
{
pdf_puts("/");
for (; *s != 0; s++) {
+@@ -310,7 +310,7 @@ static void copyDict(Object * obj)
+ static void copyFontDict(Object * obj, InObj * r)
+ {
+ int i, l;
+- char *key;
++ const char *key;
+ if (!obj->isDict())
+ pdftex_fail("PDF inclusion: invalid dict type <%s>",
+ obj->getTypeName());
+@@ -382,7 +382,7 @@ static bool embeddableFont(Object * font
+ return false;
+ }
+
+-static void copyFont(char *tag, Object * fontRef)
++static void copyFont(const char *tag, Object * fontRef)
+ {
+ Object fontdict, subtype, basefont, fontdescRef, fontdesc, charset,
+ stemV;
@@ -418,7 +418,7 @@ static void copyFont(char *tag, Object *
&& fontdescRef.isRef()
&& fontdesc.isDict()
@@ -31,6 +56,15 @@ Build with poppler 0.64
else
embed_whole_font(fd);
addFontDesc(fontdescRef.getRef(), fd);
+@@ -467,7 +467,7 @@ static void copyFontResources(Object * o
+ pdf_puts(">>\n");
+ }
+
+-static void copyOtherResources(Object * obj, char *key)
++static void copyOtherResources(Object * obj, const char *key)
+ {
+ // copies all other resources (write_epdf handles Fonts and ProcSets),
+
@@ -554,8 +554,8 @@ static void copyObject(Object * obj)
Object obj1;
int i, l, c;
@@ -42,3 +76,72 @@ Build with poppler 0.64
if (obj->isBool()) {
pdf_printf("%s", obj->getBool()? "true" : "false");
} else if (obj->isInt()) {
+@@ -655,7 +655,7 @@ static void writeRefs()
+ static void writeEncodings()
+ {
+ UsedEncoding *r, *n;
+- char *glyphNames[256], *s;
++ const char *glyphNames[256], *s;
+ int i;
+ for (r = encodingList; r != 0; r = r->next) {
+ for (i = 0; i < 256; i++) {
+@@ -685,20 +685,24 @@ static void writeEncodings()
+ // get the pagebox according to the pagebox_spec
+ static PDFRectangle *get_pagebox(Page * page, int pagebox_spec)
+ {
++ const PDFRectangle *ret;
++
+ if (pagebox_spec == pdfboxspecmedia)
+- return page->getMediaBox();
++ ret = page->getMediaBox();
+ else if (pagebox_spec == pdfboxspeccrop)
+- return page->getCropBox();
++ ret = page->getCropBox();
+ else if (pagebox_spec == pdfboxspecbleed)
+- return page->getBleedBox();
++ ret = page->getBleedBox();
+ else if (pagebox_spec == pdfboxspectrim)
+- return page->getTrimBox();
++ ret = page->getTrimBox();
+ else if (pagebox_spec == pdfboxspecart)
+- return page->getArtBox();
++ ret = page->getArtBox();
+ else
+ pdftex_fail("PDF inclusion: unknown value of pagebox spec (%i)",
+ (int) pagebox_spec);
+- return page->getMediaBox(); // to make the compiler happy
++ ret = page->getMediaBox(); // to make the compiler happy
++
++ return const_cast<PDFRectangle*>(ret);
+ }
+
+
+@@ -724,8 +728,8 @@ read_pdf_info(char *image_name, char *pa
+ // initialize
+ if (!isInit) {
+ globalParams = new GlobalParams();
+- globalParams->setErrQuiet(gFalse);
+- isInit = gTrue;
++ globalParams->setErrQuiet(false);
++ isInit = true;
+ }
+ // open PDF file
+ pdf_doc = find_add_document(image_name);
+@@ -822,7 +826,7 @@ void write_epdf(void)
+ Object groupDict;
+ bool writeSepGroup = false;
+ Object info;
+- char *key;
++ const char *key;
+ char s[256];
+ int i, l;
+ int rotate;
+@@ -977,7 +981,7 @@ The changes below seem to work fine.
+ }
+ l = dic1.getLength();
+ for (i = 0; i < l; i++) {
+- groupDict.dictAdd(copyString(dic1.getKey(i)),
++ groupDict.dictAdd(const_cast<const char *>(copyString(dic1.getKey(i))),
+ dic1.getValNF(i));
+ }
+ // end modification
diff --git a/print/web2c/patches/patch-pdftexdir_pdftosrc-newpoppler.cc b/print/web2c/patches/patch-pdftexdir_pdftosrc-newpoppler.cc
index 3b026f7c4c6..ee012b12305 100644
--- a/print/web2c/patches/patch-pdftexdir_pdftosrc-newpoppler.cc
+++ b/print/web2c/patches/patch-pdftexdir_pdftosrc-newpoppler.cc
@@ -1,6 +1,4 @@
-$NetBSD: patch-pdftexdir_pdftosrc-newpoppler.cc,v 1.1 2018/05/13 13:01:02 markd Exp $
-
-Build with poppler 0.64
+$NetBSD: patch-pdftexdir_pdftosrc-newpoppler.cc,v 1.2 2018/12/04 13:01:44 ryoon Exp $
--- pdftexdir/pdftosrc-newpoppler.cc.orig 2017-10-17 21:52:13.000000000 +0000
+++ pdftexdir/pdftosrc-newpoppler.cc
@@ -13,3 +11,15 @@ Build with poppler 0.64
int objnum = 0, objgen = 0;
bool extract_xref_table = false;
int c;
+@@ -173,9 +173,9 @@ int main(int argc, char *argv[])
+
+ // parse the header: object numbers and offsets
+ objStr.streamReset();
+- str = new EmbedStream(objStr.getStream(), Object(objNull), gTrue, first);
++ str = new EmbedStream(objStr.getStream(), Object(objNull), true, first);
+ lexer = new Lexer(xref, str);
+- parser = new Parser(xref, lexer, gFalse);
++ parser = new Parser(xref, lexer, false);
+ for (n = 0; n < nObjects; ++n) {
+ obj1 = parser->getObj();
+ obj2 = parser->getObj();
diff --git a/print/web2c/patches/patch-pdftexdir_writeenc.c b/print/web2c/patches/patch-pdftexdir_writeenc.c
new file mode 100644
index 00000000000..f80374b9500
--- /dev/null
+++ b/print/web2c/patches/patch-pdftexdir_writeenc.c
@@ -0,0 +1,13 @@
+$NetBSD: patch-pdftexdir_writeenc.c,v 1.1 2018/12/04 13:01:44 ryoon Exp $
+
+--- pdftexdir/writeenc.c.orig 2016-11-25 18:24:37.000000000 +0000
++++ pdftexdir/writeenc.c
+@@ -83,7 +83,7 @@ fe_entry *get_fe_entry(char *s)
+
+ /**********************************************************************/
+
+-void epdf_write_enc(char **glyph_names, int fe_objnum)
++void epdf_write_enc(const char **glyph_names, int fe_objnum)
+ {
+ int i, i_old;
+ assert(glyph_names != NULL);