summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/perl/files/perl-configpm-switch.patch
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-06-17 16:48:59 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-06-18 11:23:48 +0100
commit6896ca82f106c65e6c7d08986cfe86d2305c6afa (patch)
treea9af7a0bb0371d61c86376805798839e4ad6e052 /meta/recipes-devtools/perl/files/perl-configpm-switch.patch
parent646b596c99119f40060d84a4bc6349f3a2a4e893 (diff)
downloadpoky-6896ca82f106c65e6c7d08986cfe86d2305c6afa.tar.gz
perl: Move perl-sanity -> perl
This was moved during the perl cleanup, it can/should be moved back now as its confusing too many people. (From OE-Core rev: ce69c21707aa19ab8a3f6c07dc5a560671ab53a4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/perl/files/perl-configpm-switch.patch')
-rw-r--r--meta/recipes-devtools/perl/files/perl-configpm-switch.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/meta/recipes-devtools/perl/files/perl-configpm-switch.patch b/meta/recipes-devtools/perl/files/perl-configpm-switch.patch
new file mode 100644
index 0000000000..3c2cecb8c1
--- /dev/null
+++ b/meta/recipes-devtools/perl/files/perl-configpm-switch.patch
@@ -0,0 +1,57 @@
1From 7f313cac31c55cbe62a4d0cdfa8321cc05a8eb3a Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Sun, 27 May 2007 21:04:11 +0000
4Subject: [PATCH] perl: 5.8.7 -> 5.8.8 (from OE)
5
6This patch is used for perl-native only. It enables the switching of
7configuration files between Config_heavy.pl and
8Config_heavy-target.pl by setting the environment variables
9PERLCONFIGTARGET - the later containing settings for the target while
10the former contains those for the host. This will allow cpan.bbclass
11to use the settings appropriate for the native and/or target builds
12as required. This also disables the use of the cache since the cached
13values would be valid for the host only.
14
15Upstream-Status: Inappropriate [native]
16Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
17
18---
19 configpm | 18 ++++++++++++++++--
20 1 file changed, 16 insertions(+), 2 deletions(-)
21
22diff --git a/configpm b/configpm
23index 09c4a3b..6a0a680 100755
24--- a/configpm
25+++ b/configpm
26@@ -687,7 +687,7 @@ sub FETCH {
27 my($self, $key) = @_;
28
29 # check for cached value (which may be undef so we use exists not defined)
30- return exists $self->{$key} ? $self->{$key} : $self->fetch_string($key);
31+ return $self->fetch_string($key);
32 }
33
34 ENDOFEND
35@@ -845,7 +845,21 @@ $config_txt .= sprintf <<'ENDOFTIE', $fast_config;
36 sub DESTROY { }
37
38 sub AUTOLOAD {
39- require 'Config_heavy.pl';
40+ my $cfgfile = 'Config_heavy.pl';
41+ if (defined $ENV{PERLCONFIGTARGET} and $ENV{PERLCONFIGTARGET} eq "yes")
42+ {
43+ $cfgfile = 'Config_heavy-target.pl';
44+ }
45+ if (defined $ENV{PERL_ARCHLIB})
46+ {
47+ push @INC, $ENV{PERL_ARCHLIB};
48+ require $cfgfile;
49+ pop @INC;
50+ }
51+ else
52+ {
53+ require $cfgfile;
54+ }
55 goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/;
56 die "&Config::AUTOLOAD failed on $Config::AUTOLOAD";
57 }