From 43c3e5fc529fe1e5d1905337b9934302eb60d519 Mon Sep 17 00:00:00 2001 Message-Id: <43c3e5fc529fe1e5d1905337b9934302eb60d519.1717759534.git.mdw@distorted.org.uk> From: Mark Wooding Date: Thu, 9 Nov 2017 00:11:41 +0100 Subject: [PATCH] texlive: Reshaping termux_step_extract_package to enable moving files to standard location Organization: Straylight/Edgeware From: Henrik Grimler patch tlmgr to look for files in the right location. Patch texmf.cnf so that kpathsea finds files in the right location. --- packages/texlive-bin/build.sh | 1 + .../texlive-bin/texk-kpathsea-texmf.cnf.patch | 30 +++++++++++++++++++ packages/texlive/build.sh | 10 +++---- 3 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 packages/texlive-bin/texk-kpathsea-texmf.cnf.patch diff --git a/packages/texlive-bin/build.sh b/packages/texlive-bin/build.sh index 6127915c..b483fd33 100644 --- a/packages/texlive-bin/build.sh +++ b/packages/texlive-bin/build.sh @@ -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 diff --git a/packages/texlive-bin/texk-kpathsea-texmf.cnf.patch b/packages/texlive-bin/texk-kpathsea-texmf.cnf.patch new file mode 100644 index 00000000..bb7f14db --- /dev/null +++ b/packages/texlive-bin/texk-kpathsea-texmf.cnf.patch @@ -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,\ diff --git a/packages/texlive/build.sh b/packages/texlive/build.sh index 57f1e5cb..c7eb4769 100644 --- a/packages/texlive/build.sh +++ b/packages/texlive/build.sh @@ -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" -- [mdw]