fish: Update to 2.3.1 from git snapshot

This commit is contained in:
Fredrik Fornwall 2016-08-06 04:14:04 -04:00
parent e45652b2c6
commit 6250534f1e
4 changed files with 37 additions and 73 deletions

View File

@ -1,20 +1,19 @@
TERMUX_PKG_HOMEPAGE=http://fishshell.com/
TERMUX_PKG_DESCRIPTION="Shell geared towards interactive use"
_COMMIT=c76d86631717929b3a2f259615e8603e69e13256
TERMUX_PKG_VERSION=2.2.201605030720
TERMUX_PKG_SRCURL=https://github.com/fish-shell/fish-shell/archive/${_COMMIT}.zip
TERMUX_PKG_VERSION=2.3.1
TERMUX_PKG_SRCURL=https://github.com/fish-shell/fish-shell/releases/download/$TERMUX_PKG_VERSION/fish-${TERMUX_PKG_VERSION}.tar.gz
# 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
TERMUX_PKG_FOLDERNAME=fish-$TERMUX_PKG_VERSION
termux_step_pre_configure () {
cd $TERMUX_PKG_SRCDIR
autoconf
CXXFLAGS+=" $CPPFLAGS"
CXXFLAGS+=" $CPPFLAGS"
termux_step_post_make_install () {
cat >> $TERMUX_PREFIX/etc/fish/config.fish <<HERE
LDFLAGS+=" -lgnustl_shared"
export PCRE2_CONFIG_EXTRAS="--host=$TERMUX_HOST_PLATFORM"
function __fish_command_not_found_handler --on-event fish_command_not_found
$TERMUX_PREFIX/libexec/termux/command-not-found \$argv[1]
end
HERE
}

View File

@ -1,19 +0,0 @@
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) {

View File

@ -1,50 +1,49 @@
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 @@
diff -u -r ../fish-2.3.1/src/env_universal_common.cpp ./src/env_universal_common.cpp
--- ../fish-2.3.1/src/env_universal_common.cpp 2016-07-03 08:15:45.000000000 -0400
+++ ./src/env_universal_common.cpp 2016-08-05 09:18:38.753535780 -0400
@@ -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) {
debug(0,
@@ -985,6 +985,7 @@
if (check_runtime_path(tmpdir.c_str()) != 0)
{
@@ -1141,6 +1141,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 @@
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 {
@@ -1409,7 +1412,9 @@
const char *name;
universal_notifier_t::notifier_strategy_t strat;
} options[] = {{"default", universal_notifier_t::strategy_default},
/* 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},
{"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();
{"pipe", universal_notifier_t::strategy_named_pipe},
{"notifyd", universal_notifier_t::strategy_notifyd}
};
@@ -1687,8 +1691,10 @@
}
switch (strat) {
switch (strat)
{
+#ifndef __ANDROID__
case strategy_shmem_polling: {
case strategy_shmem_polling:
return new universal_notifier_shmem_poller_t();
}
+#endif
case strategy_notifyd: {
case strategy_notifyd:
return new universal_notifier_notifyd_t();
}

View File

@ -1,15 +0,0 @@
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.