name = 'ROOT'
version = 'v5.34.34'
versionsuffix = '-Python-%(local_pyver)s'

homepage = 'http://root.cern.ch/drupal/'
description = """The ROOT system provides a set of OO frameworks with all the functionality
    needed to handle and analyze large amounts of data in a very efficient way."""

toolchain = {'name': 'intel', 'version': '2016a'}
toolchainopts = {'pic': True}

sources = ['%(namelower)s_%(version)s.source.tar.gz']
source_urls = ['ftp://root.cern.ch/root/']
patches = [
    'configure_FftwFromMkl_28.patch',
    'ROOT-v5_recent-ifort.patch',
    'ROOT-v5.34.26_libX.patch',
]

dependencies = [
    ('GSL', '1.16'),
    ('Mesa', '11.1.2'),
    ('libxml2', '2.9.3'),
    ('PCRE', '8.38'),
    ('CFITSIO', '3.38'),
    ('freetype', '2.6.2'),
    ('Python', '2.7.11'),
    ('zlib', '1.2.8'),
    ('libXft', '2.3.2'),
    ('libXpm', '3.5.11'),
    ('libXext', '1.3.3'),
]

# use external ZLIB
preconfigopts = 'env ZLIB=$EBROOTZLIB '

# architecture
arch = 'linuxx8664icc'

# disable features
configopts = ' --disable-xrootd --disable-mysql --disable-krb5 --disable-odbc '
configopts += ' --disable-oracle --disable-pgsql --disable-qt --disable-sqlite'
# enable features
configopts += ' --enable-unuran --enable-table --enable-explicitlink --enable-minuit2 --enable-roofit'
configopts += ' --with-gsl-incdir=$EBROOTGSL/include/gsl --with-gsl-libdir=$EBROOTGSL/lib'
configopts += ' --with-fftw3-incdir=$MKLROOT/mkl/include/fftw --with-fftw3-libdir=$MKLROOT/mkl/lib/intel64'
configopts += ' --with-xml-incdir=$EBROOTLIBXML2/include/libxml2/libxml --with-xml-libdir=$EBROOTLIBXML2/lib'
configopts += ' --with-python-libdir=$EBROOTPYTHON/lib'
configopts += ' --with-cfitsio-incdir=$EBROOTCFITSIO/include --with-cfitsio-libdir=$EBROOTCFITSIO/lib'
configopts += ' --with-opengl-incdir=$EBROOTMESA/include --with-opengl-libdir=$EBROOTMESA/lib'
configopts += ' --with-x11-libdir=$EBROOTLIBX11/lib --with-xext-libdir=$EBROOTLIBXEXT/lib'
configopts += ' --with-xft-libdir=$EBROOTLIBXFT/lib'
configopts += ' --with-xpm-incdir=$EBROOTLIBXPM/include --with-xpm-libdir=$EBROOTLIBXPM/lib'

moduleclass = 'data'
