7 MASTER_SITES= TEX_CTAN/systems/texlive/Source/
9 DISTNAME= ${PORTNAME}-${DISTVERSION}-source
12 MAINTAINER= hrs@FreeBSD.org
13 COMMENT= TeX Live Typesetting System, base binaries
15 RUN_DEPENDS= psbook:print/psutils
16 LIB_DEPENDS= libicuio.so:devel/icu \
17 libt1.so:devel/t1lib \
18 libTECkit.so:textproc/teckit \
19 libgd.so:graphics/gd \
20 libgraphite2.so:graphics/graphite2 \
21 libfreetype.so:print/freetype2 \
22 libharfbuzz.so:print/harfbuzz \
23 libpng.so:graphics/png \
24 libzzip.so:devel/zziplib \
25 libpoppler.so:graphics/poppler \
26 libpotrace.so:graphics/libpotrace
28 CONFLICTS_INSTALL= texlive-texmf-201[234]*
30 USE_TEX= web2c kpathsea ptexenc tlmgr texhash-bootstrap
31 USES= ghostscript pkgconfig perl5 shebangfix tar:xz
33 # during build phase gnu configure is run a lot
34 MAKE_ENV+= CONFIG_SITE=${CONFIG_SITE}
35 EXCLUDE_FILES= ${DISTNAME}/texk/web2c \
36 ${DISTNAME}/texk/kpathsea \
37 ${DISTNAME}/texk/ptexenc \
38 ${DISTNAME}/texk/xdvik \
39 ${DISTNAME}/texk/dvipdfm-x \
40 ${DISTNAME}/texk/dvipsk \
42 ${DISTNAME}/utils/t1utils \
43 ${DISTNAME}/utils/xpdfopen
44 EXTRACT_AFTER_ARGS= ${EXCLUDE_FILES:S,^,--exclude ,}
46 CONFIGURE_ARGS= --disable-native-texlive-build \
55 --enable-build-in-source-tree \
56 --datarootdir=${LOCALBASE}/share \
57 --with-system-freetype2 \
58 --with-freetype2-includes=${LOCALBASE}/include/freetype2 \
59 --with-freetype2-libdir=${LOCALBASE}/lib \
62 --with-system-harfbuzz \
63 --with-system-graphite2 \
64 --with-system-pixman \
65 --with-system-poppler \
67 --with-xpdf-includes=${LOCALBASE}/include/poppler \
68 --with-xpdf-libdir=${LOCALBASE}/lib \
70 --with-system-zziplib \
72 .for L in gmp icu kpathsea libgs libpng libpaper mpfr ptexenc potrace teckit
73 CONFIGURE_ARGS+=--with-system-$L \
74 --with-$L-include=${LOCALBASE}/include \
75 --with-$L-libdir=${LOCALBASE}/lib
78 CFLAGS+= -I${LOCALBASE}/include
79 PLIST_SUB= INSTALL_DATA="${INSTALL_DATA}"
80 INSTALL_TARGET= install-strip
82 SHEBANG_FILES= texk/texlive/linked_scripts/accfonts/mkt1font \
83 texk/texlive/linked_scripts/accfonts/vpl2ovp \
84 texk/texlive/linked_scripts/accfonts/vpl2vpl \
85 texk/texlive/linked_scripts/arara/arara.sh \
86 texk/texlive/linked_scripts/bibexport/bibexport.sh \
87 texk/texlive/linked_scripts/convbkmk/convbkmk.rb \
88 texk/texlive/linked_scripts/ctanupload/ctanupload.pl \
89 texk/texlive/linked_scripts/de-macro/de-macro \
90 texk/texlive/linked_scripts/dtxgen/dtxgen \
91 texk/texlive/linked_scripts/exceltex/exceltex \
92 texk/texlive/linked_scripts/findhyph/findhyph \
93 texk/texlive/linked_scripts/fragmaster/fragmaster.pl \
94 texk/texlive/linked_scripts/installfont/installfont-tl \
95 texk/texlive/linked_scripts/kotex-utils/jamo-normalize.pl \
96 texk/texlive/linked_scripts/latexpand/latexpand \
97 texk/texlive/linked_scripts/ltxfileinfo/ltxfileinfo \
98 texk/texlive/linked_scripts/lua2dox/lua2dox_filter \
99 texk/texlive/linked_scripts/mathspic/mathspic.pl \
100 texk/texlive/linked_scripts/mf2pt1/mf2pt1.pl \
101 texk/texlive/linked_scripts/multibibliography/multibibliography.pl \
102 texk/texlive/linked_scripts/rubik/rubikrotation.pl \
103 texk/texlive/linked_scripts/splitindex/splitindex.pl \
104 texk/texlive/linked_scripts/svn-multi/svn-multi.pl \
105 texk/texlive/linked_scripts/texdirflatten/texdirflatten \
106 texk/texlive/linked_scripts/ulqda/ulqda.pl \
107 texk/texlive/linked_scripts/urlbst/urlbst \
108 texk/texlive/linked_scripts/yplan/yplan
115 X11_USE= TEX=xpdfopen:run
118 cd ${WRKSRC}/texk/texlive && \
119 ${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},' \
120 linked_scripts/texlive/fmtutil-sys.sh \
121 tl_scripts/texconfig-sys.sh \
122 linked_scripts/texlive/updmap-sys.sh
124 post-install-fmtutil:
125 for D in ${TEXHASHDIRS}; do \
126 ${MKDIR} ${STAGEDIR}${PREFIX}/$$D; \
127 ${TOUCH} ${STAGEDIR}${PREFIX}/$$D/.keep_me; \
129 ${MKDIR} ${STAGEDIR}${PREFIX}/${TEXMFCONFIGDIR}/web2c
130 ${TOUCH} ${STAGEDIR}${PREFIX}/${TEXMFCONFIGDIR}/web2c/.keep_me
131 ${INSTALL_DATA} ${STAGEDIR}${PREFIX}/${TEXMFDISTDIR}/web2c/fmtutil.cnf \
132 ${STAGEDIR}${PREFIX}/${FMTUTIL_CNF}
134 post-install: post-install-fmtutil
135 .ORDER: post-install-fmtutil do-texhash
137 .include <bsd.port.mk>