easyblock = 'ConfigureMake'

name = 'CMake'
version = '3.11.4'

homepage = 'http://www.cmake.org'

description = """
 CMake, the cross-platform, open-source build system.  CMake is a family of
 tools designed to build, test and package software.
"""

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

source_urls = ['http://www.cmake.org/files/v%(version_major_minor)s']
sources = [SOURCELOWER_TAR_GZ]
checksums = ['8f864e9f78917de3e1483e256270daabc4a321741592c5b36af028e72bff87f5']

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

dependencies = [
    ('ncurses', '6.1'),
    # OS dependency should be preferred if the os version is more recent then this version,
    # it's nice to have an up to date openssl for security reasons
    # ('OpenSSL', '1.1.0h'),
]

osdependencies = [
    ('openssl-devel', 'libssl-dev', 'libopenssl-devel'),
]

configopts = '-- -DCMAKE_USE_OPENSSL=1 -DCMAKE_PREFIX_PATH=$EBROOTNCURSES'

sanity_check_paths = {
    'files': ["bin/%s" % x for x in ['ccmake', 'cmake', 'cpack', 'ctest']],
    'dirs': [],
}

moduleclass = 'devel'