luv: Add SOVERSION guard

%ci:no-build
This commit is contained in:
Tee KOBAYASHI 2022-12-30 02:43:30 +09:00 committed by xtkoba
parent b710beb373
commit 972c29046b
1 changed files with 12 additions and 0 deletions

View File

@ -17,6 +17,18 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DWITH_SHARED_LIBUV=ON
"
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/^set\(LUV_VERSION_MAJOR\s+([0-9]+).*/\1/p' \
CMakeLists.txt)
if [ "${v}" != "${_SOVERSION}" ]; then
termux_error_exit "SOVERSION guard check failed."
fi
}
termux_step_pre_configure() {
export LDFLAGS+=" -L$TERMUX_PREFIX/lib/lua/5.1"
}