easyblock = 'ConfigureMake'

name = 'GLib'
version = '2.53.5'

homepage = 'http://www.gtk.org/'
description = """GLib is one of the base libraries of the GTK+ project"""

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

source_urls = [FTPGNOME_SOURCE]
sources = [SOURCELOWER_TAR_XZ]
checksums = ['991421f41a4ed4cc1637e5f9db0d03fd236d2cbd19f3c5b097a343bec5126602']

builddependencies = [
    ('binutils', '2.28'),
    ('Python', '2.7.14', '-bare'),
]
dependencies = [
    ('libffi', '3.2.1'),
    ('gettext', '0.19.8.1'),
    ('libxml2', '2.9.4'),
    ('PCRE', '8.41'),
    ('util-linux', '2.31'),
]

# avoid using hardcoded path to Python binary in build step
preconfigopts = "export PYTHON=python && "

configopts = "--disable-maintainer-mode --disable-silent-rules --disable-libelf --disable-systemtap "
configopts += "--enable-static --enable-shared"

postinstallcmds = ["sed -i -e 's|#!.*python|#!/usr/bin/env python|' %(installdir)s/bin/*"]

sanity_check_paths = {
    'files': ['lib/libglib-%(version_major)s.0.a', 'lib/libglib-%%(version_major)s.0.%s' % SHLIB_EXT],
    'dirs': ['bin', 'include'],
}

moduleclass = 'vis'
