name = 'g2lib'
version = '3.2.0'

homepage = 'https://www.nco.ncep.noaa.gov/pmb/codes/GRIB2/'
description = """Library contains GRIB2 encoder/decoder and search/indexing routines."""

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

source_urls = [homepage]
sources = ['%(name)s-%(version)s.tar']
patches = [
    '%(name)s-%(version)s_makefile.patch',
]
checksums = [
    '9d3866de32e13e80798bfb08dbbea9223f32cec3fce3c57b6838e76f27d5a1d3',  # g2lib-3.2.0.tar
    'e434394a6ec8bd68dbd57e3fdb44c47372b07380e362ed955bb038b78dd81812',  # g2lib-3.2.0_makefile.patch
]

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

dependencies = [
    ('JasPer', '4.2.4'),
    ('libpng', '1.6.43'),
]

buildopts = 'CFLAGS="$CFLAGS -DLINUXG95 -D__64BIT__" FC=$FC CC=$CC '
buildopts += 'FFLAGS="$FFLAGS -fno-range-check -fallow-invalid-boz -fallow-argument-mismatch -I."'

# parallel build tends to fail
maxparallel = 1

moduleclass = 'data'
