aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/perl/perl/dynaloaderhack.patch
blob: d1cca3962f42b4683e48b6059272b26125af7094 (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
From 28330ca32a8a26b034f410c380c637f476f74f51 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] 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 bd95625..edfe86d 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