From: Fredrik Fornwall Date: Thu, 6 Apr 2017 21:33:45 +0000 (+0200) Subject: Fix termux-elf-cleaner breakage X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/termux-packages/commitdiff_plain/bd54a46a809f0d0480a771300899e8c98e9bf161?ds=inline 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. --- diff --git a/build-package.sh b/build-package.sh index 39a4a612..af3d0c59 100755 --- a/build-package.sh +++ b/build-package.sh @@ -348,7 +348,12 @@ termux_step_start_build() { # scripts can assume that it works on both builder and host later on: 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 g++ -std=c++11 -Wall -Wextra -pedantic -Os "$TERMUX_ELF_CLEANER_SRC" -o "$TERMUX_ELF_CLEANER" fi diff --git a/packages/termux-elf-cleaner/build.sh b/packages/termux-elf-cleaner/build.sh index b5bb8958..2c948245 100644 --- a/packages/termux-elf-cleaner/build.sh +++ b/packages/termux-elf-cleaner/build.sh @@ -1,5 +1,8 @@ TERMUX_PKG_HOMEPAGE=https://github.com/termux/termux-elf-cleaner 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_SRCURL=https://github.com/termux/termux-elf-cleaner/archive/v${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_SHA256=66612b294e197ab7bfac807e497581df58424af6a7c855f89fc12eafa3dc1b8c