easyblock = 'ConfigureMake'

name = 'libdap'
version = '3.20.6'

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': '8.3.0'}

source_urls = ['http://www.opendap.org/pub/source/']
sources = [SOURCE_TAR_GZ]

builddependencies = [
    ('binutils', '2.32'),
    ('Bison', '3.3.2'),
    ('flex', '2.6.4'),
]

dependencies = [
    ('cURL', '7.66.0'),
    ('libxml2', '2.9.9'),
    ('libtirpc', '1.1.4'),
    ('PCRE', '8.43'),
    ('util-linux', '2.34'),
]

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'