From 508fa73cb8ff2a01a37c7082905c991937549e24 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Tue, 10 Jan 2017 03:14:35 -0500 Subject: [PATCH] Always call post-extract step in srcdir --- build-package.sh | 2 ++ packages/autoconf/build.sh | 1 - packages/clang/build.sh | 2 -- packages/ctags/build.sh | 1 - packages/gdb/build.sh | 2 +- packages/libandroid-support/build.sh | 1 - packages/libgc/build.sh | 1 - packages/perl/build.sh | 1 - 8 files changed, 3 insertions(+), 8 deletions(-) diff --git a/build-package.sh b/build-package.sh index 4c810616b..91fdd599f 100755 --- a/build-package.sh +++ b/build-package.sh @@ -374,6 +374,7 @@ termux_step_extract_package () { } # Hook for packages to act just after the package has been extracted. +# Invoked in $TERMUX_PKG_SRCDIR. termux_step_post_extract_package () { return } @@ -895,6 +896,7 @@ termux_step_setup_variables termux_step_handle_buildarch termux_step_start_build termux_step_extract_package +cd "$TERMUX_PKG_SRCDIR" termux_step_post_extract_package termux_step_handle_hostbuild termux_step_setup_toolchain diff --git a/packages/autoconf/build.sh b/packages/autoconf/build.sh index 0be67a1c9..a27a0893c 100644 --- a/packages/autoconf/build.sh +++ b/packages/autoconf/build.sh @@ -6,7 +6,6 @@ TERMUX_PKG_DEPENDS="m4, make, perl" TERMUX_PKG_PLATFORM_INDEPENDENT=yes termux_step_post_extract_package () { - cd $TERMUX_PKG_SRCDIR perl -p -i -e "s|/bin/sh|$TERMUX_PREFIX/bin/sh|" lib/*/*.m4 } diff --git a/packages/clang/build.sh b/packages/clang/build.sh index 3405342a9..2ccf2016f 100644 --- a/packages/clang/build.sh +++ b/packages/clang/build.sh @@ -20,8 +20,6 @@ termux_step_post_extract_package () { # COMPILERRT_SRC_TAR=compiler-rt-${TERMUX_PKG_VERSION}.src.tar.xz # test ! -f $TERMUX_PKG_CACHEDIR/$COMPILERRT_SRC_TAR && curl http://llvm.org/releases/${TERMUX_PKG_VERSION}/${COMPILERRT_SRC_TAR} > $TERMUX_PKG_CACHEDIR/$COMPILERRT_SRC_TAR - cd $TERMUX_PKG_SRCDIR - tar -xf $TERMUX_PKG_CACHEDIR/$CLANG_SRC_TAR -C tools mv tools/cfe-${TERMUX_PKG_VERSION}.src tools/clang diff --git a/packages/ctags/build.sh b/packages/ctags/build.sh index 0fd4649d9..45999b988 100644 --- a/packages/ctags/build.sh +++ b/packages/ctags/build.sh @@ -10,6 +10,5 @@ TERMUX_PKG_BUILD_IN_SRC="yes" termux_step_post_extract_package () { export regcomp_works=yes - cd $TERMUX_PKG_SRCDIR ./autogen.sh } diff --git a/packages/gdb/build.sh b/packages/gdb/build.sh index 4ca564157..3be99f5dc 100755 --- a/packages/gdb/build.sh +++ b/packages/gdb/build.sh @@ -25,7 +25,7 @@ termux_step_pre_configure() { termux_step_post_extract_package () { if [ $TERMUX_ARCH = aarch64 ]; then # Fix problem with including : - mv $TERMUX_PKG_SRCDIR/sim/aarch64/{memory.h,memory_sim.h} + mv sim/aarch64/{memory.h,memory_sim.h} perl -p -i -e 's/memory.h/memory_sim.h/' $TERMUX_PKG_SRCDIR/sim/aarch64/*c fi } diff --git a/packages/libandroid-support/build.sh b/packages/libandroid-support/build.sh index 55276f852..a9f44078a 100755 --- a/packages/libandroid-support/build.sh +++ b/packages/libandroid-support/build.sh @@ -6,7 +6,6 @@ TERMUX_PKG_BUILD_IN_SRC=yes TERMUX_PKG_ESSENTIAL=yes termux_step_post_extract_package () { - cd $TERMUX_PKG_SRCDIR mkdir -p src/musl-locale/ src/musl-multibyte/ include/ src/musl-ctype/ cp $NDK/sources/android/support/src/musl-multibyte/{mblen.c,mbsrtowcs.c,mbsnrtowcs.c,libc.h,internal.h,internal.c} src/musl-multibyte/ cp $NDK/sources/android/support/src/musl-locale/{catclose.c,catgets.c,catopen.c} src/musl-locale/ diff --git a/packages/libgc/build.sh b/packages/libgc/build.sh index 65246b3ed..55e11855c 100644 --- a/packages/libgc/build.sh +++ b/packages/libgc/build.sh @@ -8,7 +8,6 @@ termux_step_post_extract_package () { LIBATOMIC_VERSION=7.4.4 LIBATOMIC_FILE=libatomic_ops-${LIBATOMIC_VERSION}.tar.gz test ! -f $TERMUX_PKG_CACHEDIR/$LIBATOMIC_FILE && curl -o $TERMUX_PKG_CACHEDIR/$LIBATOMIC_FILE http://www.ivmaisoft.com/_bin/atomic_ops/libatomic_ops-${LIBATOMIC_VERSION}.tar.gz - cd $TERMUX_PKG_SRCDIR tar xf $TERMUX_PKG_CACHEDIR/$LIBATOMIC_FILE mv libatomic_ops-${LIBATOMIC_VERSION} libatomic_ops ./autogen.sh diff --git a/packages/perl/build.sh b/packages/perl/build.sh index 4224eb078..bc923007c 100644 --- a/packages/perl/build.sh +++ b/packages/perl/build.sh @@ -16,7 +16,6 @@ termux_step_post_extract_package () { PERLCROSS_FILE=perl-${PERLCROSS_PERL_VERSION}-cross-${PERLCROSS_VERSION}.tar.gz PERLCROSS_TAR=$TERMUX_PKG_CACHEDIR/$PERLCROSS_FILE test ! -f $PERLCROSS_TAR && curl -o $PERLCROSS_TAR -L https://github.com/arsv/perl-cross/releases/download/$PERLCROSS_VERSION/$PERLCROSS_FILE - cd $TERMUX_PKG_SRCDIR tar xf $PERLCROSS_TAR cd perl-${PERLCROSS_PERL_VERSION} cp -Rf * ../