aboutsummaryrefslogtreecommitdiff
path: root/tl-build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tl-build.sh')
-rwxr-xr-xtl-build.sh92
1 files changed, 92 insertions, 0 deletions
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 @@
1#!/bin/sh
2
3this_dir=`pwd`
4tl_sourcedir=`pwd`/source
5
6echo "Include clisp and xindy?"
7read with_clisp?'[y/n] '
8enable_xindy=""
9
10# Context
11preset_context_ver=2.10.08
12echo "Include Context v${preset_context_ver}?"
13read with_context?'[y/n] '
14if [[ ${with_context} == "y" ]]; then
15 context_ver=${preset_context_ver}
16fi
17unset preset_context_ver
18
19# TL
20echo "Build TL?"
21read build_tl?'[y/n] '
22
23# First build: clisp
24if [[ ${with_clisp} == "y" ]]; then
25 mkdir source/clisp && cd source/clisp
26 clisp_basedir=`pwd`
27 clisp_toolsdir=$clisp_basedir/clisp-tools
28 clisp_builddir=$clisp_basedir/clisp-build
29 mkdir $clisp_toolsdir
30 wget=wget # or "curl -O" or whatever
31 #libsigsegv_ver=libsigsegv-2.13
32 libsigsegv_ver=$(curl -s https://tug.org/svn/texlive/trunk/Build/source/utils/README?view=co | grep libsigsegv_ver= | sed 's/.*=//')
33 cd $clisp_basedir
34 $wget http://ftp.gnu.org/gnu/libsigsegv/$libsigsegv_ver.tar.gz
35 gzip -dc $libsigsegv_ver.tar.gz | tar xf -
36 cd $libsigsegv_ver
37 ./configure -C --prefix=$clisp_toolsdir --disable-shared --enable-static \
38 && make && make check && make install
39 # iconv
40 #libiconv_ver=libiconv-1.16
41 libiconv_ver=$(curl -s https://tug.org/svn/texlive/trunk/Build/source/utils/README?view=co | grep libiconv_ver= | sed 's/.*=//')
42 cd $clisp_basedir
43 $wget http://ftp.gnu.org/gnu/libiconv/$libiconv_ver.tar.gz
44 gzip -dc $libiconv_ver.tar.gz | tar xf -
45 cd $libiconv_ver
46 ./configure -C --prefix=$clisp_toolsdir \
47 --disable-shared --enable-static --disable-nls \
48 && make && make check && make install
49
50 #clisp_ver=clisp-2.49.92
51 clisp_ver=$(curl -s https://tug.org/svn/texlive/trunk/Build/source/utils/README?view=co | grep clisp_ver= | sed 's/.*=//')
52 cd $clisp_basedir
53 $wget https://alpha.gnu.org/gnu/clisp/$clisp_ver.tar.bz2
54 bunzip2 -dc $clisp_ver.tar.bz2 | tar xf -
55 cd $clisp_ver
56 ./configure CPPFLAGS=-DUNIX_BINARY_DISTRIB --prefix=$clisp_toolsdir \
57 --without-readline --without-dynamic-modules \
58 --disable-nls \
59 --with-libsigsegv-prefix=$clisp_toolsdir \
60 --with-libiconv-prefix=$clisp_toolsdir \
61 $clisp_builddir \
62 && (cd $clisp_builddir && make)
63 # define --enable-xindy variable
64 enable_xindy="--enable-xindy CLISP=$clisp_builddir/clisp"
65fi
66
67# If Context is required, then retrieve and build it first
68if [[ ${with_context} == "y" ]]; then
69 cd $tl_sourcedir
70 curl -L https://github.com/contextgarden/luametatex/archive/refs/tags/v$context_ver.tar.gz > luametatex-$context_ver.tar.gz
71 tar xzf luametatex-$context_ver.tar.gz
72 cd luametatex-$context_ver
73 sh build.sh
74fi
75
76# Now build TL
77if [[ ${build_tl} == "y" ]]; then
78 cd ${tl_sourcedir}
79 export TL_MAKE=gmake
80 ./Build ${enable_xindy}
81 if [[ ${with_context} == "y" ]]; then
82 tl_bindir=$tl_sourcedir/inst/bin/`ls ${tl_sourcedir}/inst/bin`
83 cp luametatex-$context_ver/build/native/luametatex $tl_bindir
84 cd $tl_bindir
85 ln -s luametatex context
86 ln -s luametatex mtxrun
87 ln -s ../../texmf-dist/scripts/context/lua/context.lua context.lua
88 ln -s ../../texmf-dist/scripts/context/lua/mtxrun.lua mtxrun.lua
89 fi
90fi
91
92cd ${this_dir}