1 TERMUX_PKG_HOMEPAGE
=https
://www.tug.org
/texlive
/
2 TERMUX_PKG_DESCRIPTION
="TeX Live is a distribution of the TeX typesetting system."
3 TERMUX_PKG_MAINTAINER
="Henrik Grimler @Grimler91"
4 _MAJOR_VERSION
=20170524
6 TERMUX_PKG_VERSION
=${_MAJOR_VERSION}${_MINOR_VERSION}
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
="0161695304e941334dc0b3b5dabcf8edf46c09b7bc33eea8229b5ead7ccfb2aa"
9 TERMUX_PKG_DEPENDS
="freetype, libpng, libgd, libgmp, libmpfr, libicu, liblua, poppler, libgraphite, harfbuzz-icu, perl"
10 TERMUX_PKG_FOLDERNAME
=texlive-
${_MAJOR_VERSION}-source
11 TERMUX_PKG_BREAKS
="texlive (<< 20170524-3)"
12 TERMUX_PKG_REPLACES
="texlive (<< 20170524-3)"
13 TERMUX_PKG_NO_DEVELSPLIT
=yes
15 TL_ROOT
=$TERMUX_PREFIX/opt
/texlive
/${TERMUX_PKG_VERSION:0:4}
16 TL_BINDIR
=$TL_ROOT/bin
/custom
18 TERMUX_PKG_EXTRA_CONFIGURE_ARGS
="
23 ac_cv_c_bigendian=no \
26 --datarootdir=$TL_ROOT \
27 --datadir=$TERMUX_PREFIX/share \
28 --mandir=$TERMUX_PREFIX/share/man \
29 --docdir=$TERMUX_PREFIX/share/doc \
30 --infodir=$TERMUX_PREFIX/share/info \
31 --libdir=$TERMUX_PREFIX/lib \
32 --includedir=$TERMUX_PREFIX/include \
33 --build=$TERMUX_BUILD_TUPLE \
35 --enable-makeindexk=yes \
38 --enable-musixtnt=no \
41 --enable-gregorio=no \
42 --disable-native-texlive-build \
47 --disable-multiplatform \
59 --with-system-graphite2 \
60 --with-system-harfbuzz \
66 --with-system-poppler \
71 --with-banner-add=/Termux"
73 TERMUX_PKG_RM_AFTER_INSTALL
="opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist"
75 termux_step_pre_configure
() {
76 # When building against libicu 59.1 or later we need c++11:
77 CXXFLAGS
+=" -std=c++11"
80 termux_step_post_make_install
() {
81 mkdir
-p
$TERMUX_PREFIX/etc
/profile.d
/
82 echo "export PATH=\$PATH:$TL_BINDIR" > $TERMUX_PREFIX/etc
/profile.d
/texlive.sh
83 echo "export TMPDIR=$TERMUX_PREFIX/tmp/" >> $TERMUX_PREFIX/etc
/profile.d
/texlive.sh
84 chmod 0744 $TERMUX_PREFIX/etc
/profile.d
/texlive.sh
85 mv $TL_BINDIR/tlmgr
$TL_BINDIR/tlmgr.
ln
86 echo "#!$TERMUX_PREFIX/bin/sh" > $TL_BINDIR/tlmgr
87 echo "termux-fix-shebang $TL_ROOT/texmf-dist/scripts/texlive/tlmgr.pl" >> $TL_BINDIR/tlmgr
88 echo "sed -E -i '"'s@`/bin/sh@`'$TERMUX_PREFIX"/bin/sh@g' ${TL_ROOT}/tlpkg/TeXLive/TLUtils.pm" >> $TL_BINDIR/tlmgr
89 echo 'tlmgr.ln "$@"' >> $TL_BINDIR/tlmgr
90 chmod 0744 $TL_BINDIR/tlmgr
93 termux_step_create_debscripts
() {
94 # Clean texlive's folder if needed (run on fresh install)
95 echo "if [ ! -f $TERMUX_PREFIX/opt/texlive/2016/install-tl -a ! -f $TERMUX_PREFIX/opt/texlive/2017/install-tl ]; then exit 0; else echo 'Removing residual files from old version of TeX Live for Termux'; fi" > preinst
96 echo "rm -rf $TERMUX_PREFIX/etc/profile.d/texlive.sh" >> preinst
97 echo "rm -rf $TERMUX_PREFIX/opt/texlive/2016"
98 # Let's not delete the previous texmf-dist so that people who have installed a full distribution won't need to download everything again
99 echo "rm -rf $TERMUX_PREFIX/opt/texlive/2017/!(texmf-dist)" >> preinst
100 echo "exit 0" >> preinst