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