summaryrefslogtreecommitdiffstats
path: root/meta/packages/perl/perl-5.8.8/perl-configpm-switch.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/perl/perl-5.8.8/perl-configpm-switch.patch')
-rw-r--r--meta/packages/perl/perl-5.8.8/perl-configpm-switch.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/meta/packages/perl/perl-5.8.8/perl-configpm-switch.patch b/meta/packages/perl/perl-5.8.8/perl-configpm-switch.patch
new file mode 100644
index 0000000000..1aacd35189
--- /dev/null
+++ b/meta/packages/perl/perl-5.8.8/perl-configpm-switch.patch
@@ -0,0 +1,34 @@
1This patch is used for perl-native only. It enables the switching of
2configuration files between Config_heavy.pl and
3Config_heavy-target.pl by setting the environment variables
4PERLCONFIGTARGET - the later containing settings for the target while
5the former contains those for the host. This will allow cpan.bbclass
6to use the settings appropriate for the native and/or target builds
7as required. This also disables the use of the cache since the cached
8values would be valid for the host only.
9
10--- perl-5.8.8/configpm 2007/04/30 03:10:43 1.1
11+++ perl-5.8.8/configpm 2007/04/30 03:11:56
12@@ -374,7 +374,7 @@
13 my($self, $key) = @_;
14
15 # check for cached value (which may be undef so we use exists not defined)
16- return $self->{$key} if exists $self->{$key};
17+ #return $self->{$key} if exists $self->{$key};
18
19 return $self->fetch_string($key);
20 }
21@@ -530,7 +530,12 @@
22 sub DESTROY { }
23
24 sub AUTOLOAD {
25- require 'Config_heavy.pl';
26+ my $cfgfile = 'Config_heavy.pl';
27+ if (defined $ENV{PERLCONFIGTARGET} and $ENV{PERLCONFIGTARGET} eq "yes")
28+ {
29+ $cfgfile = 'Config_heavy-target.pl';
30+ }
31+ require $cfgfile;
32 goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/;
33 die "&Config::AUTOLOAD failed on $Config::AUTOLOAD";
34 }