Commit | Line | Data |
---|---|---|
dce832a2 HG |
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" | |
6a98cd7b HG |
4 | TERMUX_PKG_VERSION=20170524 |
5 | TERMUX_PKG_REVISION=7 | |
dce832a2 HG |
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="0161695304e941334dc0b3b5dabcf8edf46c09b7bc33eea8229b5ead7ccfb2aa" | |
8 | TERMUX_PKG_DEPENDS="freetype, libpng, libgd, libgmp, libmpfr, libicu, liblua, poppler, libgraphite, harfbuzz-icu, perl" | |
1ec6c4b8 | 9 | TERMUX_PKG_BUILD_DEPENDS="icu-devtools" |
dce832a2 HG |
10 | TERMUX_PKG_BREAKS="texlive (<< 20170524-3)" |
11 | TERMUX_PKG_REPLACES="texlive (<< 20170524-3)" | |
93372882 | 12 | TERMUX_PKG_RECOMMENDS="texlive" |
dce832a2 HG |
13 | TERMUX_PKG_NO_DEVELSPLIT=yes |
14 | ||
15 | TL_ROOT=$TERMUX_PREFIX/opt/texlive/${TERMUX_PKG_VERSION:0:4} | |
16 | TL_BINDIR=$TL_ROOT/bin/custom | |
17 | ||
18 | TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" | |
19 | AR=ar \ | |
20 | RANLIB=ranlib \ | |
21 | BUILDAR=ar \ | |
22 | BUILDRANLIB=ranlib \ | |
23 | ac_cv_c_bigendian=no \ | |
24 | --prefix=$TL_ROOT \ | |
25 | --bindir=$TL_BINDIR \ | |
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 \ | |
34 | --enable-ttfdump=no \ | |
35 | --enable-makeindexk=yes \ | |
36 | --enable-makejvf=no \ | |
37 | --enable-mendexk=no \ | |
38 | --enable-musixtnt=no \ | |
39 | --enable-ps2pk=no \ | |
40 | --enable-seetexk=no \ | |
41 | --enable-gregorio=no \ | |
42 | --disable-native-texlive-build \ | |
43 | --disable-bibtexu \ | |
44 | --disable-dvisvgm \ | |
45 | --disable-dialog \ | |
46 | --disable-psutils \ | |
47 | --disable-multiplatform \ | |
48 | --disable-t1utils \ | |
49 | --enable-luatex \ | |
50 | --disable-luajittex \ | |
51 | --disable-mflua \ | |
52 | --disable-mfluajit \ | |
53 | --disable-xz \ | |
54 | --disable-pmx \ | |
55 | --without-texinfo \ | |
56 | --without-xdvipdfmx \ | |
57 | --without-texi2html \ | |
58 | --with-system-cairo \ | |
59 | --with-system-graphite2 \ | |
60 | --with-system-harfbuzz \ | |
61 | --with-system-gd \ | |
62 | --with-system-gmp \ | |
63 | --with-system-icu \ | |
64 | --with-system-lua \ | |
65 | --with-system-mpfr \ | |
66 | --with-system-poppler \ | |
67 | --with-system-zlib \ | |
68 | --with-system-xpdf \ | |
69 | --with-system-lua \ | |
70 | --without-x \ | |
71 | --with-banner-add=/Termux" | |
72 | ||
0b67d3bb | 73 | # These files are provided by texlive: |
93372882 HG |
74 | TERMUX_PKG_RM_AFTER_INSTALL=" |
75 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/texconfig/tcfmgr.map | |
76 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/texconfig/tcfmgr | |
77 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/web2c/texmf.cnf | |
78 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/web2c/mktex.opt | |
79 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/web2c/mktexdir.opt | |
80 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/web2c/mktexnam.opt | |
81 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/web2c/fmtutil.cnf | |
82 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/web2c/mktexdir | |
83 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/web2c/mktexnam | |
84 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/web2c/mktexupd | |
85 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/dvipdfmx/dvipdfmx.cfg | |
86 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/dvips/base/color.pro | |
87 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/dvips/base/crop.pro | |
88 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/dvips/base/finclude.pro | |
89 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/dvips/base/hps.pro | |
90 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/dvips/base/special.pro | |
91 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/dvips/base/tex.pro | |
92 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/dvips/base/texps.pro | |
93 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/dvips/base/texc.pro | |
94 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/dvips/gsftopk/render.ps | |
95 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/scripts/texlive/allcm.sh | |
96 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/scripts/texlive/allneeded.sh | |
97 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/scripts/texlive/dvi2fax.sh | |
98 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/scripts/texlive/dvired.sh | |
99 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/scripts/texlive/kpsetool.sh | |
100 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/scripts/texlive/kpsewhere.sh | |
101 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/scripts/texlive/texconfig-dialog.sh | |
102 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/scripts/texlive/texconfig-sys.sh | |
103 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/scripts/texlive/texconfig.sh | |
104 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/scripts/texlive/texlinks.sh | |
105 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/scripts/texlive/fmtutil-sys.sh | |
106 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/scripts/texlive/fmtutil.pl | |
107 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/scripts/texlive/tlmgr.pl | |
108 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/scripts/texlive/updmap-sys.sh | |
109 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/scripts/texlive/updmap.pl | |
110 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/scripts/simpdftex/simpdftex | |
111 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/fonts/cmap/dvipdfmx/EUC-UCS2 | |
112 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/fonts/map/glyphlist/pdfglyphlist.txt | |
113 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/fonts/map/glyphlist/glyphlist.txt | |
114 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/fonts/map/glyphlist/texglyphlist.txt | |
115 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/fonts/map/dvipdfmx/cid-x.map | |
116 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/fonts/enc/dvips/base/7t.enc | |
117 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/scripts/luaotfload/luaotfload-tool.lua | |
118 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/scripts/oberdiek/pdfatfi.pl | |
119 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/scripts/lua2dox/lua2dox_filter | |
120 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/scripts/context/perl/mptopdf.pl | |
121 | opt/texlive/${TERMUX_PKG_VERSION:0:4}/texmf-dist/scripts/checkcites/checkcites.lua" | |
dce832a2 HG |
122 | |
123 | termux_step_pre_configure() { | |
124 | # When building against libicu 59.1 or later we need c++11: | |
125 | CXXFLAGS+=" -std=c++11" | |
206fed09 HG |
126 | # Oz flag causes problems. See https://github.com/termux/termux-packages/issues/1765: |
127 | CFLAGS=${CFLAGS/Oz/O3} | |
dce832a2 HG |
128 | } |
129 | ||
130 | termux_step_post_make_install () { | |
0b67d3bb | 131 | # Add bin dir to path for new shells (doesn't work for zsh and others) |
dce832a2 | 132 | mkdir -p $TERMUX_PREFIX/etc/profile.d/ |
0b67d3bb | 133 | echo "#!$TERMUX_PREFIX/bin/sh" > $TERMUX_PREFIX/etc/profile.d/texlive.sh |
104ad022 | 134 | echo "export TMPDIR=$TERMUX_PREFIX/tmp" >> $TERMUX_PREFIX/etc/profile.d/texlive.sh |
0b67d3bb | 135 | echo "export PATH=\$PATH:$TL_BINDIR" >> $TERMUX_PREFIX/etc/profile.d/texlive.sh |
dce832a2 | 136 | chmod 0744 $TERMUX_PREFIX/etc/profile.d/texlive.sh |
0b67d3bb | 137 | # Replace tlmgr link with a small wrapper that prevents common break on "tlmgr update --self" |
dce832a2 HG |
138 | mv $TL_BINDIR/tlmgr $TL_BINDIR/tlmgr.ln |
139 | echo "#!$TERMUX_PREFIX/bin/sh" > $TL_BINDIR/tlmgr | |
140 | echo "termux-fix-shebang $TL_ROOT/texmf-dist/scripts/texlive/tlmgr.pl" >> $TL_BINDIR/tlmgr | |
141 | echo "sed -E -i '"'s@`/bin/sh@`'$TERMUX_PREFIX"/bin/sh@g' ${TL_ROOT}/tlpkg/TeXLive/TLUtils.pm" >> $TL_BINDIR/tlmgr | |
142 | echo 'tlmgr.ln "$@"' >> $TL_BINDIR/tlmgr | |
143 | chmod 0744 $TL_BINDIR/tlmgr | |
144 | } | |
145 | ||
146 | termux_step_create_debscripts () { | |
147 | # Clean texlive's folder if needed (run on fresh install) | |
5ceb2e0e | 148 | echo "#!$TERMUX_PREFIX/bin/bash" > preinst |
0b67d3bb | 149 | 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 |
dce832a2 | 150 | echo "rm -rf $TERMUX_PREFIX/etc/profile.d/texlive.sh" >> preinst |
0b67d3bb | 151 | echo "rm -rf $TERMUX_PREFIX/opt/texlive/2016" >> preinst |
dce832a2 | 152 | # Let's not delete the previous texmf-dist so that people who have installed a full distribution won't need to download everything again |
104ad022 | 153 | echo "shopt -s extglob" >> preinst # !(texmf-dist) is an extended glob which is turned off in scripts |
dce832a2 | 154 | echo "rm -rf $TERMUX_PREFIX/opt/texlive/2017/!(texmf-dist)" >> preinst |
104ad022 | 155 | echo "shopt -u extglob" >> preinst # disable extglob again just in case |
dce832a2 HG |
156 | echo "exit 0" >> preinst |
157 | chmod 0755 preinst | |
158 | } |