]> git.draconx.ca Git - gentoo-draconx.git/blobdiff - dev-util/qcachegrind/qcachegrind-0.7.4-r1.ebuild
qcachegrind: Enable build for Qt5.
[gentoo-draconx.git] / dev-util / qcachegrind / qcachegrind-0.7.4-r1.ebuild
diff --git a/dev-util/qcachegrind/qcachegrind-0.7.4-r1.ebuild b/dev-util/qcachegrind/qcachegrind-0.7.4-r1.ebuild
new file mode 100644 (file)
index 0000000..090e7d2
--- /dev/null
@@ -0,0 +1,54 @@
+# Copyright © 2012-2014, 2018 Nick Bowler
+# License GPLv3+: GNU General Public License version 3 or later.
+# There is NO WARRANTY, to the extent permitted by law.
+
+EAPI=6
+
+inherit qmake-utils
+
+MY_P=${P/qcachegrind/kcachegrind}
+
+DESCRIPTION="Qt-based GUI frontend for Callgrind"
+HOMEPAGE="https://kcachegrind.github.io/"
+SRC_URI="https://kcachegrind.github.io/files/$MY_P.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="dbus +qt5"
+
+DEPEND="qt5? (
+               dev-qt/qtgui:5
+               dbus? ( dev-qt/qtdbus:5 )
+       )
+       !qt5? (
+               >=dev-qt/qtgui-4.4:4
+               dbus? ( >=dev-qt/qtdbus-4.4:4 )
+       )"
+RDEPEND="$DEPEND
+       media-gfx/graphviz"
+
+S=$WORKDIR/$MY_P
+
+PATCHES=(
+       "$FILESDIR/$P-qt5-fix.patch"
+)
+
+pkg_setup() {
+       use dbus || PATCHES+=("$FILESDIR/$PN-disable-dbus.patch")
+}
+
+src_configure() {
+       eqmake$(usex qt5 5 4) qcg.pro
+}
+
+src_install() {
+       dobin qcachegrind/qcachegrind
+       dobin cgview/cgview
+
+       newicon -s 48 kcachegrind/hi48-app-kcachegrind.png kcachegrind.png
+       newicon -s 32 kcachegrind/hi32-app-kcachegrind.png kcachegrind.png
+
+       insinto /usr/share/applications
+       doins qcachegrind/qcachegrind.desktop
+}