From 8e66b39bf1c96b0ca31999931cb28ccb00e5d9ee Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Tue, 3 May 2016 07:45:33 -0400 Subject: [PATCH] fish: Update to latest master --- packages/fish/build.sh | 7 +-- packages/fish/env_universal_common.cpp.patch | 49 ------------------ packages/fish/env_universal_common.h.patch | 14 ------ packages/fish/src-common.cpp.patch | 19 +++++++ .../fish/src-env_universal_common.cpp.patch | 50 +++++++++++++++++++ .../fish/src-env_universal_common.h.patch | 15 ++++++ packages/fish/src-fallback.h.patch | 12 ----- 7 files changed, 88 insertions(+), 78 deletions(-) delete mode 100644 packages/fish/env_universal_common.cpp.patch delete mode 100644 packages/fish/env_universal_common.h.patch create mode 100644 packages/fish/src-common.cpp.patch create mode 100644 packages/fish/src-env_universal_common.cpp.patch create mode 100644 packages/fish/src-env_universal_common.h.patch delete mode 100644 packages/fish/src-fallback.h.patch diff --git a/packages/fish/build.sh b/packages/fish/build.sh index 499102ab0..9d69fee6d 100644 --- a/packages/fish/build.sh +++ b/packages/fish/build.sh @@ -1,9 +1,10 @@ TERMUX_PKG_HOMEPAGE=http://fishshell.com/ TERMUX_PKG_DESCRIPTION="Shell geared towards interactive use" -_COMMIT=b1b2698a843b52ea18ae0f8fc1e5a2b6e003f409 -TERMUX_PKG_VERSION=2.2.201603181154 +_COMMIT=c76d86631717929b3a2f259615e8603e69e13256 +TERMUX_PKG_VERSION=2.2.201605030720 TERMUX_PKG_SRCURL=https://github.com/fish-shell/fish-shell/archive/${_COMMIT}.zip -TERMUX_PKG_DEPENDS="ncurses, libgnustl, libandroid-support" +# fish calls 'tput' from ncurses-utils, at least when cancelling (Ctrl+C) a command line: +TERMUX_PKG_DEPENDS="ncurses, libgnustl, libandroid-support, ncurses-utils" TERMUX_PKG_BUILD_IN_SRC=yes TERMUX_PKG_FOLDERNAME=fish-shell-$_COMMIT diff --git a/packages/fish/env_universal_common.cpp.patch b/packages/fish/env_universal_common.cpp.patch deleted file mode 100644 index 1e3bf8608..000000000 --- a/packages/fish/env_universal_common.cpp.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff -u -r ../fish-shell-master/src/env_universal_common.cpp ./src/env_universal_common.cpp ---- ../fish-shell-master/src/env_universal_common.cpp 2016-03-09 07:07:04.000000000 -0500 -+++ ./src/env_universal_common.cpp 2016-03-12 15:47:14.502255105 -0500 -@@ -166,7 +166,7 @@ - } - - // /tmp/fish.user -- std::string tmpdir = "/tmp/fish."; -+ std::string tmpdir = "@TERMUX_PREFIX@/tmp/fish."; - tmpdir.append(uname); - if (check_runtime_path(tmpdir.c_str()) != 0) - { -@@ -1142,6 +1142,7 @@ - return result; - } - -+#ifndef __ANDROID__ - class universal_notifier_shmem_poller_t : public universal_notifier_t - { - /* This is what our shared memory looks like. Everything here is stored in network byte order (big-endian) */ -@@ -1304,6 +1305,7 @@ - } - } - }; -+#endif - - /* A notifyd-based notifier. Very straightforward. */ - class universal_notifier_notifyd_t : public universal_notifier_t -@@ -1625,7 +1627,9 @@ - } options[] = - { - {"default", universal_notifier_t::strategy_default}, -+#ifndef __ANDROID__ - {"shmem", universal_notifier_t::strategy_shmem_polling}, -+#endif - {"pipe", universal_notifier_t::strategy_named_pipe}, - {"notifyd", universal_notifier_t::strategy_notifyd} - }; -@@ -1687,8 +1691,10 @@ - } - switch (strat) - { -+#ifndef __ANDROID__ - case strategy_shmem_polling: - return new universal_notifier_shmem_poller_t(); -+#endif - - case strategy_notifyd: - return new universal_notifier_notifyd_t(); diff --git a/packages/fish/env_universal_common.h.patch b/packages/fish/env_universal_common.h.patch deleted file mode 100644 index b368d7d22..000000000 --- a/packages/fish/env_universal_common.h.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -u -r ../fish-2.2.0/env_universal_common.h ./env_universal_common.h ---- ../fish-2.2.0/env_universal_common.h 2015-07-03 15:46:59.000000000 -0400 -+++ ./src/env_universal_common.h 2015-07-25 17:52:47.555388223 -0400 -@@ -123,8 +123,10 @@ - // Default meta-strategy to use the 'best' notifier for the system - strategy_default, - -+#ifndef __ANDROID__ - // Use a value in shared memory. Simple, but requires polling and therefore semi-frequent wakeups. - strategy_shmem_polling, -+#endif - - // Strategy that uses a named pipe. Somewhat complex, but portable and doesn't require polling most of the time. - strategy_named_pipe, diff --git a/packages/fish/src-common.cpp.patch b/packages/fish/src-common.cpp.patch new file mode 100644 index 000000000..3007a387e --- /dev/null +++ b/packages/fish/src-common.cpp.patch @@ -0,0 +1,19 @@ +diff -u -r ../fish-shell-c76d86631717929b3a2f259615e8603e69e13256/src/common.cpp ./src/common.cpp +--- ../fish-shell-c76d86631717929b3a2f259615e8603e69e13256/src/common.cpp 2016-05-03 01:20:53.000000000 -0400 ++++ ./src/common.cpp 2016-05-03 07:16:32.052328928 -0400 +@@ -68,6 +68,7 @@ + void show_stackframe() { + ASSERT_IS_NOT_FORKED_CHILD(); + ++#ifndef __ANDROID__ + // Hack to avoid showing backtraces in the tester. + if (program_name && !wcscmp(program_name, L"(ignore)")) return; + +@@ -77,6 +78,7 @@ + trace_size = backtrace(trace, 32); + debug(0, L"Backtrace:"); + backtrace_symbols_fd(trace, trace_size, STDERR_FILENO); ++#endif + } + + int fgetws2(wcstring *s, FILE *f) { diff --git a/packages/fish/src-env_universal_common.cpp.patch b/packages/fish/src-env_universal_common.cpp.patch new file mode 100644 index 000000000..59c17700f --- /dev/null +++ b/packages/fish/src-env_universal_common.cpp.patch @@ -0,0 +1,50 @@ +diff -u -r ../fish-shell-c76d86631717929b3a2f259615e8603e69e13256/src/env_universal_common.cpp ./src/env_universal_common.cpp +--- ../fish-shell-c76d86631717929b3a2f259615e8603e69e13256/src/env_universal_common.cpp 2016-05-03 01:20:53.000000000 -0400 ++++ ./src/env_universal_common.cpp 2016-05-03 06:59:06.896497467 -0400 +@@ -134,7 +134,7 @@ + } + + // /tmp/fish.user +- std::string tmpdir = "/tmp/fish."; ++ std::string tmpdir = "@TERMUX_PREFIX@/tmp/fish."; + tmpdir.append(uname); + if (check_runtime_path(tmpdir.c_str()) != 0) { + debug(0, +@@ -985,6 +985,7 @@ + return result; + } + ++#ifndef __ANDROID__ + class universal_notifier_shmem_poller_t : public universal_notifier_t { + // This is what our shared memory looks like. Everything here is stored in network byte order + // (big-endian). +@@ -1126,6 +1127,7 @@ + } + } + }; ++#endif + + /// A notifyd-based notifier. Very straightforward. + class universal_notifier_notifyd_t : public universal_notifier_t { +@@ -1409,7 +1412,9 @@ + const char *name; + universal_notifier_t::notifier_strategy_t strat; + } options[] = {{"default", universal_notifier_t::strategy_default}, ++#ifndef __ANDROID__ + {"shmem", universal_notifier_t::strategy_shmem_polling}, ++#endif + {"pipe", universal_notifier_t::strategy_named_pipe}, + {"notifyd", universal_notifier_t::strategy_notifyd}}; + const size_t opt_count = sizeof options / sizeof *options; +@@ -1462,9 +1467,11 @@ + strat = resolve_default_strategy(); + } + switch (strat) { ++#ifndef __ANDROID__ + case strategy_shmem_polling: { + return new universal_notifier_shmem_poller_t(); + } ++#endif + case strategy_notifyd: { + return new universal_notifier_notifyd_t(); + } diff --git a/packages/fish/src-env_universal_common.h.patch b/packages/fish/src-env_universal_common.h.patch new file mode 100644 index 000000000..b340ff1c3 --- /dev/null +++ b/packages/fish/src-env_universal_common.h.patch @@ -0,0 +1,15 @@ +diff -u -r ../fish-shell-c76d86631717929b3a2f259615e8603e69e13256/src/env_universal_common.h ./src/env_universal_common.h +--- ../fish-shell-c76d86631717929b3a2f259615e8603e69e13256/src/env_universal_common.h 2016-05-03 01:20:53.000000000 -0400 ++++ ./src/env_universal_common.h 2016-05-03 07:14:21.002360936 -0400 +@@ -116,9 +116,11 @@ + // Default meta-strategy to use the 'best' notifier for the system. + strategy_default, + ++#ifndef __ANDROID__ + // Use a value in shared memory. Simple, but requires polling and therefore semi-frequent + // wakeups. + strategy_shmem_polling, ++#endif + + // Strategy that uses a named pipe. Somewhat complex, but portable and doesn't require + // polling most of the time. diff --git a/packages/fish/src-fallback.h.patch b/packages/fish/src-fallback.h.patch deleted file mode 100644 index 8c22c398c..000000000 --- a/packages/fish/src-fallback.h.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -u -r ../fish-shell-master/src/fallback.h ./src/fallback.h ---- ../fish-shell-master/src/fallback.h 2015-12-16 10:35:17.000000000 -0500 -+++ ./src/fallback.h 2015-12-17 05:05:46.153316539 -0500 -@@ -31,7 +31,7 @@ - #if __STDC_VERSION__ < 199901L - # if __GNUC__ >= 2 - # define __func__ __FUNCTION__ --# else -+# elif !defined(__func__) - # define __func__ "" - # endif - #endif