# IT4Innovations 
# LK 2021

easyblock = 'ConfigureMake'

name = 'libgd'
version = '2.3.1'

homepage = 'https://libgd.github.io/'
description = "GD is an open source code library for the dynamic creation of images by programmers."

toolchain = SYSTEM
toolchainopts = {'pic': True}

source_urls = ['https://github.com/libgd/libgd/releases/download/gd-%(version)s/']
sources = [SOURCELOWER_TAR_GZ]
checksums = ['e904a35fd3379ddb2d7c64f929b7cbdf0422863646dae252be0029b9e47c9fe3']

dependencies = [
    ('fontconfig', '2.13.93'),
    ('libjpeg-turbo', '2.0.6'),
    ('libpng', '1.6.37'),
    ('zlib', '1.2.11'),
]

configopts = "--with-fontconfig=$EBROOTFONTCONFIG --with-jpeg=$EBROOTLIBJPEGMINTURBO "
configopts += "--with-png=$EBROOTLIBPNG --with-zlib=$EBROOTZLIB"

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

moduleclass = 'lib'
