From 486e12e8af4af25f760caf3c9a97d4cbe5fd5561 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Sat, 24 Feb 2024 16:47:00 +0100 Subject: initial commit --- tl-build.sh | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100755 tl-build.sh (limited to 'tl-build.sh') diff --git a/tl-build.sh b/tl-build.sh new file mode 100755 index 0000000..b4cd7c9 --- /dev/null +++ b/tl-build.sh @@ -0,0 +1,92 @@ +#!/bin/sh + +this_dir=`pwd` +tl_sourcedir=`pwd`/source + +echo "Include clisp and xindy?" +read with_clisp?'[y/n] ' +enable_xindy="" + +# Context +preset_context_ver=2.10.08 +echo "Include Context v${preset_context_ver}?" +read with_context?'[y/n] ' +if [[ ${with_context} == "y" ]]; then + context_ver=${preset_context_ver} +fi +unset preset_context_ver + +# TL +echo "Build TL?" +read build_tl?'[y/n] ' + +# First build: clisp +if [[ ${with_clisp} == "y" ]]; then + mkdir source/clisp && cd source/clisp + clisp_basedir=`pwd` + clisp_toolsdir=$clisp_basedir/clisp-tools + clisp_builddir=$clisp_basedir/clisp-build + mkdir $clisp_toolsdir + wget=wget # or "curl -O" or whatever + #libsigsegv_ver=libsigsegv-2.13 + libsigsegv_ver=$(curl -s https://tug.org/svn/texlive/trunk/Build/source/utils/README?view=co | grep libsigsegv_ver= | sed 's/.*=//') + cd $clisp_basedir + $wget http://ftp.gnu.org/gnu/libsigsegv/$libsigsegv_ver.tar.gz + gzip -dc $libsigsegv_ver.tar.gz | tar xf - + cd $libsigsegv_ver + ./configure -C --prefix=$clisp_toolsdir --disable-shared --enable-static \ + && make && make check && make install + # iconv + #libiconv_ver=libiconv-1.16 + libiconv_ver=$(curl -s https://tug.org/svn/texlive/trunk/Build/source/utils/README?view=co | grep libiconv_ver= | sed 's/.*=//') + cd $clisp_basedir + $wget http://ftp.gnu.org/gnu/libiconv/$libiconv_ver.tar.gz + gzip -dc $libiconv_ver.tar.gz | tar xf - + cd $libiconv_ver + ./configure -C --prefix=$clisp_toolsdir \ + --disable-shared --enable-static --disable-nls \ + && make && make check && make install + + #clisp_ver=clisp-2.49.92 + clisp_ver=$(curl -s https://tug.org/svn/texlive/trunk/Build/source/utils/README?view=co | grep clisp_ver= | sed 's/.*=//') + cd $clisp_basedir + $wget https://alpha.gnu.org/gnu/clisp/$clisp_ver.tar.bz2 + bunzip2 -dc $clisp_ver.tar.bz2 | tar xf - + cd $clisp_ver + ./configure CPPFLAGS=-DUNIX_BINARY_DISTRIB --prefix=$clisp_toolsdir \ + --without-readline --without-dynamic-modules \ + --disable-nls \ + --with-libsigsegv-prefix=$clisp_toolsdir \ + --with-libiconv-prefix=$clisp_toolsdir \ + $clisp_builddir \ + && (cd $clisp_builddir && make) + # define --enable-xindy variable + enable_xindy="--enable-xindy CLISP=$clisp_builddir/clisp" +fi + +# If Context is required, then retrieve and build it first +if [[ ${with_context} == "y" ]]; then + cd $tl_sourcedir + curl -L https://github.com/contextgarden/luametatex/archive/refs/tags/v$context_ver.tar.gz > luametatex-$context_ver.tar.gz + tar xzf luametatex-$context_ver.tar.gz + cd luametatex-$context_ver + sh build.sh +fi + +# Now build TL +if [[ ${build_tl} == "y" ]]; then + cd ${tl_sourcedir} + export TL_MAKE=gmake + ./Build ${enable_xindy} + if [[ ${with_context} == "y" ]]; then + tl_bindir=$tl_sourcedir/inst/bin/`ls ${tl_sourcedir}/inst/bin` + cp luametatex-$context_ver/build/native/luametatex $tl_bindir + cd $tl_bindir + ln -s luametatex context + ln -s luametatex mtxrun + ln -s ../../texmf-dist/scripts/context/lua/context.lua context.lua + ln -s ../../texmf-dist/scripts/context/lua/mtxrun.lua mtxrun.lua + fi +fi + +cd ${this_dir} -- cgit v1.2.3