pkgname=glib2 pkgver=2.82.4 pkgrel=1 pkgdesc="Low level core library" arch=('x86_64') url="https://gitlab.gnome.org/GNOME/glib" license=('LGPL-2.1-or-later') depends=( 'bash' 'glibc' 'libffi' 'pcre2' 'util-linux' 'zlib' ) makedepends=( 'bash-completion' 'dbus' 'gettext' 'gobject-introspection' 'libelf' 'libxslt' 'meson' 'python-docutils' 'python-gi-docgen' 'python-packaging' 'python-setuptools' ) source=(https://download.gnome.org/sources/glib/${pkgver%.*}/${pkgname%2}-${pkgver}.tar.xz https://www.linuxfromscratch.org/patches/downloads/glib-skip_warnings/glib-skip_warnings-1.patch gio-querymodules.hook glib-compile-schemas.hook) sha256sums=(37dd0877fe964cd15e9a2710b044a1830fb1bd93652a6d0cb6b8b2dff187c709 8f9ee9f4a6a08c49c9c912241c63d55b969950c49f4d40337c6fd9557b9daa1b 7085285d9b83885d56e064d15f7222b4d8171937466417012cd2d3795f0831a9 fe31399eb057d24a37062bcae6f88ca0778a91b85737f8110a03baa8bfc64fec) prepare() { cd ${pkgname%2}-${pkgver} patch -Np1 -i ${srcdir}/glib-skip_warnings-1.patch } build() { cd ${pkgname%2}-${pkgver} local meson_args=( -Dintrospection=enabled -Dglib_debug=disabled -Dman-pages=enabled -Dsysprof=disabled -Ddocumentation=true -Dselinux=disabled ) # Produce more debug info: GLib has a lot of useful macros CFLAGS+=" -g3" CXXFLAGS+=" -g3" # use fat LTO objects for static libraries CFLAGS+=" -ffat-lto-objects" CXXFLAGS+=" -ffat-lto-objects" ${meson_options} ${meson_args[@]} ${meson_build} } package() { cd ${pkgname%2}-${pkgver} ${meson_install} ${pkgdir} install -Dt ${pkgdir}/usr/share/libalpm/hooks -m644 ${srcdir}/*.hook }