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