diff options
author | Jamie Lenehan <lenehan@twibble.org> | 2007-04-30 04:06:31 +0000 |
---|---|---|
committer | Jamie Lenehan <lenehan@twibble.org> | 2007-04-30 04:06:31 +0000 |
commit | bca1af865658a00eb25d22c0fb22b8fecc745813 (patch) | |
tree | e342293ca7717835f82ccad62121f087bc6caa81 /classes/cpan.bbclass | |
parent | 21174316f8181c882e6816b923ad2ca81c3778a2 (diff) |
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.
Diffstat (limited to 'classes/cpan.bbclass')
-rw-r--r-- | classes/cpan.bbclass | 9 |
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 |