easyblock = 'ConfigureMake'

name = 'HDF'
version = '4.2.14'

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': 'GCCcore', 'version': '7.3.0'}
toolchainopts = {'pic': True}

source_urls = ['http://www.hdfgroup.org/ftp/HDF/releases/HDF%(version)s/src/']
sources = [SOURCELOWER_TAR_GZ]
checksums = ['2d383e87c8a0ca6a5352adbd1d5546e6cc43dc21ff7d90f93efa644d85c0b14a']

builddependencies = [
    ('binutils', '2.30'),
    ('Bison', '3.0.5'),
    ('flex', '2.6.4'),
]

dependencies = [
    ('libjpeg-turbo', '2.0.0'),
    ('Szip', '2.1.1'),
    ('zlib', '1.2.11'),
]

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

modextrapaths = {'CPATH': 'include/hdf'}

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

moduleclass = 'data'
