include ldns-config in ldns-dev
[termux-packages] / packages / texlive / build.sh
CommitLineData
cb2a32e4 1TERMUX_PKG_HOMEPAGE=https://www.tug.org/texlive/
2TERMUX_PKG_DESCRIPTION="TeX Live is a distribution of the TeX typesetting system."
e85171f5
HG
3TERMUX_PKG_MAINTAINER="Henrik Grimler @Grimler91"
4_MAJOR_VERSION=20170524
5_MINOR_VERSION=
d415b125 6TERMUX_PKG_VERSION=${_MAJOR_VERSION}${_MINOR_VERSION}
d946e67c 7TERMUX_PKG_REVISION=2
d415b125 8TERMUX_PKG_SRCURL=ftp://tug.org/historic/systems/texlive/${TERMUX_PKG_VERSION:0:4}/texlive-${TERMUX_PKG_VERSION}-source.tar.xz
e85171f5
HG
9TERMUX_PKG_SHA256="0161695304e941334dc0b3b5dabcf8edf46c09b7bc33eea8229b5ead7ccfb2aa"
10TERMUX_PKG_DEPENDS="freetype, libpng, libgd, libgmp, libmpfr, libicu, liblua, poppler, libgraphite, harfbuzz-icu, perl, xz-utils, wget, gnupg"
d415b125 11TERMUX_PKG_FOLDERNAME=texlive-${_MAJOR_VERSION}-source
12
e85171f5
HG
13TL_ROOT=$TERMUX_PREFIX/opt/texlive/${TERMUX_PKG_VERSION:0:4}
14
b6c7cb34 15TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
cb2a32e4 16AR=ar \
17RANLIB=ranlib \
18BUILDAR=ar \
19BUILDRANLIB=ranlib \
86aeac04 20ac_cv_c_bigendian=no \
e85171f5
HG
21--prefix=$TL_ROOT \
22--bindir=$TL_ROOT/bin/pkg \
23--datarootdir=$TL_ROOT \
24--datadir=$TERMUX_PREFIX/share \
25--mandir=$TERMUX_PREFIX/share/man \
26--docdir=$TERMUX_PREFIX/share/doc \
27--infodir=$TERMUX_PREFIX/share/info \
d415b125 28--libdir=$TERMUX_PREFIX/lib \
e85171f5 29--includedir=$TERMUX_PREFIX/include \
cb2a32e4 30--build=$TERMUX_BUILD_TUPLE \
290d898d 31--enable-ttfdump=no \
e85171f5 32--enable-makeindexk=yes \
290d898d
FF
33--enable-makejvf=no \
34--enable-mendexk=no \
35--enable-musixtnt=no \
36--enable-ps2pk=no \
37--enable-seetexk=no \
38--enable-gregorio=no \
cb2a32e4 39--disable-native-texlive-build \
290d898d
FF
40--disable-bibtexu \
41--disable-dvisvgm \
cb2a32e4 42--disable-dialog \
43--disable-psutils \
290d898d 44--disable-multiplatform \
cb2a32e4 45--disable-t1utils \
d415b125 46--enable-luatex \
290d898d
FF
47--disable-luajittex \
48--disable-mflua \
49--disable-mfluajit \
50--disable-xz \
d415b125 51--disable-pmx \
cb2a32e4 52--without-texinfo \
53--without-xdvipdfmx \
54--without-texi2html \
290d898d
FF
55--with-system-cairo \
56--with-system-graphite2 \
57--with-system-harfbuzz \
58--with-system-gd \
59--with-system-gmp \
cb2a32e4 60--with-system-icu \
290d898d
FF
61--with-system-lua \
62--with-system-mpfr \
cb2a32e4 63--with-system-poppler \
290d898d 64--with-system-zlib \
cb2a32e4 65--with-system-xpdf \
d415b125 66--with-system-lua \
290d898d
FF
67--without-x \
68--with-banner-add=/Termux"
cb2a32e4 69
86aeac04
FF
70termux_step_pre_configure() {
71 # When building against libicu 59.1 or later we need c++11:
72 CXXFLAGS+=" -std=c++11"
cb2a32e4 73}
74
75termux_step_post_make_install () {
d415b125 76 cp $TERMUX_PKG_BUILDER_DIR/termux-install-tl.sh $TERMUX_PREFIX/bin/termux-install-tl
e85171f5
HG
77 mkdir -p $TERMUX_PREFIX/etc/profile.d/
78 echo "export PATH=\$PATH:$TERMUX_PREFIX/opt/texlive/${TERMUX_PKG_VERSION:0:4}/bin/custom/" >> $TERMUX_PREFIX/etc/profile.d/texlive.sh
79 echo "export TMPDIR=$TERMUX_PREFIX/tmp/" >> $TERMUX_PREFIX/etc/profile.d/texlive.sh
80 chmod 0744 $TERMUX_PREFIX/etc/profile.d/texlive.sh
cb2a32e4 81}
82
83termux_step_create_debscripts () {
d415b125 84 echo 'echo "========================================================"' > postinst
85 echo 'echo "retrieving texlive..."' >> postinst
86 echo 'echo "you can start this manually by calling termux-install-tl"' >> postinst
87 echo 'echo "========================================================"' >> postinst
290d898d
FF
88 echo "termux-install-tl" >> postinst
89 echo "exit 0" >> postinst
90 chmod 0755 postinst
e85171f5
HG
91
92 # Clean texlive's folder if needed.
93 echo "if [ ! -f $TERMUX_PREFIX/opt/texlive/2016/install-tl ]; then exit 0; else echo 'Removing residual files from old version of TeX Live for Termux'; fi" > preinst
94 echo "rm -rf $TERMUX_PREFIX/{etc/profile.d/texlive.sh,opt/texlive}" >> preinst
95 echo "exit 0" >> preinst
96 chmod 0755 preinst
97
98 # Remove all files installed/downloaded through termux-install-tl
99 echo 'if [ $1 != "remove" ]; then exit 0; fi' > prerm
100 echo "echo Running texlinks --unlink" >> prerm
101 echo "texlinks --unlink" >> prerm
102 echo "echo Removing bin/custom and texmf-dist" >> prerm
103 echo "rm -rf $TL_ROOT/{bin/custom,texmf-dist}" >> prerm
104 echo "exit 0" >> prerm
105 chmod 0755 prerm
cb2a32e4 106}