diff options
author | adam <adam@pkgsrc.org> | 2019-05-14 13:23:10 +0000 |
---|---|---|
committer | adam <adam@pkgsrc.org> | 2019-05-14 13:23:10 +0000 |
commit | af0b3f9e27ed73671932a02aea1dbb9bc48e7b47 (patch) | |
tree | 7baca24a91c37d6d39b170eda81634e28635271d | |
parent | 7facfc69f35d7e6adbc46a649011d339274e5482 (diff) | |
download | pkgsrc-af0b3f9e27ed73671932a02aea1dbb9bc48e7b47.tar.gz |
web2c: update to 2019
sync with other texlive packages
-rw-r--r-- | print/texlive/Makefile.common | 3 | ||||
-rw-r--r-- | print/web2c/Makefile | 53 | ||||
-rw-r--r-- | print/web2c/PLIST | 20 | ||||
-rw-r--r-- | print/web2c/distinfo | 23 | ||||
-rw-r--r-- | print/web2c/patches/patch-Makefile.in | 10 | ||||
-rw-r--r-- | print/web2c/patches/patch-am | 22 | ||||
-rw-r--r-- | print/web2c/patches/patch-man_Makefile.in | 23 | ||||
-rw-r--r-- | print/web2c/patches/patch-pdftexdir_pdftex-common.h | 4 | ||||
-rw-r--r-- | print/web2c/patches/patch-pdftexdir_pdftoepdf-newpoppler.cc | 249 | ||||
-rw-r--r-- | print/web2c/patches/patch-pdftexdir_pdftoepdf-poppler0.75.0.cc | 111 | ||||
-rw-r--r-- | print/web2c/patches/patch-pdftexdir_pdftosrc-newpoppler.cc | 41 | ||||
-rw-r--r-- | print/web2c/patches/patch-pdftexdir_writeenc.c | 4 | ||||
-rw-r--r-- | print/web2c/patches/patch-pdftexdir_writet1.c | 18 |
13 files changed, 223 insertions, 358 deletions
diff --git a/print/texlive/Makefile.common b/print/texlive/Makefile.common index dbc2a8c1827..d784e430b47 100644 --- a/print/texlive/Makefile.common +++ b/print/texlive/Makefile.common @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.common,v 1.1 2019/05/09 09:47:34 adam Exp $ +# $NetBSD: Makefile.common,v 1.2 2019/05/14 13:23:10 adam Exp $ # used by converters/dvi2tty/Makefile # used by fonts/afm2pl/Makefile # used by fonts/gsftopkk/Makefile @@ -18,6 +18,7 @@ # used by print/seetexk/Makefile # used by print/tex4ht/Makefile # used by print/vlna/Makefile +# used by print/web2c/Makefile # used by print/xdvik/Makefile # used by print/xetex/Makefile # used by print/xpdfopen/Makefile diff --git a/print/web2c/Makefile b/print/web2c/Makefile index 3580f581d53..6bea0f399f7 100644 --- a/print/web2c/Makefile +++ b/print/web2c/Makefile @@ -1,35 +1,26 @@ -# $NetBSD: Makefile,v 1.85 2019/05/09 13:57:51 ryoon Exp $ +# $NetBSD: Makefile,v 1.86 2019/05/14 13:23:10 adam Exp $ -DISTNAME= texlive-20180414-source -PKGNAME= web2c-2018 -PKGREVISION= 13 +.include "../../print/texlive/Makefile.common" + +PKGNAME= web2c-2019 CATEGORIES= print -MASTER_SITES= ftp://tug.org/historic/systems/texlive/2018/ -EXTRACT_SUFX= .tar.xz -MAINTAINER= minskim@NetBSD.org HOMEPAGE= http://www.tug.org/web2c/ COMMENT= TeX implementation translating WEB to C DEPENDS+= kpathsea>=6.2.1:../../print/kpathsea DEPENDS+= ptexenc>=1.3.4:../../print/ptexenc -EXTRACT_ELEMENTS= ${DISTNAME}/build-aux \ - ${DISTNAME}/texk/web2c +EXTRACT_ELEMENTS+= ${DISTNAME}/texk/web2c -GNU_CONFIGURE= yes +USE_LANGUAGES= c c++11 +USE_TOOLS+= gmake lex yacc GNU_CONFIGURE_STRICT= no # texk/web2c/web2c doesn't know the options - -INFO_FILES= yes -USE_LANGUAGES= c c++11 -USE_LIBTOOL= yes -USE_TOOLS+= gmake lex yacc pkg-config -WRKSRC= ${WRKDIR}/${DISTNAME}/texk/web2c - -CONFIG_GUESS_OVERRIDE+= ${WRKDIR}/${DISTNAME}/build-aux/config.guess -CONFIG_SUB_OVERRIDE+= ${WRKDIR}/${DISTNAME}/build-aux/config.sub PKGCONFIG_OVERRIDE= synctexdir/synctex.pc.in +INFO_FILES= yes +WRKSRC= ${WRKDIR}/${DISTNAME}/texk/web2c + CONFIGURE_ARGS+= --disable-luatex CONFIGURE_ARGS+= --disable-luatex53 CONFIGURE_ARGS+= --disable-luajittex @@ -41,28 +32,28 @@ CONFIGURE_ARGS+= --without-mf-x-toolkit CONFIGURE_ARGS+= --with-system-kpathsea CONFIGURE_ARGS+= --with-system-libpng CONFIGURE_ARGS+= --with-system-cairo -CONFIGURE_ARGS+= --with-system-gmp \ - --with-gmp-includes=${BUILDLINK_PREFIX.gmp}/include \ - --with-gmp-libdir=${BUILDLINK_PREFIX.gmp}/lib -CONFIGURE_ARGS+= --with-system-mpfr \ - --with-mpfr-includes=${BUILDLINK_PREFIX.mpfr}/include \ - --with-mpfr-libdir=${BUILDLINK_PREFIX.mpfr}/lib +CONFIGURE_ARGS+= --with-system-gmp +CONFIGURE_ARGS+= --with-gmp-includes=${BUILDLINK_PREFIX.gmp}/include +CONFIGURE_ARGS+= --with-gmp-libdir=${BUILDLINK_PREFIX.gmp}/lib +CONFIGURE_ARGS+= --with-system-mpfr +CONFIGURE_ARGS+= --with-mpfr-includes=${BUILDLINK_PREFIX.mpfr}/include +CONFIGURE_ARGS+= --with-mpfr-libdir=${BUILDLINK_PREFIX.mpfr}/lib CONFIGURE_ARGS+= --with-system-pixman CONFIGURE_ARGS+= --with-system-poppler CONFIGURE_ARGS+= --with-system-xpdf CONFIGURE_ARGS+= --with-system-ptexenc -CONFIGURE_ARGS+= --with-system-zlib \ - --with-zlib-includes=${BUILDLINK_PREFIX.zlib}/include \ - --with-zlib-libdir=${BUILDLINK_PREFIX.zlib}/lib +CONFIGURE_ARGS+= --with-system-zlib +CONFIGURE_ARGS+= --with-zlib-includes=${BUILDLINK_PREFIX.zlib}/include +CONFIGURE_ARGS+= --with-zlib-libdir=${BUILDLINK_PREFIX.zlib}/lib CONFIGURE_ARGS+= --with-system-zziplib LIBTOOL_OVERRIDE= ../*/libtool */libtool CONFIGURE_DIRS= ${WRKDIR}/${DISTNAME}/texk/web2c -INSTALL_DIRS= ${WRKDIR}/${DISTNAME}/texk/web2c +INSTALL_DIRS= ${WRKDIR}/${DISTNAME}/texk/web2c pre-configure: - cp ${WRKSRC}/pdftexdir/pdftoepdf-newpoppler.cc ${WRKSRC}/pdftexdir/pdftoepdf.cc - cp ${WRKSRC}/pdftexdir/pdftosrc-newpoppler.cc ${WRKSRC}/pdftexdir/pdftosrc.cc + ${CP} ${WRKSRC}/pdftexdir/pdftoepdf-poppler0.75.0.cc ${WRKSRC}/pdftexdir/pdftoepdf.cc + ${CP} ${WRKSRC}/pdftexdir/pdftosrc-newpoppler.cc ${WRKSRC}/pdftexdir/pdftosrc.cc .include "../../archivers/zziplib/buildlink3.mk" .include "../../devel/zlib/buildlink3.mk" diff --git a/print/web2c/PLIST b/print/web2c/PLIST index 68f8b60f4ee..d816b285f91 100644 --- a/print/web2c/PLIST +++ b/print/web2c/PLIST @@ -1,8 +1,11 @@ -@comment $NetBSD: PLIST,v 1.13 2016/06/16 04:06:20 markd Exp $ +@comment $NetBSD: PLIST,v 1.14 2019/05/14 13:23:10 adam Exp $ bin/aleph bin/bibtex bin/ctangle bin/ctie +bin/ctwill +bin/ctwill-refsort +bin/ctwill-twinx bin/cweave bin/dvicopy bin/dvitomp @@ -45,6 +48,9 @@ bin/pooltype bin/ppltotf bin/ptex bin/ptftopl +bin/r-mpost +bin/r-pmpost +bin/r-upmpost bin/synctex bin/tangle bin/tex @@ -67,6 +73,7 @@ bin/wovf2ovp bin/wovp2ovf include/synctex/synctex_parser.h include/synctex/synctex_parser_utils.h +include/synctex/synctex_version.h info/web2c.info lib/libsynctex.la lib/pkgconfig/synctex.pc @@ -74,11 +81,16 @@ man/man1/aleph.1 man/man1/bibtex.1 man/man1/ctangle.1 man/man1/ctie.1 +man/man1/ctwill-refsort.1 +man/man1/ctwill-twinx.1 +man/man1/ctwill.1 man/man1/cweave.1 man/man1/cweb.1 man/man1/dvicopy.1 man/man1/dvitomp.1 man/man1/dvitype.1 +man/man1/eptex.1 +man/man1/euptex.1 man/man1/gftodvi.1 man/man1/gftopk.1 man/man1/gftype.1 @@ -107,12 +119,18 @@ man/man1/pktogf.1 man/man1/pktype.1 man/man1/pltotf.1 man/man1/pooltype.1 +man/man1/ppltotf.1 +man/man1/ptex.1 +man/man1/ptftopl.1 man/man1/synctex.1 man/man1/tangle.1 man/man1/tex.1 man/man1/tftopl.1 man/man1/tie.1 man/man1/ttf2afm.1 +man/man1/uppltotf.1 +man/man1/uptex.1 +man/man1/uptftopl.1 man/man1/vftovp.1 man/man1/vptovf.1 man/man1/weave.1 diff --git a/print/web2c/distinfo b/print/web2c/distinfo index ae9b06bc42a..9d48284455f 100644 --- a/print/web2c/distinfo +++ b/print/web2c/distinfo @@ -1,13 +1,12 @@ -$NetBSD: distinfo,v 1.33 2019/05/10 19:19:09 ryoon Exp $ +$NetBSD: distinfo,v 1.34 2019/05/14 13:23:10 adam Exp $ -SHA1 (texlive-20180414-source.tar.xz) = 81bdd9999b6ab860d1d3c388cf27062aba960255 -RMD160 (texlive-20180414-source.tar.xz) = 0ff63bbd7f8a0fb6417089f5d1ae1e4124a1dd95 -SHA512 (texlive-20180414-source.tar.xz) = ecac9b8203d2747be7ba7f82d68096d859fb35713276106d7049035dd3a8cfca07f8a8648982f0317b3812f8480db7326714de32f95998e3e6f73571de2aa140 -Size (texlive-20180414-source.tar.xz) = 49770944 bytes -SHA1 (patch-Makefile.in) = 28e7ad00f3796b49f92c5cc3eb3c94bdf38b1364 -SHA1 (patch-am) = b7b81b1161a2117e756b25b80f9a676575267bdd -SHA1 (patch-pdftexdir_pdftex-common.h) = 59f32828de5dd032307467d83e43f21382a39330 -SHA1 (patch-pdftexdir_pdftoepdf-newpoppler.cc) = aff81fbdeb0cfee1f52d98e53507a227ac899ba6 -SHA1 (patch-pdftexdir_pdftosrc-newpoppler.cc) = 91b94d9f77edd349c9b0bd1a5c20c190f1a3e5c1 -SHA1 (patch-pdftexdir_writeenc.c) = daf41fec97d3d3e46063d8cf4c559d96e1ec69bf -SHA1 (patch-pdftexdir_writet1.c) = 7d00d5d5d3f884bc1f9946cb3fbcaa7f224df9de +SHA1 (texlive-20190410-source.tar.xz) = d700878d3e19b6ad1313791dd5cef4bf0acfd675 +RMD160 (texlive-20190410-source.tar.xz) = a0cbe56b19b1f3d064315c37f8b5a4b04f82678b +SHA512 (texlive-20190410-source.tar.xz) = 7759d8e668e53c0c73e48907096da9d8fb6384dd9c3342ddfb05e17d077054c5351d35256cf4e63a6da502de2f09f521979bede7209cdd5bd8ae80eba0efed2e +Size (texlive-20190410-source.tar.xz) = 53783408 bytes +SHA1 (patch-Makefile.in) = ec3cc8f935d7365c90aabcd68be431eb706d970e +SHA1 (patch-man_Makefile.in) = 8d0cbcd73f113135ea400c0491a4c0cbd0b07c73 +SHA1 (patch-pdftexdir_pdftex-common.h) = 0f82056b5431c0a4718ab8609967f2ec9aeca3a9 +SHA1 (patch-pdftexdir_pdftoepdf-poppler0.75.0.cc) = fed92e4cc1fa8086eb70dd44726371e1df64f79f +SHA1 (patch-pdftexdir_pdftosrc-newpoppler.cc) = ce79bc0fc98756493adb1b57724ccb7f7b2821aa +SHA1 (patch-pdftexdir_writeenc.c) = d2dfedf140c2c2c9143bc701291c09d3a8d3f3a4 diff --git a/print/web2c/patches/patch-Makefile.in b/print/web2c/patches/patch-Makefile.in index adb3f4cece1..b7065740164 100644 --- a/print/web2c/patches/patch-Makefile.in +++ b/print/web2c/patches/patch-Makefile.in @@ -1,14 +1,14 @@ -$NetBSD: patch-Makefile.in,v 1.1 2018/05/15 06:11:45 minskim Exp $ +$NetBSD: patch-Makefile.in,v 1.2 2019/05/14 13:23:10 adam Exp $ Remove a race condition. $(nodist_libmplibbackends_a_SOURCES) should't be compiled before mplib.h is created. ---- Makefile.in.orig 2018-03-20 22:58:40.000000000 +0000 +--- Makefile.in.orig 2019-02-20 21:54:28.000000000 +0000 +++ Makefile.in -@@ -17349,7 +17349,7 @@ svgout-tangle: ctangle$(EXEEXT) mplibdir - $(nodist_libmplibcore_a_SOURCES): $(svgout_c_h) $(pngout_c_h) +@@ -18394,7 +18394,7 @@ $(nodist_libmplibcore_a_SOURCES): $(mpma - $(libmplibcore_a_OBJECTS): $(nodist_libmplibcore_a_SOURCES) $(KPATHSEA_DEPEND) $(MPFR_DEPEND) + $(libmplibcore_a_OBJECTS): $(nodist_libmplibcore_a_SOURCES) $(KPATHSEA_DEPEND) + $(libmplibextramath_a_OBJECTS): $(nodist_libmplibextramath_a_SOURCES) $(KPATHSEA_DEPEND) $(MPFR_DEPEND) -$(libmplibbackends_a_OBJECTS): $(nodist_libmplibbackends_a_SOURCES) $(KPATHSEA_DEPEND) $(CAIRO_DEPEND) $(MPFR_DEPEND) +$(libmplibbackends_a_OBJECTS): $(nodist_libmplibbackends_a_SOURCES) mplib.h $(KPATHSEA_DEPEND) $(CAIRO_DEPEND) $(MPFR_DEPEND) $(etex_OBJECTS): $(etex_prereq) diff --git a/print/web2c/patches/patch-am b/print/web2c/patches/patch-am deleted file mode 100644 index b3eff318cf8..00000000000 --- a/print/web2c/patches/patch-am +++ /dev/null @@ -1,22 +0,0 @@ -$NetBSD: patch-am,v 1.7 2016/06/16 04:06:20 markd Exp $ - ---- man/Makefile.in.orig 2016-03-07 18:22:26.000000000 +0000 -+++ man/Makefile.in -@@ -433,7 +433,7 @@ x_tool_libs = @x_tool_libs@ - man_sources = $(bootstrap_man_sources) $(am__append_1) $(am__append_2) \ - $(am__append_4) $(am__append_7) $(am__append_8) \ - $(am__append_9) $(am__append_11) $(am__append_13) \ -- $(am__append_14) $(am__append_16) $(misc_man_sources) -+ $(am__append_14) $(am__append_16) - EXTRA_DIST = $(bootstrap_man_sources) $(web_man_sources) tex.man \ - mf.man mpost.man etex.man $(pdftex_man_sources) luatex.man \ - $(otangle_man_sources) aleph.man $(misc_man_sources) spell.add -@@ -441,7 +441,7 @@ bootstrap_man_sources = ctie.man cweb.ma - - # Symlinks within $(man1dir): FILE:LINK indicates LINK.1->FILE.1 - man1_links = cweb:ctangle cweb:cweave $(am__append_3) $(am__append_5) \ -- $(am__append_6) $(am__append_10) $(am__append_12) \ -+ $(am__append_6) $(am__append_12) \ - $(am__append_15) $(am__append_17) - web_man_sources = bibtex.man dvicopy.man dvitomp.man dvitype.man gftodvi.man \ - gftopk.man gftype.man mft.man patgen.man pktogf.man pktype.man \ diff --git a/print/web2c/patches/patch-man_Makefile.in b/print/web2c/patches/patch-man_Makefile.in new file mode 100644 index 00000000000..523d3d35983 --- /dev/null +++ b/print/web2c/patches/patch-man_Makefile.in @@ -0,0 +1,23 @@ +$NetBSD: patch-man_Makefile.in,v 1.1 2019/05/14 13:23:10 adam Exp $ + +--- man/Makefile.in.orig 2019-03-30 10:13:17.000000000 +0000 ++++ man/Makefile.in +@@ -443,8 +443,7 @@ x_tool_libs = @x_tool_libs@ + man_sources = $(bootstrap_man_sources) $(am__append_1) $(am__append_2) \ + $(am__append_4) $(am__append_7) $(am__append_8) \ + $(am__append_9) $(am__append_11) $(am__append_13) \ +- $(am__append_15) $(am__append_16) $(am__append_18) \ +- $(misc_man_sources) ++ $(am__append_15) $(am__append_16) $(am__append_18) + EXTRA_DIST = $(bootstrap_man_sources) $(web_man_sources) tex.man \ + mf.man mpost.man etex.man $(pdftex_man_sources) ptex.man \ + ppltotf.man ptftopl.man luatex.man xetex.man \ +@@ -454,7 +453,7 @@ bootstrap_man_sources = ctie.man cweb.ma + # Symlinks within $(man1dir): FILE:LINK indicates LINK.1->FILE.1 + man1_links = cweb:ctangle cweb:cweave ctwill:ctwill-refsort \ + ctwill:ctwill-twinx $(am__append_3) $(am__append_5) \ +- $(am__append_6) $(am__append_10) $(am__append_12) \ ++ $(am__append_6) $(am__append_12) \ + $(am__append_14) $(am__append_17) $(am__append_19) + web_man_sources = bibtex.man dvicopy.man dvitomp.man dvitype.man gftodvi.man \ + gftopk.man gftype.man mft.man patgen.man pktogf.man pktype.man \ diff --git a/print/web2c/patches/patch-pdftexdir_pdftex-common.h b/print/web2c/patches/patch-pdftexdir_pdftex-common.h index 8da5d218588..7f93e86ee22 100644 --- a/print/web2c/patches/patch-pdftexdir_pdftex-common.h +++ b/print/web2c/patches/patch-pdftexdir_pdftex-common.h @@ -1,4 +1,6 @@ -$NetBSD: patch-pdftexdir_pdftex-common.h,v 1.1 2018/12/04 13:01:44 ryoon Exp $ +$NetBSD: patch-pdftexdir_pdftex-common.h,v 1.2 2019/05/14 13:23:10 adam Exp $ + +Fix buildling. --- pdftexdir/pdftex-common.h.orig 2016-11-25 18:24:37.000000000 +0000 +++ pdftexdir/pdftex-common.h diff --git a/print/web2c/patches/patch-pdftexdir_pdftoepdf-newpoppler.cc b/print/web2c/patches/patch-pdftexdir_pdftoepdf-newpoppler.cc deleted file mode 100644 index 4bba3a2be3a..00000000000 --- a/print/web2c/patches/patch-pdftexdir_pdftoepdf-newpoppler.cc +++ /dev/null @@ -1,249 +0,0 @@ -$NetBSD: patch-pdftexdir_pdftoepdf-newpoppler.cc,v 1.5 2019/05/10 19:19:09 ryoon Exp $ - ---- pdftexdir/pdftoepdf-newpoppler.cc.orig 2018-04-04 04:08:11.000000000 +0000 -+++ pdftexdir/pdftoepdf-newpoppler.cc -@@ -22,7 +22,7 @@ This is based on the patch texlive-poppl - https://git.archlinux.org/svntogit/packages.git/plain/texlive-bin/trunk - by Arch Linux. A little modifications are made to avoid a crash for - some kind of pdf images, such as figure_missing.pdf in gnuplot. --The poppler should be 0.59.0 or newer versions. -+The poppler should be 0.76.0 or newer versions. - POPPLER_VERSION should be defined. - */ - -@@ -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 -@@ -290,9 +290,9 @@ static void copyName(char *s) - static void copyDictEntry(Object * obj, int i) - { - Object obj1; -- copyName(obj->dictGetKey(i)); -+ copyName((char *)obj->dictGetKey(i)); - pdf_puts(" "); -- obj1 = obj->dictGetValNF(i); -+ obj1 = obj->dictGetValNF(i).copy(); - copyObject(&obj1); - pdf_puts("\n"); - } -@@ -317,7 +317,7 @@ static void copyFontDict(Object * obj, I - pdf_puts("<<\n"); - assert(r->type == objFont); // FontDescriptor is in fd_tree - for (i = 0, l = obj->dictGetLength(); i < l; ++i) { -- key = obj->dictGetKey(i); -+ key = (char *)obj->dictGetKey(i); - if (strncmp("FontDescriptor", key, strlen("FontDescriptor")) == 0 - || strncmp("BaseFont", key, strlen("BaseFont")) == 0 - || strncmp("Encoding", key, strlen("Encoding")) == 0) -@@ -351,11 +351,11 @@ static void copyProcSet(Object * obj) - obj->getTypeName()); - pdf_puts("/ProcSet [ "); - for (i = 0, l = obj->arrayGetLength(); i < l; ++i) { -- procset = obj->arrayGetNF(i); -+ procset = obj->arrayGetNF(i).copy(); - if (!procset.isName()) - pdftex_fail("PDF inclusion: invalid ProcSet entry type <%s>", - procset.getTypeName()); -- copyName(procset.getName()); -+ copyName((char *)procset.getName()); - pdf_puts(" "); - } - pdf_puts("]\n"); -@@ -406,7 +406,7 @@ static void copyFont(char *tag, Object * - if (fontdict.isDict()) { - subtype = fontdict.dictLookup("Subtype"); - basefont = fontdict.dictLookup("BaseFont"); -- fontdescRef = fontdict.dictLookupNF("FontDescriptor"); -+ fontdescRef = fontdict.dictLookupNF("FontDescriptor").copy(); - if (fontdescRef.isRef()) { - fontdesc = fontdescRef.fetch(xref); - } -@@ -418,7 +418,7 @@ static void copyFont(char *tag, Object * - && fontdescRef.isRef() - && fontdesc.isDict() - && embeddableFont(&fontdesc) -- && (fontmap = lookup_fontmap(basefont.getName())) != NULL) { -+ && (fontmap = lookup_fontmap((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. -@@ -427,7 +427,7 @@ static void copyFont(char *tag, Object * - charset = fontdesc.dictLookup("CharSet"); - if (!charset.isNull() && - charset.isString() && is_subsetable(fontmap)) -- epdf_mark_glyphs(fd, charset.getString()->getCString()); -+ epdf_mark_glyphs(fd, (char *)charset.getString()->c_str()); - else - embed_whole_font(fd); - addFontDesc(fontdescRef.getRef(), fd); -@@ -452,11 +452,11 @@ static void copyFontResources(Object * o - obj->getTypeName()); - pdf_puts("/Font << "); - for (i = 0, l = obj->dictGetLength(); i < l; ++i) { -- fontRef = obj->dictGetValNF(i); -+ fontRef = obj->dictGetValNF(i).copy(); - if (fontRef.isRef()) -- copyFont(obj->dictGetKey(i), &fontRef); -+ copyFont((char *)obj->dictGetKey(i), &fontRef); - else if (fontRef.isDict()) { // some programs generate pdf with embedded font object -- copyName(obj->dictGetKey(i)); -+ copyName((char *)obj->dictGetKey(i)); - pdf_puts(" "); - copyObject(&fontRef); - } -@@ -565,8 +565,8 @@ static void copyObject(Object * obj) - } else if (obj->isNum()) { - pdf_printf("%s", convertNumToPDF(obj->getNum())); - } else if (obj->isString()) { -- s = obj->getString(); -- p = s->getCString(); -+ s = (GooString *)obj->getString(); -+ p = (char *)s->c_str(); - l = s->getLength(); - if (strlen(p) == (unsigned int) l) { - pdf_puts("("); -@@ -589,13 +589,13 @@ static void copyObject(Object * obj) - pdf_puts(">"); - } - } else if (obj->isName()) { -- copyName(obj->getName()); -+ copyName((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) { -- obj1 = obj->arrayGetNF(i); -+ obj1 = obj->arrayGetNF(i).copy(); - if (!obj1.isName()) - pdf_puts(" "); - copyObject(&obj1); -@@ -664,12 +664,12 @@ static void writeEncodings() - ("PDF inclusion: CID fonts are not supported" - " (try to disable font replacement to fix this)"); - } -- if ((s = ((Gfx8BitFont *) r->font)->getCharName(i)) != 0) -+ if ((s = (char *)((Gfx8BitFont *) r->font)->getCharName(i)) != 0) - glyphNames[i] = s; - else - glyphNames[i] = notdef; - } -- epdf_write_enc(glyphNames, r->enc_objnum); -+ epdf_write_enc(const_cast<const char**>(glyphNames), r->enc_objnum); - } - for (r = encodingList; r != 0; r = n) { - n = r->next; -@@ -683,7 +683,7 @@ static void writeEncodings() - } - - // get the pagebox according to the pagebox_spec --static PDFRectangle *get_pagebox(Page * page, int pagebox_spec) -+static const PDFRectangle *get_pagebox(Page * page, int pagebox_spec) - { - if (pagebox_spec == pdfboxspecmedia) - return page->getMediaBox(); -@@ -715,7 +715,7 @@ read_pdf_info(char *image_name, char *pa - { - PdfDocument *pdf_doc; - Page *page; -- PDFRectangle *pagebox; -+ const PDFRectangle *pagebox; - #ifdef POPPLER_VERSION - int pdf_major_version_found, pdf_minor_version_found; - #else -@@ -724,8 +724,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); -@@ -761,7 +761,7 @@ read_pdf_info(char *image_name, char *pa - if (link == 0 || !link->isOk()) - pdftex_fail("PDF inclusion: invalid destination <%s>", page_name); - Ref ref = link->getPageRef(); -- page_num = pdf_doc->doc->getCatalog()->findPage(ref.num, ref.gen); -+ page_num = pdf_doc->doc->getCatalog()->findPage(ref); - if (page_num == 0) - pdftex_fail("PDF inclusion: destination is not a page <%s>", - page_name); -@@ -849,7 +849,7 @@ void write_epdf(void) - pageObj = xref->fetch(pageRef->num, pageRef->gen); - pageDict = pageObj.getDict(); - rotate = page->getRotate(); -- PDFRectangle *pagebox; -+ const PDFRectangle *pagebox; - // write the Page header - pdf_puts("/Type /XObject\n"); - pdf_puts("/Subtype /Form\n"); -@@ -865,7 +865,7 @@ void write_epdf(void) - pdf_printf("/%s.PageNumber %i\n", pdfkeyprefix, (int) epdf_selected_page); - } - if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_INFODICT) == 0) { -- info = pdf_doc->doc->getDocInfoNF(); -+ info = pdf_doc->doc->getDocInfoNF().copy(); - if (info.isRef()) { - // the info dict must be indirect (PDF Ref p. 61) - pdf_printf("/%s.InfoDict ", pdfkeyprefix); -@@ -921,13 +921,13 @@ void write_epdf(void) - pdf_puts(stripzeros(s)); - - // Metadata validity check (as a stream it must be indirect) -- dictObj = pageDict->lookupNF("Metadata"); -+ dictObj = pageDict->lookupNF("Metadata").copy(); - if (!dictObj.isNull() && !dictObj.isRef()) - pdftex_warn("PDF inclusion: /Metadata must be indirect object"); - - // copy selected items in Page dictionary except Resources & Group - for (i = 0; pageDictKeys[i] != NULL; i++) { -- dictObj = pageDict->lookupNF(pageDictKeys[i]); -+ dictObj = pageDict->lookupNF(pageDictKeys[i]).copy(); - if (!dictObj.isNull()) { - pdf_newline(); - pdf_printf("/%s ", pageDictKeys[i]); -@@ -936,7 +936,7 @@ void write_epdf(void) - } - - // handle page group -- dictObj = pageDict->lookupNF("Group"); -+ dictObj = pageDict->lookupNF("Group").copy(); - if (!dictObj.isNull()) { - if (pdfpagegroupval == 0) { - // another pdf with page group was included earlier on the -@@ -977,8 +977,8 @@ The changes below seem to work fine. - } - l = dic1.getLength(); - for (i = 0; i < l; i++) { -- groupDict.dictAdd(copyString(dic1.getKey(i)), -- dic1.getValNF(i)); -+ groupDict.dictAdd((const char *)copyString(dic1.getKey(i)), -+ dic1.getValNF(i).copy()); - } - // end modification - pdf_printf("/Group %ld 0 R\n", (long)pdfpagegroupval); -@@ -1001,13 +1001,13 @@ The changes below seem to work fine. - pdf_puts("/Resources <<\n"); - for (i = 0, l = obj1->dictGetLength(); i < l; ++i) { - obj2 = obj1->dictGetVal(i); -- key = obj1->dictGetKey(i); -+ key = (char *)obj1->dictGetKey(i); - if (strcmp("Font", key) == 0) - copyFontResources(&obj2); - else if (strcmp("ProcSet", key) == 0) - copyProcSet(&obj2); - else -- copyOtherResources(&obj2, key); -+ copyOtherResources(&obj2, (char *)key); - } - pdf_puts(">>\n"); - } diff --git a/print/web2c/patches/patch-pdftexdir_pdftoepdf-poppler0.75.0.cc b/print/web2c/patches/patch-pdftexdir_pdftoepdf-poppler0.75.0.cc new file mode 100644 index 00000000000..f2e02a7e2f9 --- /dev/null +++ b/print/web2c/patches/patch-pdftexdir_pdftoepdf-poppler0.75.0.cc @@ -0,0 +1,111 @@ +$NetBSD: patch-pdftexdir_pdftoepdf-poppler0.75.0.cc,v 1.1 2019/05/14 13:23:10 adam Exp $ + +Fix building. + +--- pdftexdir/pdftoepdf-poppler0.75.0.cc.orig 2019-03-21 06:38:16.000000000 +0000 ++++ pdftexdir/pdftoepdf-poppler0.75.0.cc +@@ -275,7 +275,7 @@ static int getNewObjectNumber(Ref ref) + + static void copyObject(Object *); + +-static void copyName(char *s) ++static void copyName(const char *s) + { + 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; +@@ -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; + Ref ref; +- char *p; +- GString *s; ++ const char *p; ++ const GString *s; + 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 const 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); + } + + +@@ -761,7 +765,7 @@ read_pdf_info(char *image_name, char *pa + if (link == 0 || !link->isOk()) + pdftex_fail("PDF inclusion: invalid destination <%s>", page_name); + Ref ref = link->getPageRef(); +- page_num = pdf_doc->doc->getCatalog()->findPage(ref.num, ref.gen); ++ page_num = pdf_doc->doc->getCatalog()->findPage(ref); + if (page_num == 0) + pdftex_fail("PDF inclusion: destination is not a page <%s>", + page_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; diff --git a/print/web2c/patches/patch-pdftexdir_pdftosrc-newpoppler.cc b/print/web2c/patches/patch-pdftexdir_pdftosrc-newpoppler.cc index 2fcb4591826..d2665fd773b 100644 --- a/print/web2c/patches/patch-pdftexdir_pdftosrc-newpoppler.cc +++ b/print/web2c/patches/patch-pdftexdir_pdftosrc-newpoppler.cc @@ -1,26 +1,28 @@ -$NetBSD: patch-pdftexdir_pdftosrc-newpoppler.cc,v 1.5 2019/05/10 19:19:09 ryoon Exp $ +$NetBSD: patch-pdftexdir_pdftosrc-newpoppler.cc,v 1.6 2019/05/14 13:23:10 adam Exp $ ---- pdftexdir/pdftosrc-newpoppler.cc.orig 2017-10-17 21:52:13.000000000 +0000 +Fix building. + +--- pdftexdir/pdftosrc-newpoppler.cc.orig 2018-12-06 23:31:33.000000000 +0000 +++ pdftexdir/pdftosrc-newpoppler.cc -@@ -20,7 +20,7 @@ with this program. If not, see <http:// - /* - This is based on the patch texlive-poppler-0.59.patch <2017-09-19> at - https://git.archlinux.org/svntogit/packages.git/plain/texlive-bin/trunk --by Arch Linux. The poppler should be 0.59.0 or newer versions. -+by Arch Linux. The poppler should be 0.76.0 or newer versions. - POPPLER_VERSION should be defined. - */ - -@@ -109,7 +109,7 @@ int main(int argc, char *argv[]) +@@ -69,7 +69,7 @@ int main(int argc, char *argv[]) + Stream *s; + Object srcStream, srcName, catalogDict; + FILE *outfile; +- char *outname; ++ const char *outname; + int objnum = 0, objgen = 0; + bool extract_xref_table = false; + int c; +@@ -110,7 +110,7 @@ int main(int argc, char *argv[]) fprintf(stderr, "No SourceName found\n"); exit(1); } -- outname = srcName.getString()->getCString(); +- outname = (char *)srcName.getString()->getCString(); + outname = (char *)srcName.getString()->c_str(); // We cannot free srcName, as objname shares its string. // srcName.free(); } else if (objnum > 0) { -@@ -118,7 +118,7 @@ int main(int argc, char *argv[]) +@@ -119,7 +119,7 @@ int main(int argc, char *argv[]) fprintf(stderr, "Not a Stream object\n"); exit(1); } @@ -29,7 +31,7 @@ $NetBSD: patch-pdftexdir_pdftosrc-newpoppler.cc,v 1.5 2019/05/10 19:19:09 ryoon if ((p = strrchr(buf, '.')) == 0) p = strchr(buf, 0); if (objgen == 0) -@@ -128,7 +128,7 @@ int main(int argc, char *argv[]) +@@ -129,7 +129,7 @@ int main(int argc, char *argv[]) outname = buf; } else { // objnum < 0 means we are extracting the XRef table extract_xref_table = true; @@ -38,7 +40,12 @@ $NetBSD: patch-pdftexdir_pdftosrc-newpoppler.cc,v 1.5 2019/05/10 19:19:09 ryoon if ((p = strrchr(buf, '.')) == 0) p = strchr(buf, 0); sprintf(p, ".xref"); -@@ -161,7 +161,7 @@ int main(int argc, char *argv[]) +@@ -157,12 +157,11 @@ int main(int argc, char *argv[]) + (e->type == xrefEntryFree ? "f" : "n")); + else { // e->offset is the object number of the object stream + Stream *str; +- Lexer *lexer; + Parser *parser; Object objStr, obj1, obj2; int nObjects, first, n; int localOffset = 0; @@ -47,7 +54,7 @@ $NetBSD: patch-pdftexdir_pdftosrc-newpoppler.cc,v 1.5 2019/05/10 19:19:09 ryoon objStr = xref->fetch(e->offset, 0); assert(objStr.isStream()); -@@ -173,9 +173,8 @@ int main(int argc, char *argv[]) +@@ -174,9 +173,8 @@ int main(int argc, char *argv[]) // parse the header: object numbers and offsets objStr.streamReset(); diff --git a/print/web2c/patches/patch-pdftexdir_writeenc.c b/print/web2c/patches/patch-pdftexdir_writeenc.c index f80374b9500..37510812063 100644 --- a/print/web2c/patches/patch-pdftexdir_writeenc.c +++ b/print/web2c/patches/patch-pdftexdir_writeenc.c @@ -1,4 +1,6 @@ -$NetBSD: patch-pdftexdir_writeenc.c,v 1.1 2018/12/04 13:01:44 ryoon Exp $ +$NetBSD: patch-pdftexdir_writeenc.c,v 1.2 2019/05/14 13:23:10 adam Exp $ + +Fix building. --- pdftexdir/writeenc.c.orig 2016-11-25 18:24:37.000000000 +0000 +++ pdftexdir/writeenc.c diff --git a/print/web2c/patches/patch-pdftexdir_writet1.c b/print/web2c/patches/patch-pdftexdir_writet1.c deleted file mode 100644 index 75ddea57357..00000000000 --- a/print/web2c/patches/patch-pdftexdir_writet1.c +++ /dev/null @@ -1,18 +0,0 @@ -$NetBSD: patch-pdftexdir_writet1.c,v 1.1 2018/11/01 11:02:34 markd Exp $ - -writet1 protection against buffer overflow - -git-svn-id: svn://tug.org/texlive/trunk/Build/source@48697 c570f23f-e606-0410-a88d-b1316a301751 - ---- pdftexdir/writet1.c.orig 2016-11-25 18:24:37.000000000 +0000 -+++ pdftexdir/writet1.c -@@ -1598,7 +1598,9 @@ static void t1_check_unusual_charstring( - *(strend(t1_buf_array) - 1) = ' '; - - t1_getline(); -+ alloc_array(t1_buf, strlen(t1_line_array) + strlen(t1_buf_array) + 1, T1_BUF_SIZE); - strcat(t1_buf_array, t1_line_array); -+ alloc_array(t1_line, strlen(t1_buf_array) + 1, T1_BUF_SIZE); - strcpy(t1_line_array, t1_buf_array); - t1_line_ptr = eol(t1_line_array); - } |