libjxl: Add SOVERSION guard

%ci:no-build
This commit is contained in:
Tee KOBAYASHI 2022-12-28 02:54:15 +09:00 committed by xtkoba
parent 41f180c82a
commit 5d89398ab4
1 changed files with 16 additions and 0 deletions

View File

@ -11,5 +11,21 @@ TERMUX_PKG_DEPENDS="brotli, libc++"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="-DJPEGXL_FORCE_SYSTEM_BROTLI=True"
termux_step_post_get_source() {
# Do not forget to bump revision of reverse dependencies and rebuild them
# after RELEASE / SOVERSION is changed.
local _SOVERSION=0.7
for a in MAJOR SO_MINOR; do
local _${a}=$(sed -En 's/^set\(JPEGXL_'"${a}"'_VERSION\s+([0-9]+).*/\1/p' \
lib/CMakeLists.txt)
done
local v="${_MAJOR}"
if [ "${_SO_MINOR}" != "0" ]; then
v+=".${_SO_MINOR}"
fi
if [ "${_SOVERSION}" != "${v}" ]; then
termux_error_exit "SOVERSION guard check failed."
fi
./deps.sh
}