libsndfile: Add SOVERSION guard

%ci:no-build
This commit is contained in:
Tee KOBAYASHI 2022-12-27 22:08:14 +09:00 committed by xtkoba
parent b60e2cc292
commit fa8cb5b9b0
1 changed files with 14 additions and 0 deletions

View File

@ -18,6 +18,20 @@ TERMUX_PKG_RM_AFTER_INSTALL="bin/ share/man/man1/"
termux_step_post_get_source() {
rm -f CMakeLists.txt
# Do not forget to bump revision of reverse dependencies and rebuild them
# after SOVERSION is changed.
local _SOVERSION=1
local a
for a in LT_CURRENT LT_AGE; do
local _${a}=$(sed -En 's/^m4_define\(\['"${a,,}"'\],\s*\[([0-9]+)\].*/\1/p' \
configure.ac)
done
local v=$(( _LT_CURRENT - _LT_AGE ))
if [ "${v}" != "${_SOVERSION}" ]; then
termux_error_exit "SOVERSION guard check failed."
fi
}
termux_step_pre_configure() {