# -*- 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
# $Id$
PortSystem      1.0
PortGroup       compilers 1.0

name            eso-tcl84
conflicts       eso-tcl84-devel
version         8.4.20
revision        11

set _name     tcl

# Tk (x11/tk) port depends on this version
categories    lang
maintainers     eso.org:usd-help
description   Tool Command Language
platforms     darwin freebsd
master_sites  sourceforge

homepage      http://www.tcl.tk/
master_sites  sourceforge:project/tcl/Tcl/${version}

checksums \
  md5 f1c783a49547778d160e10be2fb5d76f \
  sha1 7edc6b8eb5f49980ba9b788e12c236501327c815 \
  rmd160 8432aff66525a3c3f9dadb2bd8e32c28c539d14d

checksums           md5     b57ecc6540026fd4a83288ac6bf2b02b \
                    sha1    a9b7836aa5a1de31fde2738e2c15033d731f2aba \
                    rmd160  27abfdd9d8d518cfc3beff85ca782144710b13e2 \
                    sha256  fcb317b65c69f1d6962057c5622a80980bc22ffadf25c1cc50b6d02ff6c2cf40

compilers.choose  cc cpp cxx
compilers.setup   gcc 

default_variants  +${compilers.gcc_default}
use_parallel_build      no


prefix          /opt/local/libexec/eso/tcltk-8.4
dist_subdir    eso-tcltk
distname        ${_name}${version}-src
worksrcdir      ${_name}${version}/unix
configure.args  --mandir=${prefix}/share/man --enable-shared
if { [gcc_variant_isset] && [compilers::get_current_gcc_version] >= 14 } {
  configure.cflags-append  \
          -Wno-error=implicit-int \
          -Wno-incompatible-library-redeclaration \
          -Wno-builtin-declaration-mismatch \
          -Wno-implicit-function-declaration \

}

destroot.destdir  INSTALL_ROOT=${destroot}
post-destroot {
  ln -s ${prefix}/bin/tclsh8.4 ${destroot}/${prefix}/bin/tclsh
  ln -s ${prefix}/lib/libtcl8.4.dylib ${destroot}/${prefix}/lib/libtcl.dylib
}

test.run      yes

platform darwin 8 {
	configure.env	MACOSX_DEPLOYMENT_TARGET=10.4
}

platform darwin 9 {
	configure.env	MACOSX_DEPLOYMENT_TARGET=10.5
}

