# IT4Innovations 2018

easyblock = 'ConfigureMake'

name = 'zlib'
version = '1.2.8'

homepage = 'http://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': 'system', 'version': ''}

sources = [SOURCELOWER_TAR_GZ]
source_urls = [
    ('http://sourceforge.net/projects/libpng/files/zlib/%(version)s', 'download')]

# need to take care of $CFLAGS ourselves with dummy toolchain
# we need to add -fPIC, but should also include -O* option to avoid
# compiling with -O0 (default for GCC)
buildopts = 'CFLAGS="-O2 -fPIC"'

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

moduleclass = 'lib'
