Patchwork [9/9] perf: add perf-tui MACHINE_FEATURE

login
register
mail settings
Submitter Tom Zanussi
Date July 3, 2012, 6:10 p.m.
Message ID <246e913de2b0b5f18666c018ac001053cd32a7e7.1341338051.git.tom.zanussi@intel.com>
Download mbox | patch
Permalink /patch/31113/
State New
Headers show

Comments

Tom Zanussi - July 3, 2012, 6:10 p.m.
From: Tom Zanussi <tom.zanussi@intel.com>

Add a new MACHINE_FEATURE named 'perf-tui'.  Adding this into any
machine configuration will enable perf TUI (Text-base UI) user
interface on the target, which adds libnewt and turns on the perf text
UI options in perf, if perf is included in an image.

If 'perf-tui' isn't named as a feature (the default), the perf TUI
will be disabled and unavailable.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 meta/recipes-kernel/perf/perf_3.4.bb |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

Patch

diff --git a/meta/recipes-kernel/perf/perf_3.4.bb b/meta/recipes-kernel/perf/perf_3.4.bb
index 81121c1..8932bd1 100644
--- a/meta/recipes-kernel/perf/perf_3.4.bb
+++ b/meta/recipes-kernel/perf/perf_3.4.bb
@@ -9,17 +9,21 @@  as well."
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
 
-PR = "r1"
+PR = "r2"
 
 BUILDPERF_libc-uclibc = "no"
 
+TUI_DEPENDS = "${@base_contains('MACHINE_FEATURES', 'perf-tui', 'libnewt', '',d)}"
+
 DEPENDS = "virtual/kernel \
            virtual/${MLPREFIX}libc \
            ${MLPREFIX}elfutils \
            ${MLPREFIX}binutils \
+           ${TUI_DEPENDS} \
           "
 
 SCRIPTING_RDEPENDS = "${@base_contains('MACHINE_FEATURES', 'perf-scripting', 'perl perl-modules python', '',d)}"
+TUI_RDEPENDS = "${@base_contains('MACHINE_FEATURES', 'perf-tui', 'libnewt', '',d)}"
 RDEPENDS_${PN} += "elfutils ${SCRIPTING_RDEPENDS}"
 
 PROVIDES = "virtual/perf"
@@ -45,6 +49,7 @@  S = "${STAGING_KERNEL_DIR}"
 B = "${WORKDIR}/${BPN}-${PV}"
 
 SCRIPTING_DEFINES = "${@base_contains('MACHINE_FEATURES', 'perf-scripting', '', 'NO_LIBPERL=1 NO_LIBPYTHON=1',d)}"
+TUI_DEFINES = "${@base_contains('MACHINE_FEATURES', 'perf-tui', '', 'NO_NEWT=1',d)}"
 
 EXTRA_OEMAKE = \
 		'-C ${S}/tools/perf \
@@ -54,7 +59,7 @@  EXTRA_OEMAKE = \
 		CC="${CC}" \
 		AR="${AR}" \
 		prefix=/usr \
-		NO_GTK2=1 NO_NEWT=1 NO_DWARF=1 ${SCRIPTING_DEFINES} \
+		NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${SCRIPTING_DEFINES} \
 		'
 
 do_compile() {