diff options
-rw-r--r-- | README.md | 24 | ||||
-rwxr-xr-x | checkout-tl.sh | 2 | ||||
-rwxr-xr-x | tl-build.sh | 92 |
3 files changed, 118 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..28a3459 --- /dev/null +++ b/README.md | |||
@@ -0,0 +1,24 @@ | |||
1 | How to Build texlive binaries for OpenBSD | ||
2 | ----------------------------------------- | ||
3 | |||
4 | ### References | ||
5 | - General information: <https://tug.org/texlive/build.html> | ||
6 | - Building GNU CLISP for xindy: | ||
7 | <https://tug.org/svn/texlive/trunk/Build/source/utils/README?view=markup> | ||
8 | |||
9 | ### Requirements | ||
10 | - git | ||
11 | - gmake | ||
12 | - rsync | ||
13 | - subversion | ||
14 | - wget | ||
15 | - curl | ||
16 | - for context: | ||
17 | - cmake | ||
18 | - ninja | ||
19 | |||
20 | ### Getting the bources | ||
21 | Run `checkout-tl.sh` | ||
22 | |||
23 | ### Building the binaries | ||
24 | Run `tl-build.sh` | ||
diff --git a/checkout-tl.sh b/checkout-tl.sh new file mode 100755 index 0000000..435e157 --- /dev/null +++ b/checkout-tl.sh | |||
@@ -0,0 +1,2 @@ | |||
1 | #!/bin/sh | ||
2 | rsync -a --delete --exclude=.svn tug.org::tldevsrc/Build/source . | ||
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 | |||
3 | this_dir=`pwd` | ||
4 | tl_sourcedir=`pwd`/source | ||
5 | |||
6 | echo "Include clisp and xindy?" | ||
7 | read with_clisp?'[y/n] ' | ||
8 | enable_xindy="" | ||
9 | |||
10 | # Context | ||
11 | preset_context_ver=2.10.08 | ||
12 | echo "Include Context v${preset_context_ver}?" | ||
13 | read with_context?'[y/n] ' | ||
14 | if [[ ${with_context} == "y" ]]; then | ||
15 | context_ver=${preset_context_ver} | ||
16 | fi | ||
17 | unset preset_context_ver | ||
18 | |||
19 | # TL | ||
20 | echo "Build TL?" | ||
21 | read build_tl?'[y/n] ' | ||
22 | |||
23 | # First build: clisp | ||
24 | if [[ ${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" | ||
65 | fi | ||
66 | |||
67 | # If Context is required, then retrieve and build it first | ||
68 | if [[ ${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 | ||
74 | fi | ||
75 | |||
76 | # Now build TL | ||
77 | if [[ ${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 | ||
90 | fi | ||
91 | |||
92 | cd ${this_dir} | ||