# IT4Innovations 
# LK 2023

easyblock = 'Tarball'

name = 'OVITO'
version = '3.9.2'
versionsuffix = '-pro'

homepage = 'https://www.ovito.org/'
description = """OVITO is a scientific visualization and analysis software for atomistic and particle simulation data."""

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

source_urls = ['https://www.ovito.org/download/master/']
sources = ['ovito-pro-%(version)s-x86_64.tar.xz']
checksums = ['ff09f2e19288dd58c3affcf7f35090446275dc65493364da0f8c5478d8306c40']

dependencies = [
    ('Qt5', '5.15.7'),
]

import os
if os.environ.get("CLUSTERNAME") in ["BARBORA"]:
    postinstallcmds = [
        'rm %(installdir)s/lib/ovito/libcrypto.so.1.1',
        'ln -s /lib64/libcrypto.so.1.1 %(installdir)s/lib/ovito/',
]

sanity_check_paths = {
    'files': ['bin/ovito', 'bin/ovitos', 'bin/qt.conf'],
    'dirs': ['bin', 'include', 'lib', 'share'],
}

#sanity_check_commands = ['ovito --nogui --noviewports --help']

modextravars = {
    'OVITO_LICENSING_VERBOSE': '1',
}

moduleclass = 'vis'