libprotobuf-c: Add SOVERSION guard

%ci:no-build
This commit is contained in:
Tee KOBAYASHI 2022-12-28 01:59:40 +09:00 committed by xtkoba
parent 997b11e875
commit 000b3d3af3
1 changed files with 16 additions and 0 deletions

View File

@ -11,6 +11,22 @@ TERMUX_PKG_DEPENDS="libc++, libprotobuf, protobuf"
TERMUX_PKG_BREAKS="libprotobuf-c-dev"
TERMUX_PKG_REPLACES="libprotobuf-c-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 a
for a in CURRENT AGE; do
local _LT_${a}=$(sed -En 's/^LIBPROTOBUF_C_'"${a}"'=([0-9]+).*/\1/p' \
Makefile.am)
done
local v=$(( _LT_CURRENT - _LT_AGE ))
if [ "${v}" != "${_SOVERSION}" ]; then
termux_error_exit "SOVERSION guard check failed."
fi
}
termux_step_pre_configure() {
termux_setup_protobuf
export PROTOC=$(command -v protoc)