sys-process/latencytop: Misc improvements
authorAnthony Ryan <anthonyryan1@gmail.com>
Sat, 31 Dec 2016 18:17:06 +0000 (13:17 -0500)
committerAndreas K. Hüttel <dilfridge@gentoo.org>
Sun, 1 Jan 2017 17:20:08 +0000 (18:20 +0100)
* EAPI=5 (not 6 per base-system requirement)
* kernel-info config checking
* KEYWORD="~arm" (tested on armv7a RK3288)
* Convert patches to -p1

Ack'ed by polynomial-c
Closes: https://github.com/gentoo/gentoo/pull/3293

Package-Manager: Portage-2.3.3, Repoman-2.3.1

sys-process/latencytop/files/latencytop-0.5-01-mkdir-usr-sbin-as-well.patch
sys-process/latencytop/files/latencytop-0.5-03-clean-up-build-system.patch
sys-process/latencytop/files/latencytop-0.5-fsync-fix-implicit-decl.patch
sys-process/latencytop/latencytop-0.5-r1.ebuild [new file with mode: 0644]

index 52d791e7a6012878f641d94373876b218b6a4a1e..d5a60c9387545ec7d61fe39b3886233369474a3f 100644 (file)
@@ -7,8 +7,8 @@ Subject: [PATCH] mkdir /usr/sbin as well
 
 diff --git a/src/Makefile b/src/Makefile
 index fdf1616..de24551 100644
---- a/src/Makefile
-+++ b/src/Makefile
+--- a/Makefile
++++ b/Makefile
 @@ -30,6 +30,7 @@
  
  install: latencytop
index 8910e32bbc2bc451b43ff0e7093099c6c79bfb65..4c3461b08051ff90c0252c75ebd850d1f1d0052a 100644 (file)
@@ -13,8 +13,8 @@ Signed-off-by: Mike Frysinger <vapier@gentoo.org>
 
 diff --git a/src/Makefile b/src/Makefile
 index de24551..9a3cc05 100644
---- a/src/Makefile
-+++ b/src/Makefile
+--- a/Makefile
++++ b/Makefile
 @@ -3,14 +3,22 @@ HAS_GTK_GUI = 1
  
  DESTDIR =
index ef57e9e04c008c7160063f4136cb8b87813e85b7..33f2bc278600e55a6e51a24870124d4d3387731c 100644 (file)
@@ -13,8 +13,8 @@ Signed-off-by: Mike Frysinger <vapier@gentoo.org>
 
 diff --git a/src/fsync.c b/src/fsync.c
 index 1706571..3bec719 100644
---- a/src/fsync.c
-+++ b/src/fsync.c
+--- a/fsync.c
++++ b/fsync.c
 @@ -30,6 +30,7 @@
  #include <string.h>
  #include <ncurses.h>
diff --git a/sys-process/latencytop/latencytop-0.5-r1.ebuild b/sys-process/latencytop/latencytop-0.5-r1.ebuild
new file mode 100644 (file)
index 0000000..68205b1
--- /dev/null
@@ -0,0 +1,53 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils linux-info
+
+DESCRIPTION="tool for identifying where in the system latency is happening"
+HOMEPAGE="http://git.infradead.org/latencytop.git"
+
+# Upstream is long gone, so we explicitly use our mirrors for the tarball
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+CONFIG_CHECK="~LATENCYTOP"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="gtk"
+
+RDEPEND="dev-libs/glib:2
+       gtk? ( x11-libs/gtk+:2 )
+       sys-libs/ncurses:0="
+DEPEND="${RDEPEND}
+       virtual/pkgconfig"
+
+# Upstream is dead, so there are no bugs to track for any
+# of these patches.
+PATCHES=(
+       "${FILESDIR}/${P}-01-mkdir-usr-sbin-as-well.patch"
+       "${FILESDIR}/${P}-03-clean-up-build-system.patch"
+       "${FILESDIR}/${P}-fsync-fix-implicit-decl.patch"
+)
+
+pkg_pretend() {
+       linux-info_pkg_setup
+}
+
+pkg_setup() {
+       linux-info_pkg_setup
+}
+
+src_prepare() {
+       epatch "${PATCHES[@]}"
+
+       # Without a configure script, we toggle bools manually
+       # This also needs to be done after patches are applied
+       # since this bool doesn't exist outside our patches
+       if ! use gtk; then
+               sed -i -e "/HAS_GTK_GUI = 1/d" Makefile || die
+       fi
+}