easyblock = 'ConfigureMake'

name = 'memkind'
version = '1.14.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': '11.3.0'}
toolchainopts = {'pic': True}

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

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

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

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

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

moduleclass = 'lib'
