##
# This file is an EasyBuild recipe; see https://github.com/hpcugent/easybuild
#
# Copyright:: Copyright (c) 2016 Riccardo Murri <riccardo.murri@gmail.com>
# Authors::   Riccardo Murri <riccardo.murri@gmail.com>
# License::   GPL
#
##

easyblock = 'ConfigureMake'

name = 'FFLAS-FFPACK'
version = '2.2.0'

homepage = 'https://linbox-team.github.io/fflas-ffpack/'
description = "Finite Field Linear Algebra Subroutines / Package"

toolchain = {'version': '2016a', 'name': 'foss'}

sources = ['v%(version)s.zip']
source_urls = ['https://github.com/linbox-team/fflas-ffpack/archive']

builddependencies = [
    ('Autotools', '20150215'),
]
dependencies = [
    ('GMP', '6.1.0'),
    ('Givaro', '4.0.1'),
]

preconfigopts = "env NOCONFIGURE=1 ./autogen.sh && "
configopts = '--with-gmp=$EBROOTGMP --with-givaro=$EBROOTGIVARO'
configopts += ' --with-blas-cflags="-I$BLAS_INC_DIR" --with-blas-libs="-L$BLAS_LIB_DIR $LIBBLAS" --enable-openmp'

sanity_check_paths = {
    'files': ['bin/fflas-ffpack-config', 'include/fflas-ffpack/fflas-ffpack.h'],
    'dirs': ['bin', 'include', 'lib'],
}

moduleclass = 'math'
