easyblock = 'ConfigureMake'

name = 'gc'
version = '7.6.0'

homepage = 'http://hboehm.info/gc/'

description = """
 The Boehm-Demers-Weiser conservative garbage collector can be used as a
 garbage collecting replacement for C malloc or C++ new.
"""

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

source_urls = [
    'http://hboehm.info/gc/gc_source/',
    'https://github.com/ivmai/libatomic_ops/releases/download/v7.4.6/',
]
sources = [
    SOURCE_TAR_GZ,
    'libatomic_ops-7.4.6.tar.gz',
]
checksums = [
    'a14a28b1129be90e55cd6f71127ffc5594e1091d5d54131528c24cd0c03b7d90',
    '96e88ba450ae5fa10aa8e94e6b151a63ffbe47f8069574bd12da22ae80c686db',
]

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

preconfigopts = 'ln -s %(builddir)s/libatomic_ops*/ libatomic_ops && '

sanity_check_paths = {
    'files': ['include/gc.h', 'lib/libcord.a', 'lib/libcord.%s' % SHLIB_EXT,
              'lib/libgc.a', 'lib/libgc.%s' % SHLIB_EXT],
    'dirs': ['include/gc', 'share'],
}

moduleclass = 'lib'
