build-package: mv termux_step_patch_package to scripts/build/
This commit is contained in:
parent
63fdeada9b
commit
5389a1a4e2
@ -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
Normal file
15
scripts/build/termux_step_patch_package.sh
Normal file
@ -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…
Reference in New Issue
Block a user