summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/perl/perl-5.8.8/perl-configpm-switch.patch
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:14:24 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:29:45 +0100
commit29d6678fd546377459ef75cf54abeef5b969b5cf (patch)
tree8edd65790e37a00d01c3f203f773fe4b5012db18 /meta/recipes-devtools/perl/perl-5.8.8/perl-configpm-switch.patch
parentda49de6885ee1bc424e70bc02f21f6ab920efb55 (diff)
downloadpoky-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.gz
Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-devtools/perl/perl-5.8.8/perl-configpm-switch.patch')
-rw-r--r--meta/recipes-devtools/perl/perl-5.8.8/perl-configpm-switch.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/perl-configpm-switch.patch b/meta/recipes-devtools/perl/perl-5.8.8/perl-configpm-switch.patch
new file mode 100644
index 0000000000..ac519a0271
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/perl-configpm-switch.patch
@@ -0,0 +1,43 @@
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,21 @@
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+ if (defined $ENV{PERL_ARCHLIB})
32+ {
33+ push @INC, $ENV{PERL_ARCHLIB};
34+ require $cfgfile;
35+ pop @INC;
36+ }
37+ else
38+ {
39+ require $cfgfile;
40+ }
41 goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/;
42 die "&Config::AUTOLOAD failed on $Config::AUTOLOAD";
43 }