Stand in srcdir for termux_step_pre_configure
[termux-packages] / build-package.sh
index 1d23c0f..e989f0e 100755 (executable)
@@ -178,7 +178,7 @@ termux_step_handle_arguments() {
 termux_step_setup_variables() {
        : "${ANDROID_HOME:="${HOME}/lib/android-sdk"}"
        : "${NDK:="${HOME}/lib/android-ndk"}"
-       : "${TERMUX_MAKE_PROCESSES:="4"}"
+       : "${TERMUX_MAKE_PROCESSES:="$(nproc)"}"
        : "${TERMUX_TOPDIR:="$HOME/.termux-build"}"
        : "${TERMUX_ARCH:="aarch64"}" # arm, aarch64, i686 or x86_64.
        : "${TERMUX_PREFIX:="/data/data/com.termux/files/usr"}"
@@ -1061,7 +1061,7 @@ termux_step_handle_hostbuild
 termux_step_setup_toolchain
 termux_step_patch_package
 termux_step_replace_guess_scripts
-cd "$TERMUX_PKG_BUILDDIR"
+cd "$TERMUX_PKG_SRCDIR"
 termux_step_pre_configure
 cd "$TERMUX_PKG_BUILDDIR"
 termux_step_configure