# IT4Innovations
# LK 2024

easyblock = 'ConfigureMake'

name = 'PRRTE'
version = '3.0.5'

homepage = 'https://docs.prrte.org/'
description = """PRRTE is the PMIx Reference RunTime Environment"""

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

source_urls = ['https://github.com/openpmix/prrte/releases/download/v%(version)s']
sources = ['%(namelower)s-%(version)s.tar.bz2']
checksums = ['75ce732b02f3bc7eff5e51b81469e4373f1effc6a42d8445e2935d3670e58c8e']

builddependencies = [('binutils', '2.39')]

dependencies = [
    ('libevent', '2.1.12'),
    ('hwloc', '2.8.0'),
    ('PMIx', '5.0.2'),
]

configopts = ' --with-libevent=$EBROOTLIBEVENT'
configopts += ' --with-hwloc=$EBROOTHWLOC --with-pmix=$EBROOTPMIX'

buildopts = 'V=1'

local_binaries = ['prte', 'prte_info', 'prterun', 'prun', 'pterm']

sanity_check_paths = {
    'files': ['bin/%s' % x for x in local_binaries] + ['lib/libprrte.%s' % SHLIB_EXT],
    'dirs': ['etc', 'include', 'share']
}

sanity_check_commands = ['%s --version' % x for x in local_binaries]

moduleclass = 'lib'
