3.14. tcl-8.6.11
#!/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
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() { cd unix ./configure \ --prefix=${PREFIX} \ --mandir=${PREFIX}/share/man \ $(ause_enable 'cap64' '--enable-64bit') }
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.2|${PREFIX}/lib/tdbc1.1.2|" \ -e "s|${S}/pkgs/tdbc1.1.2/generic|${PREFIX}/include|" \ -e "s|${S}/pkgs/tdbc1.1.2/library|${PREFIX}/lib/tcl8.6|" \ -e "s|${S}/pkgs/tdbc1.1.2|${PREFIX}/include|" \ -i pkgs/tdbc1.1.2/tdbcConfig.sh sed -e "s|${S}/unix/pkgs/itcl4.2.1|${PREFIX}/lib/itcl4.2.1|" \ -e "s|${S}/pkgs/itcl4.2.1/generic|${PREFIX}/include|" \ -e "s|${S}/pkgs/itcl4.2.1|${PREFIX}/include|" \ -i pkgs/itcl4.2.1/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.0/chapter08/tcl.html
- url.lfs.stage1: