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>
${MLPREFIX}elfutils \
${MLPREFIX}binutils \
"
-RDEPENDS_${PN} += "elfutils perl python"
+
+RDEPENDS_${PN} += "elfutils perl perl-modules python"
PROVIDES = "virtual/perf"
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}"