easyblock = 'ConfigureMake'

name = 'HDF'
version = '4.2.7-patch1'

homepage = 'http://www.hdfgroup.org/products/hdf4/'
description = """HDF (also known as HDF4) is a library and multi-object file format for storing
 and managing data between machines."""

toolchain = {'name': 'ictce', 'version': '3.2.2.u3'}
toolchainopts = {'opt': True, 'pic': True}

dependencies = [
    ('flex', '2.5.35'),
    ('Bison', '2.5'),
    ('Szip', '2.1'),
    ('JasPer', '1.900.1'),
]

sources = [SOURCELOWER_TAR_GZ]
source_urls = ['http://www.hdfgroup.org/ftp/HDF/releases/HDF%s/src/' % version.split('-')[0]]

configopts = "--with-szlib=$EBROOTSZIP --includedir=%(installdir)s/include/%(namelower)s"

sanity_check_paths = {
    'files': ['lib/libdf.a', 'lib/libhdf4.settings', 'lib/libmfhdf.a'],
    'dirs': ['bin', 'include/hdf'],
}

moduleclass = 'data'
