summaryrefslogtreecommitdiff
path: root/perl-core/ExtUtils-MakeMaker/files/6.58-RUNPATH.patch
diff options
context:
space:
mode:
Diffstat (limited to 'perl-core/ExtUtils-MakeMaker/files/6.58-RUNPATH.patch')
-rw-r--r--perl-core/ExtUtils-MakeMaker/files/6.58-RUNPATH.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/perl-core/ExtUtils-MakeMaker/files/6.58-RUNPATH.patch b/perl-core/ExtUtils-MakeMaker/files/6.58-RUNPATH.patch
new file mode 100644
index 00000000000..41f26098b2b
--- /dev/null
+++ b/perl-core/ExtUtils-MakeMaker/files/6.58-RUNPATH.patch
@@ -0,0 +1,16 @@
+--- a/lib/ExtUtils/MM_Any.pm
++++ b/lib/ExtUtils/MM_Any.pm
+@@ -1900,6 +1900,13 @@ CODE
+ # LD_RUN_PATH now computed by ExtUtils::Liblist
+ ($self->{EXTRALIBS}, $self->{BSLOADLIBS},
+ $self->{LDLOADLIBS}, $self->{LD_RUN_PATH}) = @libs;
++ # We do not want the build root in RPATH
++ if ( exists $ENV{PORTAGE_TMPDIR} ){
++ # If we have a PORTAGE_TMPDIR set, strip that, as just testing for
++ # /usr and /opt might not be sufficient.
++ $self->{LD_RUN_PATH} = join ':', grep !/^\Q$ENV{PORTAGE_TMPDIR}/,
++ split /:/, $self->{LD_RUN_PATH};
++ }
+ last;
+ }
+ }