name = 'R'
version = '3.2.1'
versionsuffix = '-bare'

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

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

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.17'),  # for plotting in R
    ('libjpeg-turbo', '1.4.1'),  # for plottting in R
    ('Java', '1.8.0_45', '', True),  # Java bindings are built if Java is found, might as well provide it
]

configopts = "--with-pic --enable-threads --enable-R-shlib"
# some recommended packages may fail in a parallel build (e.g. Matrix), and we're installing them anyway below
configopts += " --with-recommended-packages=no"

# 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 = []

moduleclass = 'lang'
