# Built with EasyBuild version 2.1.1 on 2015-06-30_13-50-57
easyblock = 'ConfigureMake'

name = 'Octave'
version = '4.0.1'

homepage = 'http://www.gnu.org/software/octave/'
description = """GNU Octave is a high-level interpreted language, primarily intended for numerical local_computations."""

toolchain = {'name': 'intel', 'version': '2016.01'}

source_urls = [GNU_SOURCE]
sources = [SOURCELOWER_TAR_GZ]

osdependencies = ['gnuplot', 'texinfo-tex', 'texlive-dvips']

dependencies = [
    ('PCRE', '8.36'),
    ('ncurses', '5.9'),
    ('libreadline', '6.3'),
]

configopts = '--with-blas="-lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -lpthread -lm" '
configopts += '--with-lapack="-lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -lpthread -lm" '
configopts += '--without-umfpack --without-cxsparse --without-colamd --without-ccolamd --without-qrupdate '
configopts += '--without-camd  --without-amd --without-arpack --without-qhull'

# Because of missing man pages (non-standard location)
postinstallcmds = [
    'mkdir -p %(installdir)s/share/man/man1',
    'cp doc/interpreter/*.1 %(installdir)s/share/man/man1'
]
modextrapaths = {'MANPATH': 'share/man'}

sanity_check_paths = {
    'files': ['bin/octave'],
    'dirs': []
}

sanity_check_commands = [('octave', '--eval "1+2"')]

moduleclass = 'math'
