#/bin/sh

. ./_clfsset.sh

APPNAME=tcl
VER=8.6.1
TARGET=$APPNAME-$VER
TARGETBALL=$APPNAME$VER-src.tar.gz
TARGETDIR=$APPNAME$VER

cd $SRC

echo $TARGET

RemoveSrcDir

. $WRK/_extract.sh

cd $TARGETDIR

TimeStart

sed -i s/500/5000/ generic/regc_nfa.c

echo Configuring...
cd unix
CC="gcc ${BUILD64}" ./configure --prefix=/tools --libdir=/tools/lib64 \
        1> $LOG/$THISFILE.1_conf.log 2>&1 || exit 1

echo Making...
make \
        1> $LOG/$THISFILE.2_make.log 2>&1 || exit 1

echo Installing...
make install \
        1> $LOG/$THISFILE.3_install.log 2>&1 || exit 1
make install-private-headers \
        1>> $LOG/$THISFILE.3_install.log 2>&1 || exit 1
ln -sv tclsh8.6 /tools/bin/tclsh \
        1>> $LOG/$THISFILE.3_install.log 2>&1 || exit 1

TimeEnd

cd ../..
RemoveSrcDir

echo Done.

