abuild: strip leading v from pkgconfig versions

This commit is contained in:
Sertonix 2024-07-22 23:22:05 +02:00 committed by Natanael Copa
parent d85ea24eca
commit ac45be0c71
1 changed files with 1 additions and 0 deletions

View File

@ -1272,6 +1272,7 @@ prepare_pkgconfig_provides() {
local v=$(PKG_CONFIG_PATH="$dir"/usr/lib/pkgconfig:"$dir"/usr/share/pkgconfig \ local v=$(PKG_CONFIG_PATH="$dir"/usr/lib/pkgconfig:"$dir"/usr/share/pkgconfig \
PKG_CONFIG_MAXIMUM_TRAVERSE_DEPTH=1 pkg-config \ PKG_CONFIG_MAXIMUM_TRAVERSE_DEPTH=1 pkg-config \
--modversion ${f%.pc} | sed -E -e 's/-(alpha|beta|rc|pre)/_\1/') --modversion ${f%.pc} | sed -E -e 's/-(alpha|beta|rc|pre)/_\1/')
v=${v#v}
$APK version --check --quiet $v || die "$i: pkgconf version $v is invalid" $APK version --check --quiet $v || die "$i: pkgconf version $v is invalid"
echo "$pcprefix${f%.pc}=${v:-0}" >> "$controldir"/.provides-pc echo "$pcprefix${f%.pc}=${v:-0}" >> "$controldir"/.provides-pc
done done