[oe-commits] Ben Gardiner : latencytop: add version 0.5

git version control git at git.openembedded.org
Mon Oct 4 20:59:45 UTC 2010


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 72816b2be90da3c04c06106f190c2f3657a4f6cf
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=72816b2be90da3c04c06106f190c2f3657a4f6cf

Author: Ben Gardiner <bengardiner at nanometrics.ca>
Date:   Mon May 31 05:48:24 2010 +0000

latencytop: add version 0.5

Add a new recipe to for latencytop.
* patch the makefile to disable GTK support, use the LDFLAGS and use ncurses
  instead of the 'w' variant.

Signed-off-by: Ben Gardiner <bengardiner at nanometrics.ca>
Signed-off-by: Eric Bénard <eric at eukrea.com>

---

 recipes/latencytop/latencytop/cc-var.patch        |   15 +++++++++++
 recipes/latencytop/latencytop/fixinstalldir.patch |   10 +++++++
 recipes/latencytop/latencytop/ldflags.patch       |   11 ++++++++
 recipes/latencytop/latencytop/ncursesw.patch      |   27 +++++++++++++++++++++
 recipes/latencytop/latencytop/no-gtk.patch        |    9 +++++++
 recipes/latencytop/latencytop_0.5.bb              |   23 +++++++++++++++++
 6 files changed, 95 insertions(+), 0 deletions(-)

diff --git a/recipes/latencytop/latencytop/cc-var.patch b/recipes/latencytop/latencytop/cc-var.patch
new file mode 100644
index 0000000..70b9ebb
--- /dev/null
+++ b/recipes/latencytop/latencytop/cc-var.patch
@@ -0,0 +1,15 @@
+--- latencytop-0.5/Makefile.orig	2010-05-27 16:45:23.051146454 -0400
++++ latencytop-0.5/Makefile	2010-05-27 16:49:14.660573483 -0400
+@@ -23,10 +23,10 @@ endif
+ 
+ # We write explicity this "implicit rule"
+ %.o : %.c
+-	gcc -c $(CFLAGS) $(XCFLAGS) $< -o $@
++	$(CC) -c $(CFLAGS) $(XCFLAGS) $< -o $@
+ 
+ latencytop:  $(OBJS) latencytop.h Makefile
+-	gcc $(CFLAGS) $(OBJS) $(LDF) -o latencytop 
++	$(CC) $(CFLAGS) $(OBJS) $(LDF) -o latencytop 
+ 
+ clean:
+ 	rm -f *~ latencytop DEADJOE *.o
diff --git a/recipes/latencytop/latencytop/fixinstalldir.patch b/recipes/latencytop/latencytop/fixinstalldir.patch
new file mode 100644
index 0000000..7f3d7ab
--- /dev/null
+++ b/recipes/latencytop/latencytop/fixinstalldir.patch
@@ -0,0 +1,10 @@
+diff --git a/Makefile b/Makefile
+index 24c0946..89a9021 100644
+--- a/Makefile
++++ b/Makefile
+@@ -28,4 +28,5 @@ install: latencytop
+ 	mkdir -p $(DESTDIR)/usr/share/latencytop
+ 	install -m 0644 latencytop.trans $(DESTDIR)/usr/share/latencytop/latencytop.trans
+ 	install -m 0644 *.png $(DESTDIR)/usr/share/latencytop/
++	mkdir -p $(DESTDIR)$(SBINDIR)/
+ 	install -m 0755 latencytop $(DESTDIR)$(SBINDIR)/
diff --git a/recipes/latencytop/latencytop/ldflags.patch b/recipes/latencytop/latencytop/ldflags.patch
new file mode 100644
index 0000000..526c9c7
--- /dev/null
+++ b/recipes/latencytop/latencytop/ldflags.patch
@@ -0,0 +1,11 @@
+--- latencytop-0.5/Makefile.orig	2010-05-31 11:05:50.750592910 -0400
++++ latencytop-0.5/Makefile	2010-05-31 11:06:03.030795137 -0400
+@@ -26,7 +26,7 @@ endif
+ 	$(CC) -c $(CFLAGS) $(XCFLAGS) $< -o $@
+ 
+ latencytop:  $(OBJS) latencytop.h Makefile
+-	$(CC) $(CFLAGS) $(OBJS) $(LDF) -o latencytop 
++	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LDF) -o latencytop 
+ 
+ clean:
+ 	rm -f *~ latencytop DEADJOE *.o
diff --git a/recipes/latencytop/latencytop/ncursesw.patch b/recipes/latencytop/latencytop/ncursesw.patch
new file mode 100644
index 0000000..2aa3944
--- /dev/null
+++ b/recipes/latencytop/latencytop/ncursesw.patch
@@ -0,0 +1,27 @@
+--- latencytop-0.5/Makefile.orig	2010-05-31 11:11:51.632940308 -0400
++++ latencytop-0.5/Makefile	2010-05-31 11:12:48.201571738 -0400
+@@ -1,7 +1,7 @@
+ DESTDIR =
+ SBINDIR = /usr/sbin
+ XCFLAGS = -W  -g `pkg-config --cflags glib-2.0` -D_FORTIFY_SOURCE=2 -Wno-sign-compare
+-LDF = -Wl,--as-needed `pkg-config --libs glib-2.0`   -lncursesw 
++LDF = -Wl,--as-needed `pkg-config --libs glib-2.0`   -lncurses
+ 
+ OBJS= latencytop.o text_display.o translate.o fsync.o
+ 
+@@ -12,14 +12,7 @@ ifdef HAS_GTK_GUI
+ endif
+ 
+ 
+-#
+-# The w in -lncursesw is not a typo; it is the wide-character version
+-# of the ncurses library, needed for multi-byte character languages
+-# such as Japanese and Chinese etc.
+-#
+-# On Debian/Ubuntu distros, this can be found in the
+-# libncursesw5-dev package. 
+-#
++# we use ncurses instead of ncursesw in embedded environments -- similar to powertop
+ 
+ # We write explicity this "implicit rule"
+ %.o : %.c
diff --git a/recipes/latencytop/latencytop/no-gtk.patch b/recipes/latencytop/latencytop/no-gtk.patch
new file mode 100644
index 0000000..b3500b4
--- /dev/null
+++ b/recipes/latencytop/latencytop/no-gtk.patch
@@ -0,0 +1,9 @@
+--- latencytop-0.5/Makefile.orig	2010-05-27 16:36:41.510515029 -0400
++++ latencytop-0.5/Makefile	2010-05-27 16:37:03.442467568 -0400
+@@ -1,6 +1,3 @@
+-# FIXME: Use autoconf ?
+-HAS_GTK_GUI = 1
+-
+ DESTDIR =
+ SBINDIR = /usr/sbin
+ XCFLAGS = -W  -g `pkg-config --cflags glib-2.0` -D_FORTIFY_SOURCE=2 -Wno-sign-compare
diff --git a/recipes/latencytop/latencytop_0.5.bb b/recipes/latencytop/latencytop_0.5.bb
new file mode 100644
index 0000000..14491c0
--- /dev/null
+++ b/recipes/latencytop/latencytop_0.5.bb
@@ -0,0 +1,23 @@
+DESCRIPTION = "measuring and fixing Linux latency"
+HOMEPAGE = "http://www.latencytop.org/"
+LICENSE = "GPL"
+
+DEPENDS = "glib-2.0 ncurses"
+
+SRC_URI = "\
+  http://www.latencytop.org/download/latencytop-${PV}.tar.gz\
+  file://no-gtk.patch \
+  file://cc-var.patch \
+  file://ldflags.patch \
+  file://ncursesw.patch \
+  file://fixinstalldir.patch \
+"
+
+do_install() {
+        oe_runmake DESTDIR="${D}" install
+}
+
+SRC_URI[md5sum] = "73bb3371c6ee0b0e68e25289027e865c"
+SRC_URI[sha256sum] = "9e7f72fbea7bd918e71212a1eabaad8488d2c602205d2e3c95d62cd57e9203ef"
+
+FILES_${PN} = "${sbindir} ${datadir}/${PN}/latencytop.trans"





More information about the Openembedded-commits mailing list