libyaml: Add SOVERSION guard

%ci:no-build
This commit is contained in:
Tee KOBAYASHI 2022-12-28 00:16:26 +09:00 committed by xtkoba
parent 14acbcd849
commit 722b02d207
1 changed files with 18 additions and 0 deletions

View File

@ -10,6 +10,24 @@ TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_BREAKS="libyaml-dev"
TERMUX_PKG_REPLACES="libyaml-dev"
termux_step_post_get_source() {
# Do not forget to bump revision of reverse dependencies and rebuild them
# after RELEASE / SOVERSION is changed.
local _RELEASE=0
local _SOVERSION=2
local a
for a in YAML_RELEASE YAML_CURRENT YAML_AGE; do
local _${a}=$(sed -En 's/^m4_define\(\['"${a}"'\],\s*([0-9]+).*/\1/p' \
configure.ac)
done
local v=$(( _YAML_CURRENT - _YAML_AGE ))
if [ "${_RELEASE}" != "${_YAML_RELEASE}" ] || \
[ ! "${_YAML_CURRENT}" ] || [ "${_SOVERSION}" != "${v}" ]; then
termux_error_exit "SOVERSION guard check failed."
fi
}
termux_step_pre_configure() {
./bootstrap
}