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