pcre2: Add SOVERSION guard

%ci:no-build
This commit is contained in:
Tee KOBAYASHI 2022-12-23 12:34:05 +09:00 committed by xtkoba
parent d3c1670db9
commit 55e08cdf4b
1 changed files with 17 additions and 0 deletions

View File

@ -18,3 +18,20 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--enable-pcre2-16
--enable-pcre2-32
"
termux_step_post_get_source() {
# Do not forget to bump revision of reverse dependencies and rebuild them
# after SOVERSION is changed.
local _SOVER_libpcre2_8=0
local _SOVER_libpcre2_16=0
local _SOVER_libpcre2_32=0
local _SOVER_libpcre2_posix=3
local a
for a in libpcre2_{8,16,32,posix}; do
local e=$(sed -En 's/^m4_define\('"${a}"'_version,\s*\[([0-9]+):([0-9]+):([0-9]+)\].*/\1-\3/p' \
configure.ac)
if [ ! "${e}" ] || [ "$(eval echo \$_SOVER_${a})" != "$(( "${e}" ))" ]; then
termux_error_exit "SOVERSION guard check failed for ${a/_/-}.so."
fi
done
}