core/glib2/PKGBUILD

65 lines
1.9 KiB
Bash
Raw Normal View History

2015-12-17 18:29:35 +08:00
pkgbase=glib2
pkgname=(glib2 glib2-docs)
pkgver=2.58.1
2018-11-29 05:22:08 +08:00
pkgrel=2
2012-02-26 09:38:31 +08:00
pkgdesc="Common C routines used by GTK+ and other libs"
2018-09-11 04:41:30 +08:00
url="https://wiki.gnome.org/Projects/GLib"
2015-12-17 18:29:35 +08:00
arch=(x86_64)
2018-09-11 04:42:54 +08:00
depends=(pcre libffi util-linux zlib)
makedepends=(gettext gtk-doc shared-mime-info python3 libelf git meson dbus)
2018-09-11 04:41:30 +08:00
checkdepends=(desktop-file-utils)
2018-11-29 05:22:08 +08:00
optdepends=('python3: gdbus-codegen, glib-genmarshal, glib-mkenums, gtester-report'
2018-09-11 04:41:30 +08:00
'libelf: gresource inspection tool')
options=(!emptydirs)
2018-09-11 04:41:30 +08:00
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'
2018-09-11 04:41:30 +08:00
'81a4df0b638730cffb7fa263c04841f7ca6b9c9578ee5045db6f30ff0c3fc531'
'e1123a5d85d2445faac33f6dae1085fdd620d83279a4e130a83fe38db52b62b3'
'5ba204a2686304b1454d401a39a9d27d09dd25e4529664e3fd565be3d439f8b6')
2014-02-10 06:14:56 +08:00
2018-09-11 04:41:30 +08:00
prepare() {
cd glib-$pkgver
2018-09-11 04:41:30 +08:00
# Suppress noise from glib-compile-schemas.hook
patch -Np1 -i ../noisy-glib-compile-schemas.diff
}
2018-09-11 04:41:30 +08:00
build() {
chakra-meson glib-$pkgver build \
2018-09-11 04:41:30 +08:00
-D selinux=false \
-D man=true \
-D gtk_doc=true
ninja -C build
}
2015-12-17 18:29:35 +08:00
check() {
meson test -C build
2015-12-17 18:29:35 +08:00
}
2010-03-13 23:25:19 +08:00
2015-12-17 18:29:35 +08:00
package_glib2() {
2018-09-11 04:41:30 +08:00
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"
2012-02-26 09:38:31 +08:00
}
2015-12-17 18:29:35 +08:00
package_glib2-docs() {
2018-09-11 04:41:30 +08:00
pkgdesc="Documentation for GLib"
depends=()
optdepends=()
license+=(custom)
2015-12-17 18:29:35 +08:00
2018-09-11 04:41:30 +08:00
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
2015-12-17 18:29:35 +08:00
}
2018-09-11 04:41:30 +08:00