# IT4Innovations
# LK 2024

easyblock = 'ConfigureMake'

name = 'cURL'
version = '8.7.1'

homepage = 'https://curl.haxx.se'

description = """
 libcurl is a free and easy-to-use client-side URL transfer library,
 supporting DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP,
 LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, Telnet and TFTP.
 libcurl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP
 form based upload, proxies, cookies, user+password authentication (Basic,
 Digest, NTLM, Negotiate, Kerberos), file transfer resume, http proxy tunneling
 and more.
"""

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

source_urls = ['https://curl.haxx.se/download/']
sources = [SOURCELOWER_TAR_GZ]
checksums = ['f91249c87f68ea00cf27c44fdfa5a78423e41e71b7d408e5901a9896d905c495']

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

dependencies = [
    ('zlib', '1.3.1'),
#    ('OpenSSL', '3', '', SYSTEM),
]

configopts = '--with-zlib '
configopts += '--with-ssl=$EBROOTOPENSSL '

modextravars = {'CURL_INCLUDES': '%(installdir)s/include'}

sanity_check_paths = {
    'files': ['bin/curl', 'lib/libcurl.a', 'lib/libcurl.%s' % SHLIB_EXT],
    'dirs': ['lib/pkgconfig', 'include/curl'],
}

moduleclass = 'tools'