From 2c70621a98c29659d6be536da7c910b397009e8a Mon Sep 17 00:00:00 2001 From: Henrik Grimler Date: Sat, 21 Aug 2021 16:50:05 +0200 Subject: [PATCH] build-package: rename TERMUX_DEBUG to TERMUX_DEBUG_BUILD To make it more self-explanatory. --- build-all.sh | 6 +++--- build-package.sh | 4 ++-- packages/busybox/build.sh | 2 +- packages/emacs/build.sh | 2 +- packages/mutt/build.sh | 2 +- packages/nginx/build.sh | 2 +- scripts/build/configure/termux_step_configure_cmake.sh | 2 +- scripts/build/termux_step_massage.sh | 2 +- scripts/build/termux_step_patch_package.sh | 2 +- scripts/build/termux_step_setup_toolchain.sh | 2 +- scripts/build/termux_step_setup_variables.sh | 2 +- scripts/build/termux_step_start_build.sh | 4 ++-- scripts/setup-offline-bundle.sh | 2 +- 13 files changed, 17 insertions(+), 17 deletions(-) diff --git a/build-all.sh b/build-all.sh index a665f0a167..bd5f2f8221 100755 --- a/build-all.sh +++ b/build-all.sh @@ -12,7 +12,7 @@ fi test -f "$HOME"/.termuxrc && . "$HOME"/.termuxrc : ${TERMUX_TOPDIR:="$HOME/.termux-build"} : ${TERMUX_ARCH:="aarch64"} -: ${TERMUX_DEBUG:=""} +: ${TERMUX_DEBUG_BUILD:=""} : ${TERMUX_INSTALL_DEPS:="-s"} # Set TERMUX_INSTALL_DEPS to -s unless set to -i @@ -29,7 +29,7 @@ _show_usage() { while getopts :a:hdio: option; do case "$option" in a) TERMUX_ARCH="$OPTARG";; - d) TERMUX_DEBUG='-d';; + d) TERMUX_DEBUG_BUILD='-d';; i) TERMUX_INSTALL_DEPS='-i';; o) TERMUX_DEBDIR="$(realpath -m "$OPTARG")";; h) _show_usage;; @@ -72,7 +72,7 @@ while read -r PKG PKG_DIR; do echo -n "Building $PKG... " BUILD_START=$(date "+%s") - bash -x "$BUILDSCRIPT" -a "$TERMUX_ARCH" $TERMUX_DEBUG \ + bash -x "$BUILDSCRIPT" -a "$TERMUX_ARCH" $TERMUX_DEBUG_BUILD \ ${TERMUX_DEBDIR+-o $TERMUX_DEBDIR} $TERMUX_INSTALL_DEPS "$PKG_DIR" \ > "$BUILDALL_DIR"/"${PKG}".out 2> "$BUILDALL_DIR"/"${PKG}".err BUILD_END=$(date "+%s") diff --git a/build-package.sh b/build-package.sh index 6184163d7c..ae4ff85d47 100755 --- a/build-package.sh +++ b/build-package.sh @@ -278,7 +278,7 @@ while getopts :a:hdDfiIqso: option; do fi ;; h) _show_usage;; - d) export TERMUX_DEBUG=true;; + d) export TERMUX_DEBUG_BUILD=true;; D) TERMUX_IS_DISABLED=true;; f) TERMUX_FORCE_BUILD=true;; i) @@ -337,7 +337,7 @@ while (($# > 0)); do for arch in 'aarch64' 'arm' 'i686' 'x86_64'; do env TERMUX_ARCH="$arch" TERMUX_BUILD_IGNORE_LOCK=true ./build-package.sh \ ${TERMUX_FORCE_BUILD+-f} ${TERMUX_INSTALL_DEPS+-i} ${TERMUX_IS_DISABLED+-D} \ - ${TERMUX_DEBUG+-d} ${TERMUX_DEBDIR+-o $TERMUX_DEBDIR} "$1" + ${TERMUX_DEBUG_BUILD+-d} ${TERMUX_DEBDIR+-o $TERMUX_DEBDIR} "$1" done exit fi diff --git a/packages/busybox/build.sh b/packages/busybox/build.sh index 6edde4a756..42f170b82a 100644 --- a/packages/busybox/build.sh +++ b/packages/busybox/build.sh @@ -39,7 +39,7 @@ termux_step_configure() { } termux_step_post_make_install() { - if $TERMUX_DEBUG; then + if $TERMUX_DEBUG_BUILD; then install -Dm700 busybox_unstripped $PREFIX/bin/busybox fi diff --git a/packages/emacs/build.sh b/packages/emacs/build.sh index 00d8b603a4..53bf4ffc6b 100644 --- a/packages/emacs/build.sh +++ b/packages/emacs/build.sh @@ -30,7 +30,7 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" --with-dumping=none " -if $TERMUX_DEBUG; then +if $TERMUX_DEBUG_BUILD; then TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --enable-checking=yes,glyphs --enable-check-lisp-object-type diff --git a/packages/mutt/build.sh b/packages/mutt/build.sh index b482ef512c..865468d3b2 100644 --- a/packages/mutt/build.sh +++ b/packages/mutt/build.sh @@ -26,7 +26,7 @@ mutt_cv_c99_vsnprintf=yes --with-ssl " -if $TERMUX_DEBUG; then +if $TERMUX_DEBUG_BUILD; then export TERMUX_PKG_EXTRA_CONFIGURE_ARGS+="--enable-debug" fi diff --git a/packages/nginx/build.sh b/packages/nginx/build.sh index 09f4797f66..9128ff811b 100644 --- a/packages/nginx/build.sh +++ b/packages/nginx/build.sh @@ -35,7 +35,7 @@ termux_step_pre_configure() { termux_step_configure() { DEBUG_FLAG="" - $TERMUX_DEBUG && DEBUG_FLAG="--with-debug" + $TERMUX_DEBUG_BUILD && DEBUG_FLAG="--with-debug" ./configure \ --prefix=$TERMUX_PREFIX \ diff --git a/scripts/build/configure/termux_step_configure_cmake.sh b/scripts/build/configure/termux_step_configure_cmake.sh index 51a1c237ce..4003abe3b5 100644 --- a/scripts/build/configure/termux_step_configure_cmake.sh +++ b/scripts/build/configure/termux_step_configure_cmake.sh @@ -2,7 +2,7 @@ termux_step_configure_cmake() { termux_setup_cmake local BUILD_TYPE=Release - [ "$TERMUX_DEBUG" = "true" ] && BUILD_TYPE=Debug + [ "$TERMUX_DEBUG_BUILD" = "true" ] && BUILD_TYPE=Debug local CMAKE_PROC=$TERMUX_ARCH test $CMAKE_PROC == "arm" && CMAKE_PROC='armv7-a' diff --git a/scripts/build/termux_step_massage.sh b/scripts/build/termux_step_massage.sh index 427defd268..b391c665be 100644 --- a/scripts/build/termux_step_massage.sh +++ b/scripts/build/termux_step_massage.sh @@ -18,7 +18,7 @@ termux_step_massage() { # Remove world permissions and make sure that user still have read-write permissions. chmod -Rf u+rw,g-rwx,o-rwx . || true - if [ "$TERMUX_DEBUG" = "false" ]; then + if [ "$TERMUX_DEBUG_BUILD" = "false" ]; then # Strip binaries. file(1) may fail for certain unusual files, so disable pipefail. set +e +o pipefail find . \( -path "./bin/*" -o -path "./lib/*" -o -path "./libexec/*" \) -type f | \ diff --git a/scripts/build/termux_step_patch_package.sh b/scripts/build/termux_step_patch_package.sh index 424e78bc1f..78c00fa120 100644 --- a/scripts/build/termux_step_patch_package.sh +++ b/scripts/build/termux_step_patch_package.sh @@ -3,7 +3,7 @@ termux_step_patch_package() { cd "$TERMUX_PKG_SRCDIR" local DEBUG_PATCHES="" - if [ "$TERMUX_DEBUG" = "true" ]; then + if [ "$TERMUX_DEBUG_BUILD" = "true" ]; then DEBUG_PATCHES=$(find $TERMUX_PKG_BUILDER_DIR -mindepth 1 -maxdepth 1 -name \*.patch.debug) fi if [ "$TERMUX_PKG_QUICK_REBUILD" = "false" ]; then diff --git a/scripts/build/termux_step_setup_toolchain.sh b/scripts/build/termux_step_setup_toolchain.sh index ffc9886801..b41f197bf3 100644 --- a/scripts/build/termux_step_setup_toolchain.sh +++ b/scripts/build/termux_step_setup_toolchain.sh @@ -69,7 +69,7 @@ termux_step_setup_toolchain() { CFLAGS+=" -fstack-protector-strong" LDFLAGS+=" -Wl,-z,relro,-z,now" - if [ "$TERMUX_DEBUG" = "true" ]; then + if [ "$TERMUX_DEBUG_BUILD" = "true" ]; then CFLAGS+=" -g3 -O1" CPPFLAGS+=" -D_FORTIFY_SOURCE=2 -D__USE_FORTIFY_LEVEL=2" else diff --git a/scripts/build/termux_step_setup_variables.sh b/scripts/build/termux_step_setup_variables.sh index 5b5243ba8a..06dc1147e1 100644 --- a/scripts/build/termux_step_setup_variables.sh +++ b/scripts/build/termux_step_setup_variables.sh @@ -1,7 +1,7 @@ termux_step_setup_variables() { : "${TERMUX_ARCH:="aarch64"}" # arm, aarch64, i686 or x86_64. : "${TERMUX_DEBDIR:="${TERMUX_SCRIPTDIR}/debs"}" - : "${TERMUX_DEBUG:="false"}" + : "${TERMUX_DEBUG_BUILD:="false"}" : "${TERMUX_FORCE_BUILD:="false"}" : "${TERMUX_INSTALL_DEPS:="false"}" : "${TERMUX_MAKE_PROCESSES:="$(nproc)"}" diff --git a/scripts/build/termux_step_start_build.sh b/scripts/build/termux_step_start_build.sh index 2e2fdbbcde..d2f6c32d9a 100644 --- a/scripts/build/termux_step_start_build.sh +++ b/scripts/build/termux_step_start_build.sh @@ -24,7 +24,7 @@ termux_step_start_build() { TERMUX_PKG_FULLVERSION+="-$TERMUX_PKG_REVISION" fi - if [ "$TERMUX_DEBUG" = "true" ]; then + if [ "$TERMUX_DEBUG_BUILD" = "true" ]; then if [ "$TERMUX_PKG_HAS_DEBUG" = "true" ]; then DEBUG="-dbg" else @@ -35,7 +35,7 @@ termux_step_start_build() { DEBUG="" fi - if [ "$TERMUX_DEBUG" = "false" ] && [ "$TERMUX_FORCE_BUILD" = "false" ]; then + if [ "$TERMUX_DEBUG_BUILD" = "false" ] && [ "$TERMUX_FORCE_BUILD" = "false" ]; then if [ -e "$TERMUX_BUILT_PACKAGES_DIRECTORY/$TERMUX_PKG_NAME" ] && [ "$(cat "$TERMUX_BUILT_PACKAGES_DIRECTORY/$TERMUX_PKG_NAME")" = "$TERMUX_PKG_FULLVERSION" ]; then echo "$TERMUX_PKG_NAME@$TERMUX_PKG_FULLVERSION built - skipping (rm $TERMUX_BUILT_PACKAGES_DIRECTORY/$TERMUX_PKG_NAME to force rebuild)" diff --git a/scripts/setup-offline-bundle.sh b/scripts/setup-offline-bundle.sh index 38b232ef89..41aede6922 100755 --- a/scripts/setup-offline-bundle.sh +++ b/scripts/setup-offline-bundle.sh @@ -80,7 +80,7 @@ for p in "$TERMUX_SCRIPTDIR"/packages/*; do TERMUX_ARCH_BITS=64 TERMUX_BUILD_TUPLE=x86_64-pc-linux-gnu TERMUX_PKG_GIT_BRANCH="" - TERMUX_DEBUG=false + TERMUX_DEBUG_BUILD=false TERMUX_MAKE_PROCESSES=1 mkdir -p "$TERMUX_PKG_CACHEDIR" "$TERMUX_PKG_TMPDIR" "$TERMUX_PKG_SRCDIR"