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