Browse Source

build-package: mv termux_step_patch_package to scripts/build/

android-5
Henrik Grimler 6 years ago
committed by Leonid Plyushch
parent
commit
f445a43da1
  1. 16
      build-package.sh
  2. 15
      scripts/build/termux_step_patch_package.sh

16
build-package.sh

@ -65,21 +65,7 @@ source scripts/build/termux_step_host_build.sh
source scripts/build/termux_step_setup_toolchain.sh
# Apply all *.patch files for the package. Not to be overridden by packages.
termux_step_patch_package() {
cd "$TERMUX_PKG_SRCDIR"
local DEBUG_PATCHES=""
if [ "$TERMUX_DEBUG" == "true" ] && [ -f $TERMUX_PKG_BUILDER_DIR/*.patch.debug ] ; then
DEBUG_PATCHES="$(ls $TERMUX_PKG_BUILDER_DIR/*.patch.debug)"
fi
# Suffix patch with ".patch32" or ".patch64" to only apply for these bitnesses:
shopt -s nullglob
for patch in $TERMUX_PKG_BUILDER_DIR/*.patch{$TERMUX_ARCH_BITS,} $DEBUG_PATCHES; do
test -f "$patch" && sed "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" "$patch" | \
sed "s%\@TERMUX_HOME\@%${TERMUX_ANDROID_HOME}%g" | \
patch --silent -p1
done
shopt -u nullglob
}
source scripts/build/termux_step_patch_package.sh
# Replace autotools build-aux/config.{sub,guess} with ours to add android targets.
termux_step_replace_guess_scripts() {

15
scripts/build/termux_step_patch_package.sh

@ -0,0 +1,15 @@
termux_step_patch_package() {
cd "$TERMUX_PKG_SRCDIR"
local DEBUG_PATCHES=""
if [ "$TERMUX_DEBUG" == "true" ] && [ -f $TERMUX_PKG_BUILDER_DIR/*.patch.debug ] ; then
DEBUG_PATCHES="$(ls $TERMUX_PKG_BUILDER_DIR/*.patch.debug)"
fi
# Suffix patch with ".patch32" or ".patch64" to only apply for these bitnesses:
shopt -s nullglob
for patch in $TERMUX_PKG_BUILDER_DIR/*.patch{$TERMUX_ARCH_BITS,} $DEBUG_PATCHES; do
test -f "$patch" && sed "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" "$patch" | \
sed "s%\@TERMUX_HOME\@%${TERMUX_ANDROID_HOME}%g" | \
patch --silent -p1
done
shopt -u nullglob
}
Loading…
Cancel
Save