summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--subr/pkg_install_libs.subr5
1 files changed, 3 insertions, 2 deletions
diff --git a/subr/pkg_install_libs.subr b/subr/pkg_install_libs.subr
index 61d87a56..c4b49c6e 100644
--- a/subr/pkg_install_libs.subr
+++ b/subr/pkg_install_libs.subr
@@ -19,11 +19,12 @@ pkgp_install_lib_check() {
pkgp_install_lib_link() {
local _so_path="${1}" _so_dir="${2}" _lib_name="${3}" \
_lib_link_tgt _lib_link_path;
+ _lib_link_path="${_so_path%.so*}.lib.a";
_lib_link_tgt="$(find "${_so_dir}" \
-name "${_lib_name%%.*}.*.lib.a" |\
sort | tail -1)";
- if [ -n "${_lib_link_tgt}" ]; then
- _lib_link_path="${_so_path%.so*}.lib.a";
+ if [ -n "${_lib_link_tgt}" ]\
+ && [ "${_lib_link_tgt}" != "${_lib_link_path}" ]; then
ex_build_fileop rm "${_lib_link_path}";
ex_build_fileop ln_symbolic "$(ex_basename "${_lib_link_tgt}")" \
"${_lib_link_path}";