aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/perl/perl/dynaloaderhack.patch
blob: 719f07c9cc4512f55b9f9057ef6e9db380445796 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From 2e0ce5d27e70defd66ace0661af7c24daae34f8b Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Sat, 19 Jan 2013 23:49:24 +0000
Subject: [PATCH 7/8] perl: Add dyanloader build hack

Hack the dynamic module loader so that we use native modules since we can't load
the target ones.

Upstream-Status: Inappropriate

RP
2013/01/13

---
 ext/DynaLoader/DynaLoader_pm.PL | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ext/DynaLoader/DynaLoader_pm.PL b/ext/DynaLoader/DynaLoader_pm.PL
index e828f35..4021559 100644
--- a/ext/DynaLoader/DynaLoader_pm.PL
+++ b/ext/DynaLoader/DynaLoader_pm.PL
@@ -343,6 +343,10 @@ sub bootstrap {
     foreach (@INC) {
 	<<$^O-eq-VMS>>chop($_ = VMS::Filespec::unixpath($_));<</$^O-eq-VMS>>
 	    $dir = "$_/auto/$modpname";
+
+	if (defined $ENV{PERL_LIB} and defined $ENV{PERLHOSTLIB}) {
+	    $dir =~ s/$ENV{PERL_LIB}/$ENV{PERLHOSTLIB}/g;
+	}
 	
 	next unless -d $dir; # skip over uninteresting directories
 	
-- 
2.1.4