core/glib2/PKGBUILD
2018-11-28 22:22:08 +01:00

65 lines
1.9 KiB
Bash

pkgbase=glib2
pkgname=(glib2 glib2-docs)
pkgver=2.58.1
pkgrel=2
pkgdesc="Common C routines used by GTK+ and other libs"
url="https://wiki.gnome.org/Projects/GLib"
arch=(x86_64)
depends=(pcre libffi util-linux zlib)
makedepends=(gettext gtk-doc shared-mime-info python3 libelf git meson dbus)
checkdepends=(desktop-file-utils)
optdepends=('python3: gdbus-codegen, glib-genmarshal, glib-mkenums, gtester-report'
'libelf: gresource inspection tool')
options=(!emptydirs)
source=("http://download.gnome.org/sources/glib/2.58/glib-${pkgver}.tar.xz"
noisy-glib-compile-schemas.diff
glib-compile-schemas.hook gio-querymodules.hook)
sha256sums=('97d6a9d926b6aa3dfaadad3077cfb43eec74432ab455dff14250c769d526d7d6'
'81a4df0b638730cffb7fa263c04841f7ca6b9c9578ee5045db6f30ff0c3fc531'
'e1123a5d85d2445faac33f6dae1085fdd620d83279a4e130a83fe38db52b62b3'
'5ba204a2686304b1454d401a39a9d27d09dd25e4529664e3fd565be3d439f8b6')
prepare() {
cd glib-$pkgver
# Suppress noise from glib-compile-schemas.hook
patch -Np1 -i ../noisy-glib-compile-schemas.diff
}
build() {
chakra-meson glib-$pkgver build \
-D selinux=false \
-D man=true \
-D gtk_doc=true
ninja -C build
}
check() {
meson test -C build
}
package_glib2() {
DESTDIR="$pkgdir" meson install -C build
install -Dt "$pkgdir/usr/share/libalpm/hooks" -m644 *.hook
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"
# Split docs
mv "$pkgdir/usr/share/gtk-doc" "$srcdir"
}
package_glib2-docs() {
pkgdesc="Documentation for GLib"
depends=()
optdepends=()
license+=(custom)
mkdir -p "$pkgdir/usr/share"
mv gtk-doc "$pkgdir/usr/share"
cd glib-$pkgver
install -Dt "$pkgdir/usr/share/licenses/glib2-docs" -m644 docs/reference/COPYING
}