easyblock = 'ConfigureMake'

name = 'Voro++'
version = '0.4.6'

homepage = 'http://math.lbl.gov/voro++/'
description = """Voro++ is a software library for carrying out three-dimensional computations of the Voronoi tessellation.
A distinguishing feature of the Voro++ library is that it carries out cell-based calculations, computing the Voronoi cell
for each particle individually. It is particularly well-suited for applications that rely on cell-based statistics,
where features of Voronoi cells (eg. volume, centroid, number of faces) can be used to analyze a system of particles."""

toolchain = {'name': 'intel', 'version': '2016a'}
toolchainopts = {'pic': True}

sources = [SOURCELOWER_TAR_GZ]
source_urls = ['http://math.lbl.gov/voro++/download/dir/']

# Let's store the checksum in order to be sure it doesn't suddenly change
checksums = ['2338b824c3b7b25590e18e8df5d68af9']

# No configure
skipsteps = ['configure']

# Override CXX and CFLAGS variables from Makefile
buildopts = 'CXX="$CXX" CFLAGS="$CXXFLAGS"'

# Override PREFIX variable from Makefile
installopts = "PREFIX=%(installdir)s"

sanity_check_paths = {
    'files': ['bin/voro++', 'lib/libvoro++.a', 'include/voro++/voro++.hh'],
    'dirs': [],
}

modextrapaths = {'CPATH': 'include/voro++'}

moduleclass = 'math'
