#!/bin/bash set -e # With simpleBuildEnvironment flag, we're already in the build directory # which contains the copied source tree SRCDIR=$(pwd) # Change to unix subdirectory for TCL configuration cd sources/unix # Configure TCL with LFS-recommended options ./configure --prefix=${PREFIX} \ --mandir=${PREFIX}/share/man \ --disable-rpath # Build the package make # Store the source directory for later use in sed commands export SRCDIR # Fix configuration files to replace build directory references with install paths sed -e "s|$SRCDIR/unix|${LIBDIR}|g" \ -e "s|$SRCDIR|${INCLUDEDIR}|g" \ -i tclConfig.sh # Fix TDBC configuration files if [ -f "pkgs/tdbc1.1.10/tdbcConfig.sh" ]; then sed -e "s|$SRCDIR/unix/pkgs/tdbc1.1.10|${LIBDIR}/tdbc1.1.10|g" \ -e "s|$SRCDIR/pkgs/tdbc1.1.10/generic|${INCLUDEDIR}|g" \ -e "s|$SRCDIR/pkgs/tdbc1.1.10/library|${LIBDIR}/tcl8.6|g" \ -e "s|$SRCDIR/pkgs/tdbc1.1.10|${INCLUDEDIR}|g" \ -i pkgs/tdbc1.1.10/tdbcConfig.sh fi # Fix ITCL configuration files if [ -f "pkgs/itcl4.3.2/itclConfig.sh" ]; then sed -e "s|$SRCDIR/unix/pkgs/itcl4.3.2|${LIBDIR}/itcl4.3.2|g" \ -e "s|$SRCDIR/pkgs/itcl4.3.2/generic|${INCLUDEDIR}|g" \ -e "s|$SRCDIR/pkgs/itcl4.3.2|${INCLUDEDIR}|g" \ -i pkgs/itcl4.3.2/itclConfig.sh fi echo "TCL 8.6.16 build completed successfully."