easyblock = 'ConfigureMake'

name = 'memkind'
version = '1.5.0'

homepage = 'http://memkind.github.io'
description = """User Extensible Heap Manager built on top of jemalloc which enables control of memory characteristics 
and a partitioning of the heap between kinds of memory.
"""

toolchain = {'name': 'GCCcore', 'version': '5.4.0'}
toolchainopts = {'pic': True}

source_urls = ['https://github.com/memkind/memkind/archive/']
sources = ['v%(version)s.tar.gz']

builddependencies = [
    ('binutils', '2.26'),
    ('Coreutils', '8.27'), # needed to ensure that ./build_jemalloc.sh works properly
    ('Autotools', '20150215'), # needed to ensure that ./build_jemalloc.sh works properly
]

dependencies = [
    ('tbb', '2017_U5'), # optional, to enable the tbb heap manager
    ('numactl', '2.0.11')
]

preconfigopts = './build_jemalloc.sh && ./autogen.sh && '

sanity_check_paths = {
    'files': ["include/memkind.h", "lib/libmemkind.%s" % SHLIB_EXT],
    'dirs': [],
}

moduleclass = 'lib'
