OCaml 4.14.0 rebuild
[arch-packages.git] / sysprof / repos / extra-x86_64 / PKGBUILD
blobf459da642a04000ea905caac36ee4c7ef901cf99
1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
3 # Contributor: Geoffroy Carrier <geoffroy.carrier@aur.archlinux.org>
4 # Contributor: Eric Belanger <belanger@astro.umontreal.ca>
5 # Contributor: aeolist <aeolist@hotmail.com>
6 # Contributor: Gabriel Rauter <rauter.gabriel@gmail.com>
8 pkgbase=sysprof
9 pkgname=(sysprof libsysprof-capture)
10 pkgver=3.44.0
11 pkgrel=2
12 pkgdesc="Kernel based performance profiler"
13 url="https://wiki.gnome.org/Apps/Sysprof"
14 license=(GPL)
15 arch=(x86_64)
16 depends=(gtk3 polkit libdazzle)
17 makedepends=(yelp-tools git meson)
18 options=(debug)
19 _commit=7d44e2db75941e5eef0c67fae3c0ce0cbd176dc6  # tags/3.44.0^0
20 source=("git+https://gitlab.gnome.org/GNOME/sysprof.git#commit=$_commit")
21 sha256sums=('SKIP')
23 pkgver() {
24   cd sysprof
25   git describe --tags | sed 's/^sysprof-//;s/[^-]*-g/r&/;s/-/+/g'
28 prepare() {
29   cd sysprof
32 build() {
33   # Ensure static library is non-LTO compatible
34   CFLAGS+=" -ffat-lto-objects"
36   arch-meson sysprof build
37   meson compile -C build
40 check() {
41   meson test -C build --print-errorlogs
44 _pick() {
45   local p="$1" f d; shift
46   for f; do
47     d="$srcdir/$p/${f#$pkgdir/}"
48     mkdir -p "$(dirname "$d")"
49     mv "$f" "$d"
50     rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
51   done
54 package_sysprof() {
55   depends+=(libsysprof-capture)
56   groups=(gnome-extra)
58   meson install -C build --destdir "$pkgdir"
60   cd "$pkgdir"
62   _pick capture usr/lib/libsysprof-capture-*
63   _pick capture usr/lib/pkgconfig/sysprof-capture-*
64   _pick capture usr/include/sysprof-*/sysprof-{address,capture,clock,collector,macros}.h
65   _pick capture usr/include/sysprof-*/sysprof-{platform,version,version-macros}.h
66   _pick capture usr/include/sysprof-*/sysprof-capture-{condition,cursor,reader,types,writer}.h
69 package_libsysprof-capture() {
70   pkgdesc+=" - capture library"
71   depends=()
72   license=(BSD)
74   mv capture/* "$pkgdir"
76   install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 \
77     sysprof/src/libsysprof-capture/COPYING