Patchwork [3/3] perf: add perf-tui feature

login
register
mail settings
Submitter Tom Zanussi
Date July 9, 2012, 5:07 p.m.
Message ID <59861210906bdddb91dab74b98f7d76bd3f115c4.1341852059.git.tom.zanussi@intel.com>
Download mbox | patch
Permalink /patch/31565/
State Accepted
Commit 4fd8a550886f02189e4ed127d0a2f16e92f8474c
Headers show

Comments

Tom Zanussi - July 9, 2012, 5:07 p.m.
From: Tom Zanussi <tom.zanussi@intel.com>

Add a new feature named 'perf-tui'.  Adding this into the
PERF_FEATURES variable in perf.inc will enable the perf TUI (Text-base
UI) user interface on a 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 |    8 ++++++--
 1 files changed, 6 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 e96552c..ccb7425 100644
--- a/meta/recipes-kernel/perf/perf_3.4.bb
+++ b/meta/recipes-kernel/perf/perf_3.4.bb
@@ -9,16 +9,19 @@  as well."
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
 
-PR = "r2"
+PR = "r3"
 
 require perf.inc
 
 BUILDPERF_libc-uclibc = "no"
 
+TUI_DEPENDS = "${@perf_feature_enabled('perf-tui', 'libnewt', '',d)}"
+
 DEPENDS = "virtual/kernel \
            virtual/${MLPREFIX}libc \
            ${MLPREFIX}elfutils \
            ${MLPREFIX}binutils \
+           ${TUI_DEPENDS} \
           "
 
 SCRIPTING_RDEPENDS = "${@perf_feature_enabled('perf-scripting', 'perl perl-modules python', '',d)}"
@@ -47,6 +50,7 @@  S = "${STAGING_KERNEL_DIR}"
 B = "${WORKDIR}/${BPN}-${PV}"
 
 SCRIPTING_DEFINES = "${@perf_feature_enabled('perf-scripting', '', 'NO_LIBPERL=1 NO_LIBPYTHON=1',d)}"
+TUI_DEFINES = "${@perf_feature_enabled('perf-tui', '', 'NO_NEWT=1',d)}"
 
 EXTRA_OEMAKE = \
 		'-C ${S}/tools/perf \
@@ -56,7 +60,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() {