pre-pkg/06-shlib-provides.sh: revamp soname registration.
We now register all versioned sonames, and unversioned sonames only when in libdir. (E.g. libdb and tcl use version numbers in the library name, and have unversioned sonames.) Closes #2699.
This commit is contained in:
parent
09c91f97f0
commit
e3f0ce021e
1 changed files with 8 additions and 2 deletions
|
@ -3,7 +3,8 @@
|
|||
|
||||
collect_sonames() {
|
||||
local _destdir="$1" f _soname _fname _pattern
|
||||
local _pattern="^[[:alnum:]]+(.*)+\.so(\.[0-9]+)+$"
|
||||
local _pattern="^[[:alnum:]]+(.*)+\.so(\.[0-9]+)*$"
|
||||
local _versioned_pattern="^[[:alnum:]]+(.*)+\.so(\.[0-9]+)+$"
|
||||
local _tmpfile="$(mktemp)"
|
||||
|
||||
if [ ! -d ${_destdir} ]; then
|
||||
|
@ -18,7 +19,12 @@ collect_sonames() {
|
|||
application/x-sharedlib*)
|
||||
# shared library
|
||||
_soname=$(${OBJDUMP} -p "$f"|grep SONAME|awk '{print $2}')
|
||||
if [[ ${_soname} =~ ${_pattern} ]]; then
|
||||
# Register all versioned sonames, and
|
||||
# unversioned sonames only when in libdir.
|
||||
if [[ ${_soname} =~ ${_versioned_pattern} ]] ||
|
||||
[[ ${_soname} =~ ${_pattern} &&
|
||||
( -e ${_destdir}/usr/lib/${_fname} ||
|
||||
-e ${_destdir}/usr/lib32/${_fname} ) ]]; then
|
||||
echo "${_soname}" >> ${_tmpfile}
|
||||
echo " SONAME ${_soname} from ${f##${_destdir}}"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue