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