git: Use $PREFIX/bin/sh instead of /system/bin/sh

This commit is contained in:
Fredrik Fornwall 2015-12-02 06:24:10 -05:00
parent f2091a8e83
commit 5822f92030
3 changed files with 9 additions and 7 deletions

View File

@ -60,9 +60,6 @@ RUN cd /tmp && \
rm -fr /tmp/*
RUN mkdir -p /data/data/com.termux/files/usr && mkdir -p /root/termux-packages && \
# This link is needed for building git package
mkdir -p /system/bin && \
ln -s /bin/sh /system/bin/sh && \
# Install neovim dependencies
luarocks install lpeg && \
luarocks install lua-MessagePack && \

View File

@ -190,6 +190,10 @@ rm -Rf $TERMUX_PKG_BUILDDIR $TERMUX_PKG_PACKAGEDIR $TERMUX_PKG_SRCDIR $TERMUX_
# Ensure folders present (but not $TERMUX_PKG_SRCDIR, it will be created in build)
mkdir -p $TERMUX_PKG_BUILDDIR $TERMUX_PKG_PACKAGEDIR $TERMUX_PKG_TMPDIR $TERMUX_PKG_CACHEDIR $TERMUX_PKG_MASSAGEDIR $PKG_CONFIG_LIBDIR $TERMUX_PREFIX/{bin,etc,lib,libexec,share,tmp}
# Make $TERMUX_PREFIX/bin/sh executable on the builder, so that build script can assume that it works
# on both builder and host later on:
ln -f -s /bin/sh $TERMUX_PREFIX/bin/sh
# If $TERMUX_PREFIX already exists, it may have been built for a different arch
TERMUX_ARCH_FILE=/data/TERMUX_ARCH
if [ -f "${TERMUX_ARCH_FILE}" ]; then
@ -240,7 +244,6 @@ Requires:
Libs: -L$TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr/lib -lz
Cflags: -I$TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr/include
HERE
sleep 1 # Sleep so that zlib.c get older timestamp then TERMUX_BUILD_TS_FILE.
fi
TERMUX_ELF_CLEANER=$TERMUX_COMMON_CACHEDIR/termux-elf-cleaner
@ -251,6 +254,8 @@ fi
# Keep track of when build started so we can see what files have been created
export TERMUX_BUILD_TS_FILE=$TERMUX_PKG_TMPDIR/timestamp_$TERMUX_PKG_NAME
sleep 1 # Sleep so that any generated files above (such as zlib.c and $PREFIX/bin/sh)
#get older timestamp then TERMUX_BUILD_TS_FILE
rm -f $TERMUX_BUILD_TS_FILE && touch $TERMUX_BUILD_TS_FILE
# Run just after sourcing $TERMUX_PKG_BUILDER_SCRIPT

View File

@ -5,10 +5,10 @@ TERMUX_PKG_DESCRIPTION="Distributed version control system designed to handle ev
# escape sequences:
TERMUX_PKG_DEPENDS="openssl, libcurl, less"
TERMUX_PKG_VERSION=2.6.3
TERMUX_PKG_BUILD_REVISION=1
TERMUX_PKG_BUILD_REVISION=2
TERMUX_PKG_SRCURL=https://www.kernel.org/pub/software/scm/git/git-${TERMUX_PKG_VERSION}.tar.xz
## This requires a /system/bin/sh on the host building:
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--without-tcltk --with-curl --with-shell=/system/bin/sh ac_cv_header_libintl_h=no ac_cv_fread_reads_directories=yes ac_cv_snprintf_returns_bogus=yes"
## This requires a working $TERMUX_PREFIX/bin/sh on the host building:
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--without-tcltk --with-curl --with-shell=$TERMUX_PREFIX/bin/sh ac_cv_header_libintl_h=no ac_cv_fread_reads_directories=yes ac_cv_snprintf_returns_bogus=yes"
# expat is only used by git-http-push for remote lock management over DAV, so disable:
# NO_INSTALL_HARDLINKS to use symlinks instead of hardlinks (which does not work on Android M):
TERMUX_PKG_EXTRA_MAKE_ARGS="NO_NSEC=1 NO_PERL=1 NO_GETTEXT=1 NO_EXPAT=1 NO_INSTALL_HARDLINKS=1 PERL_PATH=$TERMUX_PREFIX/bin/perl"