libinih: Add SOVERSION guard

%ci:no-build
This commit is contained in:
Tee KOBAYASHI 2022-12-30 04:59:55 +09:00 committed by xtkoba
parent cca83ede92
commit 9504fc86ca
1 changed files with 12 additions and 0 deletions

View File

@ -8,3 +8,15 @@ TERMUX_PKG_SHA256=4f2ba6bd122d30281a8c7a4d5723b7af90b56aa828c0e88256d7fceda03a49
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_UPDATE_VERSION_REGEXP="\d+"
TERMUX_PKG_DEPENDS="libc++"
termux_step_post_get_source() {
# Do not forget to bump revision of reverse dependencies and rebuild them
# after SOVERSION is changed.
local _SOVERSION=0
local v=$(sed -n "/library('inih'/,/)\s*$/p" meson.build | \
sed -En "s/\s*soversion\s*:\s*'?([0-9]+).*/\1/p")
if [ "${v}" != "${_SOVERSION}" ]; then
termux_error_exit "SOVERSION guard check failed."
fi
}