libheif: Add SOVERSION guard

%ci:no-build
This commit is contained in:
Tee KOBAYASHI 2022-12-27 23:56:02 +09:00 committed by xtkoba
parent 9da8ba12d1
commit 14acbcd849
1 changed files with 11 additions and 1 deletions

View File

@ -19,8 +19,18 @@ termux_step_pre_configure() {
}
termux_step_post_massage() {
# Do not forget to bump revision of reverse dependencies and rebuild them
# after SOVERSION is changed.
local _SOVERSION_GUARD_FILES="lib/libheif.so.1"
local f
for f in ${_SOVERSION_GUARD_FILES}; do
if [ ! -e "${f}" ]; then
termux_error_exit "SOVERSION guard check failed."
fi
done
# Check if SONAME is properly set:
if readelf -d lib/libheif.so | grep -q '(SONAME).*\[libheif\.so\]'; then
if ! readelf -d lib/libheif.so | grep -q '(SONAME).*\[libheif\.so\.'; then
termux_error_exit "SONAME for libheif.so is not properly set."
fi
}