Browse Source

tar: Fix /bin/sh -> $PREFIX/bin/sh

Also depend on xz-utils for xz compression to work.

Fixes #410.
android-5
Fredrik Fornwall 8 years ago
parent
commit
7892fa9703
  1. 3
      packages/tar/build.sh
  2. 27
      packages/tar/src-system.c.patch

3
packages/tar/build.sh

@ -1,7 +1,10 @@
TERMUX_PKG_HOMEPAGE=http://www.gnu.org/software/tar/
TERMUX_PKG_DESCRIPTION="GNU tar for manipulating tar archives"
TERMUX_PKG_VERSION=1.29
TERMUX_PKG_BUILD_REVISION=1
TERMUX_PKG_SRCURL=http://ftp.gnu.org/gnu/tar/tar-${TERMUX_PKG_VERSION}.tar.xz
# Allow xz compression (busybox only provides xz decompression):
TERMUX_PKG_DEPENDS="xz-utils"
# When cross-compiling configure guesses that d_ino in struct dirent only exists
# if triplet matches linux*-gnu*, so we force set it explicitly:
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="gl_cv_struct_dirent_d_ino=yes"

27
packages/tar/src-system.c.patch

@ -0,0 +1,27 @@
diff -u -r ../tar-1.29/src/system.c ./src/system.c
--- ../tar-1.29/src/system.c 2016-04-14 04:23:45.000000000 -0400
+++ ./src/system.c 2016-08-20 17:14:29.885111362 -0400
@@ -29,12 +29,12 @@
{
char *argv[4];
- argv[0] = (char *) "/bin/sh";
+ argv[0] = (char *) "@TERMUX_PREFIX@/bin/sh";
argv[1] = (char *) "-c";
argv[2] = (char *) cmd;
argv[3] = NULL;
- execv ("/bin/sh", argv);
+ execv ("@TERMUX_PREFIX@/bin/sh", argv);
exec_fatal (cmd);
}
@@ -203,7 +203,7 @@
pid_t child;
const char *shell = getenv ("SHELL");
if (! shell)
- shell = "/bin/sh";
+ shell = "@TERMUX_PREFIX@/bin/sh";
child = xfork ();
if (child == 0)
{
Loading…
Cancel
Save