build.sh 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/bin/bash
  2. set -e
  3. # With simpleBuildEnvironment flag, we're already in the build directory
  4. # which contains the copied source tree
  5. SRCDIR=$(pwd)
  6. # Change to unix subdirectory for TCL configuration
  7. cd sources/unix
  8. # Configure TCL with LFS-recommended options
  9. ./configure --prefix=${PREFIX} \
  10. --mandir=${PREFIX}/share/man \
  11. --disable-rpath
  12. # Build the package
  13. make
  14. # Store the source directory for later use in sed commands
  15. export SRCDIR
  16. # Fix configuration files to replace build directory references with install paths
  17. sed -e "s|$SRCDIR/unix|${LIBDIR}|g" \
  18. -e "s|$SRCDIR|${INCLUDEDIR}|g" \
  19. -i tclConfig.sh
  20. # Fix TDBC configuration files
  21. if [ -f "pkgs/tdbc1.1.10/tdbcConfig.sh" ]; then
  22. sed -e "s|$SRCDIR/unix/pkgs/tdbc1.1.10|${LIBDIR}/tdbc1.1.10|g" \
  23. -e "s|$SRCDIR/pkgs/tdbc1.1.10/generic|${INCLUDEDIR}|g" \
  24. -e "s|$SRCDIR/pkgs/tdbc1.1.10/library|${LIBDIR}/tcl8.6|g" \
  25. -e "s|$SRCDIR/pkgs/tdbc1.1.10|${INCLUDEDIR}|g" \
  26. -i pkgs/tdbc1.1.10/tdbcConfig.sh
  27. fi
  28. # Fix ITCL configuration files
  29. if [ -f "pkgs/itcl4.3.2/itclConfig.sh" ]; then
  30. sed -e "s|$SRCDIR/unix/pkgs/itcl4.3.2|${LIBDIR}/itcl4.3.2|g" \
  31. -e "s|$SRCDIR/pkgs/itcl4.3.2/generic|${INCLUDEDIR}|g" \
  32. -e "s|$SRCDIR/pkgs/itcl4.3.2|${INCLUDEDIR}|g" \
  33. -i pkgs/itcl4.3.2/itclConfig.sh
  34. fi
  35. echo "TCL 8.6.16 build completed successfully."