commit:     1b64b1183a42846c6f6900cce6d43f60e72496b1
Author:     Anthony Ryan <anthonyryan1 <AT> gmail <DOT> com>
AuthorDate: Sat Dec 31 18:17:06 2016 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Jan  1 17:20:08 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b64b118

sys-process/latencytop: Misc improvements

* 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

 .../latencytop-0.5-01-mkdir-usr-sbin-as-well.patch |  4 +-
 .../latencytop-0.5-03-clean-up-build-system.patch  |  4 +-
 .../latencytop-0.5-fsync-fix-implicit-decl.patch   |  4 +-
 sys-process/latencytop/latencytop-0.5-r1.ebuild    | 53 ++++++++++++++++++++++
 4 files changed, 59 insertions(+), 6 deletions(-)

diff --git 
a/sys-process/latencytop/files/latencytop-0.5-01-mkdir-usr-sbin-as-well.patch 
b/sys-process/latencytop/files/latencytop-0.5-01-mkdir-usr-sbin-as-well.patch
index 52d791e..d5a60c9 100644
--- 
a/sys-process/latencytop/files/latencytop-0.5-01-mkdir-usr-sbin-as-well.patch
+++ 
b/sys-process/latencytop/files/latencytop-0.5-01-mkdir-usr-sbin-as-well.patch
@@ -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

diff --git 
a/sys-process/latencytop/files/latencytop-0.5-03-clean-up-build-system.patch 
b/sys-process/latencytop/files/latencytop-0.5-03-clean-up-build-system.patch
index 8910e32..4c3461b 100644
--- a/sys-process/latencytop/files/latencytop-0.5-03-clean-up-build-system.patch
+++ b/sys-process/latencytop/files/latencytop-0.5-03-clean-up-build-system.patch
@@ -13,8 +13,8 @@ Signed-off-by: Mike Frysinger <vap...@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 =

diff --git 
a/sys-process/latencytop/files/latencytop-0.5-fsync-fix-implicit-decl.patch 
b/sys-process/latencytop/files/latencytop-0.5-fsync-fix-implicit-decl.patch
index ef57e9e..33f2bc2 100644
--- a/sys-process/latencytop/files/latencytop-0.5-fsync-fix-implicit-decl.patch
+++ b/sys-process/latencytop/files/latencytop-0.5-fsync-fix-implicit-decl.patch
@@ -13,8 +13,8 @@ Signed-off-by: Mike Frysinger <vap...@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
index 00000000..68205b1
--- /dev/null
+++ b/sys-process/latencytop/latencytop-0.5-r1.ebuild
@@ -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
+}

Reply via email to