Enable texlive (#752)
[termux-packages] / packages / texlive / build.sh
1 TERMUX_PKG_HOMEPAGE=https://www.tug.org/texlive/
2 TERMUX_PKG_DESCRIPTION="TeX Live is a distribution of the TeX typesetting system."
3 _MAJOR_VERSION=20160523
4 _MINOR_VERSION=b
5 TERMUX_PKG_VERSION=${_MAJOR_VERSION}${_MINOR_VERSION}
6 TERMUX_PKG_SRCURL=ftp://tug.org/historic/systems/texlive/${TERMUX_PKG_VERSION:0:4}/texlive-${TERMUX_PKG_VERSION}-source.tar.xz
7 TERMUX_PKG_SHA256="a8b32ca47f0a403661a09e202f4567a995beb718c18d8f81ca6d76daa1da21ed"
8 TERMUX_PKG_DEPENDS="freetype, libpng, libgd, libgmp, libmpfr, libicu, liblua, poppler, libgraphite, harfbuzz-icu, perl, xz-utils"
9 TERMUX_PKG_FOLDERNAME=texlive-${_MAJOR_VERSION}-source
10
11 # change the bin directory to "$TERMUX_PREFIX/opt/texlive/2016/bin/pkg" because the installer will symlink this to the actual bin dir..
12 TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
13 AR=ar \
14 RANLIB=ranlib \
15 BUILDAR=ar \
16 BUILDRANLIB=ranlib \
17 --prefix=$TERMUX_PREFIX/opt/texlive/${TERMUX_PKG_VERSION:0:4} \
18 --bindir=$TERMUX_PREFIX/opt/texlive/${TERMUX_PKG_VERSION:0:4}/bin/pkg \
19 --libdir=$TERMUX_PREFIX/lib \
20 --build=$TERMUX_BUILD_TUPLE \
21 --enable-ttfdump=no \
22 --enable-makeindexk=no \
23 --enable-makejvf=no \
24 --enable-mendexk=no \
25 --enable-musixtnt=no \
26 --enable-ps2pk=no \
27 --enable-seetexk=no \
28 --enable-gregorio=no \
29 --disable-native-texlive-build \
30 --disable-bibtexu \
31 --disable-dvisvgm \
32 --disable-dialog \
33 --disable-psutils \
34 --disable-multiplatform \
35 --disable-t1utils \
36 --enable-luatex \
37 --disable-luajittex \
38 --disable-mflua \
39 --disable-mfluajit \
40 --disable-xz \
41 --disable-pmx \
42 --without-texinfo \
43 --without-xdvipdfmx \
44 --without-texi2html \
45 --with-system-cairo \
46 --with-system-graphite2 \
47 --with-system-harfbuzz \
48 --with-system-gd \
49 --with-system-gmp \
50 --with-system-icu \
51 --with-system-lua \
52 --with-system-mpfr \
53 --with-system-poppler \
54 --with-system-zlib \
55 --with-system-xpdf \
56 --with-system-lua \
57 --without-x \
58 --with-banner-add=/Termux"
59
60 termux_step_post_extract_package () {
61 rm -rdf $TERMUX_PKG_SRCDIR/libs/luajit
62 }
63
64 termux_step_post_make_install () {
65 cp $TERMUX_PKG_BUILDER_DIR/termux-install-tl.sh $TERMUX_PREFIX/bin/termux-install-tl
66 }
67
68 termux_step_create_debscripts () {
69 echo 'echo "========================================================"' > postinst
70 echo 'echo "retrieving texlive..."' >> postinst
71 echo 'echo "you can start this manually by calling termux-install-tl"' >> postinst
72 echo 'echo "========================================================"' >> postinst
73 echo "termux-install-tl" >> postinst
74 echo "exit 0" >> postinst
75 chmod 0755 postinst
76 }