Skip to content

[HDF] [package list]

HDF/4.2.15-cpeGNU-22.08 (HDF-4.2.15-cpeGNU-22.08.eb)

Install with the EasyBuild-user module:

eb HDF-4.2.15-cpeGNU-22.08.eb -r
To access module help after installation and get reminded for which stacks and partitions the module is installed, use module spider HDF/4.2.15-cpeGNU-22.08.

EasyConfig:

easyblock = 'ConfigureMake'

local_libjpegturbo_version = '2.1.3'         # https://github.com/libjpeg-turbo/libjpeg-turbo/releases
local_Szip_version =         '2.1.1'         # https://support.hdfgroup.org/ftp/lib-external/szip/
local_libtirpc_version =     '1.3.2'         # https://sourceforge.net/projects/libtirpc/files/libtirpc/
local_zlib_version =         '1.2.12'        # https://zlib.net/

name =    'HDF'
version = '4.2.15'

homepage = 'https://www.hdfgroup.org/products/hdf4/'

whatis = [
    'Description: HDF provides the HDF4 libraries'
]

description = """
HDF (also known as HDF4) is a library and multi-object file format for
storing and managing data between machines.

This library has been superseded by HDF5. One should not develop new
code using the HDF4 libraries as they are no longer well supported and
not further developed.

For compatibility with GDAL this library has been compiled without netcdf
and Fortran support in the shared library version.
"""

docurls = [
    'Man pages: overview man page hdf and man pages for ncdump and ncgen'    
]

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

source_urls = ['http://www.hdfgroup.org/ftp/HDF/releases/HDF%(version)s/src/']
sources = [SOURCELOWER_TAR_GZ]
checksums = [
    'dbeeef525af7c2d01539906c28953f0fdab7dba603d1bc1ec4a5af60d002c459',  # hdf-4.2.15.tar.gz
]

builddependencies = [
    ('buildtools', '%(toolchain_version)s', '', True),
]

dependencies = [
    ('libjpeg-turbo', local_libjpegturbo_version),
    ('Szip',          local_Szip_version),
    ('zlib',          local_zlib_version),
    ('libtirpc',      local_libtirpc_version),
]

preconfigopts = "LIBS='-ltirpc' "
local_common_configopts  = '--with-szlib=$EBROOTSZIP CFLAGS="$CFLAGS -I$EBROOTLIBTIRPC/include/tirpc" '
local_common_configopts += '--includedir=%(installdir)s/include/%(namelower)s '
configopts = [
    # -fallow-argument-mismatch is required to compile with GCC 10.x
    local_common_configopts + 'FFLAGS="$FFLAGS -fallow-argument-mismatch"',
    # Cannot build shared libraries and Fortran...
    # https://trac.osgeo.org/gdal/wiki/HDF#IncompatibilitywithNetCDFLibraries
    # netcdf must be disabled to allow HDF to be used by GDAL
    local_common_configopts + "--enable-shared --disable-fortran --disable-netcdf",
]

postinstallcmds = [
    'mkdir -p %(installdir)s/share/licenses/HDF && cp -f COPYING %(installdir)s/share/licenses/HDF/COPYING',
]

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

sanity_check_paths = {
    'files': ['bin/h4cc', 'bin/ncdump', 'lib/libdf.a', 'lib/libhdf4.settings', 'lib/libmfhdf.a',
              'lib/libmfhdf.%s' % SHLIB_EXT, 'share/licenses/HDF/COPYING'],
    'dirs':  ['include/hdf'],
}

sanity_check_commands = [
    "h4cc --help",
    "ncdump -V",
]

moduleclass = 'data'

[HDF] [package list]