3.14. tcl-8.6.12
#!/bin/sh # Copyright © 1999-2022 Gerard Beekmans # Copyright © 2017-2022 Random Crew # Distributed under the terms of MIT License. MY_P="tcl${PV}-src"
Additional source handling
The directory inside source archive is named as tcl1.2.3 instead of standard tcl-1.2.3. We need to move to that directory explicitly.
src_postfetch() { cd ${WORKDIR}/tcl${PV} }
Configuration
Certain version of LFS adds option --enable-64bit to configure.
String with ause_enable means option --enable-64bit will be added to configure, if project goes in 64-bit mode and dataword cap64 is present in configuration.
src_config() { bit_option= case ${LFS_VERSION} in 11.1) if ause 'cap64' ; then bit_option='--enable-64bit' fi ;; esac cd unix ./configure \ --prefix=${PREFIX} \ --mandir=${PREFIX}/share/man \ ${bit_option} }
Compilation
src_compile() { make ${MAKEOPTS} sed -e "s|${S}/unix|${PREFIX}/lib|" \ -e "s|${S}|${PREFIX}/include|" \ -i tclConfig.sh sed -e "s|${S}/unix/pkgs/tdbc1.1.3|${PREFIX}/lib/tdbc1.1.3|" \ -e "s|${S}/pkgs/tdbc1.1.3/generic|${PREFIX}/include|" \ -e "s|${S}/pkgs/tdbc1.1.3/library|${PREFIX}/lib/tcl8.6|" \ -e "s|${S}/pkgs/tdbc1.1.3|${PREFIX}/include|" \ -i pkgs/tdbc1.1.3/tdbcConfig.sh sed -e "s|${S}/unix/pkgs/itcl4.2.2|${PREFIX}/lib/itcl4.2.2|" \ -e "s|${S}/pkgs/itcl4.2.2/generic|${PREFIX}/include|" \ -e "s|${S}/pkgs/itcl4.2.2|${PREFIX}/include|" \ -i pkgs/itcl4.2.2/itclConfig.sh }
Installation
src_install() { make install ${MAKEOPTS} DESTDIR=${D} chmod u+w ${D}${PREFIX}/lib/libtcl8.6.so make install-private-headers ${MAKEOPTS} DESTDIR=${D} ln -s tclsh8.6 ${D}${PREFIX}/bin/tclsh mv ${D}${PREFIX}/share/man/man3/Thread.3 ${D}${PREFIX}/share/man/man3/Tcl_Thread.3 }
Unit testing
src_check() { make test }
Build code
Other files
Links
- url.lfs: https://linuxfromscratch.org/lfs/view/11.2/chapter08/tcl.html
- url.lfs.stage1: