summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel
diff options
context:
space:
mode:
authorTom Zanussi <tom.zanussi@intel.com>2012-06-24 23:31:58 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-07-04 14:54:11 +0100
commit73a8eed010a821fc4f5c0e71ef749938ed780b44 (patch)
tree66b5e68e56804bf7a3589ab93362b2c7e90dfa3d /meta/recipes-kernel
parent487c3a72f0ac7121b79d2f78b81f1d4732bc258a (diff)
downloadopenembedded-core-73a8eed010a821fc4f5c0e71ef749938ed780b44.tar.gz
perf: enable Perl binding
Add support to enable the perf Perl binding. The build depends on perl-native to retrieve the configuration settings needed for the binding. cpan-base adds some useful functions like is_target() and get_perl_version() that we need for PERLCONFIGTARGET and related settings, which allow us to use the target's Config_heavy.pl settings for ExtUtils:Embed when building for the target. Also adds the perl-modules dependency to give the target the perl modules that scripts using the binding need. Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
Diffstat (limited to 'meta/recipes-kernel')
-rw-r--r--meta/recipes-kernel/perf/perf_3.4.bb11
1 files changed, 10 insertions, 1 deletions
diff --git a/meta/recipes-kernel/perf/perf_3.4.bb b/meta/recipes-kernel/perf/perf_3.4.bb
index 9f3648473f..514876b873 100644
--- a/meta/recipes-kernel/perf/perf_3.4.bb
+++ b/meta/recipes-kernel/perf/perf_3.4.bb
@@ -18,7 +18,8 @@ DEPENDS = "virtual/kernel \
${MLPREFIX}elfutils \
${MLPREFIX}binutils \
"
-RDEPENDS_${PN} += "elfutils perl python"
+
+RDEPENDS_${PN} += "elfutils perl perl-modules python"
PROVIDES = "virtual/perf"
@@ -31,6 +32,14 @@ export STAGING_LIBDIR
export BUILD_SYS
export HOST_SYS
+# needed for building the tools/perf Perl binding
+inherit perlnative cpan-base
+# Env var which tells perl if it should use host (no) or target (yes) settings
+export PERLCONFIGTARGET = "${@is_target(d)}"
+export PERL_INC = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}/CORE"
+export PERL_LIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}"
+export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}"
+
S = "${STAGING_KERNEL_DIR}"
B = "${WORKDIR}/${BPN}-${PV}"