*: Refine SOVERSION guard

Check if regexp actually matches to avoid false negatives when SOVERSION
is equal to 0.

%ci:no-build
This commit is contained in:
Tee KOBAYASHI 2022-12-28 15:23:44 +09:00
parent b7f1a6a796
commit 61e0c66450
9 changed files with 10 additions and 9 deletions

View File

@ -22,7 +22,7 @@ termux_step_pre_configure() {
CMakeLists.txt)
done
local v=$(( _LT_CURRENT - _LT_AGE ))
if [ "${v}" != "${_SOVERSION}" ]; then
if [ ! "${_LT_CURRENT}" ] || [ "${v}" != "${_SOVERSION}" ]; then
termux_error_exit "SOVERSION guard check failed."
fi
}

View File

@ -23,7 +23,7 @@ termux_step_post_get_source() {
libass/Makefile_library.am)
done
local v=$(( _LT_CURRENT - _LT_AGE ))
if [ "${v}" != "${_SOVERSION}" ]; then
if [ ! "${_LT_CURRENT}" ] || [ "${v}" != "${_SOVERSION}" ]; then
termux_error_exit "SOVERSION guard check failed."
fi
}

View File

@ -42,7 +42,7 @@ termux_step_post_get_source() {
lib/Makefile.soname)
done
local v=$(( _VERSIONCHANGE - _VERSIONDEL ))
if [ "${v}" != "${_SOVERSION}" ]; then
if [ ! "${_VERSIONCHANGE}" ] || [ "${v}" != "${_SOVERSION}" ]; then
termux_error_exit "SOVERSION guard check failed."
fi
}

View File

@ -37,7 +37,8 @@ termux_step_post_get_source() {
local r=$(sed -En 's/.*set\(EVENT_PACKAGE_RELEASE\s+([0-9.]+)\).*/\1/p' \
CMakeLists.txt)
local v=$(( _LIBVERSION_CURRENT - _LIBVERSION_AGE ))
if [ "${_RELEASE}" != "${r}" ] || [ "${_SOVERSION}" != "${v}" ]; then
if [ "${_RELEASE}" != "${r}" ] || \
[ ! "${_LIBVERSION_CURRENT}" ] || [ "${_SOVERSION}" != "${v}" ]; then
termux_error_exit "SOVERSION guard check failed."
fi
}

View File

@ -21,7 +21,7 @@ termux_step_post_get_source() {
configure.ac)
done
local v=$(( _LIBEXIF_CURRENT - _LIBEXIF_AGE ))
if [ "${v}" != "${_SOVERSION}" ]; then
if [ ! "${_LIBEXIF_CURRENT}" ] || [ "${v}" != "${_SOVERSION}" ]; then
termux_error_exit "SOVERSION guard check failed."
fi
}

View File

@ -21,7 +21,7 @@ termux_step_post_get_source() {
local _${a}=$(sed -En 's/^'"${a}"'=([0-9]+).*/\1/p' configure.ac)
done
local v=$(( _LIBCURRENT - _LIBAGE ))
if [ "${v}" != "${_SOVERSION}" ]; then
if [ ! "${_LIBCURRENT}" ] || [ "${v}" != "${_SOVERSION}" ]; then
termux_error_exit "SOVERSION guard check failed."
fi
}

View File

@ -23,7 +23,7 @@ termux_step_post_get_source() {
configure.ac)
done
local v=$(( _LT_CURRENT - _LT_AGE ))
if [ "${v}" != "${_SOVERSION}" ]; then
if [ ! "${_LT_CURRENT}" ] || [ "${v}" != "${_SOVERSION}" ]; then
termux_error_exit "SOVERSION guard check failed."
fi
}

View File

@ -22,7 +22,7 @@ termux_step_post_get_source() {
Makefile.am)
done
local v=$(( _LT_CURRENT - _LT_AGE ))
if [ "${v}" != "${_SOVERSION}" ]; then
if [ ! "${_LT_CURRENT}" ] || [ "${v}" != "${_SOVERSION}" ]; then
termux_error_exit "SOVERSION guard check failed."
fi
}

View File

@ -29,7 +29,7 @@ termux_step_post_get_source() {
configure.ac)
done
local v=$(( _LT_CURRENT - _LT_AGE ))
if [ "${v}" != "${_SOVERSION}" ]; then
if [ ! "${_LT_CURRENT}" ] || [ "${v}" != "${_SOVERSION}" ]; then
termux_error_exit "SOVERSION guard check failed."
fi
}