summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/cpan.bbclass9
1 files changed, 9 insertions, 0 deletions
diff --git a/classes/cpan.bbclass b/classes/cpan.bbclass
index 00709f7e18..687dbcd1cb 100644
--- a/classes/cpan.bbclass
+++ b/classes/cpan.bbclass
@@ -41,9 +41,18 @@ def perl_get_libdirs(d):
libdirs = libdir + '/*/*/perl5'
return libdirs
+def is_target(d):
+ import bb
+ if not bb.data.inherits_class('native', d):
+ return "yes"
+ return "no"
+
IS_NEW_PERL = "${@is_new_perl(d)}"
PERLLIBDIRS = "${@perl_get_libdirs(d)}"
+# Env var which tells perl if it should use host (no) or target (yes) settings
+export PERLCONFIGTARGET = "${@is_target(d)}"
+
cpan_do_configure () {
perl Makefile.PL ${EXTRA_CPANFLAGS}
if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then