easyblock = 'ConfigureMake'

name = 'h5utils'
version = '1.12.1'

homepage = 'http://ab-initio.mit.edu/wiki/index.php/H5utils'
description = """h5utils is a set of utilities for visualization and conversion of scientific data in the free, portable
 HDF5 format. Besides providing a simple tool for batch visualization as PNG images, h5utils also includes programs to
 convert HDF5 datasets into the formats required by other free visualization software (e.g. plain text, Vis5d, and VTK)."""

source_urls = ['http://ab-initio.mit.edu/h5utils/']
sources = [SOURCELOWER_TAR_GZ]

patches = ['libpng1.5_fix.patch']

toolchain = {'name': 'ictce', 'version': '4.0.6'}
toolchainopts = {'usempi': True}

dependencies = [
    ('zlib', '1.2.7'),
    ('libpng', '1.5.11'),
    ('libmatheval', '1.1.8'),
    ('HDF5', '1.8.7'),
]

sanity_check_paths = {
    'files': ['bin/%s' % x for x in ['h5fromtxt', 'h5math', 'h5topng', 'h5totxt', 'h5tovtk']],
    'dirs': ['share/h5utils/colormaps']
}

moduleclass = 'data'
