1 # Maintainer: Antonio Rojas <arojas@archlinux.org>
2 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 # Contributor: Andrea Scarpino <andrea@archlinux.org>
6 pkgname=(kcachegrind kcachegrind-common qcachegrind)
9 pkgdesc='Visualization of Performance Profiling Data'
10 url='https://apps.kde.org/kcachegrind/'
12 license=(GPL LGPL FDL)
13 makedepends=(extra-cmake-modules kdoctools qt5-tools kio)
14 source=(https://download.kde.org/stable/release-service/$pkgver/src/$pkgname-$pkgver.tar.xz{,.sig})
15 sha256sums=('160b9b2f28e1e6986026c0fc3dc34df26d56d88e3355704a0226e60786218ac7'
17 validpgpkeys=(CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7 # Albert Astals Cid <aacid@kde.org>
18 F23275E4BF10AFC1DF6914A6DBD2CE893E2D1C87 # Christoph Feck <cfeck@kde.org>
19 D81C0CB38EB725EF6691C385BB463350D6EF31EF) # Heiko Becker <heiko.becker@kde.org>
23 cmake -B build -S $pkgname-$pkgver \
28 package_kcachegrind() {
29 groups=(kde-applications kdesdk)
30 depends=(kio kcachegrind-common)
31 optdepends=('graphviz: for plotting support')
33 DESTDIR="$pkgdir" cmake --install build
34 rm -r "$pkgdir"/usr/{bin/*tree,share/{doc,icons,locale}}
37 package_kcachegrind-common() {
38 pkgdesc+=' (common files)'
39 depends=(hicolor-icon-theme)
40 optdepends=('php: for pprof2calltree' 'perl: for dprof2calltree, memprof2calltree and op2calltree')
42 DESTDIR="$pkgdir" cmake --install build
43 rm -r "$pkgdir"/usr/{bin/kcachegrind,share/{kcachegrind,applications,metainfo}} # provided by kcachegrind
46 sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|' \
47 "$pkgdir"/usr/bin/hotshot2calltree
50 package_qcachegrind() {
51 pkgdesc+=' (pure Qt version)'
52 depends=(qt5-base kcachegrind-common)
53 optdepends=('graphviz: for plotting support')
55 install -Dm755 build/bin/qcachegrind -t "$pkgdir"/usr/bin/
56 install -Dm644 $pkgbase-$pkgver/qcachegrind/qcachegrind.desktop -t "$pkgdir"/usr/share/applications/