chiark / gitweb /
Move $PREFIX/bin/env from coreutils to busybox
authorFredrik Fornwall <fredrik@fornwall.net>
Mon, 2 May 2016 22:40:17 +0000 (00:40 +0200)
committerFredrik Fornwall <fredrik@fornwall.net>
Mon, 2 May 2016 22:41:11 +0000 (00:41 +0200)
The busybox version of env should provide enough functionality, and
having $PREFIX/bin/env available out of the box is valuable.

packages/busybox/build.sh
packages/coreutils/build.sh

index dce90ed2a41b8fa62b76dd3f9e8ff44d9b572b9a..6c2fab07db8cd0d022a472164a0acb52ebd9ee6c 100755 (executable)
@@ -2,9 +2,11 @@ TERMUX_PKG_HOMEPAGE=http://www.busybox.net/
 TERMUX_PKG_DESCRIPTION="Tiny versions of many common UNIX utilities into a single small executable"
 TERMUX_PKG_ESSENTIAL=yes
 TERMUX_PKG_VERSION=1.24.2
-TERMUX_PKG_BUILD_REVISION=1
+TERMUX_PKG_BUILD_REVISION=2
 TERMUX_PKG_SRCURL=http://www.busybox.net/downloads/busybox-${TERMUX_PKG_VERSION}.tar.bz2
 TERMUX_PKG_BUILD_IN_SRC=yes
+# We replace env in the old coreutils package:
+TERMUX_PKG_CONFLICTS="coreutils (< 8.25-4)"
 
 # NOTE: sed on mac does not work for building busybox, install gsed and symlink sed => gsed
 
@@ -31,9 +33,10 @@ termux_step_post_make_install () {
        cd $TERMUX_PREFIX/bin/applets
        for f in `cat $TERMUX_PKG_SRCDIR/busybox.links`; do ln -s ../busybox `basename $f`; done
 
+        # The 'ash' and 'env' applets are special in that they go into $PREFIX/bin:
        cd $TERMUX_PREFIX/bin
-       rm -f ash
-       ln -s busybox ash
+       ln -f -s busybox ash
+       ln -f -s busybox env
 
        # Install busybox man page
        mkdir -p $TERMUX_PREFIX/share/man/man1
index 371d63d08e21475e6eec64b630c56bf2f9d3d00c..f321861d5333ff7491df44ae2608a97b81d39017 100755 (executable)
@@ -1,13 +1,14 @@
 TERMUX_PKG_HOMEPAGE=http://www.gnu.org/software/coreutils/
 TERMUX_PKG_DESCRIPTION="Basic file, shell and text manipulation utilities from the GNU project"
 TERMUX_PKG_VERSION=8.25
-TERMUX_PKG_BUILD_REVISION=3
+TERMUX_PKG_BUILD_REVISION=4
 TERMUX_PKG_SRCURL=http://ftp.gnu.org/gnu/coreutils/coreutils-${TERMUX_PKG_VERSION}.tar.xz
 TERMUX_PKG_EXTRA_CONFIGURE_ARGS="ac_cv_func_mkfifo=yes gl_cv_host_operating_system=Android --without-gmp --enable-single-binary=symlinks ac_cv_func_endpwent=no"
 # pinky has no usage on Android.
 # realpath has permission denied problem with relative paths, let busybox version prevail.
 # df does not work either, let system binary prevail.
-TERMUX_PKG_EXTRA_CONFIGURE_ARGS+="  --enable-no-install-program=pinky,realpath,df,chroot"
+# $PREFIX/bin/env is provided by busybox for shebangs to work directly.
+TERMUX_PKG_EXTRA_CONFIGURE_ARGS+="  --enable-no-install-program=pinky,realpath,df,chroot,env"
 TERMUX_PKG_EXTRA_HOSTBUILD_CONFIGURE_ARGS="$TERMUX_PKG_EXTRA_CONFIGURE_ARGS"
 TERMUX_PKG_BUILD_IN_SRC=yes
 # Host build for man pages generated by help2man, see makefile.patch: