42 lines
1.1 KiB
Bash
Executable File
42 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
# ============================================================================
|
|
# DarkForge Linux — Phase 3, Chapter 8.17: Tcl
|
|
# ============================================================================
|
|
# Purpose: Build Tcl (Tool Command Language), a scripting language needed
|
|
# by expect and dejagnu for running test suites.
|
|
# Inputs: /sources/tcl8.6.16-src.tar.gz
|
|
# Outputs: Tcl library and binary in /usr
|
|
# Ref: LFS 13.0 §8.17
|
|
# ============================================================================
|
|
|
|
set -euo pipefail
|
|
source /sources/toolchain-scripts/100-chroot-env.sh
|
|
|
|
PACKAGE="tcl8.6.16"
|
|
VERSION="8.6.16"
|
|
|
|
echo "=== Building ${PACKAGE} (Phase 3) ==="
|
|
|
|
pkg_extract "${PACKAGE}-src.tar.gz"
|
|
cd "${PACKAGE}/unix"
|
|
|
|
# Configure Tcl with optimizations for our hardware
|
|
./configure \
|
|
--prefix=/usr \
|
|
--enable-64bit \
|
|
--enable-threads
|
|
|
|
make
|
|
make install
|
|
|
|
# Make the library accessible and create symbolic links
|
|
make install-private-headers
|
|
ln -sv tclsh8.6 /usr/bin/tclsh
|
|
|
|
# Verify installation
|
|
echo "Tcl version: $(/usr/bin/tclsh --version)"
|
|
|
|
cd "${SRCDIR}"
|
|
pkg_cleanup "${PACKAGE}"
|
|
echo "=== ${PACKAGE} complete ==="
|