# Contributor: Rasmus Thomsen # Contributor: Valery Kartel # Contributor: Natanael Copa # Maintainer: Pablo Correa Gómez pkgname=glib pkgver=2.76.4 pkgrel=1 pkgdesc="Common C routines used by Gtk+ and other libs" url="https://developer.gnome.org/glib/" arch="all" license="LGPL-2.1-or-later" triggers="$pkgname.trigger=/usr/share/glib-2.0/schemas:/usr/lib/gio/modules:/usr/lib/gtk-4.0" depends_dev=" bzip2-dev docbook-xml docbook-xsl gettext-dev libxml2-utils libxslt python3 " makedepends="$depends_dev pcre2-dev meson zlib-dev libffi-dev util-linux-dev" subpackages=" $pkgname-dbg $pkgname-doc $pkgname-static $pkgname-dev $pkgname-lang $pkgname-bash-completion " source="https://download.gnome.org/sources/glib/${pkgver%.*}/glib-$pkgver.tar.xz alwaysbash.patch deprecated-no-warn.patch " options="!check" # don't like to be run without first being installed # secfixes: # 2.66.6-r0: # - CVE-2021-27219 GHSL-2021-045 # 2.62.5-r0: # - CVE-2020-6750 # 2.60.4-r0: # - CVE-2019-12450 build() { CFLAGS="$CFLAGS -ffat-lto-objects -O2" \ CXXFLAGS="$CXXFLAGS -O2" \ CPPFLAGS="$CPPFLAGS -O2" \ abuild-meson \ -Db_lto=true \ --default-library=both \ -Dman=true \ -Dtests="$(want_check && echo true || echo false)" \ . output meson compile -C output } package() { DESTDIR="$pkgdir" meson install --no-rebuild -C output } dev() { default_dev mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/share find "$pkgdir"/usr/bin ! -name "glib-compile-schemas" -a \( \ -name "gdbus-codegen" -o \ -name "gobject-query" -o \ -name "gresource" -o \ -name "gtester*" -o \ -name "glib-*" \) \ -exec mv {} "$subpkgdir"/usr/bin \; amove usr/share/gdb usr/share/glib-2.0 } static() { default_static depends="gettext-static" } sha512sums=" f76932dc5090a44880373228e2b162f338415d06f7c90f2950eab1a43bb191c56a1797da4d377594f6a999197fef4defb848039259cfa4105bb68288a928f5b7 glib-2.76.4.tar.xz 41d23f0797cae11d017f9e9492173f1f68125d99c28416ff2482e3eb81460a9c33cecc2bee806dad1d1da19800d0a90ae43d9a44f5e2864c2cd7c8a704669eb3 alwaysbash.patch 744239ea2afb47e15d5d0214c37d7c798edac53797ca3ac14d515aee4cc3999ef9716ba744c64c40198fb259edc922559f77c9051104a568fc8ee4fc790810b1 deprecated-no-warn.patch "