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"
38 _commit=e35768fe299d6389f8f5eef15593762389d2c07d # tags/2.74.4^0
40 "git+https://gitlab.gnome.org/GNOME/glib.git#commit=$_commit"
41 "git+https://gitlab.gnome.org/GNOME/gvdb.git"
42 0001-glib-compile-schemas-Remove-noisy-deprecation-warnin.patch
43 gio-querymodules.{hook,script}
44 glib-compile-schemas.hook
48 '4d5cb5ad1222a5e8d06e79736170cd694a6277e0da71ffd55560d74cf5c3273551d302a35bd2ff43f09070d61c1de147bb312428fce98347d232ac3d44406511'
49 'cd3a7817193ca985be5aff0813e78cc59c39ad8d4a2171c1c719267e4f51beda47c58a44c6d5afead64e9fa1b854430ac935976d02158e927ba3ec8f36fce282'
50 '4b90eb8d582509b09aab401313d4399cc139ad21b5dd7d45d79860d0764c7494c60714e0794e09823e51d1894ac032a994f27d79d1499abf24ee6f59bdb0c243'
51 'd30d349b4cb4407839d9074ce08f5259b8a5f3ca46769aabc621f17d15effdb89c4bf19bd23603f6df3d59f8d1adaded0f4bacd0333afcab782f2d048c882858')
56 git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
62 # Fix build (missing include)
63 git cherry-pick -n 03cb4261e00cf505790f4fd4e69f97b2ef4fcccd
65 # Suppress noise from glib-compile-schemas.hook
66 git apply -3 ../0001-glib-compile-schemas-Remove-noisy-deprecation-warnin.patch
69 git submodule set-url subprojects/gvdb "$srcdir/gvdb"
70 git -c protocol.file.allow=always submodule update
74 # Produce more debug info: GLib has a lot of useful macros
75 # use fat LTO objects for static libraries
76 CFLAGS+=' -ffat-lto-objects -g3'
77 CXXFLAGS+=' -ffat-lto-objects -g3'
79 CFLAGS+=" -DG_DISABLE_CAST_CHECKS"
80 arch-meson glib build \
81 --default-library both \
82 -D glib_debug=disabled \
87 meson compile -C build
91 meson test -C build --no-suite flaky --no-suite slow --print-errorlogs
99 provides+=(libg{lib,io,module,object,thread}-2.0.so)
101 'gvfs: most gio functionality'
102 'libelf: gresource inspection tool'
103 'python: gdbus-codegen, glib-genmarshal, glib-mkenums, gtester-report'
106 meson install -C build --destdir "$pkgdir"
108 install -Dt "$pkgdir/usr/share/libalpm/hooks" -m644 *.hook
109 install -D gio-querymodules.script "$pkgdir/usr/share/libalpm/scripts/gio-querymodules"
111 python -m compileall -d /usr/share/glib-2.0/codegen \
112 "$pkgdir/usr/share/glib-2.0/codegen"
113 python -O -m compileall -d /usr/share/glib-2.0/codegen \
114 "$pkgdir/usr/share/glib-2.0/codegen"
117 mkdir -p docs/usr/share
118 mv {"$pkgdir",docs}/usr/share/gtk-doc
121 package_glib2-docs() {
122 pkgdesc="Documentation for GLib"
126 mv -t "$pkgdir" docs/*
127 install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 glib/docs/reference/COPYING
130 # vim:set sw=2 sts=-1 et: