makepkg: fix extraction of soname in find_libdepends

libperl.so results in soname="libperl.so.so" which is wrong.

This returns the correct string: "libperl.so"

Fix-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Florian Pritz <bluewind@xinu.at>
This commit is contained in:
Florian Pritz 2012-03-04 19:17:21 +01:00 committed by Dan McGee
parent 986e99a613
commit fbfcd86650
1 changed files with 1 additions and 1 deletions

View File

@ -1067,7 +1067,7 @@ find_libdepends() {
for sofile in $(LC_ALL=C readelf -d "$filename" 2>/dev/null | sed -nr 's/.*Shared library: \[(.*)\].*/\1/p')
do
# extract the library name: libfoo.so
soname="${sofile%%\.so\.*}.so"
soname="${sofile%.so?(+(.+([0-9])))}".so
# extract the major version: 1
soversion="${sofile##*\.so\.}"
if in_array "${soname}" ${depends[@]}; then