# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild
# Author: Pablo Escobar Lopez
# Swiss Institute of Bioinformatics
# Biozentrum - University of Basel

easyblock = 'ConfigureMake'

name = 'JAGS'
version = '4.2.0'

homepage = 'http://mcmc-jags.sourceforge.net/'
description = """JAGS is Just Another Gibbs Sampler.  It is a program for analysis 
 of Bayesian hierarchical models using Markov Chain Monte Carlo (MCMC) simulation  """

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

source_urls = [('http://sourceforge.net/projects/mcmc-jags/files/JAGS/%(version_major)s.x/Source/', 'download')]
sources = [SOURCE_TAR_GZ]

configopts = ' --with-blas="-lmkl" --with-lapack="-lmkl" '

sanity_check_paths = {
    'files': ["bin/jags", "libexec/jags-terminal", "lib/libjags.%s" % SHLIB_EXT],
    'dirs': []
}

modextrapaths = {
    'JAGS_INCLUDE': 'include/JAGS',
    'JAGS_LIB': 'lib',
}

moduleclass = 'math'
