]> git.draconx.ca Git - gentoo-draconx.git/blob - dev-util/qcachegrind/qcachegrind-0.7.4-r3.ebuild
dev-util/qcachegrind: Add qtwidgets:5 dependency.
[gentoo-draconx.git] / dev-util / qcachegrind / qcachegrind-0.7.4-r3.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                 dev-qt/qtwidgets:5
24                 dbus? ( dev-qt/qtdbus:5 )
25         )
26         !qt5? (
27                 >=dev-qt/qtgui-4.4:4
28                 dbus? ( >=dev-qt/qtdbus-4.4:4 )
29         )"
30 RDEPEND="$DEPEND
31         media-gfx/graphviz"
32
33 S=$WORKDIR/$MY_P
34
35 PATCHES=(
36         "$FILESDIR/$P-qt5-fix.patch"
37 )
38
39 pkg_setup() {
40         use dbus || PATCHES+=("$FILESDIR/$PN-disable-dbus.patch")
41 }
42
43 src_configure() {
44         eqmake$(usex qt5 5 4) qcg.pro
45 }
46
47 src_install() {
48         default
49
50         dobin qcachegrind/qcachegrind
51         dobin cgview/cgview
52
53         newicon -s 48 kcachegrind/hi48-app-kcachegrind.png kcachegrind.png
54         newicon -s 32 kcachegrind/hi32-app-kcachegrind.png kcachegrind.png
55
56         insinto /usr/share/applications
57         doins qcachegrind/qcachegrind.desktop
58 }