From bca1af865658a00eb25d22c0fb22b8fecc745813 Mon Sep 17 00:00:00 2001 From: Jamie Lenehan Date: Mon, 30 Apr 2007 04:06:31 +0000 Subject: perl 5.8.8: Improvements for cpan modules: * Modify perl to install a copy of it's configuration during staging. This will allow us to get at the perl settings for the target when building cpan modules. * Modify perl-native to allow selection of the host or target configuration based on an environment variable. This will allow the cpan class to select the appropriate configuration based on if we are building the native package or not. * Modify cpan.bbclass to set the environment variable to an appropriate value to tell perl native to select the appropriate settings based on if we are building native or target modules. This change fixes some modules that were compiled for the host instead of the target (libversion-perl for example) and fixes up some of cpan modules that include additional subdirectories with their own makefiles. --- classes/cpan.bbclass | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'classes') 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 -- cgit v1.2.3