autodeps: parse LIB_DIRS with more specificity

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2025-01-31 15:56:51 +10:00
parent bc7b8e2eb2
commit 0f6b4f4fab
2 changed files with 4 additions and 4 deletions

View file

@ -51,8 +51,8 @@ library_depends() {
unset prefix
for libdir in ${LIB_DIRS[@]}; do
if [[ ${libdir/*:} == ${libpath} ]]; then
prefix=${libdir/:*}
if [[ ${libdir#*:} == ${libpath} ]]; then
prefix=${libdir%%:*}
fi
done

View file

@ -28,8 +28,8 @@ autodep_functions+=('library_provides')
library_provides() {
if check_option "autodeps" "y"; then
for lib in ${LIB_DIRS[@]}; do
dir=${lib/*:}
prefix=${lib/:*}
dir=${lib#*:}
prefix=${lib%%:*}
if [[ ! -d "$pkgdir/$dir" ]]; then
continue;