mbedtls: Add SOVERSION guard

%ci:no-build
This commit is contained in:
Tee KOBAYASHI 2022-09-20 03:27:56 +09:00 committed by xtkoba
parent 1b1755b104
commit 13b2c73490
1 changed files with 16 additions and 0 deletions

View File

@ -15,3 +15,19 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DENABLE_TESTING=OFF
-DENABLE_PROGRAMS=OFF
"
termux_step_post_get_source() {
# Do not forget to bump revision of reverse dependencies and rebuild them
# after SOVERSION is changed.
local _SOVER_crypto=12
local _SOVER_tls=18
local _SOVER_x509=4
local f
for f in crypto tls x509; do
local v="$(sed -n 's/^SOEXT_'${f^^}'=so\.//p' library/Makefile)"
if [ "$(eval echo \$_SOVER_${f})" != "${v}" ]; then
termux_error_exit "Error: SOVERSION guard check failed for libmbed${f}.so."
fi
done
}