Fix termux-elf-cleaner breakage

When separating out termux-elf-cleaner into its own repository the
way of building a native binary failed. Fixes #906.
This commit is contained in:
Fredrik Fornwall 2017-04-06 23:33:45 +02:00
parent 9cdf713e24
commit 386c84693b
2 changed files with 9 additions and 1 deletions

View File

@ -348,7 +348,12 @@ termux_step_start_build() {
# scripts can assume that it works on both builder and host later on: # scripts can assume that it works on both builder and host later on:
ln -f -s /bin/sh "$TERMUX_PREFIX/bin/sh" ln -f -s /bin/sh "$TERMUX_PREFIX/bin/sh"
TERMUX_ELF_CLEANER_SRC=$TERMUX_SCRIPTDIR/packages/termux-elf-cleaner/termux-elf-cleaner.cpp local TERMUX_ELF_CLEANER_SRC=$TERMUX_COMMON_CACHEDIR/termux-elf-cleaner.cpp
local TERMUX_ELF_CLEANER_VERSION=$(bash -c ". $TERMUX_SCRIPTDIR/packages/termux-elf-cleaner/build.sh; echo \$TERMUX_PKG_VERSION")
termux_download \
https://raw.githubusercontent.com/termux/termux-elf-cleaner/v$TERMUX_ELF_CLEANER_VERSION/termux-elf-cleaner.cpp \
$TERMUX_ELF_CLEANER_SRC \
11a38372f4d0e36b7556382c7ecffecae35cee8b68daaee2dbee025f758e17ee
if [ "$TERMUX_ELF_CLEANER_SRC" -nt "$TERMUX_ELF_CLEANER" ]; then if [ "$TERMUX_ELF_CLEANER_SRC" -nt "$TERMUX_ELF_CLEANER" ]; then
g++ -std=c++11 -Wall -Wextra -pedantic -Os "$TERMUX_ELF_CLEANER_SRC" -o "$TERMUX_ELF_CLEANER" g++ -std=c++11 -Wall -Wextra -pedantic -Os "$TERMUX_ELF_CLEANER_SRC" -o "$TERMUX_ELF_CLEANER"
fi fi

View File

@ -1,5 +1,8 @@
TERMUX_PKG_HOMEPAGE=https://github.com/termux/termux-elf-cleaner TERMUX_PKG_HOMEPAGE=https://github.com/termux/termux-elf-cleaner
TERMUX_PKG_DESCRIPTION="Cleaner of ELF files for Android" TERMUX_PKG_DESCRIPTION="Cleaner of ELF files for Android"
# NOTE: The termux-elf-cleaner.cpp file is used by build-package.sh
# to create a native binary. Bumping this version will need
# updating the checksum used there.
TERMUX_PKG_VERSION=1.1 TERMUX_PKG_VERSION=1.1
TERMUX_PKG_SRCURL=https://github.com/termux/termux-elf-cleaner/archive/v${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_SRCURL=https://github.com/termux/termux-elf-cleaner/archive/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=66612b294e197ab7bfac807e497581df58424af6a7c855f89fc12eafa3dc1b8c TERMUX_PKG_SHA256=66612b294e197ab7bfac807e497581df58424af6a7c855f89fc12eafa3dc1b8c