# JH 2020 and LK

easyblock = 'MesonNinja'

name = 'GLib'
version = '2.64.1'

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

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

source_urls = ['http://ftp.gnome.org/pub/gnome/sources/glib/%(version_major_minor)s/']
sources = ['glib-%(version)s.tar.xz']

builddependencies = [
    ('Meson', '0.53.0', '-Py-3.7', True),
    ('Ninja', '1.9.0', '', True),
    ('binutils', '2.32'),
    ('pkg-config', '0.29.2'),
]

dependencies = [
    ('libffi', '3.3'),
    ('gettext', '0.20.1'),
    ('libxml2', '2.9.9'),
    ('PCRE', '8.43'),
    ('util-linux', '2.34'),
]

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

configopts = "--buildtype=release --default-library=both "

fix_python_shebang_for = ['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'
