easyblock = 'ConfigureMake'

name = 'Tcl'
version = '8.6.11'

homepage = 'https://www.tcl.tk/'

description = """
 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.
"""

toolchain = {'name': 'GCCcore', 'version': '10.2.0'}

source_urls = ["http://prdownloads.sourceforge.net/tcl"]
sources = ['%(namelower)s%(version)s-src.tar.gz']
checksums = ['8c0486668586672c5693d7d95817cb05a18c5ecca2f40e2836b9578064088258']

builddependencies = [('binutils', '2.35')]

dependencies = [('zlib', '1.2.11')]

configopts = '--enable-threads EXTRA_INSTALL="install-private-headers"'

runtest = 'test'

start_dir = 'unix'

postinstallcmds = [
    'ln -s %(installdir)s/bin/tclsh%(version_major)s.%(version_minor)s %(installdir)s/bin/tclsh'
]

sanity_check_paths = {
    'files': ['bin/tclsh%(version_major)s.%(version_minor)s', 'bin/tclsh',
              'include/tcl.h', 'lib/libtcl%%(version_major)s.%%(version_minor)s.%s' % SHLIB_EXT,
              'lib/tclConfig.sh', 'man/man1/tclsh.1'],
    'dirs': ['share'],
}

moduleclass = 'lang'
