name = 'R'
version = '3.1.2'

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

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

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

preconfigopts = 'BLAS_LIBS="$LIBBLAS_MT" LAPACK_LIBS="$LIBLAPACK_MT"'
configopts = "--with-lapack --with-blas --with-pic --enable-threads --with-x=no --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"

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

name_tmpl = '%(name)s_%(version)s.tar.gz'
ext_options = {
    'source_urls': [
        # package archive
        'http://cran.r-project.org/src/contrib/Archive/%(name)s',
        'http://cran.r-project.org/src/contrib/',  # current version of packages
        # mirror alternative for current packages
        'http://cran.freestatistics.org/src/contrib',
    ],
    'source_tmpl': name_tmpl,
}
# Bioconductor packages have a different download url
bioconductor_options = {
    'source_urls': [
        'http://www.bioconductor.org/packages/release/bioc/src/contrib/',
        'http://www.bioconductor.org/packages/release/data/annotation/src/contrib/',
        'http://www.bioconductor.org/packages/release/data/experiment/src/contrib/',
        'http://www.bioconductor.org/packages/3.0/bioc/src/contrib/',
        'http://www.bioconductor.org/packages/3.0/data/annotation/src/contrib/',
        'http://www.bioconductor.org/packages/3.0/data/experiment/src/contrib/',
    ],
    'source_tmpl': name_tmpl,
}

# !! order of packages is important !!
# packages updated on January 8th 2015
exts_list = [
    # default libraries, only here to sanity check their presence
    'base',
    'datasets',
    'graphics',
    'grDevices',
    'grid',
    'methods',
    'splines',
    'stats',
    'stats4',
    'tools',
    'utils',
    # non-standard libraries, should be specified with fixed versions!
    ('Rmpi', '0.6-5', dict(ext_options.items() +
                           [('patches', ['Rmpi-0.6-5_impi5.patch'])])),
    ('abind', '1.4-0', ext_options),
    ('magic', '1.5-6', ext_options),
    ('geometry', '0.3-4', dict(ext_options.items() +
                               [('patches', ['geometry-0.3-4-icc.patch'])])),
    ('bit', '1.1-12', ext_options),
    ('filehash', '2.2-2', ext_options),
    ('ff', '2.2-13', ext_options),
    ('bnlearn', '3.6', ext_options),
    ('bootstrap', '2014.4', ext_options),
    ('combinat', '0.0-8', ext_options),
    ('deal', '1.2-37', ext_options),
    ('fdrtool', '1.2.13', ext_options),
    ('formatR', '1.0', ext_options),
    ('gtools', '3.4.1', ext_options),
    ('gdata', '2.13.3', ext_options),
    ('GSA', '1.03', ext_options),
    ('highr', '0.4', ext_options),
    ('infotheo', '1.2.0', ext_options),
    ('lars', '1.2', ext_options),
    ('lazy', '1.2-15', ext_options),
    ('kernlab', '0.9-19', ext_options),
    ('mime', '0.2', ext_options),
    ('markdown', '0.7.4', ext_options),
    ('mlbench', '2.1-1', ext_options),
    ('NLP', '0.1-5', ext_options),
    ('mclust', '4.4', ext_options),
    ('RANN', '2.4.1', ext_options),
    ('rmeta', '2.16', ext_options),
    ('segmented', '0.5-1.0', ext_options),
    ('som', '0.3-5', ext_options),
    ('SuppDists', '1.1-9.1', ext_options),
    ('stabledist', '0.6-6', ext_options),
    ('survivalROC', '1.0.3', ext_options),
    ('pspline', '1.0-16', ext_options),
    ('timeDate', '3011.99', ext_options),
    ('longmemo', '1.0-0', ext_options),
    ('ADGofTest', '0.3', ext_options),
    ('ade4', '1.6-2', ext_options),
    ('AlgDesign', '1.1-7.3', ext_options),
    ('base64enc', '0.1-2', ext_options),
    ('BH', '1.55.0-3', ext_options),
    ('brew', '1.0-6', ext_options),
    ('Brobdingnag', '1.2-4', ext_options),
    ('corpcor', '1.6.7', ext_options),
    ('longitudinal', '1.1.10', ext_options),
    ('checkmate', '1.5.1', ext_options),
    ('cubature', '1.1-2', ext_options),
    ('DEoptimR', '1.0-2', ext_options),
    ('digest', '0.6.8', ext_options),
    ('fastmatch', '1.0-4', ext_options),
    ('ffbase', '0.11.3', ext_options),
    ('iterators', '1.0.7', ext_options),
    ('maps', '2.3-9', ext_options),
    ('nnls', '1.4', ext_options),
    ('sendmailR', '1.2-1', ext_options),
    ('spam', '1.0-1', ext_options),
    ('subplex', '1.1-4', ext_options),
    ('stringr', '0.6.2', ext_options),
    ('evaluate', '0.5.5', ext_options),
    ('logspline', '2.1.5', ext_options),
    ('ncbit', '2013.03.29', ext_options),
    ('permute', '0.8-3', ext_options),
    ('plotrix', '3.5-10', ext_options),
    ('randomForest', '4.6-10', ext_options),
    ('scatterplot3d', '0.3-35', ext_options),
    ('SparseM', '1.6', ext_options),
    ('tripack', '1.3-6', ext_options),
    ('irace', '1.06', ext_options),
    ('rJava', '0.9-6', ext_options),
    ('lattice', '0.20-29', ext_options),
    ('RColorBrewer', '1.1-2', ext_options),
    ('latticeExtra', '0.6-26', ext_options),
    ('Matrix', '1.1-4', ext_options),
    ('png', '0.1-7', ext_options),
    ('Rcpp', '0.11.3', ext_options),
    ('RcppArmadillo', '0.4.600.0', ext_options),
    ('plyr', '1.8.1', ext_options),
    ('pROC', '1.7.3', ext_options),
    ('quadprog', '1.5-5', ext_options),
    ('BB', '2014.10-1', ext_options),
    ('BBmisc', '1.8', ext_options),
    ('fail', '1.2', ext_options),
    ('rlecuyer', '0.3-3', ext_options),
    ('snow', '0.3-13', ext_options),
    ('MASS', '7.3-35', ext_options),
    ('tree', '1.0-35', ext_options),
    ('pls', '2.4-3', ext_options),
    ('class', '7.3-11', ext_options),
    ('e1071', '1.6-4', ext_options),
    ('nnet', '7.3-8', ext_options),
    ('car', '2.0-22', ext_options),
    ('colorspace', '1.2-4', ext_options),
    ('robustbase', '0.92-2', ext_options),
    ('sp', '1.0-17', ext_options),
    ('vcd', '1.3-2', ext_options),
    ('snowfall', '1.84-6', ext_options),
    ('rpart', '4.1-8', ext_options),
    ('mice', '2.22', ext_options),
    ('nlme', '3.1-118', ext_options),
    ('urca', '1.2-8', ext_options),
    ('fracdiff', '1.4-2', ext_options),
    ('mgcv', '1.8-4', ext_options),
    ('logistf', '1.21', ext_options),
    ('akima', '0.5-11', ext_options),
    ('bitops', '1.0-6', ext_options),
    ('boot', '1.3-13', ext_options),
    ('mixtools', '1.0.2', ext_options),
    ('cluster', '1.15.3', ext_options),
    ('gclus', '1.3.1', ext_options),
    ('coda', '0.16-1', ext_options),
    ('codetools', '0.2-9', ext_options),
    ('foreach', '1.4.2', ext_options),
    ('doMC', '1.3.3', ext_options),
    ('DBI', '0.3.1', ext_options),
    ('foreign', '0.8-62', ext_options),
    ('survival', '2.37-7', ext_options),
    ('gam', '1.09.1', ext_options),
    ('gamlss.data', '4.2-7', ext_options),
    ('gamlss.dist', '4.3-1', ext_options),
    ('hwriter', '1.3.2', ext_options),
    ('KernSmooth', '2.23-13', ext_options),
    ('zoo', '1.7-11', ext_options),
    ('xts', '0.9-7', ext_options),
    ('TTR', '0.22-0', ext_options),
    ('quantmod', '0.4-3', ext_options),
    ('lmtest', '0.9-33', ext_options),
    ('mnormt', '1.5-1', ext_options),
    ('mvtnorm', '1.0-2', ext_options),
    ('pcaPP', '1.9-60', ext_options),
    ('numDeriv', '2012.9-1', ext_options),
    ('lava', '1.3', ext_options),
    ('prodlim', '1.5.1', ext_options),
    ('pscl', '1.4.6', ext_options),
    ('RSQLite', '1.0.0', ext_options),
    ('BatchJobs', '1.5', ext_options),
    ('sandwich', '2.3-2', ext_options),
    ('sfsmisc', '1.0-27', ext_options),
    ('spatial', '7.3-8', ext_options),
    ('VGAM', '0.9-6', ext_options),
    ('waveslim', '1.7.3', ext_options),
    ('xtable', '1.7-4', ext_options),
    ('profileModel', '0.5-9', ext_options),
    ('brglm', '0.5-9', ext_options),
    ('deSolve', '1.11', ext_options),
    ('tseriesChaos', '0.1-13', ext_options),
    ('tseries', '0.10-32', ext_options),
    ('fastICA', '1.2-0', ext_options),
    ('R.methodsS3', '1.6.1', ext_options),
    ('R.oo', '1.18.0', ext_options),
    ('cgdsr', '1.1.33', ext_options),
    ('R.utils', '1.34.0', ext_options),
    ('R.matlab', '3.1.1', ext_options),
    ('BiocGenerics', '0.12.1', bioconductor_options),
    ('Biobase', '2.26.0', bioconductor_options),
    ('S4Vectors', '0.4.0', bioconductor_options),
    ('IRanges', '2.0.1', bioconductor_options),
    ('GenomeInfoDb', '1.2.4', bioconductor_options),
    ('AnnotationDbi', '1.28.1', bioconductor_options),
    ('XVector', '0.6.0', bioconductor_options),
    ('zlibbioc', '1.12.0', bioconductor_options),
    ('Biostrings', '2.34.1', bioconductor_options),
    ('GenomicRanges', '1.18.4', bioconductor_options),
    ('Rsamtools', '1.18.2', bioconductor_options),
    ('BiocParallel', '1.0.2', bioconductor_options),
    ('GenomicAlignments', '1.2.1', bioconductor_options),
    ('ShortRead', '1.24.0', bioconductor_options),
    ('graph', '1.44.1', bioconductor_options),
    ('gbm', '2.1', ext_options),
    ('dichromat', '2.0-0', ext_options),
    ('Formula', '1.1-2', ext_options),
    ('acepack', '1.3-3.3', ext_options),
    ('Hmisc', '3.14-6', ext_options),
    ('munsell', '0.4.2', ext_options),
    ('labeling', '0.3', ext_options),
    ('scales', '0.2.4', ext_options),
    ('fastcluster', '1.1.15', ext_options),
    ('reshape2', '1.4.1', ext_options),
    ('chron', '2.3-45', ext_options),
    ('data.table', '1.9.4', ext_options),
    ('gtable', '0.1.2', ext_options),
    ('proto', '0.3-10', ext_options),
    ('ggplot2', '1.0.0', ext_options),
    ('igraph', '0.7.1', ext_options),
    ('GeneNet', '1.2.11', ext_options),
    ('ape', '3.2', ext_options),
    ('htmltools', '0.2.6', ext_options),
    ('RJSONIO', '1.3-0', ext_options),
    ('caTools', '1.17.1', ext_options),
    ('gplots', '2.16.0', ext_options),
    ('ROCR', '1.0-5', ext_options),
    ('httpuv', '1.3.2', ext_options),
    ('R6', '2.0.1', ext_options),
    ('shiny', '0.10.2.2', ext_options),
    ('adegenet', '1.4-2', ext_options),
    ('phylobase', '0.6.8', ext_options),
    ('adephylo', '1.1-6', ext_options),
    ('animation', '2.3', ext_options),
    ('bigmemory.sri', '0.1.3', ext_options),
    ('bigmemory', '4.4.6', ext_options),
    ('calibrate', '1.7.2', ext_options),
    ('clusterGeneration', '1.3.1', ext_options),
    ('raster', '2.3-12', ext_options),
    ('dismo', '1.0-5', ext_options),
    ('expm', '0.99-1.1', ext_options),
    ('extrafontdb', '1.0', ext_options),
    ('Rttf2pt1', '1.3.2', ext_options),
    ('extrafont', '0.17', ext_options),
    ('fields', '7.1', ext_options),
    ('shapefiles', '0.7', ext_options),
    ('fossil', '0.3.7', ext_options),
    ('geiger', '2.0.3', ext_options),
    ('glmnet', '1.9-8', ext_options),
    ('labdsv', '1.6-1', ext_options),
    ('MatrixModels', '0.3-1.1', ext_options),
    ('stabs', '0.5-0', ext_options),
    ('mboost', '2.4-1', ext_options),
    ('msm', '1.5', ext_options),
    ('nor1mix', '1.2-0', ext_options),
    ('np', '0.60-2', ext_options),
    ('polynom', '1.3-8', ext_options),
    ('quantreg', '5.05', ext_options),
    ('RcppEigen', '0.3.2.3.0', ext_options),
    ('polspline', '1.1.9', ext_options),
    ('TH.data', '1.0-6', ext_options),
    ('multcomp', '1.3-8', ext_options),
    ('rms', '4.2-1', ext_options),
    ('RWekajars', '3.7.11-1', ext_options),
    ('RWeka', '0.4-23', ext_options),
    ('slam', '0.1-32', ext_options),
    ('tm', '0.6', ext_options),
    ('TraMineR', '1.8-8', ext_options),
    ('chemometrics', '1.3.8', ext_options),
    ('FNN', '1.1', ext_options),
    ('ipred', '0.9-3', ext_options),
    ('knitr', '1.8', ext_options),
    ('statmod', '1.4.20', ext_options),
    ('miscTools', '0.6-16', ext_options),
    ('maxLik', '1.2-4', ext_options),
    ('mlogit', '0.2-4', ext_options),
    ('getopt', '1.20.0', ext_options),
    ('gsalib', '2.1', ext_options),
    ('reshape', '0.8.5', ext_options),
    ('optparse', '1.3.0', ext_options),
    ('klaR', '0.6-12', ext_options),
    ('neuRosim', '0.2-12', ext_options),
    ('affyio', '1.34.0', bioconductor_options),
    ('BiocInstaller', '1.16.1', bioconductor_options),
    ('preprocessCore', '1.28.0', bioconductor_options),
    ('affy', '1.44.0', bioconductor_options),
    ('GO.db', '3.0.0', bioconductor_options),
    ('limma', '3.22.4', bioconductor_options),
    ('RBGL', '1.42.0', bioconductor_options),
    ('org.Hs.eg.db', '3.0.0', bioconductor_options),
    ('AnnotationForge', '1.8.2', bioconductor_options),
    ('KEGG.db', '3.0.0', bioconductor_options),
    ('annaffy', '1.38.0', bioconductor_options),
    ('gcrma', '2.38.0', bioconductor_options),
    ('oligoClasses', '1.28.0', bioconductor_options),
    ('edgeR', '3.8.5', bioconductor_options),
    ('PFAM.db', '3.0.0', bioconductor_options),
    ('locfit', '1.5-9.1', ext_options),
    ('gridExtra', '0.9.1', ext_options),
    ('GGally', '0.5.0', ext_options),
    ('baySeq', '2.0.50', bioconductor_options),
    ('beanplot', '1.2', ext_options),
    ('clValid', '0.6-6', ext_options),
    ('qvalue', '1.40.0', bioconductor_options),
    ('impute', '1.40.0', bioconductor_options),
    ('matrixStats', '0.12.2', ext_options),
    ('samr', '2.0', ext_options),
    ('DEGseq', '1.20.0', bioconductor_options),
    ('DiscriMiner', '0.1-29', ext_options),
    ('ellipse', '0.3-8', ext_options),
    ('leaps', '2.9', ext_options),
    ('FactoMineR', '1.28', ext_options),
    ('modeltools', '0.2-21', ext_options),
    ('flexclust', '1.3-4', ext_options),
    ('flexmix', '2.3-12', ext_options),
    ('prabclus', '2.2-6', ext_options),
    ('diptest', '0.75-6', ext_options),
    ('trimcluster', '0.1-2', ext_options),
    ('fpc', '2.1-9', ext_options),
    ('BiasedUrn', '1.06.1', ext_options),
    ('hgu133plus2.db', '3.0.0', bioconductor_options),
    ('TeachingDemos', '2.9', ext_options),
    ('jsonlite', '0.9.14', ext_options),
    ('kohonen', '2.0.15', ext_options),
    ('base64', '1.1', ext_options),
    ('illuminaio', '0.8.0', bioconductor_options),
    ('registry', '0.2', ext_options),
    ('pkgmaker', '0.22', ext_options),
    ('rngtools', '1.2.4', ext_options),
    ('doRNG', '1.6', ext_options),
    ('bumphunter', '1.6.0', bioconductor_options),
    ('multtest', '2.22.0', bioconductor_options),
    ('siggenes', '1.40.0', bioconductor_options),
    ('nleqslv', '2.5', ext_options),
    ('DynDoc', '1.44.0', bioconductor_options),
    ('genoset', '1.20.0', bioconductor_options),
    ('RGCCA', '2.0', ext_options),
    ('pheatmap', '0.7.7', ext_options),
    ('multtest', '2.22.0', bioconductor_options),
    ('NOISeq', '2.8.0', bioconductor_options),
    ('openxlsx', '2.2.1', ext_options),
    ('Rgraphviz', '2.10.0', bioconductor_options),
    ('pvclust', '1.3-2', ext_options),
    ('RCircos', '1.1.2', ext_options),
    ('reshape', '0.8.5', ext_options),
    ('RNASeqPower', '1.6.0', bioconductor_options),
    ('VennDiagram', '1.6.9', ext_options),
    ('xlsxjars', '0.6.1', ext_options),
    ('xlsx', '0.5.7', ext_options),
]

moduleclass = 'lang'
