1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Jan de Groot <jgc@archlinux.org>
5 pkgname=(glib2 glib2-docs)
8 pkgdesc="Low level core library"
9 url="https://wiki.gnome.org/Projects/GLib"
12 depends=(pcre libffi util-linux-libs zlib libsysprof-capture)
13 makedepends=(gettext gtk-doc shared-mime-info python libelf git util-linux
15 checkdepends=(desktop-file-utils)
17 _commit=dce30492f6087a8e1e288f1706d41142b74ca1ff # tags/2.72.3^0
18 source=("git+https://gitlab.gnome.org/GNOME/glib.git#commit=$_commit"
19 0001-glib-compile-schemas-Remove-noisy-deprecation-warnin.patch
20 glib-compile-schemas.hook gio-querymodules.{hook,script})
22 'f410289d8acf787cf0fc512efe5622d4bbd574c032e3ee0efd9cae2155b2c3dc'
23 '64ae5597dda3cc160fc74be038dbe6267d41b525c0c35da9125fbf0de27f9b25'
24 '2a9f9b8235f48e3b7d0f6cfcbc76cd2116c45f28692cac4bd61074c495bd5eb7'
25 '92d08db5aa30bda276bc3d718e7ff9dd01dc40dcab45b359182dcc290054e24e')
29 git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
35 # Suppress noise from glib-compile-schemas.hook
36 git apply -3 ../0001-glib-compile-schemas-Remove-noisy-deprecation-warnin.patch
40 # Produce more debug info: GLib has a lot of useful macros
44 CFLAGS+=" -DG_DISABLE_CAST_CHECKS"
45 arch-meson glib build \
46 -D glib_debug=disabled \
51 meson compile -C build
55 meson test -C build --no-suite flaky --no-suite slow --print-errorlogs
59 depends+=(libmount.so libffi.so)
60 provides+=(libgio-2.0.so libglib-2.0.so libgmodule-2.0.so libgobject-2.0.so
62 optdepends=('python: gdbus-codegen, glib-genmarshal, glib-mkenums, gtester-report'
63 'libelf: gresource inspection tool'
64 'gvfs: most gio functionality')
66 meson install -C build --destdir "$pkgdir"
68 install -Dt "$pkgdir/usr/share/libalpm/hooks" -m644 *.hook
69 install -D gio-querymodules.script "$pkgdir/usr/share/libalpm/scripts/gio-querymodules"
71 python -m compileall -d /usr/share/glib-2.0/codegen \
72 "$pkgdir/usr/share/glib-2.0/codegen"
73 python -O -m compileall -d /usr/share/glib-2.0/codegen \
74 "$pkgdir/usr/share/glib-2.0/codegen"
77 mkdir -p docs/usr/share
78 mv {"$pkgdir",docs}/usr/share/gtk-doc
81 package_glib2-docs() {
82 pkgdesc="Documentation for GLib"
86 mv -t "$pkgdir" docs/*
87 install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 glib/docs/reference/COPYING