diff --git a/print/tex-luatex/Makefile b/print/tex-luatex/Makefile index 2170772f1dd4..5ef297e9fae9 100644 --- a/print/tex-luatex/Makefile +++ b/print/tex-luatex/Makefile @@ -1,99 +1,97 @@ PORTNAME= luatex PORTVERSION= 0.80.0 -PORTREVISION= 23 +PORTREVISION= 24 CATEGORIES= print MASTER_SITES= ftp://tug.org/historic/systems/texlive/2015/ PKGNAMEPREFIX= tex- DISTNAME= texlive-${DISTVERSION_TEXLIVE_SOURCE}-source DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ ${DISTNAME_TEXMF}${EXTRACT_SUFX} DIST_SUBDIR= TeX EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= freebsd-tex@FreeBSD.org COMMENT= Extended version of pdfTeX using Lua LIB_DEPENDS= libpng.so:graphics/png \ libmpfr.so:math/mpfr \ libzzip.so:devel/zziplib USES= gnome libtool pkgconfig tar:xz xorg USE_TEX= kpathsea web2c texmf formats texlua texluajit fmtutil USE_XORG= pixman USE_GNOME= cairo USE_LDCONFIG= yes TEXHASHDIRS= ${TEXMFDISTDIR} ${TEXMFVARDIR} EXTRACT_AFTER_ARGS= ${EXTRACT_FILES:S,^,${DISTNAME}/,} EXTRACT_FILES= build-aux \ libs/xpdf \ libs/lua52 \ libs/luajit \ libs/poppler \ texk/web2c EXTRACT_AFTER_ARGS_TEXMF=| ${TAR} -xf - -C ${STAGEDIR}${PREFIX}/share \ --strip-components 1 --no-same-permission --no-same-owner \ ${EXTRACT_FILES_TEXMF:S,^,${DISTNAME_TEXMF}/,} DISTVERSION_TEXLIVE_SOURCE= 20150521 DISTVERSION_TEXLIVE_TEXMF= 20150523 DISTNAME_TEXMF= texlive-${DISTVERSION_TEXLIVE_TEXMF}-texmf EXTRACT_FILES_TEXMF= \ texmf-dist/doc/lualatex \ texmf-dist/doc/luatex \ texmf-dist/scripts/context/lua \ texmf-dist/source/luatex \ texmf-dist/source/lualatex \ texmf-dist/fonts/map/luatex \ texmf-dist/tex/plain/config/dviluatex.ini \ texmf-dist/tex/luatex \ texmf-dist/tex/plain/config/luatex.ini \ texmf-dist/tex/generic/config/luatex-unicode-letters.tex \ texmf-dist/tex/generic/config/luatexiniconfig.tex \ texmf-dist/tex/generic/context/luatex \ texmf-dist/tex/latex/latexconfig/dvilualatex.ini \ texmf-dist/tex/latex/latexconfig/lualatex-reset-codes.tex \ texmf-dist/tex/latex/latexconfig/lualatexquotejobname.tex \ texmf-dist/tex/latex/latexconfig/lualatex-patch-kernel.tex \ texmf-dist/tex/latex/latexconfig/lualatexiniconfig.tex \ texmf-dist/tex/latex/latexconfig/lualatex.ini \ texmf-dist/tex/lualatex WRKSRC= ${WRKDIR}/${DISTNAME}/texk/web2c GNU_CONFIGURE= yes EXCLUDE_ENGINES=aleph etex pdftex mf mf-nowin \ ptex eptex uptex euptex \ otangle mp pmp upmp web2c web-progs xetex tex synctex CONFIGURE_ARGS= ${EXCLUDE_ENGINES:S/^/--disable-/} \ --enable-luatex \ --enable-luajittex \ --without-system-poppler \ --with-system-zlib \ --with-system-zziplib .for L in cairo gmp kpathsea libpng mpfr pixman ptexenc CONFIGURE_ARGS+=--with-system-$L \ --with-$L-include=${LOCALBASE}/include \ --with-$L-libdir=${LOCALBASE}/lib .endfor +CONFIGURE_ARGS+=CC="${CC}" \ + CXX="${CXX}" CPPFLAGS+= -I${LOCALBASE}/include MAKE_JOBS_UNSAFE= yes TEX_FORMATS= luatex -# Fix build on recent current -- our tex is so outdated, -# that it's unlikely that any upstream patches apply. -CFLAGS+= -fcommon - # buildenv and dumpenv in Makefile uses hard-coded TEXMFCNF. post-extract: cd ${WRKSRC}/.. && \ ${LN} -s -f ${LOCALBASE}/${TEXMFDISTDIR}/web2c kpathsea pre-configure: for D in libs/xpdf libs/poppler; do \ cd ${WRKDIR}/${DISTNAME}/$$D && \ ${SETENV} ${CONFIGURE_ENV} ${SH} ${CONFIGURE_SCRIPT} \ ${CONFIGURE_ARGS}; \ done pre-install: ${CAT} ${DISTDIR}/${DIST_SUBDIR}/texlive-${DISTVERSION_TEXLIVE_TEXMF}-texmf${EXTRACT_SUFX} \ ${EXTRACT_AFTER_ARGS_TEXMF} .include diff --git a/print/tex-luatex/files/patch-luatexdir_font_luatexfont.h b/print/tex-luatex/files/patch-luatexdir_font_luatexfont.h new file mode 100644 index 000000000000..f3feeb7a31c9 --- /dev/null +++ b/print/tex-luatex/files/patch-luatexdir_font_luatexfont.h @@ -0,0 +1,11 @@ +--- luatexdir/font/luatexfont.h.orig 2015-03-20 07:59:58 UTC ++++ luatexdir/font/luatexfont.h +@@ -149,8 +149,6 @@ void replace_packet_fonts(internal_font_number f, int + int *new_fontid, int count); + int *packet_local_fonts(internal_font_number f, int *num); + +-int packet_cur_s; /* current |do_vf_packet()| recursion level */ +-int packet_stack_ptr; /* pointer into |packet_stack| */ + vf_struct *new_vfstruct(void); + + /* writecff.c */ diff --git a/print/tex-luatex/files/patch-luatexdir_image_writeimg.h b/print/tex-luatex/files/patch-luatexdir_image_writeimg.h new file mode 100644 index 000000000000..264feada74cf --- /dev/null +++ b/print/tex-luatex/files/patch-luatexdir_image_writeimg.h @@ -0,0 +1,11 @@ +--- luatexdir/image/writeimg.h.orig 2015-03-20 07:59:58 UTC ++++ luatexdir/image/writeimg.h +@@ -27,7 +27,7 @@ + # include "pdf/pdfpage.h" + + typedef image_dict *idict_entry; +-idict_entry *idict_array; ++extern idict_entry *idict_array; + + void new_img_pdfstream_struct(image_dict *); + image *new_image(void); diff --git a/print/tex-luatex/files/patch-luatexdir_image_writeimg.w b/print/tex-luatex/files/patch-luatexdir_image_writeimg.w new file mode 100644 index 000000000000..cdbf579e417a --- /dev/null +++ b/print/tex-luatex/files/patch-luatexdir_image_writeimg.w @@ -0,0 +1,11 @@ +--- luatexdir/image/writeimg.w.orig 2015-03-20 07:59:58 UTC ++++ luatexdir/image/writeimg.w +@@ -125,6 +125,8 @@ + #define HEADER_PDF "%PDF-1." + #define MAX_HEADER (sizeof(HEADER_PNG)-1) + ++idict_entry *idict_array; ++ + static void check_type_by_header(image_dict * idict) + { + int i; diff --git a/print/tex-luatex/files/patch-luatexdir_pdf_pdftables.h b/print/tex-luatex/files/patch-luatexdir_pdf_pdftables.h new file mode 100644 index 000000000000..1b22db82488a --- /dev/null +++ b/print/tex-luatex/files/patch-luatexdir_pdf_pdftables.h @@ -0,0 +1,11 @@ +--- luatexdir/pdf/pdftables.h.orig 2015-03-20 07:59:58 UTC ++++ luatexdir/pdf/pdftables.h +@@ -21,7 +21,7 @@ + #ifndef PDFTABLES_H + # define PDFTABLES_H + +-const char *pdf_obj_typenames[PDF_OBJ_TYPE_MAX + 1]; ++extern const char *pdf_obj_typenames[PDF_OBJ_TYPE_MAX + 1]; + + typedef enum { + union_type_int, diff --git a/print/tex-luatex/files/patch-luatexdir_tex_textoken.w b/print/tex-luatex/files/patch-luatexdir_tex_textoken.w new file mode 100644 index 000000000000..6beaab5efe4d --- /dev/null +++ b/print/tex-luatex/files/patch-luatexdir_tex_textoken.w @@ -0,0 +1,11 @@ +--- luatexdir/tex/textoken.w.orig 2015-03-28 00:34:27 UTC ++++ luatexdir/tex/textoken.w +@@ -75,7 +75,7 @@ maximum memory usage. When code between the delimiters + report these statistics when |tracing_stats| is sufficiently large. + + @c +-int var_used, dyn_used; /* how much memory is in use */ ++int dyn_used; /* how much memory is in use */ + + halfword avail; /* head of the list of available one-word nodes */ + unsigned fix_mem_end; /* the last one-word node used in |mem| */