# IT4Innovations
# LK 2023

easyblock = 'ConfigureMake'

name = 'zlib'
version = '1.2.12'

homepage = 'https://www.zlib.net/'
description = """zlib is designed to be a free, general-purpose, legally unencumbered -- that is,
 not covered by any patents -- lossless data-compression library for use on virtually any
 computer hardware and operating system."""

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

source_urls = ['https://zlib.net/fossils']
sources = [SOURCELOWER_TAR_GZ]
patches = ['zlib-%(version)s_fix-CC-logic-in-configure.patch']
checksums = [
    '91844808532e5ce316b3c010929493c0244f3d37593afd6de04f71821d5136d9',  # zlib-1.2.12.tar.gz
    'f35eb05334a4f8d7b40b6c5610a6369f654863b5fa1a19c2507888f918025238',  # zlib-1.2.12_fix-CC-logic-in-configure.patch
]

# use same binutils version that was used when building GCC toolchain
builddependencies = [('binutils', '2.40', '', SYSTEM)]

sanity_check_paths = {
    'files': ['include/zconf.h', 'include/zlib.h', 'lib/libz.a', 'lib/libz.%s' % SHLIB_EXT],
    'dirs': [],
}

moduleclass = 'lib'
