diff options
author | Jamie Lenehan <lenehan@twibble.org> | 2007-04-30 04:12:09 +0000 |
---|---|---|
committer | Jamie Lenehan <lenehan@twibble.org> | 2007-04-30 04:12:09 +0000 |
commit | c8ffd6dc2793e9cab761ad7c9c6b1bdd8425a28b (patch) | |
tree | 1891aa13788b48f893254bfee38d8787397b8583 | |
parent | 32bd006a7e537d275653a0899430aa194e736148 (diff) | |
parent | ffc51060357ce21e555d9ed50042ccfa04286528 (diff) |
merge of '0e85d248181cfdf704931e925058cea1824151c2'
and '4ae75f1e55a112909b2988f967576647e8b6ed03'
-rw-r--r-- | classes/cpan.bbclass | 9 | ||||
-rw-r--r-- | packages/perl/libxml-parser-perl_2.34.bb | 5 | ||||
-rw-r--r-- | packages/perl/perl-5.8.8/perl-configpm-switch.patch | 34 | ||||
-rw-r--r-- | packages/perl/perl-native_5.8.8.bb | 7 | ||||
-rw-r--r-- | packages/perl/perl_5.8.8.bb | 3 |
5 files changed, 54 insertions, 4 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 diff --git a/packages/perl/libxml-parser-perl_2.34.bb b/packages/perl/libxml-parser-perl_2.34.bb index f6cbb4efbe..67ee0bd8de 100644 --- a/packages/perl/libxml-parser-perl_2.34.bb +++ b/packages/perl/libxml-parser-perl_2.34.bb @@ -1,11 +1,14 @@ SECTION = "libs" LICENSE = "Artistic" -PR = "r3" +DEPENDS += "expat-native" +PR = "r4" SRC_URI = "http://www.cpan.org/modules/by-module/XML/XML-Parser-${PV}.tar.gz" S = "${WORKDIR}/XML-Parser-${PV}" +EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}" + inherit cpan FILES_${PN} = "${PERLLIBDIRS}/auto/XML/Parser/Expat/* \ diff --git a/packages/perl/perl-5.8.8/perl-configpm-switch.patch b/packages/perl/perl-5.8.8/perl-configpm-switch.patch new file mode 100644 index 0000000000..1aacd35189 --- /dev/null +++ b/packages/perl/perl-5.8.8/perl-configpm-switch.patch @@ -0,0 +1,34 @@ +This patch is used for perl-native only. It enables the switching of +configuration files between Config_heavy.pl and +Config_heavy-target.pl by setting the environment variables +PERLCONFIGTARGET - the later containing settings for the target while +the former contains those for the host. This will allow cpan.bbclass +to use the settings appropriate for the native and/or target builds +as required. This also disables the use of the cache since the cached +values would be valid for the host only. + +--- perl-5.8.8/configpm 2007/04/30 03:10:43 1.1 ++++ perl-5.8.8/configpm 2007/04/30 03:11:56 +@@ -374,7 +374,7 @@ + my($self, $key) = @_; + + # check for cached value (which may be undef so we use exists not defined) +- return $self->{$key} if exists $self->{$key}; ++ #return $self->{$key} if exists $self->{$key}; + + return $self->fetch_string($key); + } +@@ -530,7 +530,12 @@ + sub DESTROY { } + + sub AUTOLOAD { +- require 'Config_heavy.pl'; ++ my $cfgfile = 'Config_heavy.pl'; ++ if (defined $ENV{PERLCONFIGTARGET} and $ENV{PERLCONFIGTARGET} eq "yes") ++ { ++ $cfgfile = 'Config_heavy-target.pl'; ++ } ++ require $cfgfile; + goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/; + die "&Config::AUTOLOAD failed on $Config::AUTOLOAD"; + } diff --git a/packages/perl/perl-native_5.8.8.bb b/packages/perl/perl-native_5.8.8.bb index e14ced8691..75002313cd 100644 --- a/packages/perl/perl-native_5.8.8.bb +++ b/packages/perl/perl-native_5.8.8.bb @@ -3,12 +3,15 @@ HOMEPAGE = "http://www.perl.org/" SECTION = "libs" LICENSE = "Artistic|GPL" DEPENDS = "virtual/db-native gdbm-native" -PR = "r0" +PR = "r1" + +FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/perl-${PV}" DEFAULT_PREFERENCE = "-1" SRC_URI = "http://ftp.funet.fi/pub/CPAN/src/perl-${PV}.tar.gz \ - file://Configure-multilib.patch;patch=1" + file://Configure-multilib.patch;patch=1 \ + file://perl-configpm-switch.patch;patch=1" S = "${WORKDIR}/perl-${PV}" diff --git a/packages/perl/perl_5.8.8.bb b/packages/perl/perl_5.8.8.bb index 486c999eaa..7265074ea7 100644 --- a/packages/perl/perl_5.8.8.bb +++ b/packages/perl/perl_5.8.8.bb @@ -5,7 +5,7 @@ LICENSE = "Artistic|GPL" PRIORITY = "optional" # We need gnugrep (for -I) DEPENDS = "virtual/db perl-native grep-native" -PR = "r7" +PR = "r8" # Major part of version PVM = "5.8" @@ -127,6 +127,7 @@ do_install() { do_stage() { install -d ${STAGING_DIR}/${HOST_SYS}/perl/ install config.sh ${STAGING_DIR}/${HOST_SYS}/perl/ + install lib/Config_heavy.pl ${STAGING_DIR}/${BUILD_SYS}/lib/perl5/${PV}/Config_heavy-target.pl } PACKAGES = "perl-dbg perl perl-misc perl-lib perl-dev perl-pod perl-doc" |