easyblock = 'CMakeMake'

name = 'PCRaster'

version = '4.3.3'

versionsuffix = '-Python-%(pyver)s'

homepage = "https://pcraster.geo.uu.nl"

description = """PCRaster is a collection of software targeted at the
development and deployment of spatio-temporal environmental models."""

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

sources = ['%(namelower)s-%(version)s.tar.bz2']
source_urls = ['http://pcraster.geo.uu.nl/pcraster/packages/src/']

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

dependencies = [
    ('Python', '3.9.6'),
    ('Qt5', '5.15.5'),
    ('Boost', '1.79.0', '', ('GCC', '11.2.0')),
    ('GDAL', '3.3.2', '', ('foss', '2021b')),
    ('Xerces-C++', '3.2.3'),
    ('ncurses', '6.2')
]

configopts = " -D Python3_EXECUTABLE=$EBROOTPYTHON/bin/python -D PYTHON_EXECUTABLE=$EBROOTPYTHON/bin/python -D PCRASTER_WITH_FLAGS_IPO=ON "

sanity_check_paths = {
    'files': ['bin/%s' % x for x in ['aguila', 'asc2map', 'col2map', 'legend', 'map2asc', 'map2col',
                                     'mapattr', 'oldcalc', 'pcrcalc', 'mf2005', 'resample', 'table']],
    'dirs': ['python/pcraster'],
}

modextrapaths = {'PYTHONPATH': ['python']}

moduleclass = 'geo'
