Skip to content

Commit afadc5c

Browse files
fix(main/libvips): enable SOVERSION suffix (#24153)
Most FFI-based libvips bindings expect version-suffixed SONAMEs. See: libvips/php-vips#260 Co-authored-by: TomIO <[email protected]>
1 parent 420624b commit afadc5c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

packages/libvips/build.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="A fast image processing library with low memory needs"
33
TERMUX_PKG_LICENSE="LGPL-2.1"
44
TERMUX_PKG_MAINTAINER="@termux"
55
TERMUX_PKG_VERSION="8.16.1"
6+
TERMUX_PKG_REVISION=1
67
TERMUX_PKG_SRCURL=https://github.com/libvips/libvips/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
78
TERMUX_PKG_SHA256=df960c3df02da8ae16ee19e79c9428e955d178242a8f06064e07e0c417238e6e
89
TERMUX_PKG_AUTO_UPDATE=true
@@ -18,4 +19,17 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
1819
termux_step_pre_configure() {
1920
termux_setup_gir
2021
termux_setup_glib_cross_pkg_config_wrapper
22+
23+
export TERMUX_MESON_ENABLE_SOVERSION=1
24+
}
25+
26+
termux_step_post_massage() {
27+
# Do not forget to bump revision of reverse dependencies and rebuild them
28+
# after SOVERSION is changed.
29+
local _SOVERSION=42
30+
if [ ! -e "lib/libvips.so.${_SOVERSION}" ]; then
31+
echo "ERROR: Expected: lib/libvips.so.${_SOVERSION}" 1>&2
32+
echo "ERROR: Found : $(find lib/libvips* -regex '.*so\.[0-9]+')" 1>&2
33+
termux_error_exit "Not proceeding with update."
34+
fi
2135
}

0 commit comments

Comments
 (0)