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