easyblock = 'ConfigureMake'

name = 'MDSplus'
version = '7.0.67'
versionsuffix = '-Java-%(javaver)s-Python-%(pyver)s'

homepage = 'http://mdsplus.org/'
description = """MDSplus is a set of software tools for data acquisition and storage and a
 methodology for management of complex scientific data."""

toolchain = {'name': 'foss', 'version': '2016a'}

source_urls = ['https://github.com/%(name)s/%(namelower)s/archive']
sources = ['stable_release-%s.zip' % version.replace('.', '-')]

dependencies = [
    ('Java', '1.7.0_79', '', True),
    ('Python', '2.7.11'),
    ('HDF5', '1.8.16'),
    ('libxml2', '2.9.3', '-Python-%(pyver)s'),
    ('zlib', '1.2.8')
]

configopts = '--with-jdk=$JAVA_HOME'

preconfigopts = 'export CFLAGS="$CFLAGS -I$EBROOTLIBXML2/include/libxml2 " && '

parallel = 1

modextravars = {
    'MDSPLUS_DIR': '%(installdir)s',
    'MDS_PATH': '%(installdir)s/tdi',
}

moduleclass = 'data'
