Update print/tex-luatex to version 0.79.1_2
[dports.git] / print / tex-luatex / Makefile
1 # $FreeBSD$
2
3 PORTNAME=       luatex
4 PORTVERSION=    0.79.1
5 PORTREVISION=   2
6 CATEGORIES=     print
7 MASTER_SITES=   ftp://tug.org/historic/systems/texlive/2014/
8 PKGNAMEPREFIX=  tex-
9 DISTNAME=       texlive-${DISTVERSION_TEXMF}-source
10 DISTFILES=      ${DISTNAME}${EXTRACT_SUFX} \
11                 ${DISTNAME_TEXMF}${EXTRACT_SUFX}
12 DIST_SUBDIR=    TeX
13 EXTRACT_ONLY=   texlive-${DISTVERSION_TEXMF}-source${EXTRACT_SUFX}
14
15 MAINTAINER=     hrs@FreeBSD.org
16 COMMENT=        Extended version of pdfTeX using Lua
17
18 LIB_DEPENDS=    libfreetype.so:${PORTSDIR}/print/freetype2 \
19                 libgraphite.so:${PORTSDIR}/graphics/silgraphite \
20                 libicuio.so:${PORTSDIR}/devel/icu \
21                 libpng15.so:${PORTSDIR}/graphics/png \
22                 libpoppler.so:${PORTSDIR}/graphics/poppler \
23                 libTECkit.so:${PORTSDIR}/textproc/teckit \
24                 libzzip.so:${PORTSDIR}/devel/zziplib
25
26 USE_TEX=        kpathsea web2c texmf formats fmtutil
27 USE_XORG=       pixman
28 USES=           pkgconfig tar:xz gmake
29 EXTRACT_AFTER_ARGS=     ${EXTRACT_FILES:S,^,${DISTNAME}/,}
30 EXTRACT_FILES=  \
31         build-aux \
32         libs/xpdf \
33         libs/cairo \
34         libs/pixman \
35         libs/lua52 \
36         libs/luajit \
37         texk/web2c
38 EXTRACT_AFTER_ARGS_TEXMF=| ${TAR} -xf - -C ${STAGEDIR}${PREFIX}/share \
39                 --strip-components 1 --no-same-permission --no-same-owner \
40                 ${EXTRACT_FILES_TEXMF:S,^,${DISTNAME_TEXMF}/,}
41 DISTVERSION_TEXMF=20140525
42 DISTNAME_TEXMF= texlive-${DISTVERSION_TEXMF}-texmf
43 EXTRACT_FILES_TEXMF= \
44         texmf-dist/doc/lualatex \
45         texmf-dist/doc/luatex \
46         texmf-dist/scripts/context/lua \
47         texmf-dist/source/luatex \
48         texmf-dist/source/lualatex \
49         texmf-dist/fonts/map/luatex \
50         texmf-dist/tex/plain/config/dviluatex.ini \
51         texmf-dist/tex/luatex \
52         texmf-dist/tex/plain/config/luatex.ini \
53         texmf-dist/tex/generic/config/luatex-unicode-letters.tex \
54         texmf-dist/tex/generic/config/luatexiniconfig.tex \
55         texmf-dist/tex/generic/context/luatex \
56         texmf-dist/tex/latex/latexconfig/dvilualatex.ini \
57         texmf-dist/tex/latex/latexconfig/lualatex-reset-codes.tex \
58         texmf-dist/tex/latex/latexconfig/lualatexquotejobname.tex \
59         texmf-dist/tex/latex/latexconfig/lualatex-patch-kernel.tex \
60         texmf-dist/tex/latex/latexconfig/lualatexiniconfig.tex \
61         texmf-dist/tex/latex/latexconfig/lualatex.ini \
62         texmf-dist/tex/lualatex
63 WRKSRC=         ${WRKDIR}/${DISTNAME}/texk/web2c
64 GNU_CONFIGURE=  yes
65 EXCLUDE_ENGINES=aleph etex pdftex mf mf-nowin mp ptex eptex uptex euptex \
66                 xetex tex
67 CONFIGURE_ARGS= ${EXCLUDE_ENGINES:S/^/--disable-/} \
68                 --enable-luatex \
69                 --enable-luajittex \
70                 --enable-web2c \
71                 --disable-web-progs \
72                 --with-system-freetype2 \
73                 --with-freetype2-includes=${LOCALBASE}/include/freetype2 \
74                 --with-freetype2-libdir=${LOCALBASE}/lib \
75                 --with-system-gd \
76                 --with-system-icu \
77                 --with-icu-includes=${LOCALBASE}/include \
78                 --with-icu-libdir=${LOCALBASE}/lib \
79                 --with-system-kpathsea \
80                 --with-kpathsea-includes=${LOCALBASE}/include \
81                 --with-kpathsea-libdir=${LOCALBASE}/lib \
82                 --with-system-libpng \
83                 --with-libpng-includes=${LOCALBASE}/include \
84                 --with-libpng-libdir=${LOCALBASE}/lib \
85                 --with-system-poppler \
86                 --with-system-t1lib \
87                 --with-system-teckit \
88                 --with-teckit-includes=${LOCALBASE}/include/teckit \
89                 --with-teckit-libdir=${LOCALBASE}/lib \
90                 --with-system-pixman \
91                 --with-system-zziplib \
92                 --with-system-zlib
93 CFLAGS+=        -I${LOCALBASE}/include
94 MAKE_JOBS_UNSAFE=       yes
95 TEX_FORMATS=    luatex
96
97 pre-configure:
98         for D in libs/xpdf libs/cairo libs/lua52 libs/luajit; do \
99                 cd ${WRKDIR}/${DISTNAME}/$$D && \
100                 ${SETENV} ${CONFIGURE_ENV} ${SH} ${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}; \
101         done
102
103 pre-install:
104         ${CAT} ${DISTDIR}/${DIST_SUBDIR}/texlive-${DISTVERSION_TEXMF}-texmf${EXTRACT_SUFX} \
105                 ${EXTRACT_AFTER_ARGS_TEXMF}
106
107 .include <bsd.port.mk>