From 41b3d799bf86d42bcfec3ac1af795615d950897a Mon Sep 17 00:00:00 2001 From: Tom Yan Date: Tue, 19 Mar 2019 04:36:23 +0800 Subject: [PATCH] build-package: add TERMUX_PKG_DEVPACKAGE_{BREAKS,REPLACES} support --- scripts/build/termux_create_subpackages.sh | 6 ++++++ scripts/build/termux_step_setup_variables.sh | 2 ++ 2 files changed, 8 insertions(+) diff --git a/scripts/build/termux_create_subpackages.sh b/scripts/build/termux_create_subpackages.sh index ff60bb1e7..8304488c8 100644 --- a/scripts/build/termux_create_subpackages.sh +++ b/scripts/build/termux_create_subpackages.sh @@ -10,6 +10,12 @@ termux_create_subpackages() { else echo "TERMUX_SUBPKG_DEPENDS=\"$TERMUX_PKG_NAME\"" >> "$_DEVEL_SUBPACKAGE_FILE" fi + if [ -n "$TERMUX_PKG_DEVPACKAGE_BREAKS" ]; then + echo "TERMUX_SUBPKG_BREAKS=\"$TERMUX_PKG_DEVPACKAGE_BREAKS\"" >> "$_DEVEL_SUBPACKAGE_FILE" + fi + if [ -n "$TERMUX_PKG_DEVPACKAGE_REPLACES" ]; then + echo "TERMUX_SUBPKG_REPLACES=\"$TERMUX_PKG_DEVPACKAGE_REPLACES\"" >> "$_DEVEL_SUBPACKAGE_FILE" + fi fi # Now build all sub packages rm -Rf "$TERMUX_TOPDIR/$TERMUX_PKG_NAME/subpackages" diff --git a/scripts/build/termux_step_setup_variables.sh b/scripts/build/termux_step_setup_variables.sh index ca524756a..ab8e23e9c 100644 --- a/scripts/build/termux_step_setup_variables.sh +++ b/scripts/build/termux_step_setup_variables.sh @@ -104,6 +104,8 @@ termux_step_setup_variables() { TERMUX_PKG_CONFFILES="" TERMUX_PKG_INCLUDE_IN_DEVPACKAGE="" TERMUX_PKG_DEVPACKAGE_DEPENDS="" + TERMUX_PKG_DEVPACKAGE_BREAKS="" + TERMUX_PKG_DEVPACKAGE_REPLACES="" # Set if a host build should be done in TERMUX_PKG_HOSTBUILD_DIR: TERMUX_PKG_HOSTBUILD="" TERMUX_PKG_FORCE_CMAKE=no # if the package has autotools as well as cmake, then set this to prefer cmake