libnl: Add SOVERSION guard

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

View File

@ -15,6 +15,23 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--enable-cli
"
termux_step_post_get_source() {
# Do not forget to bump revision of reverse dependencies and rebuild them
# after RELEASE / SOVERSION is changed.
local _RELEASE=3
local _SOVERSION=200
for a in MAJOR_VERSION LT_CURRENT LT_AGE; do
local _${a}=$(sed -En 's/^m4_define\(\[libnl_'"${a,,}"'\],\s*\[([0-9]+).*/\1/p' \
configure.ac)
done
local v=$(( _LT_CURRENT - _LT_AGE ))
if [ "${_RELEASE}" != "${_MAJOR_VERSION}" ] || \
[ ! "${_LT_CURRENT}" ] || [ "${_SOVERSION}" != "${v}" ]; then
termux_error_exit "SOVERSION guard check failed."
fi
}
termux_step_pre_configure() {
CFLAGS+=" -Dsockaddr_storage=__kernel_sockaddr_storage"
}