name = "medfile"
easyblock = "ConfigureMake"
version = "4.1.1"

homepage = 'https://www.salome-platform.org'
description = """The MED file format is a specialization of the HDF5
standard."""

source_urls = ['https://files.salome-platform.org/Salome/other']
sources = ['med-%(version)s.tar.gz']
checksums = [
    ('sha256', 'dc2b5d54ebf0666e3ff2e974041d2ab0da906061323537023ab165d573389dd0')
]

toolchain = {
    'name': 'foss',
    'version': '2022b'
}

toolchainopts = {'pic': True}

dependencies = [
    ('HDF5', '1.10.3'),
    ('Python', '3.10.8')
]
builddependencies = [('CMake', '3.24.3')]

preconfigopts = 'FFLAGS="-g -O2 -ffixed-line-length-none -fdefault-integer-8"'
preconfigopts += ' FCFLAGS=-fdefault-integer-8'

configopts = ' CFLAGS=-m64 CXXFLAGS=-m64'
configopts += ' --enable-python=yes'
configopts += ' --enable-mesgerr'
configopts += " --with-hdf5=${EBROOTHDF5}"

# No parallel
configopts += ' --with-swig=no'

moduleclass = 'data'
