abuild: simplify depends_static

Should not be any significant functional difference.
This commit is contained in:
Richard Mortier 2019-09-30 12:02:40 +00:00 committed by Natanael Copa
parent 5486d877c5
commit 9be3a6c6a0

View File

@ -1771,17 +1771,12 @@ default_static() {
# search for -dev package matching our prefix
if [ -z "$depends_static" ]; then
# remove common suffixes to get our prefix
for devpkg in \
"${subpkgname%-static}" \
"${subpkgname%-libs-static}" \
;
do
devpkg="$devpkg-dev"
if subpackages_has "$devpkg"; then
depends_static="$devpkg"
fi
done
devpkg="${subpkgname%-libs-static}"
devpkg="${devpkg%-static}"
devpkg="$devpkg-dev"
if subpackages_has "$devpkg"; then
depends_static="$devpkg"
fi
fi
depends="$depends_static"