easyblock = 'ConfigureMake'

name = 'Valgrind'
version = '3.13.0'

homepage = 'http://valgrind.org'
description = "Valgrind: Debugging and profiling tools"

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

source_urls = [
    'ftp://sourceware.org/pub/valgrind/',
    'http://www.mirrorservice.org/sites/sourceware.org/pub/valgrind/',
]
sources = [SOURCELOWER_TAR_BZ2]
checksums = ['d76680ef03f00cd5e970bbdcd4e57fb1f6df7d2e2c071635ef2be74790190c3b']

configopts = ' --with-mpicc="$MPICC"'

binaries = [
    'callgrind_annotate', 'callgrind_control', 'cg_annotate', 'cg_diff',
    'cg_merge', 'ms_print', 'valgrind', 'valgrind-listener', 'vgdb'
]

sanity_check_paths = {
    'files': ['bin/%s' % x for x in binaries] +
             ['lib/valgrind/libmpiwrap-amd64-linux.%s' % SHLIB_EXT],
    'dirs': []
}

moduleclass = 'debugger'
