name = 'MPI_NET'
version = '1.2.0'

easyblock = 'ConfigureMake'

homepage = 'http://www.osl.iu.edu/research/mpi.net/'
description = """MPI.NET is a high-performance, easy-to-use implementation of the Message Passing Interface (MPI)
for Microsoft's .NET environment"""

toolchain = {'name': 'intel', 'version': '2017b'}

dependencies = [('Mono', '5.0.0.100', '', True)]

patches = [('mpi.net-1.2.0-unsafe.patch', 1),
           ('configure.ac.patch')
           ]

preconfigopts = 'sh ./autogen.sh && '

prebuildopts = 'cd MPI && perl ./Unsafe.pl $EBROOTIMPI/include64/mpi.h ./Unsafe.cs CustomUnsafe.cs cbridge.c && cd .. && '

sources = ['%(version)s.tar.gz']
source_urls = ['https://github.com/jmp75/MPI.NET/archive/']

sanity_check_paths = {
    'files': ['lib/MPI.dll'],
    'dirs': ['lib'],
}

maxparallel = 4

moduleclass = 'mpi'