easyblock = 'ConfigureMake'

name = 'libxc'
version = '4.2.3'

homepage = 'http://www.tddft.org/programs/octopus/wiki/index.php/Libxc'
description = """Libxc is a library of exchange-correlation functionals for density-functional theory.
 The aim is to provide a portable, well tested and reliable set of exchange and correlation functionals."""

toolchain = {'name': 'intel', 'version': '2017a'}

source_urls = ['http://www.tddft.org/programs/octopus/down.php?file=libxc/%(version)s/']
sources = [SOURCE_TAR_GZ]
checksums = ['02e49e9ba7d21d18df17e9e57eae861e6ce05e65e966e1e832475aa09e344256']

configopts = '--enable-static --enable-shared --enable-fortran'

runtest = 'check'

sanity_check_paths = {
    'files': ['lib/libxc%s.%s' % (x, y) for x in ['', 'f90'] for y in ['a', SHLIB_EXT]],
    'dirs': ['include'],
}

parallel = 1

moduleclass = 'chem'
