# IT4Innovations
# LK 2021

easyblock = 'CMakeMake'

name = 'OpenCoarrays'
version = '2.9.2'

homepage = 'https://github.com/sourceryinstitute/opencoarrays'
description = """OpenCoarrays is an open-source software project that supports
the coarray Fortran (CAF) parallel programming features of the Fortran 2008
standard and several features proposed for Fortran 2015 in the draft Technical
Specification TS 18508 Additional Parallel Features in Fortran."""

toolchain = {'name': 'gompi', 'version': '2020b'}
toolchainopts = {'pic': True}

source_urls = ['https://github.com/sourceryinstitute/opencoarrays/releases/download/%(version)s']
sources = [SOURCE_TAR_GZ]
patches = ['OpenCoarrays-2.2.0-cafrun-OpenMPI-mpiexec.patch']
checksums = [
    '6c200ca49808c75b0a2dfa984304643613b6bc77cc0044bee093f9afe03698f7',  # OpenCoarrays-2.9.2.tar.gz
    # OpenCoarrays-2.2.0-cafrun-OpenMPI-mpiexec.patch
    '5d410cc78c80dfa54237f874a0627260ad0b4b2f272d8f0f9ce317375bcc796f',
]

separate_build_dir = True

builddependencies = [('CMake', '3.18.4')]

sanity_check_paths = {
    'files': ['bin/caf', 'bin/cafrun', 'include/opencoarrays.mod', ('lib/libcaf_mpi.a', 'lib64/libcaf_mpi.a')],
    'dirs': [],
}

moduleclass = 'mpi'
