libpaper: Add SOVERSION guard

%ci:no-build
This commit is contained in:
Tee KOBAYASHI 2022-12-28 05:31:53 +09:00 committed by xtkoba
parent 47ec092271
commit a4ed58a99c
1 changed files with 12 additions and 0 deletions

View File

@ -12,6 +12,18 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
"
TERMUX_PKG_PROVIDES="paper"
termux_step_post_get_source() {
# Do not forget to bump revision of reverse dependencies and rebuild them
# after SOVERSION is changed.
local _SOVERSION=2
local v=$(echo ${TERMUX_PKG_VERSION#*:} | cut -d . -f 1)
if [ "${v}" != "${_SOVERSION}" ]; then
termux_error_exit "SOVERSION guard check failed."
fi
}
termux_step_pre_configure() {
# 210x297 (in mm) is A4 size. Use as default to be provided by locale.
CFLAGS+=" -D_NL_PAPER_WIDTH=210 -D_NL_PAPER_HEIGHT=297"