# IT4Innovations 2019

name = 'OpenFOAM'
version = '6'

homepage = 'http://www.openfoam.org/'
description = """OpenFOAM is a free, open source CFD software package.
 OpenFOAM has an extensive range of features to solve anything from local_complex fluid flows
 involving chemical reactions, turbulence and heat transfer,
 to solid dynamics and electromagnetics."""

toolchain = {'name': 'foss', 'version': '2018a'}
toolchainopts = {'cstd': 'c++11'}

source_urls = [
    'https://github.com/OpenFOAM/OpenFOAM-%(version_major)s/archive']
sources = ['version-%(version)s.tar.gz']
patches = ['OpenFOAM-%(version)s-cleanup.patch']
checksums = [
    '32a6af4120e691ca2df29c5b9bd7bc7a3e11208947f9bccf6087cfff5492f025',  # version-6.tar.gz
    '5accbde6bde116691ea6a4666348f85487b5d5503a9761435c2cb1412b036c28',
    # OpenFOAM-6-cleanup.patch
]

dependencies = [
    ('libreadline', '7.0', '', True),
    ('ncurses', '6.1', '', True),
    # OpenFOAM requires 64 bit METIS using 32 bit indexes (array indexes)
    ('METIS', '5.1.0', '', True),
    ('SCOTCH', '6.0.6'),
    ('CGAL', '4.11.1'),
    ('ParaView', '5.4.1', '-mpi'),
]

builddependencies = [
    ('Bison', '3.0.5', '', True),
    ('CMake', '3.13.1', '', True),
    ('flex', '2.6.4', '', True),
]

modextrapaths = {'PATH': 'OpenFOAM-%(version)s/bin'}

moduleclass = 'cae'