glib2/PKGBUILD
2024-04-29 15:01:12 +08:00

68 lines
1.9 KiB
Bash

# Maintainer: Future Linux Team <futurelinux@163.com>
pkgname=glib2
pkgver=2.80.0
pkgrel=2
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' 'git' 'gobject-introspection')
source=(git+https://gitlab.com/future-linux/clone/glib.git#tag=${pkgver}
git+https://gitlab.com/future-linux/clone/gvdb.git
0001-glib-compile-schemas-Remove-noisy-deprecation-warnin.patch
gio-querymodules.hook
glib-compile-schemas.hook)
sha256sums=(SKIP
SKIP
7f8ee5db60987f0d0feba84643e1cf988c98a294a681fb8d4fce1a5b2c25d1d3
b6fb5f07643c234bd0bde6c4899001effd270c17132e546cec535cb15771d269
64ae5597dda3cc160fc74be038dbe6267d41b525c0c35da9125fbf0de27f9b25)
prepare() {
cd glib
git apply -3 ${srcdir}/0001-glib-compile-schemas-Remove-noisy-deprecation-warnin.patch
git submodule init
git submodule set-url subprojects/gvdb ${srcdir}/gvdb
git -c protocol.file.allow=always submodule update
}
build() {
cd glib
# 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=enabled \
-Dman-pages=enabled
meson compile -C build
}
package() {
cd glib
meson install -C build --destdir ${pkgdir}
install -Dt ${pkgdir}/usr/share/libalpm/hooks -m644 ${srcdir}/*.hook
touch ${pkgdir}/usr/lib64/gio/modules/.keep
python3 -m compileall -d /usr/share/glib-2.0/codegen ${pkgdir}/usr/share/glib-2.0/codegen
python3 -O -m compileall -d /usr/share/glib-2.0/codegen ${pkgdir}/usr/share/glib-2.0/codegen
}