Blame SOURCES/perl-5.16.3-create_libperl_soname.patch

243a19
From fa2f0dd5a7767223df10149d3f16d7ed7013e16f Mon Sep 17 00:00:00 2001
243a19
From: Torsten Veller <tove@gentoo.org>
243a19
Date: Sat, 14 Apr 2012 13:49:18 +0200
243a19
Subject: Set libperl soname
243a19
243a19
Bug-Gentoo: https://bugs.gentoo.org/286840
243a19
243a19
Patch-Name: gentoo/create_libperl_soname.diff
243a19
---
243a19
 Makefile.SH | 9 +++++++--
243a19
 1 file changed, 7 insertions(+), 2 deletions(-)
243a19
243a19
diff --git a/Makefile.SH b/Makefile.SH
243a19
index d1da0a0..7733a32 100755
243a19
--- a/Makefile.SH
243a19
+++ b/Makefile.SH
243a19
@@ -58,7 +58,7 @@ true)
243a19
 				${api_revision}.${api_version}.${api_subversion} \
243a19
 			     -current_version \
243a19
 				${revision}.${patchlevel}.${subversion} \
243a19
-			     -install_name \$(shrpdir)/\$@"
243a19
+			     -install_name \$(shrpdir)/libperl.@scl@${revision}.${patchlevel}.dylib"
243a19
 		;;
243a19
 	cygwin*)
243a19
 		shrpldflags="$shrpldflags -Wl,--out-implib=libperl.dll.a -Wl,--image-base,0x52000000"
243a19
@@ -66,13 +66,15 @@ true)
243a19
 		;;
243a19
 	sunos*)
243a19
 		linklibperl="-lperl"
243a19
+		shrpldflags="$shrpldflags -Wl,-soname -Wl,libperl.so.@scl@${revision}.${patchlevel}"
243a19
 		;;
243a19
 	netbsd*|freebsd[234]*|openbsd*|dragonfly*|bitrig*)
243a19
 		linklibperl="-L. -lperl"
243a19
+		shrpldflags="$shrpldflags -Wl,-soname -Wl,libperl.so.@scl@${revision}.${patchlevel}"
243a19
 		;;
243a19
 	interix*)
243a19
 		linklibperl="-L. -lperl"
243a19
-		shrpldflags="$shrpldflags -Wl,--image-base,0x57000000"
243a19
+		shrpldflags="$shrpldflags -Wl,--image-base,0x57000000 -Wl,-soname -Wl,libperl.so.@scl@${revision}.${patchlevel}"
243a19
 		;;
243a19
 	aix*)
243a19
 		case "$cc" in
243a19
@@ -110,6 +112,9 @@ true)
243a19
 	    linklibperl='libperl.x'
243a19
 	    DPERL_EXTERNAL_GLOB=''
243a19
 	    ;;
243a19
+	linux*)
243a19
+		shrpldflags="$shrpldflags -Wl,-soname -Wl,libperl.so.@scl@${revision}.${patchlevel}"
243a19
+	    ;;
243a19
 	esac
243a19
 	case "$ldlibpthname" in
243a19
 	'') ;;