easyblock = 'ConfigureMake'

name = 'libgeotiff'
version = '1.6.0'

homepage = 'https://directory.fsf.org/wiki/Libgeotiff'
description = """Library for reading and writing coordinate system information from/to GeoTIFF files"""

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

source_urls = ['https://download.osgeo.org/geotiff/libgeotiff']
sources = [SOURCE_TAR_GZ]
checksums = ['9311017e5284cffb86f2c7b7a9df1fb5ebcdc61c30468fb2e6bca36e4272ebca']

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

dependencies = [
    ('PROJ', '7.2.1'),
    ('libjpeg-turbo', '2.0.6'),
    ('zlib', '1.2.11'),
    ('SQLite', '3.36'),
    ('LibTIFF', '4.3.0'),
    ('cURL', '7.78.0'),
]

configopts = ' --with-libtiff=$EBROOTLIBTIFF --with-proj=$EBROOTPROJ --with-zlib=$EBROOTZLIB'
configopts += ' --with-jpeg=$EBROOTLIBJPEGMINTURBO'

sanity_check_paths = {
    'files': ['bin/listgeo', 'lib/libgeotiff.a', 'lib/libgeotiff.%s' % SHLIB_EXT],
    'dirs': ['include', 'share'],
}

moduleclass = 'lib'
