glib2/PKGBUILD
2024-04-29 14:51:04 +08:00

55 lines
1.4 KiB
Bash

# Maintainer: Future Linux Team <futurelinux@163.com>
pkgname=glib2
pkgver=2.80.0
pkgrel=1
pkgdesc="Low level core library"
arch=('x86_64')
url="https://gitlab.gnome.org/GNOME/glib"
license=('LGPL-2.1-or-later')
depends=('libffi' 'pcre2' 'util-linux' 'zlib' 'python-packaging')
makedepends=('dbus' 'gettext' 'libelf' 'meson' 'python-docutils' 'libxslt')
source=(https://download.gnome.org/sources/glib/${pkgver%.*}/glib-${pkgver}.tar.xz
glib-skip_warnings-1.patch
gio-querymodules.hook
glib-compile-schemas.hook)
sha256sums=(8228a92f92a412160b139ae68b6345bd28f24434a7b5af150ebe21ff587a561d
8f9ee9f4a6a08c49c9c912241c63d55b969950c49f4d40337c6fd9557b9daa1b
b6fb5f07643c234bd0bde6c4899001effd270c17132e546cec535cb15771d269
64ae5597dda3cc160fc74be038dbe6267d41b525c0c35da9125fbf0de27f9b25)
prepare() {
cd glib-${pkgver}
patch -Np1 -i ${srcdir}/glib-skip_warnings-1.patch
}
build() {
cd glib-${pkgver}
# 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 setup build \
--prefix=/usr \
--libdir=/usr/lib64 \
--buildtype=release \
-Dintrospection=disabled \
-Dman-pages=enabled
meson compile -C build
}
package() {
cd glib-${pkgver}
meson install -C build --destdir ${pkgdir}
install -Dt ${pkgdir}/usr/share/libalpm/hooks -m644 ${srcdir}/*.hook
}