From: Fredrik Fornwall Date: Sun, 12 Jul 2015 00:11:50 +0000 (-0400) Subject: gdb: Use termux-provided bin/sh instead of system X-Git-Url: https://git.distorted.org.uk/~mdw/termux-packages/commitdiff_plain/614749cd9e7fac779ab170bf7742e8fabe777d8b?hp=638b6413b1ea097bae7a9275a8f8fc8b92f1bcfc gdb: Use termux-provided bin/sh instead of system --- diff --git a/packages/gdb/build.sh b/packages/gdb/build.sh index 9fdc2678..915fdb91 100755 --- a/packages/gdb/build.sh +++ b/packages/gdb/build.sh @@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/gdb/ TERMUX_PKG_DESCRIPTION="The standard GNU Debugger that runs on many Unix-like systems and works for many programming languages" TERMUX_PKG_DEPENDS="liblzma, libexpat, readline" TERMUX_PKG_VERSION=7.9.1 +TERMUX_PKG_BUILD_REVISION=1 TERMUX_PKG_SRCURL=http://ftp.gnu.org/gnu/gdb/gdb-${TERMUX_PKG_VERSION}.tar.xz # gdb can not build with our normal --disable-static: https://sourceware.org/bugzilla/show_bug.cgi?id=15916 TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-system-readline --with-curses --enable-static ac_cv_func_getpwent=no ac_cv_func_getpwnam=no" diff --git a/packages/gdb/cli_cmds_c_bin_sh.patch b/packages/gdb/cli_cmds_c_bin_sh.patch index 1080011f..c74c3f83 100644 --- a/packages/gdb/cli_cmds_c_bin_sh.patch +++ b/packages/gdb/cli_cmds_c_bin_sh.patch @@ -6,7 +6,7 @@ diff -u -r ../gdb-7.6.2/gdb/cli/cli-cmds.c ./gdb/cli/cli-cmds.c if ((user_shell = (char *) getenv ("SHELL")) == NULL) - user_shell = "/bin/sh"; -+ user_shell = "/system/bin/sh"; ++ user_shell = "@TERMUX_PREFIX@/bin/sh"; /* Get the name of the shell for arg0. */ p = lbasename (user_shell); diff --git a/packages/gdb/fork_child_bin_sh.patch b/packages/gdb/fork_child_bin_sh.patch index a2b98eee..f891677b 100644 --- a/packages/gdb/fork_child_bin_sh.patch +++ b/packages/gdb/fork_child_bin_sh.patch @@ -6,6 +6,6 @@ diff -u -r ../gdb-7.6.2/gdb/fork-child.c ./gdb/fork-child.c /* This just gets used as a default if we can't find SHELL. */ -#define SHELL_FILE "/bin/sh" -+#define SHELL_FILE "/system/bin/sh" ++#define SHELL_FILE "@TERMUX_PREFIX@/bin/sh" extern char **environ;