# This file is an EasyBuild reciPY as per https://github.com/easybuilders/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': '2017a'}

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

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'
