From 14acbcd84932baba55ba0f5bf203a01d7a3c405a Mon Sep 17 00:00:00 2001 From: Tee KOBAYASHI Date: Tue, 27 Dec 2022 23:56:02 +0900 Subject: [PATCH] libheif: Add SOVERSION guard %ci:no-build --- packages/libheif/build.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/libheif/build.sh b/packages/libheif/build.sh index 58d6e42883..7a804dc0c7 100644 --- a/packages/libheif/build.sh +++ b/packages/libheif/build.sh @@ -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 }