name = 'R'
version = '3.1.1'
versionsuffix = '-default-mt'

homepage = 'http://www.r-project.org/'
description = """R is a free software environment for statistical computing and graphics."""

toolchain = {'name': 'ictce', 'version': '6.2.5'}
# turn on -fpmodel=precise and -O3
toolchainopts = {'precise': True, 'opt': True}  # 'openmp' is enabled in R by default

sources = [SOURCE_TAR_GZ]
source_urls = ['http://cran.us.r-project.org/src/base/R-%(version_major)s']

dependencies = [
    ('libreadline', '6.3'),
    ('ncurses', '5.9'),
    ('libpng', '1.6.12'),  # for plotting in R
    ('libjpeg-turbo', '1.3.1'),  # for plotting in R
    ('Java', '1.7.0_60', '', True),  # Java bindings are built if Java is found, might as well provide it
]

configopts = "--with-pic --enable-threads --enable-R-shlib"

# specify that at least EasyBuild v3.5.0 is required,
# since we rely on the updated easyblock for R to configure correctly w.r.t. BLAS/LAPACK
easybuild_version = '3.5.0'

exts_list = [
    # default libraries, only here to sanity check their presence
    'base',
    'boot',
    'class',
    'cluster',
    'codetools',
    'compiler',
    'datasets',
    'foreign',
    'graphics',
    'grDevices',
    'grid',
    'KernSmooth',
    'lattice',
    'MASS',
    'Matrix',
    'methods',
    'mgcv',
    'nlme',
    'nnet',
    'parallel',
    'rpart',
    'spatial',
    'splines',
    'stats',
    'stats4',
    'survival',
    'tcltk',
    'tools',
    'translations',
    'utils',
]

moduleclass = 'lang'
