From 1052993989ecbc45247d753252acbce5d1a9ea1a Mon Sep 17 00:00:00 2001 From: Yingjie Wang Date: Mon, 29 Dec 2025 19:41:51 -0500 Subject: [PATCH] new blfs: glib bootstrap/glib-2.84.4 dev-libs/gobject-introspection-1.84.0 dev-libs/glib-2.84.4 --- bootstrap/glib-2.84.4.PKGBUILD | 48 +++++++++++++++ dev-libs/glib-2.84.4.PKGBUILD | 59 +++++++++++++++++++ dev-libs/glib-2.84.4/gio-querymodules.HOOK | 5 ++ .../glib-2.84.4/glib-compile-schemas.HOOK | 5 ++ .../gobject-introspection-1.84.0.PKGBUILD | 35 +++++++++++ 5 files changed, 152 insertions(+) create mode 100644 bootstrap/glib-2.84.4.PKGBUILD create mode 100644 dev-libs/glib-2.84.4.PKGBUILD create mode 100644 dev-libs/glib-2.84.4/gio-querymodules.HOOK create mode 100644 dev-libs/glib-2.84.4/glib-compile-schemas.HOOK create mode 100644 dev-libs/gobject-introspection-1.84.0.PKGBUILD diff --git a/bootstrap/glib-2.84.4.PKGBUILD b/bootstrap/glib-2.84.4.PKGBUILD new file mode 100644 index 0000000..4c574da --- /dev/null +++ b/bootstrap/glib-2.84.4.PKGBUILD @@ -0,0 +1,48 @@ +pkgname=glib +pkgver=2.84.4 +_basever=2.84 +_lfsver=12.4 +pkgdesc="Low level core library" +homepage="https://gitlab.gnome.org/GNOME/glib" +license=(LGPL-2.1-or-later) +arch=(x86_64) +sources=("${pkgname}-${pkgver}.tar.xz" + "glib-skip_warnings-1.patch" +) +_gnomeurl="https://download.gnome.org/sources" +urls=("${_gnomeurl}/${pkgname}/${_basever}/${sources[0]}" + "https://www.linuxfromscratch.org/patches/blfs/${_lfsver}/${sources[2]}" +) +md5sums=("5655d0ff809b98dd77c02490609fadde" + "729287ad0c60b5b2d6ca9ec4a19d8cec" +) + +export GLIB_LOG_LEVEL=4 + +src_prepare() { + tar -xf ${distdir}/${sources[0]} --strip-components=1 + patch -p1 -i ${distdir}/${sources[1]} +} + +src_build() { + # Produce more debug info: GLib has a lot of useful macros + CFLAGS+=" -g3" + CXXFLAGS+=" -g3" + + meson setup build \ + --prefix=/usr \ + --buildtype=release \ + -D introspection=disabled \ + -D glib_debug=disabled \ + -D man-pages=enabled \ + -D sysprof=disabled && + meson compile -C build +} + +src_check() { + leaf_noop +} + +src_install() { + meson install -C build --destdir "$pkgdir" +} diff --git a/dev-libs/glib-2.84.4.PKGBUILD b/dev-libs/glib-2.84.4.PKGBUILD new file mode 100644 index 0000000..f21dfbe --- /dev/null +++ b/dev-libs/glib-2.84.4.PKGBUILD @@ -0,0 +1,59 @@ +pkgname=glib +pkgver=2.84.4 +_basever=2.84 +_lfsver=12.4 +pkgdesc="Low level core library" +homepage="https://gitlab.gnome.org/GNOME/glib" +license=(LGPL-2.1-or-later) +arch=(x86_64) +sources=("${pkgname}-${pkgver}.tar.xz" + "glib-skip_warnings-1.patch" + "gio-querymodules.HOOK" + "glib-compile-schemas.HOOK" +) +_gnomeurl="https://download.gnome.org/sources" +urls=("${_gnomeurl}/${pkgname}/${_basever}/${sources[0]}" + "https://www.linuxfromscratch.org/patches/blfs/${_lfsver}/${sources[1]}" + "gio-querymodules.HOOK" + "glib-compile-schemas.HOOK" +) +md5sums=("5655d0ff809b98dd77c02490609fadde" + "729287ad0c60b5b2d6ca9ec4a19d8cec" + "a1737601c4040854741ac7cd80e56366" + "689505071dad3a1164ec63ea0a8a7bb4" +) + +export GLIB_LOG_LEVEL=4 + +src_prepare() { + tar -xf ${distdir}/${sources[0]} --strip-components=1 + patch -p1 -i ${distdir}/${sources[1]} +} + +src_build() { + # Produce more debug info: GLib has a lot of useful macros + CFLAGS+=" -g3" + CXXFLAGS+=" -g3" + + meson setup build \ + --prefix=/usr \ + --buildtype=release \ + -D introspection=enabled \ + -D glib_debug=disabled \ + -D man-pages=enabled \ + -D sysprof=disabled && + meson compile -C build +} + +src_check() { + chown -R leaf . + unset GLIB_LOG_LEVEL + su leaf -c "PATH=$PATH LC_ALL=C TMPDIR=/tmp meson test -C build --no-suite flaky --no-suite slow --print-errorlogs" +} + +src_install() { + meson install -C build --destdir "$pkgdir" + + leaf_install_hook "${filedir}/${sources[2]}" + leaf_install_hook "${filedir}/${sources[3]}" +} diff --git a/dev-libs/glib-2.84.4/gio-querymodules.HOOK b/dev-libs/glib-2.84.4/gio-querymodules.HOOK new file mode 100644 index 0000000..710c0bb --- /dev/null +++ b/dev-libs/glib-2.84.4/gio-querymodules.HOOK @@ -0,0 +1,5 @@ +target=(/usr/lib/gio/modules/*.so) +triggers=("install" "remove") +operation() { + /usr/bin/gio-querymodules /usr/lib/gio/modules +} diff --git a/dev-libs/glib-2.84.4/glib-compile-schemas.HOOK b/dev-libs/glib-2.84.4/glib-compile-schemas.HOOK new file mode 100644 index 0000000..2559fc7 --- /dev/null +++ b/dev-libs/glib-2.84.4/glib-compile-schemas.HOOK @@ -0,0 +1,5 @@ +target=(/usr/share/glib-2.0/schemas/*.xml /usr/share/glib-2.0/schemas/*.override) +triggers=("install" "remove") +operation() { + /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas +} diff --git a/dev-libs/gobject-introspection-1.84.0.PKGBUILD b/dev-libs/gobject-introspection-1.84.0.PKGBUILD new file mode 100644 index 0000000..f4ed849 --- /dev/null +++ b/dev-libs/gobject-introspection-1.84.0.PKGBUILD @@ -0,0 +1,35 @@ +pkgname=gobject-introspection +pkgver=1.84.0 +pkgdesc="Introspection system for GObject-based libraries" +url="https://wiki.gnome.org/Projects/GObjectIntrospection" +arch=(x86_64) +license=( + GPL-2.0-or-later + LGPL-2.0-or-later +) +sources=("${pkgname}-${pkgver}.tar.xz") +_gnomeurl="https://download.gnome.org/sources" +urls=("${_gnomeurl}/${pkgname}/${_basever}/${sources[0]}") +md5sums=("2a62fb1c584616a8ebcd9dd4d045f27e") + +src_prepare() { + tar -xf ${distdir}/${sources[0]} --strip-components=1 +} + +src_build() { + meson setup build \ + --prefix=/usr --buildtype=release && + meson compile -C build +} + +src_check() { + meson test -C build --print-errorlogs +} + +src_install() { + meson install -C build --destdir "$pkgdir" + + cd "$pkgdir" + python -m compileall -d /usr/lib/${pkgname} usr/lib/${pkgname} + python -O -m compileall -d /usr/lib/${pkgname} usr/lib/${pkgname} +}