# IT4Innovations
# LK 2025

easyblock = 'ConfigureMake'

name = 'libpng'
version = '1.6.45'

homepage = 'http://www.libpng.org/pub/png/libpng.html'

description = "libpng is the official PNG reference library"

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

source_urls = [SOURCEFORGE_SOURCE]
sources = [SOURCELOWER_TAR_GZ]
checksums = ['7dee9e1ca8152bf52f919456f4190330aee48209887f2ec0b3d9f0ad571df11b']

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

dependencies = [('zlib', '1.3.1')]

local_majminver = '%(version_major)s%(version_minor)s'

sanity_check_paths = {
    'files': ['include/pngconf.h', 'include/png.h', 'include/pnglibconf.h',
              'lib/libpng.a', 'lib/libpng.%s' % SHLIB_EXT,
              'lib/libpng%s.a' % local_majminver,
              'lib/libpng%s.%s' % (local_majminver, SHLIB_EXT)],
    'dirs': ['bin', 'include/libpng%s' % local_majminver, 'share/man'],
}

moduleclass = 'lib'
