# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# Tk (x11/tk) port depends on this version
maintainers {mcalhoun @MarcusCalhoun-Lopez} openmaintainer
description Tool Command Language
Tcl (Tool Command Language) is a very powerful but easy to learn dynamic \
programming language, suitable for a very wide range of uses, including web \
and desktop applications, networking, administration, testing and many more. \
Open source and business-friendly, Tcl is a mature yet evolving language \
that is truly cross platform, easily deployed and highly extensible.
homepage http://www.tcl.tk/
master_sites sourceforge:project/tcl/Tcl/${version}
checksums rmd160 53723adf560606dc0403af568b6fc0d27a4fd93d \
sha256 c43cb0c1518ce42b00e7c8f6eaddd5195c53a98f94adc717234a65cbcfd3f96a \
distname ${name}${version}-src
worksrcdir ${name}${version}/unix
configure.args --mandir=${prefix}/share/man \
--disable-corefoundation \
configure.cppflags-delete -I${prefix}/include
configure.ldflags-delete -L${prefix}/lib
# sqlite3 package is provided by sqlite3-tcl
delete [glob ${worksrcpath}/../pkgs/sqlite*]
reinplace -E {s|-arch [^ ]+||g} ${worksrcpath}/tclConfig.sh
# see https://trac.macports.org/ticket/17189
destroot.destdir INSTALL_ROOT=${destroot}
ln -s tclsh8.6 ${destroot}${prefix}/bin/tclsh
ln -s libtcl8.6.dylib ${destroot}${prefix}/lib/libtcl.dylib
# dont enable threads by default as Tcl uses thread-local storage which makes
# passing Tcl_Obj* around between threads fatal
variant threads description {add multithreading support} {
configure.args-replace --disable-threads \
# CF is not fork()-safe and software e.g. using tk and fork() will crash