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