Browse Source

build-package: mv termux_step_handle_hostbuild to scripts/build/

android-5
Henrik Grimler 6 years ago
committed by Leonid Plyushch
parent
commit
c19fd73c97
  1. 18
      build-package.sh
  2. 17
      scripts/build/termux_step_handle_hostbuild.sh

18
build-package.sh

@ -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

@ -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…
Cancel
Save