Skip to content

[GLib] [package list]

GLib/2.85.1-cpeAOCC-25.03 (GLib-2.85.1-cpeAOCC-25.03.eb)

To access module help and find out for which stacks and partitions the module is installed, use module spider GLib/2.85.1-cpeAOCC-25.03.

EasyConfig:

# Note that GLib is really made to be compiled with GCC and nothing else
# due to the use of compiler-specific pragma, so you may get warnings
# about unrecognizded pragmas when compiling with another compiler.
easyblock = 'MesonNinja'

local_gettext_version =      '0.24'          # https://ftp.gnu.org/pub/gnu/gettext/
local_libffi_version =       '3.4.5'         # https://sourceware.org/libffi/
local_libxml2_version =      '2.13.4'        # http://xmlsoft.org/sources/
local_PCRE2_version =        '10.45'         # https://github.com/PCRE2Project/pcre2/releases  # Not yet in EB 2025a when checked for installation
local_util_version =         '2.40.4'        # https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/ (Not yet in EB 2025a when checking)

local_GLib_version =         '2.85.1'        # https://ftp.gnome.org/pub/GNOME/sources/glib/ Not the one from 2025a, but with newer versions we had trouble with GObject-Introspection

local_craypython_version =   '3.11.7'
local_craypython_maj_min = '.'.join( local_craypython_version.split('.')[:2] )

name =    'GLib'
version = local_GLib_version

homepage = 'http://www.gtk.org/'

whatis = [
    'Description: One of the GTK+ base libraries',
    'The module provides a number of command line utilities and static and shared libraries',
]

description = """
GLib provides the core application building blocks for libraries and
applications written in C. It provides the core object system used in GNOME,
the main loop implementation, and a large set of utility functions for strings
and common data structures.

The module provides a number of command line utilities and staqtic and shared
libraries.
"""

docurls= [
    'Web-based documentation: https://developer.gnome.org/glib/',
]

docpaths = [
    'share/gtk-doc/html/glib',
    'share/gtk-doc/html/gobject',
    'share/gtk-doc/html/gio'
]

software_license_urls = [
    'https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html',
]

toolchain = {'name': 'cpeAOCC', 'version': '25.03'}
toolchainopts = {'pic': True, 'extra_cflags': '-Wno-unsupported-target-opt'}

# Check on https://ftp.gnome.org/pub/GNOME/sources/glib/
source_urls = [FTPGNOME_SOURCE]
sources =     [SOURCELOWER_TAR_XZ]
patches = ['GLib-2.85.1_add-ldl.patch']
checksums = [
    {'glib-2.85.1.tar.xz': 'd3f57bcd4202d93aa547ffa1d2a5dbd380a05dbaac04cc291bd7dfce93b4a8e5'},
    {'GLib-2.85.1_add-ldl.patch': '780b4da7e33158e2fda21e5fab11cd451f8d63fc2d0b0530113fa75a3b4a2099'},
]

builddependencies = [
    # Python is required for building against GLib, at least when
    # gdbus-codegen or one of the other python scripts are used.
    # Since Meson 0.50 and later are Python >=3.5 only we can't build
    # Python specific versions of GLib that uses Python 2.x
    # thus Python should not be a runtime dependency for GLib.
    # Packages that use GLib should either have an explicit
    # (build)dependency on Python or it will use the system version
    # EasyBuild itself uses.
    ('buildtools' ,       '%(toolchain_version)s', '',                                        SYSTEM),
    ('buildtools-python', '%(toolchain_version)s', f'-cray-python{local_craypython_maj_min}', SYSTEM),
]

dependencies = [
    ('libffi',     local_libffi_version),
    ('gettext',    local_gettext_version),
    ('libxml2',    local_libxml2_version),
    ('PCRE2',      local_PCRE2_version),
    ('util-linux', local_util_version),
]

# Doesn't need MPI, ROCm or BLAS, and module unload never fails so this is safe.
preconfigopts = ' && '.join([
    'module unload cray-libsci cray-mpich rocm xpmem',
    f'export PYTHON=python{local_craypython_maj_min}',
]) + ' && '
preinstallopts = pretestopts = prebuildopts = preconfigopts

configopts  = '--buildtype=release --default-library=both --libdir=lib'

#parallel = 1 # For debugging

postinstallcmds = [
    # Fix shebangs and make very sure it uses cray-python.
    f'module load cray-python/{local_craypython_version} && ' +
    f'sed -i -e "s|#!.*python[0-9.]*$|#!$(which python{local_craypython_maj_min})|" %(installdir)s/bin/*',
    # Copy license information etc.
    'mkdir -p %(installdir)s/share/licenses/%(name)s',
    'cd %(start_dir)s && cp LICENSES/LGPL-2.1-or-later.txt NEWS README.md SECURITY.md %(installdir)s/share/licenses/%(name)s',   
]

sanity_check_paths = {
    'files': ['lib/libglib-%(version_major)s.0.a', 'lib/libglib-%%(version_major)s.0.%s' % SHLIB_EXT,
              f'share/licenses/{name}/LGPL-2.1-or-later.txt'],
    'dirs':  ['bin', 'include'],
}

sanity_check_commands = [
    f'pkg-config --modversion gio-2.0               | grep -q {local_GLib_version}',
    f'pkg-config --modversion gio-unix-2.0          | grep -q {local_GLib_version}',
    f'pkg-config --modversion girepository-2.0      | grep -q {local_GLib_version}',
    f'pkg-config --modversion glib-2.0              | grep -q {local_GLib_version}',
    f'pkg-config --modversion gmodule-2.0           | grep -q {local_GLib_version}',
    f'pkg-config --modversion gmodule-export-2.0    | grep -q {local_GLib_version}',
    f'pkg-config --modversion gmodule-no-export-2.0 | grep -q {local_GLib_version}',
    f'pkg-config --modversion gobject-2.0           | grep -q {local_GLib_version}',
    f'pkg-config --modversion gthread-2.0           | grep -q {local_GLib_version}',
    f'gapplication version | grep -q {local_GLib_version}',
    'gdbus help',
    'gdbus-codegen --help',
    f'gi-compile-repository --version | grep -q {local_GLib_version}',
    f'gi-decompile-typelib --version | grep -q {local_GLib_version}',
    'gi-inspect-typelib --help',
    f'gio --version | grep -q {local_GLib_version}',
    f'glib-compile-resources --version | grep -q {local_GLib_version}',
    f'glib-compile-schemas --version | grep -q {local_GLib_version}',
    f'glib-genmarshal --version | grep -q {local_GLib_version}',
    f'glib-gettextize --version | grep -q {local_GLib_version}',
    f'glib-mkenums --version | grep -q {local_GLib_version}',
    f'gobject-query --version | grep -q {local_GLib_version}',
    'gresource help',
    f'gsettings --version | grep -q {local_GLib_version}',
    f'gtester --version | grep -q {local_GLib_version}',
    f'gtester-report --version | grep -q {local_GLib_version}',
]

moduleclass = 'vis'

[GLib] [package list]