easyblock = 'ConfigureMake'

name = 'HDF'
version = '4.2.13'

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': '6.4.0'}
toolchainopts = {'pic': True}

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

builddependencies = [
    ('binutils', '2.28'),
    ('Bison', '3.0.4'),
    ('flex', '2.6.4'),
]

dependencies = [
    ('libjpeg-turbo', '1.5.2'),
    ('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'
