7e86df
diff -up perl-5.14.0/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm.usem perl-5.14.0/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm
7e86df
--- perl-5.14.0/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm.usem	2011-05-08 05:10:08.000000000 +0200
7e86df
+++ perl-5.14.0/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm	2011-05-17 11:14:22.169115984 +0200
7e86df
@@ -89,6 +89,11 @@ libraries.  LD_RUN_PATH is a colon separ
7e86df
 in LDLOADLIBS. It is passed as an environment variable to the process
7e86df
 that links the shared library.
7e86df
 
7e86df
+Fedora extension: This generation of LD_RUN_PATH is disabled by default.
7e86df
+To use the generated LD_RUN_PATH for all links, set the USE_MM_LD_RUN_PATH
7e86df
+MakeMaker object attribute / argument, (or set the $USE_MM_LD_RUN_PATH
7e86df
+environment variable).
7e86df
+
7e86df
 =head2 BSLOADLIBS
7e86df
 
7e86df
 List of those libraries that are needed but can be linked in
7e86df
diff -up perl-5.14.0/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm.usem perl-5.14.0/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm
7e86df
--- perl-5.14.0/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm.usem	2011-05-08 05:10:08.000000000 +0200
7e86df
+++ perl-5.14.0/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm	2011-05-17 13:39:26.912586030 +0200
7e86df
@@ -317,7 +317,7 @@ sub full_setup {
7e86df
     PERM_DIR PERM_RW PERM_RWX MAGICXS
7e86df
     PL_FILES PM PM_FILTER PMLIBDIRS PMLIBPARENTDIRS POLLUTE
7e86df
     PREREQ_FATAL PREREQ_PM PREREQ_PRINT PRINT_PREREQ PUREPERL_ONLY
7e86df
-    SIGN SKIP TEST_REQUIRES TYPEMAPS UNINST VERSION VERSION_FROM XS
7e86df
+    SIGN SKIP TEST_REQUIRES TYPEMAPS UNINST USE_MM_LD_RUN_PATH VERSION VERSION_FROM XS
7e86df
     XSBUILD XSMULTI XSOPT XSPROTOARG XS_VERSION
7e86df
     clean depend dist dynamic_lib linkext macro realclean tool_autosplit
7e86df
 
7e86df
@@ -501,7 +501,27 @@ sub new {
7e86df
     # PRINT_PREREQ is RedHatism.
7e86df
     if ("@ARGV" =~ /\bPRINT_PREREQ\b/) {
7e86df
         $self->_PRINT_PREREQ;
7e86df
-   }
7e86df
+    }
7e86df
+
7e86df
+    # USE_MM_LD_RUN_PATH - another RedHatism to disable automatic RPATH generation
7e86df
+    if ( ( ! $self->{USE_MM_LD_RUN_PATH} )
7e86df
+       &&( ("@ARGV" =~ /\bUSE_MM_LD_RUN_PATH(=([01]))?\b/)
7e86df
+        ||( exists( $ENV{USE_MM_LD_RUN_PATH} )
7e86df
+           &&( $ENV{USE_MM_LD_RUN_PATH} =~ /([01])?$/ )
7e86df
+           )
7e86df
+        )
7e86df
+       )
7e86df
+    {
7e86df
+       my $v = $1;
7e86df
+       if( $v )
7e86df
+       {
7e86df
+           $v = ($v=~/=([01])$/)[0];
7e86df
+       }else
7e86df
+       {
7e86df
+           $v = 1;
7e86df
+       };
7e86df
+       $self->{USE_MM_LD_RUN_PATH}=$v;
7e86df
+    };
7e86df
 
7e86df
     print "MakeMaker (v$VERSION)\n" if $Verbose;
7e86df
     if (-f "MANIFEST" && ! -f "Makefile" && ! $UNDER_CORE){
7e86df
@@ -2821,6 +2841,40 @@ precedence.  A typemap in the current di
7e86df
 precedence, even if it isn't listed in TYPEMAPS.  The default system
7e86df
 typemap has lowest precedence.
7e86df
 
7e86df
+=item USE_MM_LD_RUN_PATH
7e86df
+
7e86df
+boolean
7e86df
+The Fedora perl MakeMaker distribution differs from the standard
7e86df
+upstream release in that it disables use of the MakeMaker generated
7e86df
+LD_RUN_PATH by default, UNLESS this attribute is specified , or the
7e86df
+USE_MM_LD_RUN_PATH environment variable is set during the MakeMaker run.
7e86df
+
7e86df
+The upstream MakeMaker will set the ld(1) environment variable LD_RUN_PATH
7e86df
+to the concatenation of every -L ld(1) option directory in which a -l ld(1)
7e86df
+option library is found, which is used as the ld(1) -rpath option if none
7e86df
+is specified. This means that, if your application builds shared libraries
7e86df
+and your MakeMaker application links to them, that the absolute paths of the
7e86df
+libraries in the build tree will be inserted into the RPATH header of all
7e86df
+MakeMaker generated binaries, and that such binaries will be unable to link
7e86df
+to these libraries if they do not still reside in the build tree directories
7e86df
+(unlikely) or in the system library directories (/lib or /usr/lib), regardless
7e86df
+of any LD_LIBRARY_PATH setting. So if you specified -L../mylib -lmylib , and
7e86df
+ your 'libmylib.so' gets installed into /some_directory_other_than_usr_lib,
7e86df
+ your MakeMaker application will be unable to link to it, even if LD_LIBRARY_PATH
7e86df
+is set to include /some_directory_other_than_usr_lib, because RPATH overrides
7e86df
+LD_LIBRARY_PATH.
7e86df
+
7e86df
+So for Fedora MakeMaker builds LD_RUN_PATH is NOT generated by default for
7e86df
+every link. You can still use explicit -rpath ld options or the LD_RUN_PATH
7e86df
+environment variable during the build to generate an RPATH for the binaries.
7e86df
+
7e86df
+You can set the USE_MM_LD_RUN_PATH attribute to 1 on the MakeMaker command
7e86df
+line or in the WriteMakefile arguments to enable generation of LD_RUN_PATH
7e86df
+for every link command.
7e86df
+
7e86df
+USE_MM_LD_RUN_PATH will default to 1 (LD_RUN_PATH will be used) IF the
7e86df
+$USE_MM_LD_RUN_PATH environment variable is set during a MakeMaker run.
7e86df
+
7e86df
 =item VENDORPREFIX
7e86df
 
7e86df
 Like PERLPREFIX, but only for the vendor install locations.
7e86df
diff -up perl-5.14.0/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm.usem perl-5.14.0/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
7e86df
--- perl-5.14.0/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm.usem	2011-05-08 05:10:08.000000000 +0200
7e86df
+++ perl-5.14.0/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm	2011-05-17 11:14:22.172115972 +0200
7e86df
@@ -1045,7 +1045,7 @@ $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $
7e86df
     }
7e86df
 
7e86df
     my $ld_run_path_shell = "";
7e86df
-    if ($self->{LD_RUN_PATH} ne "") {
7e86df
+    if (($self->{LD_RUN_PATH} ne "") && ($self->{USE_MM_LD_RUN_PATH})) {
7e86df
         $ld_run_path_shell = 'LD_RUN_PATH="$(LD_RUN_PATH)" ';
7e86df
     }
7e86df