easyblock = 'CMakeMake'

name = 'TetGen'
version = '1.5.0'

homepage = 'http://wias-berlin.de/software/index.jsp?id=TetGen'
description = """ A Quality Tetrahedral Mesh Generator and a 3D Delaunay Triangulator """

toolchain = {'name': 'GCCcore', 'version': '6.4.0'}

source_urls = ['https://github.com/ufz/tetgen/archive']
sources = ['%(version)s.tar.gz']
checksums = ['791dfc6d8bf7bf2496f10da1d6d649db5e2fb12267d7911e21f4f335f374698e']

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

separate_build_dir = True

skipsteps = ['install']

postinstallcmds = [
    'mkdir -p %(installdir)s/bin/ && cp tetgen %(installdir)s/bin/',
    'mkdir -p %(installdir)s/lib/ && cp libtet.a %(installdir)s/lib/',
]

sanity_check_paths = {
    'files': ['bin/tetgen', 'lib/libtet.a'],
    'dirs': [],
}

moduleclass = 'numlib'
