easyblock = 'ConfigureMake'

name = 'gc'
version = '7.4.4'

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': 'foss', 'version': '2016a'}

source_urls = [
    'http://hboehm.info/gc/gc_source/',
    'https://github.com/ivmai/libatomic_ops/archive/',
]
sources = [
    SOURCE_TAR_GZ,
    'libatomic_ops-7_4_4.tar.gz',
]

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'
