easyblock = 'CMakeMake'

name = 'g2clib'
version = '1.7.0'

homepage = 'https://github.com/NOAA-EMC/NCEPLIBS-g2c'
description = """Library contains GRIB2 encoder/decoder ('C' version)."""

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

source_urls = ['https://github.com/NOAA-EMC/NCEPLIBS-g2c/archive/refs/tags/']
sources = ['v%(version)s.tar.gz']
checksums = ['73afba9da382fed73ed8692d77fa037bb313280879cd4012a5e5697dccf55175']

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

dependencies = [
    ('JasPer', '4.0.0'),
    ('libpng', '1.6.38'),
    ('libjpeg-turbo', '2.1.4'),
]

sanity_check_paths = {
    'files': ['lib/libg2c.%s' % SHLIB_EXT],
    'dirs': ['include'],
}

moduleclass = 'data'
