# This file is an EasyBuild reciPY as per https://github.com/easybuilders/easybuild
# Author: Pablo Escobar Lopez
# Swiss Institute of Bioinformatics
# Biozentrum - University of Basel

easyblock = 'ConfigureMake'

name = 'NLopt'
version = '2.4.2'

homepage = 'http://ab-initio.mit.edu/wiki/index.php/NLopt'
description = """ NLopt is a free/open-source library for nonlinear optimization,
 providing a common interface for a number of different free optimization routines
 available online as well as original implementations of various other algorithms. """

toolchain = {'name': 'system', 'version': ''}
toolchainopts = {'pic': True}

source_urls = ['http://ab-initio.mit.edu/nlopt/']
sources = [SOURCELOWER_TAR_GZ]
checksums = ['8099633de9d71cbc06cd435da993eb424bbcdbded8f803cdaa9fb8c6e09c8e89']

configopts = '--enable-shared'

sanity_check_paths = {
    'files': [
        'lib/libnlopt.a',
        'lib/libnlopt.%s' %
        SHLIB_EXT,
        'include/nlopt.h'],
    'dirs': ['lib/pkgconfig'],
}

moduleclass = 'numlib'
