easyblock = 'ConfigureMake'

name = 'problog'
version = '1.1'

homepage = 'http://dtai.cs.kuleuven.be/problog/problog1.html'
description = "ProbLog is a probabilistic Prolog, a probabilistic logic programming language."

toolchain = {'name': 'ictce', 'version': '5.3.0'}

source_urls = [
    'http://dtai.cs.kuleuven.be/problog/files/',  # problog
    'http://www.cs.kuleuven.be/~theo/tools/',  # SimpleCUDD
]
sources = [
    SOURCE_TGZ,
    'SimpleCUDD.tar.gz',  # no version number?!
]

patches = [('SimpleCUDD-hardcoding.patch', '..')]

skipsteps = ['configure', 'install']

prebuildopts = 'ln -s ../simplecudd && '
buildopts = 'CC="$CC" CPP="$CXX" && mkdir -p %(installdir)s/bin && cp ProblogBDD %(installdir)s/bin'

parallel = 1

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

moduleclass = 'lang'
