build-package: mv termux_step_handle_hostbuild to scripts/build/
This commit is contained in:
parent
c0b579ed14
commit
d159e59699
@ -746,23 +746,7 @@ termux_step_post_extract_package() {
|
||||
}
|
||||
|
||||
# Optional host build. Not to be overridden by packages.
|
||||
termux_step_handle_hostbuild() {
|
||||
if [ "x$TERMUX_PKG_HOSTBUILD" = "x" ]; then return; fi
|
||||
|
||||
cd "$TERMUX_PKG_SRCDIR"
|
||||
for patch in $TERMUX_PKG_BUILDER_DIR/*.patch.beforehostbuild; do
|
||||
test -f "$patch" && sed "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" "$patch" | patch --silent -p1
|
||||
done
|
||||
|
||||
local TERMUX_HOSTBUILD_MARKER="$TERMUX_PKG_HOSTBUILD_DIR/TERMUX_BUILT_FOR_$TERMUX_PKG_VERSION"
|
||||
if [ ! -f "$TERMUX_HOSTBUILD_MARKER" ]; then
|
||||
rm -Rf "$TERMUX_PKG_HOSTBUILD_DIR"
|
||||
mkdir -p "$TERMUX_PKG_HOSTBUILD_DIR"
|
||||
cd "$TERMUX_PKG_HOSTBUILD_DIR"
|
||||
termux_step_host_build
|
||||
touch "$TERMUX_HOSTBUILD_MARKER"
|
||||
fi
|
||||
}
|
||||
source scripts/build/termux_step_handle_hostbuild.sh
|
||||
|
||||
# Perform a host build. Will be called in $TERMUX_PKG_HOSTBUILD_DIR.
|
||||
# After termux_step_post_extract_package() and before termux_step_patch_package()
|
||||
|
17
scripts/build/termux_step_handle_hostbuild.sh
Normal file
17
scripts/build/termux_step_handle_hostbuild.sh
Normal file
@ -0,0 +1,17 @@
|
||||
termux_step_handle_hostbuild() {
|
||||
if [ "x$TERMUX_PKG_HOSTBUILD" = "x" ]; then return; fi
|
||||
|
||||
cd "$TERMUX_PKG_SRCDIR"
|
||||
for patch in $TERMUX_PKG_BUILDER_DIR/*.patch.beforehostbuild; do
|
||||
test -f "$patch" && sed "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" "$patch" | patch --silent -p1
|
||||
done
|
||||
|
||||
local TERMUX_HOSTBUILD_MARKER="$TERMUX_PKG_HOSTBUILD_DIR/TERMUX_BUILT_FOR_$TERMUX_PKG_VERSION"
|
||||
if [ ! -f "$TERMUX_HOSTBUILD_MARKER" ]; then
|
||||
rm -Rf "$TERMUX_PKG_HOSTBUILD_DIR"
|
||||
mkdir -p "$TERMUX_PKG_HOSTBUILD_DIR"
|
||||
cd "$TERMUX_PKG_HOSTBUILD_DIR"
|
||||
termux_step_host_build
|
||||
touch "$TERMUX_HOSTBUILD_MARKER"
|
||||
fi
|
||||
}
|
Loading…
Reference in New Issue
Block a user