-
Notifications
You must be signed in to change notification settings - Fork 0
/
tcl.sh
executable file
·47 lines (41 loc) · 1.41 KB
/
tcl.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# See LICENSE for license details.
#!/bin/bash
set -euo pipefail
unpack_src() {
tar xf tcl8.6.11-src.tar.gz
cd tcl8.6.11
tar xf ../tcl8.6.11-html.tar.gz --strip-components=1
return
}
configure() {
SRCDIR=$(pwd)
cd unix
./configure --prefix=/usr \
--mandir=/usr/share/man \
$([ "$(uname -m)" = x86_64 ] && echo --enable-64bit)
}
make_install() {
make
sed -e "s|$SRCDIR/unix|/usr/lib|" \
-e "s|$SRCDIR|/usr/include|" \
-i tclConfig.sh
sed -e "s|$SRCDIR/unix/pkgs/tdbc1.1.2|/usr/lib/tdbc1.1.2|" \
-e "s|$SRCDIR/pkgs/tdbc1.1.2/generic|/usr/include|" \
-e "s|$SRCDIR/pkgs/tdbc1.1.2/library|/usr/lib/tcl8.6|" \
-e "s|$SRCDIR/pkgs/tdbc1.1.2|/usr/include|" \
-i pkgs/tdbc1.1.2/tdbcConfig.sh
sed -e "s|$SRCDIR/unix/pkgs/itcl4.2.1|/usr/lib/itcl4.2.1|" \
-e "s|$SRCDIR/pkgs/itcl4.2.1/generic|/usr/include|" \
-e "s|$SRCDIR/pkgs/itcl4.2.1|/usr/include|" \
-i pkgs/itcl4.2.1/itclConfig.sh
unset SRCDIR
make test
make DESTDIR=$TODD_FAKE_ROOT_DIR -j1 install
chmod -v u+w $TODD_FAKE_ROOT_DIR/usr/lib/libtcl8.6.so
make install-private-headers
}
post_install() {
ln -sfv tclsh8.6 $TODD_FAKE_ROOT_DIR/usr/bin/tclsh
mv $TODD_FAKE_ROOT_DIR/usr/share/man/man3/{Thread,Tcl_Thread}.3
}
unpack_src && configure && make_install && post_install