]> git.draconx.ca Git - gentoo-draconx.git/blob - dev-util/qcachegrind/qcachegrind-0.7.4-r2.ebuild
dev-util/qcachegrind: Update to EAPI 7.
[gentoo-draconx.git] / dev-util / qcachegrind / qcachegrind-0.7.4-r2.ebuild
1 # Copyright © 2012-2014, 2018, 2020 Nick Bowler
2 # License GPLv3+: GNU General Public License version 3 or any later version.
3 # This is free software: you are free to change and redistribute it.
4 # There is NO WARRANTY, to the extent permitted by law.
5
6 EAPI=7
7
8 inherit qmake-utils
9
10 MY_P=${P/qcachegrind/kcachegrind}
11
12 DESCRIPTION="Qt-based GUI frontend for Callgrind"
13 HOMEPAGE="https://kcachegrind.github.io/"
14 SRC_URI="https://kcachegrind.github.io/files/$MY_P.tar.gz"
15
16 LICENSE="GPL-2"
17 SLOT="0"
18 KEYWORDS="~amd64"
19 IUSE="dbus +qt5"
20
21 DEPEND="qt5? (
22                 dev-qt/qtgui:5
23                 dbus? ( dev-qt/qtdbus:5 )
24         )
25         !qt5? (
26                 >=dev-qt/qtgui-4.4:4
27                 dbus? ( >=dev-qt/qtdbus-4.4:4 )
28         )"
29 RDEPEND="$DEPEND
30         media-gfx/graphviz"
31
32 S=$WORKDIR/$MY_P
33
34 PATCHES=(
35         "$FILESDIR/$P-qt5-fix.patch"
36 )
37
38 pkg_setup() {
39         use dbus || PATCHES+=("$FILESDIR/$PN-disable-dbus.patch")
40 }
41
42 src_configure() {
43         eqmake$(usex qt5 5 4) qcg.pro
44 }
45
46 src_install() {
47         default
48
49         dobin qcachegrind/qcachegrind
50         dobin cgview/cgview
51
52         newicon -s 48 kcachegrind/hi48-app-kcachegrind.png kcachegrind.png
53         newicon -s 32 kcachegrind/hi32-app-kcachegrind.png kcachegrind.png
54
55         insinto /usr/share/applications
56         doins qcachegrind/qcachegrind.desktop
57 }