c-ares: Add SOVERSION guard

%ci:no-build
This commit is contained in:
Tee KOBAYASHI 2022-12-28 00:24:44 +09:00 committed by xtkoba
parent db6b2db80b
commit 4b11a6ab11
1 changed files with 12 additions and 0 deletions

View File

@ -12,3 +12,15 @@ TERMUX_PKG_REPLACES="c-ares-dev"
# Build with cmake to install cmake/c-ares/*.cmake files:
TERMUX_PKG_FORCE_CMAKE=true
TERMUX_PKG_RM_AFTER_INSTALL="bin/"
termux_step_post_get_source() {
# Do not forget to bump revision of reverse dependencies and rebuild them
# after SOVERSION is changed.
local _SOVERSION=2
local e=$(sed -En 's/^\s*SET\s*\(CARES_LIB_VERSIONINFO\s+"?([0-9]+):([0-9]+):([0-9]+).*/\1-\3/p' \
CMakeLists.txt)
if [ ! "${e}" ] || [ "${_SOVERSION}" != "$(( "${e}" ))" ]; then
termux_error_exit "SOVERSION guard check failed."
fi
}