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