#
# author: Dina Mahmoud Ibrahim (Cairo University)
#
easyblock = 'ConfigureMake'

name = 'tclcl'
version = '1.20'

homepage = 'http://otcl-tclcl.sourceforge.net/tclcl/'
description = """TclCL (Tcl with classes) is a Tcl/C++ interface used by Mash,
 vic, vat, rtp_play, ns, and nam. It provides a layer of C++ glue over OTcl."""

toolchain = {'name': 'ictce', 'version': '5.3.0'}
toolchainopts = {'pic': True}

sources = ['%(name)s-src-%(version)s.tar.gz']
source_urls = ['http://prdownloads.sourceforge.net/otcl-tclcl']

tcl_ver = '8.5.12'
dependencies = [
    ('Tcl', tcl_ver),
    ('Tk', tcl_ver),
    ('otcl', '1.14'),
]

configopts = "--with-otcl=$EBROOTOTCL --with-tcl=$EBROOTTCL --with-tcl-ver=$EBVERSIONTCL "
configopts += "--with-tk=$EBROOTTK --with-tk-ver=$EBVERSIONTK"

preinstallopts = "mkdir -p %(installdir)s/{bin,lib,include,man} && "

sanity_check_paths = {
    'files': ['bin/tcl2c++', 'lib/libtclcl.a'],
    'dirs': ['include'],
}

moduleclass = 'lang'
