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