diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2015-10-06 18:15:44 +0000 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2015-10-06 18:17:28 +0000 |
commit | e3f0ce021e184afa91d70e75d3269d7e60ed7392 (patch) | |
tree | bfde4395232ca159197bb9e85f90f1d4ad479a39 | |
parent | 09c91f97f060e8e8017c7b4bf752b97a6f6ee08d (diff) | |
download | void-packages-e3f0ce021e184afa91d70e75d3269d7e60ed7392.tar void-packages-e3f0ce021e184afa91d70e75d3269d7e60ed7392.tar.gz void-packages-e3f0ce021e184afa91d70e75d3269d7e60ed7392.tar.bz2 void-packages-e3f0ce021e184afa91d70e75d3269d7e60ed7392.tar.lz void-packages-e3f0ce021e184afa91d70e75d3269d7e60ed7392.tar.xz void-packages-e3f0ce021e184afa91d70e75d3269d7e60ed7392.tar.zst void-packages-e3f0ce021e184afa91d70e75d3269d7e60ed7392.zip |
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.
-rw-r--r-- | common/hooks/pre-pkg/06-shlib-provides.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/common/hooks/pre-pkg/06-shlib-provides.sh b/common/hooks/pre-pkg/06-shlib-provides.sh index 401bc7ab8ab..785a7f39059 100644 --- a/common/hooks/pre-pkg/06-shlib-provides.sh +++ b/common/hooks/pre-pkg/06-shlib-provides.sh @@ -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 |