easyblock = 'CMakeMake'

name = 'Qhull'
version = '2015.2'

homepage = 'http://www.qhull.org'

description = """
 Qhull computes the convex hull, Delaunay triangulation, Voronoi diagram,
 halfspace intersection about a point, furthest-site Delaunay triangulation,
 and furthest-site Voronoi diagram. The source code runs in 2-d, 3-d, 4-d, and
 higher dimensions. Qhull implements the Quickhull algorithm for computing the
 convex hull.
"""

toolchain = {'name': 'GCCcore', 'version': '6.4.0'}
toolchainopts = {'pic': True}

source_urls = ['http://www.qhull.org/download/']
sources = ['%(namelower)s-%(version_major)s-src-7.%(version_minor)s.0.tgz']
checksums = ['78b010925c3b577adc3d58278787d7df08f7c8fb02c3490e375eab91bb58a436']

patches = [
    'Qhull-%(version)s-intel-fix.patch',
    'Qhull_pkgconfig.patch',
]

builddependencies = [
    ('binutils', '2.28'),
    ('CMake', '3.9.1'),
]

sanity_check_paths = {
    'files': ['bin/qhull', 'lib/libqhull.%s' % SHLIB_EXT,
              'lib/pkgconfig/qhull.pc'],
    'dirs': [],
}

modextrapaths = {
    'CPATH': ['qhull/include'],
}

parallel = 1

moduleclass = 'math'
