coreutils: disallow on-device build

It can delete utility 'ln' in the process of installation:

 make  install-exec-hook
 make[4]: Entering directory '/data/data/com.termux/files/home/.termux-build/coreutils/build'
 /bin/sh: 12: ln: not found
This commit is contained in:
Leonid Pliushch 2019-08-10 20:22:30 +03:00
parent c31dad8663
commit 5cb5fc32ee
1 changed files with 6 additions and 0 deletions

View File

@ -27,4 +27,10 @@ ac_cv_func_getpass=yes
termux_step_pre_configure() {
CPPFLAGS+=" -DDEFAULT_TMPDIR=\\\"$TERMUX_PREFIX/tmp\\\""
CPPFLAGS+=" -D__USE_FORTIFY_LEVEL=0"
# On device build is unsupported as it removes utility 'ln' (and maybe
# something else) in the installation process.
if [ -n "$TERMUX_ON_DEVICE_BUILD" ]; then
termux_error_exit "Package '$TERMUX_PKG_NAME' is not safe for on-device builds."
fi
}