easyblock = 'ConfigureMake'

name = 'Tk'
version = '8.6.7'

homepage = 'http://www.tcl.tk/'
description = """Tk is an open source, cross-platform widget toolchain that provides a library of basic elements for
 building a graphical user interface (GUI) in many different programming languages."""

toolchain = {'name': 'foss', 'version': '2017b'}

source_urls = ["http://prdownloads.sourceforge.net/tcl"]
sources = ['%(namelower)s%(version)s-src.tar.gz']
patches = ['Tk-8.6.4_different-prefix-with-tcl.patch']
checksums = [
    '061de2a354f9b7c7d04de3984c90c9bc6dd3a1b8377bb45509f1ad8a8d6337aa',  # tk8.6.7-src.tar.gz
    '7a6daa8349393af3d340e774aebf07c7410c51e01bc654ceb3679877063b961d',  # Tk-8.6.4_different-prefix-with-tcl.patch
]

dependencies = [
    ('Tcl', version),
    ('X11', '20171023'),
    ('zlib', '1.2.11'),
]

configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib CFLAGS="-I$EBROOTTCL/include"'

start_dir = 'unix'

moduleclass = 'vis'
