easyblock = 'ConfigureMake'

name = 'libffi'
version = '3.2.1'

homepage = 'http://sourceware.org/libffi/'
description = """The libffi library provides a portable, high level programming interface to various calling
conventions. This allows a programmer to call any function specified by a call interface description at run-time."""

toolchain = {'name': 'GCC', 'version': '5.4.0-2.26'}

source_urls = [
    'ftp://sourceware.org/pub/libffi/',
    'http://www.mirrorservice.org/sites/sourceware.org/pub/libffi/',
]
sources = [SOURCELOWER_TAR_GZ]
checksums = ['d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37']

sanity_check_paths = {
    'files': [('lib/libffi.%s' % SHLIB_EXT, 'lib64/libffi.%s' % SHLIB_EXT), ('lib/libffi.a', 'lib64/libffi.a')],
    'dirs': ['lib/libffi-%(version)s/include', 'share'],
}

modextrapaths = {'CPATH': ['lib/libffi-%(version)s/include']}

moduleclass = 'lib'
