From ec8f35afc7ac79eef0cf8e1e7c0ab026d180aa3c Mon Sep 17 00:00:00 2001 From: Ian Hu Date: Tue, 3 Aug 2021 06:10:39 +0000 Subject: [PATCH] php-zephir-parser: fix host build --- packages/php-zephir-parser/build.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/php-zephir-parser/build.sh b/packages/php-zephir-parser/build.sh index 56ff01ec1..3a7c77032 100755 --- a/packages/php-zephir-parser/build.sh +++ b/packages/php-zephir-parser/build.sh @@ -8,8 +8,6 @@ TERMUX_PKG_SHA256=b4a85ad4fb08a9832f7f978db4de1caa66dff233b9c5a8e48f731117c91b6f TERMUX_PKG_DEPENDS=php TERMUX_PKG_BUILD_IN_SRC=true TERMUX_PKG_HOSTBUILD=true -#TERMUX_MAKE_PROCESSES=1 -TERMUX_PKG_BUILD_DEPENDS=php # php is (currently) blacklisted for x86_64. Need to blacklist # php-zephir-parser well for the same arch for # ./build-package.sh -a all -i php-zephir-parser @@ -23,4 +21,12 @@ termux_step_pre_configure() { termux_step_host_build() { # lemon excuted by build host, so we need build it by hostbuild, then it will be reused by later build gcc -o "$TERMUX_PKG_SRCDIR/parser/lemon" $TERMUX_PKG_SRCDIR/parser/lemon.c +} + +termux_step_post_get_source() { + # clean up host build marker because the host build `lemon` will be removed after source extracted + local TERMUX_HOSTBUILD_MARKER="$TERMUX_PKG_HOSTBUILD_DIR/TERMUX_BUILT_FOR_$TERMUX_PKG_VERSION" + if [ -f "$TERMUX_HOSTBUILD_MARKER" ]; then + rm $TERMUX_HOSTBUILD_MARKER + fi } \ No newline at end of file