From 254c932df22f014834b0eb1be68d65df153e2699 Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Tue, 19 Jun 2018 19:24:15 +0300 Subject: [PATCH] gdb: fix default editor for command 'edit' --- packages/gdb/build.sh | 1 + packages/gdb/cli-cmds.c.patch | 21 +++++++++++++++++++++ packages/gdb/cli_cmds_c_bin_sh.patch | 12 ------------ 3 files changed, 22 insertions(+), 12 deletions(-) create mode 100644 packages/gdb/cli-cmds.c.patch delete mode 100644 packages/gdb/cli_cmds_c_bin_sh.patch diff --git a/packages/gdb/build.sh b/packages/gdb/build.sh index 9321df2ef..e6515192a 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, ncurses, libmpfr" TERMUX_PKG_VERSION=8.1 +TERMUX_PKG_REVISION=1 TERMUX_PKG_SHA256=af61a0263858e69c5dce51eab26662ff3d2ad9aa68da9583e8143b5426be4b34 TERMUX_PKG_SRCURL=https://mirrors.kernel.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 diff --git a/packages/gdb/cli-cmds.c.patch b/packages/gdb/cli-cmds.c.patch new file mode 100644 index 000000000..026ad40b5 --- /dev/null +++ b/packages/gdb/cli-cmds.c.patch @@ -0,0 +1,21 @@ +diff -uNr gdb-8.1/gdb/cli/cli-cmds.c gdb-8.1.mod/gdb/cli/cli-cmds.c +--- gdb-8.1/gdb/cli/cli-cmds.c 2018-01-05 06:07:23.000000000 +0200 ++++ gdb-8.1.mod/gdb/cli/cli-cmds.c 2018-06-19 19:21:22.451443520 +0300 +@@ -731,7 +731,7 @@ + close_most_fds (); + + if ((user_shell = (char *) getenv ("SHELL")) == NULL) +- user_shell = "/bin/sh"; ++ user_shell = "@TERMUX_PREFIX@/bin/sh"; + + /* Get the name of the shell for arg0. */ + p = lbasename (user_shell); +@@ -851,7 +851,7 @@ + } + + if ((editor = (char *) getenv ("EDITOR")) == NULL) +- editor = "/bin/ex"; ++ editor = "@TERMUX_REFIX@/bin/applets/vi"; + + fn = symtab_to_fullname (sal.symtab); + diff --git a/packages/gdb/cli_cmds_c_bin_sh.patch b/packages/gdb/cli_cmds_c_bin_sh.patch deleted file mode 100644 index c74c3f833..000000000 --- a/packages/gdb/cli_cmds_c_bin_sh.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -u -r ../gdb-7.6.2/gdb/cli/cli-cmds.c ./gdb/cli/cli-cmds.c ---- ../gdb-7.6.2/gdb/cli/cli-cmds.c 2013-12-08 05:33:13.000000000 +0100 -+++ ./gdb/cli/cli-cmds.c 2014-01-07 16:43:01.862311352 +0100 -@@ -722,7 +722,7 @@ - const char *p, *user_shell; - - if ((user_shell = (char *) getenv ("SHELL")) == NULL) -- user_shell = "/bin/sh"; -+ user_shell = "@TERMUX_PREFIX@/bin/sh"; - - /* Get the name of the shell for arg0. */ - p = lbasename (user_shell);