liblz4: Add SOVERSION guard

%ci:no-build
This commit is contained in:
Tee KOBAYASHI 2022-12-23 11:26:18 +09:00 committed by xtkoba
parent 49f9afe9ea
commit 9382ccad0e
1 changed files with 12 additions and 0 deletions

View File

@ -9,6 +9,18 @@ TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_BREAKS="liblz4-dev"
TERMUX_PKG_REPLACES="liblz4-dev"
termux_step_post_get_source() {
# Do not forget to bump revision of reverse dependencies and rebuild them
# after SOVERSION is changed.
local _SOVERSION=1
local v=$(sed -En 's/^#define LZ4_VERSION_MAJOR +([0-9]+) +.*$/\1/p' \
lib/lz4.h)
if [ "${_SOVERSION}" != "${v}" ]; then
termux_error_exit "SOVERSION guard check failed."
fi
}
termux_step_pre_configure() {
TERMUX_PKG_SRCDIR+=/build/cmake
}