libheif: Append SOVERSION suffix to shared libs

to avoid conflict with system libs.
This commit is contained in:
Tee KOBAYASHI 2022-12-20 16:44:59 +09:00 committed by xtkoba
parent 93e9278fdd
commit c02c61b942
1 changed files with 12 additions and 0 deletions

View File

@ -4,11 +4,23 @@ TERMUX_PKG_LICENSE="LGPL-3.0, MIT"
TERMUX_PKG_LICENSE_FILE="COPYING"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="1.14.0"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/strukturag/libheif/releases/download/v${TERMUX_PKG_VERSION}/libheif-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=9a2b969d827e162fa9eba582ebd0c9f6891f16e426ef608d089b1f24962295b5
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="libaom, libc++, libdav1d, librav1e, libde265, libx265"
termux_step_pre_configure() {
# SOVERSION suffix is needed for SONAME of shared libs to avoid conflict
# with system ones (in /system/lib64 or /system/lib):
sed -i 's/^\(linux\*android\)\*)/\1-notermux)/' configure
LDFLAGS+=" $($CC -print-libgcc-file-name)"
}
termux_step_post_massage() {
# Check if SONAME is properly set:
if readelf -d lib/libheif.so | grep -q '(SONAME).*\[libheif\.so\]'; then
termux_error_exit "SONAME for libheif.so is not properly set."
fi
}