2019-02-26 21:27:00 +01:00
|
|
|
termux_step_handle_hostbuild() {
|
2019-08-14 19:29:58 +02:00
|
|
|
[ "$TERMUX_PKG_METAPACKAGE" = "true" ] && return
|
|
|
|
[ "$TERMUX_PKG_HOSTBUILD" = "false" ] && return
|
2019-02-26 21:27:00 +01:00
|
|
|
|
|
|
|
cd "$TERMUX_PKG_SRCDIR"
|
2021-08-21 18:08:57 +02:00
|
|
|
for patch in $TERMUX_PKG_BUILDER_DIR/*.patch.beforehostbuild; do
|
|
|
|
echo "Applying patch: $(basename $patch)"
|
|
|
|
test -f "$patch" && sed "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" "$patch" | patch --silent -p1
|
|
|
|
done
|
2019-02-26 21:27:00 +01:00
|
|
|
|
|
|
|
if [ ! -f "$TERMUX_HOSTBUILD_MARKER" ]; then
|
2021-08-21 18:08:57 +02:00
|
|
|
rm -Rf "$TERMUX_PKG_HOSTBUILD_DIR"
|
|
|
|
mkdir -p "$TERMUX_PKG_HOSTBUILD_DIR"
|
2019-02-26 21:27:00 +01:00
|
|
|
cd "$TERMUX_PKG_HOSTBUILD_DIR"
|
|
|
|
termux_step_host_build
|
|
|
|
touch "$TERMUX_HOSTBUILD_MARKER"
|
|
|
|
fi
|
|
|
|
}
|