8b5cb75fadfc731e7b24c7068f1951219f58e0ad
[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_REVISION=1
7 TERMUX_PKG_SRCURL=ftp://tug.org/historic/systems/texlive/${TERMUX_PKG_VERSION:0:4}/texlive-${TERMUX_PKG_VERSION}-source.tar.xz
8 TERMUX_PKG_SHA256="a8b32ca47f0a403661a09e202f4567a995beb718c18d8f81ca6d76daa1da21ed"
9 TERMUX_PKG_DEPENDS="freetype, libpng, libgd, libgmp, libmpfr, libicu, liblua, poppler, libgraphite, harfbuzz-icu, perl, xz-utils"
10 TERMUX_PKG_FOLDERNAME=texlive-${_MAJOR_VERSION}-source
11
12 # change the bin directory to "$TERMUX_PREFIX/opt/texlive/2016/bin/pkg" because the installer will symlink this to the actual bin dir..
13 TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
14 AR=ar \
15 RANLIB=ranlib \
16 BUILDAR=ar \
17 BUILDRANLIB=ranlib \
18 ac_cv_c_bigendian=no \
19 --prefix=$TERMUX_PREFIX/opt/texlive/${TERMUX_PKG_VERSION:0:4} \
20 --bindir=$TERMUX_PREFIX/opt/texlive/${TERMUX_PKG_VERSION:0:4}/bin/pkg \
21 --libdir=$TERMUX_PREFIX/lib \
22 --build=$TERMUX_BUILD_TUPLE \
23 --enable-ttfdump=no \
24 --enable-makeindexk=no \
25 --enable-makejvf=no \
26 --enable-mendexk=no \
27 --enable-musixtnt=no \
28 --enable-ps2pk=no \
29 --enable-seetexk=no \
30 --enable-gregorio=no \
31 --disable-native-texlive-build \
32 --disable-bibtexu \
33 --disable-dvisvgm \
34 --disable-dialog \
35 --disable-psutils \
36 --disable-multiplatform \
37 --disable-t1utils \
38 --enable-luatex \
39 --disable-luajittex \
40 --disable-mflua \
41 --disable-mfluajit \
42 --disable-xz \
43 --disable-pmx \
44 --without-texinfo \
45 --without-xdvipdfmx \
46 --without-texi2html \
47 --with-system-cairo \
48 --with-system-graphite2 \
49 --with-system-harfbuzz \
50 --with-system-gd \
51 --with-system-gmp \
52 --with-system-icu \
53 --with-system-lua \
54 --with-system-mpfr \
55 --with-system-poppler \
56 --with-system-zlib \
57 --with-system-xpdf \
58 --with-system-lua \
59 --without-x \
60 --with-banner-add=/Termux"
61
62 termux_step_post_extract_package () {
63 rm -rdf $TERMUX_PKG_SRCDIR/libs/luajit
64 }
65
66 termux_step_pre_configure() {
67 # When building against libicu 59.1 or later we need c++11:
68 CXXFLAGS+=" -std=c++11"
69 }
70
71 termux_step_post_make_install () {
72 mkdir -p $TERMUX_PREFIX/share/man/man{1,5}/
73 mv $TERMUX_PREFIX/opt/texlive/2016/share/man/man{1,5}/* $TERMUX_PREFIX/share/man/man1/
74 cp $TERMUX_PKG_BUILDER_DIR/termux-install-tl.sh $TERMUX_PREFIX/bin/termux-install-tl
75 }
76
77 termux_step_create_debscripts () {
78 echo 'echo "========================================================"' > postinst
79 echo 'echo "retrieving texlive..."' >> postinst
80 echo 'echo "you can start this manually by calling termux-install-tl"' >> postinst
81 echo 'echo "========================================================"' >> postinst
82 echo "termux-install-tl" >> postinst
83 echo "exit 0" >> postinst
84 chmod 0755 postinst
85 }