You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/perl-core/ExtUtils-MakeMaker/files/6.58-RUNPATH.patch

17 lines
723 B

--- 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;
}
}