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>
9 pkgname=(sysprof libsysprof-capture)
12 pkgdesc="Kernel based performance profiler"
13 url="https://wiki.gnome.org/Apps/Sysprof"
16 depends=(gtk3 polkit libdazzle)
17 makedepends=(yelp-tools git meson)
19 _commit=7d44e2db75941e5eef0c67fae3c0ce0cbd176dc6 # tags/3.44.0^0
20 source=("git+https://gitlab.gnome.org/GNOME/sysprof.git#commit=$_commit")
25 git describe --tags | sed 's/^sysprof-//;s/[^-]*-g/r&/;s/-/+/g'
33 # Ensure static library is non-LTO compatible
34 CFLAGS+=" -ffat-lto-objects"
36 arch-meson sysprof build
37 meson compile -C build
41 meson test -C build --print-errorlogs
45 local p="$1" f d; shift
47 d="$srcdir/$p/${f#$pkgdir/}"
48 mkdir -p "$(dirname "$d")"
50 rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
55 depends+=(libsysprof-capture)
58 meson install -C build --destdir "$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"
74 mv capture/* "$pkgdir"
76 install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 \
77 sysprof/src/libsysprof-capture/COPYING