pkgname=glib2 pkgver=2.82.2 pkgrel=2 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) sha256sums=(ab45f5a323048b1659ee0fbda5cecd94b099ab3e4b9abf26ae06aeb3e781fd63 8f9ee9f4a6a08c49c9c912241c63d55b969950c49f4d40337c6fd9557b9daa1b b1e823f4254a0b23408b2f49d4e01d0686d1526a79b0686800350f02dadeaea2) 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} }