[oe-commits] Khem Raj : powertop: Make it compile on uclibc.

git version control git at git.openembedded.org
Sat Sep 12 06:35:35 UTC 2009


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

Author: Khem Raj <raj.khem at gmail.com>
Date:   Fri Sep 11 23:31:12 2009 -0700

powertop: Make it compile on uclibc.

* Use INC_PR
* Move common stuff to powertop.inc
* Add -lint for uclibc bases systems
* Add a patch to tinker with order of CFLAGS
  in commandline
* Eliminate the sed expression in favor of a
  patch to substitute nsursesw with ncurses

Signed-off-by: Khem Raj <raj.khem at gmail.com>

---

 conf/checksums.ini                   |    4 ++++
 recipes/powertop/files/ldflags.patch |   13 +++++++++++++
 recipes/powertop/powertop.inc        |   27 +++++++++++++++++++++++++++
 recipes/powertop/powertop_1.10.bb    |   19 ++-----------------
 recipes/powertop/powertop_1.11.bb    |   20 ++------------------
 recipes/powertop/powertop_1.8.bb     |   18 ++----------------
 6 files changed, 50 insertions(+), 51 deletions(-)

diff --git a/conf/checksums.ini b/conf/checksums.ini
index 5de82f5..68fba4f 100644
--- a/conf/checksums.ini
+++ b/conf/checksums.ini
@@ -20262,6 +20262,10 @@ sha256=cc60000bbe5f4d7b9beae8a84e1cd1ba69339a489a7d1a7365a3d8fe8fd73d6b
 md5=3498f5983c683c3a57dce7379a722082
 sha256=70e7cc53e5fbade5e447bda9f0ca12f2153bf426e074dbac3a2e97adf46180f2
 
+[http://www.lesswatts.org/projects/powertop/download/powertop-1.8.tar.gz]
+md5=38fd8a6825cd62b6c22df8a44b4e27d0
+sha256=7325ea46e5af59c12ea024e69622ac7753010c8de615d668e1f03b0fc05bad3a
+
 [http://www.linuxpowertop.org/download/powertop-1.8.tar.gz]
 md5=38fd8a6825cd62b6c22df8a44b4e27d0
 sha256=7325ea46e5af59c12ea024e69622ac7753010c8de615d668e1f03b0fc05bad3a
diff --git a/recipes/powertop/files/ldflags.patch b/recipes/powertop/files/ldflags.patch
new file mode 100644
index 0000000..690d90f
--- /dev/null
+++ b/recipes/powertop/files/ldflags.patch
@@ -0,0 +1,13 @@
+Index: powertop-1.11/Makefile
+===================================================================
+--- powertop-1.11.orig/Makefile	2008-12-30 10:52:54.000000000 -0800
++++ powertop-1.11/Makefile	2009-09-11 19:46:19.550388421 -0700
+@@ -20,7 +20,7 @@
+ 	
+ 
+ powertop: $(OBJS) Makefile powertop.h
+-	$(CC) ${CFLAGS}  $(OBJS) -lncursesw -o powertop
++	$(CC) $(OBJS) ${CFLAGS} -lncurses -o powertop
+ 	@(cd po/ && $(MAKE))
+ 
+ powertop.1.gz: powertop.1
diff --git a/recipes/powertop/powertop.inc b/recipes/powertop/powertop.inc
new file mode 100644
index 0000000..931abad
--- /dev/null
+++ b/recipes/powertop/powertop.inc
@@ -0,0 +1,27 @@
+DESCRIPTION = "PowerTOP, a tool that helps you find what software is using the most power."
+HOMEPAGE = "http://www.linuxpowertop.org/"
+LICENSE = "GPLv2"
+DEPENDS = "virtual/libintl ncurses"
+
+INC_PR = "r1"
+
+SRC_URI = "http://www.lesswatts.org/projects/powertop/download/powertop-${PV}.tar.gz \
+	   file://ldflags.patch;patch=1 \
+	  "
+
+CFLAGS = "${LDFLAGS}"
+
+do_configure() {
+    # We do not build ncurses with wide char support
+    # sed -i -e "s/lncursesw/lncurses/" ${S}/Makefile
+    :
+}
+
+do_install() {
+    oe_runmake install DESTDIR=${D}
+}
+
+
+LDFLAGS_append_linux-uclibc = " -lintl"
+LDFLAGS_append_linux-uclibceabi = " -lintl"
+LDFLAGS_append_linux-uclibcspe = " -lintl"
diff --git a/recipes/powertop/powertop_1.10.bb b/recipes/powertop/powertop_1.10.bb
index 4a429d6..49da90e 100644
--- a/recipes/powertop/powertop_1.10.bb
+++ b/recipes/powertop/powertop_1.10.bb
@@ -1,17 +1,2 @@
-DESCRIPTION = "PowerTOP, a tool that helps you find what software is using the most power."
-HOMEPAGE = "http://www.linuxpowertop.org/"
-LICENSE = "GPLv2"
-DEPENDS = "virtual/libintl ncurses"
-
-SRC_URI = "http://www.lesswatts.org/projects/powertop/download/powertop-${PV}.tar.gz"
-
-CFLAGS += "${LDFLAGS}"
-
-do_configure() {
-    # We do not build ncurses with wide char support
-    sed -i -e "s/lncursesw/lncurses/" ${S}/Makefile
-}
-
-do_install() {
-    oe_runmake install DESTDIR=${D}
-}
+require powertop.inc
+PR = "${INC_PR}.0"
diff --git a/recipes/powertop/powertop_1.11.bb b/recipes/powertop/powertop_1.11.bb
index 01148cb..6af5290 100644
--- a/recipes/powertop/powertop_1.11.bb
+++ b/recipes/powertop/powertop_1.11.bb
@@ -1,26 +1,10 @@
-DESCRIPTION = "PowerTOP, a tool that helps you find what software is using the most power."
-HOMEPAGE = "http://www.linuxpowertop.org/"
-LICENSE = "GPLv2"
-DEPENDS = "virtual/libintl ncurses"
+require powertop.inc
 
-PR = "r1"
-
-SRC_URI = "http://www.lesswatts.org/projects/powertop/download/powertop-${PV}.tar.gz"
+PR = "${INC_PR}.0"
 
 SRC_URI_append_armv7a = " file://omap.patch;patch=1;pnum=0"
 
-CFLAGS += "${LDFLAGS}"
 CFLAGS_append_beagleboard = " -DOMAP3"
 CFLAGS_append_overo = " -DOMAP3"
 CFLAGS_append_omap3evm = " -DOMAP3"
 CFLAGS_append_omapzoom2 = " -DOMAP3"
-
-
-do_configure() {
-    # We do not build ncurses with wide char support
-    sed -i -e "s/lncursesw/lncurses/" ${S}/Makefile
-}
-
-do_install() {
-    oe_runmake install DESTDIR=${D}
-}
diff --git a/recipes/powertop/powertop_1.8.bb b/recipes/powertop/powertop_1.8.bb
index ab84161..e74b8a6 100644
--- a/recipes/powertop/powertop_1.8.bb
+++ b/recipes/powertop/powertop_1.8.bb
@@ -1,17 +1,3 @@
-DESCRIPTION = "PowerTOP, a tool that helps you find what software is using the most power."
-HOMEPAGE = "http://www.linuxpowertop.org/"
-LICENSE = "GPLv2"
-DEPENDS = "ncurses"
+require powertop.inc
+PR = "${INC_PR}.0"
 
-SRC_URI = "http://www.linuxpowertop.org/download/powertop-${PV}.tar.gz"
-
-CFLAGS += "${LDFLAGS}"
-
-do_configure() {
-    # We do not build ncurses with wide char support
-    sed -i -e "s/lncursesw/lncurses/" ${S}/Makefile
-}
-
-do_install() {
-    oe_runmake install DESTDIR=${D}
-}





More information about the Openembedded-commits mailing list