Browse Source

fish: Update to 2.3.1 from git snapshot

android-5
Fredrik Fornwall 9 years ago
parent
commit
6250534f1e
  1. 21
      packages/fish/build.sh
  2. 19
      packages/fish/src-common.cpp.patch
  3. 55
      packages/fish/src-env_universal_common.cpp.patch
  4. 15
      packages/fish/src-env_universal_common.h.patch

21
packages/fish/build.sh

@ -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
}

19
packages/fish/src-common.cpp.patch

@ -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) {

55
packages/fish/src-env_universal_common.cpp.patch

@ -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();
}

15
packages/fish/src-env_universal_common.h.patch

@ -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.
Loading…
Cancel
Save