easyblock = 'ConfigureMake'

name = 'libdap'
version = '3.20.7'

homepage = 'https://www.opendap.org/software/libdap'
description = """A C++ SDK which contains an implementation of DAP 2.0 and
 DAP4.0. This includes both Client- and Server-side support classes."""

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

source_urls = ['https://www.opendap.org/pub/source/']
sources = [SOURCE_TAR_GZ]
checksums = ['6856813d0b29e70a36e8a53e9cf20ad680d21d615952263e9c6586704539e78c']

builddependencies = [
    ('binutils', '2.36.1'),
    ('Bison', '3.7.6'),
    ('flex', '2.6.4'),
]

dependencies = [
    ('cURL', '7.76.0'),
    ('libxml2', '2.9.10'),
    ('libtirpc', '1.3.2'),
    ('PCRE', '8.44'),
    ('util-linux', '2.36'),
]

configopts = 'TIRPC_LIBS="-ltirpc"'

sanity_check_paths = {
    'files': ['bin/getdap', 'bin/getdap4', 'bin/dap-config', 'lib/libdap.a', 'lib/libdap.%s' % SHLIB_EXT],
    'dirs': ['include'],
}

moduleclass = 'lib'
