# IT4Innovations
# LK 2025

easyblock = 'Bundle'

name = 'GTK3'
version = '3.24.42'

homepage = 'https://developer.gnome.org/gtk3/stable/'
description = """GTK+ is the primary library used to construct user interfaces in GNOME. It
 provides all the user interface controls, or widgets, used in a common
 graphical application. Its object-oriented API allows you to construct
 user interfaces without dealing with the low-level details of drawing and
 device interaction.
"""

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

builddependencies = [
    ('binutils', '2.42'),
    ('Autotools', '20231222'),
    ('Meson', '1.4.0'),
    ('Ninja', '1.12.1'),
    ('pkgconf', '2.3.0'),
    ('GObject-Introspection', '1.80.1'),
]

dependencies = [
    ('ATK', '2.38.0'),
    ('at-spi2-atk', '2.38.0'),
    ('cairo', '1.18.0'),
    ('Gdk-Pixbuf', '2.42.11'),
    ('GLib', '2.80.4'),
    ('Pango', '1.54.0'),
    ('libepoxy', '1.5.10'),
    ('X11', '20240607'),
    ('FriBidi', '1.0.15'),
    ('Wayland', '1.23.0'),
]

default_easyblock = 'MesonNinja'

default_component_specs = {
    'sources': [SOURCELOWER_TAR_XZ],
    'start_dir': '%(namelower)s-%(version)s',
}

components = [
    ('GTK+', version, {
        'source_urls': [FTPGNOME_SOURCE],
        'checksums': ['50f89f615092d4dd01bbd759719f8bd380e5f149f6fd78a94725e2de112377e2'],
    }),
    ('hicolor-icon-theme', '0.18', {
        'easyblock': 'MesonNinja',
        'source_urls': ['https://icon-theme.freedesktop.org/releases/'],
        'checksums': ['db0e50a80aa3bf64bb45cbca5cf9f75efd9348cf2ac690b907435238c3cf81d7'],
    }),
    ('adwaita-icon-theme', '47.0', {
        'source_urls': ['https://ftp.gnome.org/pub/GNOME/sources/%(namelower)s/%(version_major)s'],
        'checksums': ['ad088a22958cb8469e41d9f1bba0efb27e586a2102213cd89cc26db2e002bdfe'],
    }),
]

postinstallcmds = ['gtk-update-icon-cache']

sanity_check_paths = {
    'files': ['bin/%s' % x for x in ['gtk3-demo', 'gtk3-demo-application', 'gtk3-icon-browser', 'gtk3-widget-factory',
                                     'gtk-builder-tool', 'gtk-launch', 'gtk-query-immodules-3.0', 'gtk-query-settings',
                                     'gtk-update-icon-cache']] +
             ['lib/%s-%%(version_major)s.%s' % (x, SHLIB_EXT) for x in ['libgailutil', 'libgdk', 'libgtk']],
    'dirs': ['include/%s-%%(version_major)s.0' % x for x in ['gail', 'gtk']] +
            ['share/icons/hicolor', 'share/icons/Adwaita'],
}

moduleclass = 'vis'
