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=41ae5b5632ce9f6b2b5613ec1912821f769166c2 # tags/2.76.2^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 0002-glocalfile-Sum-apparent-size-only-for-files-and-syml.patch
44 0003-tests-file-Do-not-rely-on-du-bytes-behaviour.patch
46 glib-compile-schemas.hook
50 'bd7f881ae6054c363783bf45b1add5eef5e8347554e23b9fece526701469d07cdcb9871fa73dee473796a219e8aa513796a96da769949097ea207db038578d07'
51 '6bcbcba60208162f7221701d6a642eabfc92c2fc6a476bcb42da5967577f8f0c75b688d149be01c9c48cd644aafa7fbdd63d9086385b8f7607fc981756d71a68'
52 '257bf37d304cc161dedcde0a2c4d01e297f8263cde48b49d3ee47ca95a8fb9ad44bbb9bf99da51ec766ffb6f9d502e0a8fdc6b86346e6755373ee515e23b9419'
53 '14c9211c0557f6d8d9a914f1b18b7e0e23f79f4abde117cb03ab119b95bf9fa9d7a712aa0a29beb266468aeb352caa3a9e4540503cfc9fe0bbaf764371832a96'
54 'd30d349b4cb4407839d9074ce08f5259b8a5f3ca46769aabc621f17d15effdb89c4bf19bd23603f6df3d59f8d1adaded0f4bacd0333afcab782f2d048c882858')
59 git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
65 # Suppress noise from glib-compile-schemas.hook
66 git apply -3 ../0001-glib-compile-schemas-Remove-noisy-deprecation-warnin.patch
68 # fix test suite issues with coreutils >=9.2
69 # https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3358
70 git apply -3 ../0002-glocalfile-Sum-apparent-size-only-for-files-and-syml.patch
71 git apply -3 ../0003-tests-file-Do-not-rely-on-du-bytes-behaviour.patch
74 git submodule set-url subprojects/gvdb "$srcdir/gvdb"
75 git -c protocol.file.allow=always submodule update
80 --default-library both
81 -D glib_debug=disabled
88 # Produce more debug info: GLib has a lot of useful macros
92 # use fat LTO objects for static libraries
93 CFLAGS+=" -ffat-lto-objects"
94 CXXFLAGS+=" -ffat-lto-objects"
96 arch-meson glib build "${meson_options[@]}"
97 meson compile -C build
101 meson test -C build --no-suite flaky --no-suite slow --print-errorlogs
109 provides+=(libg{lib,io,module,object,thread}-2.0.so)
111 'gvfs: most gio functionality'
112 'libelf: gresource inspection tool'
113 'python: gdbus-codegen, glib-genmarshal, glib-mkenums, gtester-report'
116 meson install -C build --destdir "$pkgdir"
118 install -Dt "$pkgdir/usr/share/libalpm/hooks" -m644 *.hook
119 touch "$pkgdir/usr/lib/gio/modules/.keep"
121 python -m compileall -d /usr/share/glib-2.0/codegen \
122 "$pkgdir/usr/share/glib-2.0/codegen"
123 python -O -m compileall -d /usr/share/glib-2.0/codegen \
124 "$pkgdir/usr/share/glib-2.0/codegen"
127 mkdir -p docs/usr/share
128 mv {"$pkgdir",docs}/usr/share/gtk-doc
131 package_glib2-docs() {
132 pkgdesc+=" - documentation"
136 mv -t "$pkgdir" docs/*
137 install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 glib/docs/reference/COPYING
140 # vim:set sw=2 sts=-1 et: