From 70111511135644afe9e41304b5d7048772a8ee6b Mon Sep 17 00:00:00 2001 From: Lucio Andrés Illanes Albornoz (arab, vxp) Date: Oct 27 2017 16:47:39 +0000 Subject: subr/pkg_install.subr:pkgp_install_dlltool(): don't pass -printf to find(1) and correctly check for the existence of the target library archive. --- diff --git a/subr/pkg_install.subr b/subr/pkg_install.subr index ac963f7..a22a454 100644 --- a/subr/pkg_install.subr +++ b/subr/pkg_install.subr @@ -20,15 +20,15 @@ pkgp_install_dlltool() { $(find \( -name "*.so" \ -or -name "*.so.*" \ -or -name "*.so.*.*" \ - -or -name "*.so.*.*.*" \) -printf '%P\n'); - do + -or -name "*.so.*.*.*" \) -print); + do _so_fname="${_so_fname#./}"; case "${_so_fname}" in *.so) _so_fname_ver=""; ;; *.so.*) _so_fname_ver="${_so_fname##*.so.}"; ;; esac; _so_name="${_so_fname%%.so*}"; _lib_fname="${_so_name}${_so_fname_ver:+.${_so_fname_ver}}.lib.a"; - if [ -e "${_lib_fname}" ] \ + if [ -e "${PKG_PREFIX}/lib/${_lib_fname}" ] \ || [ ! -e "${PKG_PREFIX}/lib/$(basename "${_so_fname}")" ] \ || [ "$(readlink -f "${_so_fname}")" = "/dev/null" \) ]; then continue;