texlive: Reshaping termux_step_extract_package to enable moving files to standard location

patch tlmgr to look for files in the right location. Patch texmf.cnf so that kpathsea finds files in the right location.
This commit is contained in:
Henrik Grimler 2017-11-09 00:11:41 +01:00 committed by Fredrik Fornwall
parent 353d99c278
commit 5e08ebac2e
3 changed files with 35 additions and 6 deletions

View File

@ -130,6 +130,7 @@ termux_step_post_make_install () {
mv $TL_BINDIR/tlmgr $TL_BINDIR/tlmgr.ln
echo "#!$TERMUX_PREFIX/bin/sh" > $TL_BINDIR/tlmgr
echo "termux-fix-shebang $TL_ROOT/texmf-dist/scripts/texlive/tlmgr.pl" >> $TL_BINDIR/tlmgr
echo "sed -i 's%`kpsewhich -var-value=SELFAUTOPARENT`);%`kpsewhich -var-value=TEXMFROOT`);%g' $TL_ROOT/texmf-dist/scripts/texlive/tlmgr.pl" >> $TL_BINDIR/tlmgr
echo "sed -E -i '"'s@`/bin/sh@`'$TERMUX_PREFIX"/bin/sh@g' ${TL_ROOT}/tlpkg/TeXLive/TLUtils.pm" >> $TL_BINDIR/tlmgr
echo 'tlmgr.ln "$@"' >> $TL_BINDIR/tlmgr
chmod 0744 $TL_BINDIR/tlmgr

View File

@ -0,0 +1,30 @@
--- ./texk/kpathsea/texmf.cnf 2017-05-03 18:13:42.000000000 +0000
+++ ../texmf.cnf 2017-11-08 22:44:36.123962327 +0000
@@ -54,7 +54,7 @@
% Redistributors will probably want $SELFAUTODIR/share, i.e., /usr/share.
% Kpathsea sets SELFAUTOLOC (the directory with the binary),
% SELFAUTODIR (its parent), and SELFAUTOPARENT (its grandparent).
-TEXMFROOT = $SELFAUTOPARENT
+TEXMFROOT = $SELFAUTODIR/share/texlive
% The main tree of distributed packages and programs:
TEXMFDIST = $TEXMFROOT/texmf-dist
@@ -64,7 +64,7 @@
TEXMFMAIN = $TEXMFDIST
% Local additions to the distribution trees.
-TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local
+TEXMFLOCAL = TEXMFROOT/texmf-local
% TEXMFSYSVAR, where *-sys store cached runtime data.
TEXMFSYSVAR = $TEXMFROOT/texmf-var
@@ -516,6 +516,9 @@
$SELFAUTODIR/share/texmf-local/web2c,\
$SELFAUTODIR/share/texmf-dist/web2c,\
$SELFAUTODIR/share/texmf/web2c,\
+$SELFAUTODIR/share/texlive/texmf-local/web2c,\
+$SELFAUTODIR/share/texlive/texmf-dist/web2c,\
+$SELFAUTODIR/share/texlive/texmf/web2c,\
$SELFAUTODIR/texmf-local/web2c,\
$SELFAUTODIR/texmf-dist/web2c,\
$SELFAUTODIR/texmf/web2c,\

View File

@ -2,9 +2,8 @@ TERMUX_PKG_HOMEPAGE=https://www.tug.org/texlive/
TERMUX_PKG_DESCRIPTION="TeX Live is a distribution of the TeX typesetting system."
TERMUX_PKG_MAINTAINER="Henrik Grimler @Grimler91"
_MAJOR_VERSION=20170524
_MINOR_VERSION=
TERMUX_PKG_VERSION=${_MAJOR_VERSION}${_MINOR_VERSION}
TERMUX_PKG_REVISION=4
TERMUX_PKG_VERSION=${_MAJOR_VERSION}
TERMUX_PKG_REVISION=5
TERMUX_PKG_SRCURL=("ftp://ftp.tug.org/texlive/historic/${TERMUX_PKG_VERSION:0:4}/"\
{"texlive-$_MAJOR_VERSION-texmf.tar.xz",\
"texlive-$_MAJOR_VERSION-extra.tar.xz",\
@ -21,7 +20,7 @@ TL_FILE_LISTS=("texlive-texmf.list"
"install-tl.list")
TERMUX_PKG_PLATFORM_INDEPENDENT=yes
TL_ROOT=$TERMUX_PREFIX/share
TL_ROOT=$TERMUX_PREFIX/share/texlive
TL_BINDIR=$TERMUX_PREFIX/bin
termux_step_extract_package() {
@ -143,5 +142,4 @@ share/texlive/tlpkg/tlpostcode/xetex/conf/fonts.conf
share/texlive/tlpkg/tlpostcode/xetex/conf/fonts.dtd
share/texlive/tlpkg/tlpostcode/xetex/conf/conf.d/51-local.conf
share/texlive/tlpkg/tlpostcode/xetex/cache/readme.txt
share/texlive/tlpkg/tlpostcode/ptex2pdf-tlpost.pl
share/texlive/texmf-dist/web2c/texmf.cnf"
share/texlive/tlpkg/tlpostcode/ptex2pdf-tlpost.pl"