# IT4Innovations
# LK 2025

easyblock = 'ConfigureMake'

name = 'LibTIFF'
version = '4.7.0'

homepage = 'https://libtiff.gitlab.io/libtiff/'
description = "tiff: Library and tools for reading and writing TIFF data files"

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

source_urls = ['https://download.osgeo.org/libtiff/']
sources = ['tiff-%(version)s.tar.gz']
checksums = ['67160e3457365ab96c5b3286a0903aa6e78bdc44c4bc737d2e486bcecb6ba976']

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

dependencies = [
    ('zlib', '1.3.1'),
    ('libjpeg-turbo', '3.0.1'),
    ('XZ', '5.4.5'),
    ('jbigkit', '2.1'),
    ('zstd', '1.5.6'),
    ('libdeflate', '1.20'),
]

configopts = "--enable-ld-version-script "
configopts += "--disable-webp --disable-sphinx "

sanity_check_paths = {
    'files': ['bin/tiffdump', 'bin/tiffinfo', 'include/tiff.h', 'lib/libtiff.a', 'lib/libtiff.%s' % SHLIB_EXT,
              'lib/libtiffxx.a', 'lib/libtiffxx.%s' % SHLIB_EXT, 'lib/pkgconfig/libtiff-4.pc'],
    'dirs': [],
}

sanity_check_commands = ["tiffinfo -h"]

moduleclass = 'lib'
