easyblock = 'ConfigureMake'

name = 'GLib'
version = '2.49.5'

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

toolchain = {'name': 'intel', 'version': '2016b'}
toolchainopts = {'pic': True}

source_urls = [FTPGNOME_SOURCE]
sources = [SOURCELOWER_TAR_XZ]

dependencies = [
    ('libffi', '3.2.1'),
    ('gettext', '0.19.8'),
    ('libxml2', '2.9.4'),
    ('PCRE', '8.39'),
]

builddependencies = [('Python', '2.7.12')]

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

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'
