Add 8.15 - Build tcl

This commit is contained in:
Aditya 2023-01-10 15:38:55 +05:30
parent 39d1bc43ee
commit b15a589db7
2 changed files with 72 additions and 0 deletions

View file

@ -0,0 +1,60 @@
#!/bin/bash
cd /sources
tar xf tcl8.6.12-src.tar.gz
cd tcl8.6.12-src
tar -xf ../tcl8.6.12-html.tar.gz --strip-components=1
SRCDIR=$(pwd)
cd unix
./configure --prefix=/usr \
--mandir=/usr/share/man
if [ $? -ne 0 ]
then
exit 1
fi
make -j5
if [ $? -ne 0 ]
then
exit 1
fi
sed -e "s|$SRCDIR/unix|/usr/lib|" \
-e "s|$SRCDIR|/usr/include|" \
-i tclConfig.sh
sed -e "s|$SRCDIR/unix/pkgs/tdbc1.1.3|/usr/lib/tdbc1.1.3|" \
-e "s|$SRCDIR/pkgs/tdbc1.1.3/generic|/usr/include|" \
-e "s|$SRCDIR/pkgs/tdbc1.1.3/library|/usr/lib/tcl8.6|" \
-e "s|$SRCDIR/pkgs/tdbc1.1.3|/usr/include|" \
-i pkgs/tdbc1.1.3/tdbcConfig.sh
sed -e "s|$SRCDIR/unix/pkgs/itcl4.2.2|/usr/lib/itcl4.2.2|" \
-e "s|$SRCDIR/pkgs/itcl4.2.2/generic|/usr/include|" \
-e "s|$SRCDIR/pkgs/itcl4.2.2|/usr/include|" \
-i pkgs/itcl4.2.2/itclConfig.sh
unset SRCDIR
make test
make install
chmod -v u+w /usr/lib/libtcl8.6.so
make install-private-headers
ln -sfv tclsh8.6 /usr/bin/tclsh
mv /usr/share/man/man3/{Thread,Tcl_Thread}.3
mkdir -v -p /usr/share/doc/tcl-8.6.12
cp -v -r ../html/* /usr/share/doc/tcl-8.6.12
cd /sources
rm -rf tcl8.6.12-src

View file

@ -714,3 +714,15 @@ then
stop_script "chapter8/8.14-flex.sh"
fi
# Chapter 8.15
# ============
echo "Building tcl"
su -c "bash $SCRIPT/chapter8/8.15-tcl.sh"
# Exit on error
check_exit_code
if [ $exit_status -ne 0 ]
then
stop_script "chapter8/8.15-tcl.sh"
fi