From 70e78ebe8a72e6327899f6542e37ad874e581558 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Thu, 30 Nov 2017 00:49:01 +0100 Subject: [PATCH] fish: Update from 2.6.0 to 2.7.0 Fixes #909. --- ...8dd858c28dcfd564ee50e56ccd33fc0b39dc.patch | 65 ------------------- packages/fish/build.sh | 5 +- packages/fish/src-builtin_argparse.cpp.patch | 12 ++++ 3 files changed, 14 insertions(+), 68 deletions(-) delete mode 100644 packages/fish/5dc78dd858c28dcfd564ee50e56ccd33fc0b39dc.patch create mode 100644 packages/fish/src-builtin_argparse.cpp.patch diff --git a/packages/fish/5dc78dd858c28dcfd564ee50e56ccd33fc0b39dc.patch b/packages/fish/5dc78dd858c28dcfd564ee50e56ccd33fc0b39dc.patch deleted file mode 100644 index 330669c9a..000000000 --- a/packages/fish/5dc78dd858c28dcfd564ee50e56ccd33fc0b39dc.patch +++ /dev/null @@ -1,65 +0,0 @@ -https://github.com/fish-shell/fish-shell/commit/5dc78dd858c28dcfd564ee50e56ccd33fc0b39dc - -fix regression involving `read` from scripts - -diff --git a/src/input.cpp b/src/input.cpp -index 1cdb151b3..d4dc16698 100644 ---- a/src/input.cpp -+++ b/src/input.cpp -@@ -189,7 +189,7 @@ static std::vector terminfo_mappings; - /// List of all terminfo mappings. - static std::vector mappings; - --/// Set to true when the input subsytem has been initialized. -+/// Set to true when the input subsystem has been initialized. - bool input_initialized = false; - - /// Initialize terminfo. -@@ -307,7 +307,6 @@ void init_input() { - } - - input_initialized = true; -- return; - } - - void input_destroy() { -diff --git a/src/reader.cpp b/src/reader.cpp -index bd278ad6a..1e0e05698 100644 ---- a/src/reader.cpp -+++ b/src/reader.cpp -@@ -1563,10 +1563,10 @@ static bool check_for_orphaned_process(unsigned long loop_count, pid_t shell_pgi - - /// Initialize data for interactive use. - static void reader_interactive_init() { -- assert(input_initialized); - // See if we are running interactively. - pid_t shell_pgid; - -+ if (!input_initialized) init_input(); - kill_init(); - shell_pgid = getpgrp(); - -diff --git a/tests/read.in b/tests/read.in -index febc2968f..0fe31ec01 100644 ---- a/tests/read.in -+++ b/tests/read.in -@@ -191,3 +191,6 @@ end - if test (string length "$x") -ne $FISH_READ_BYTE_LIMIT - echo reading the max amount of data with --nchars failed the length test - end -+ -+echo '# Confirm reading non-interactively works (#4206 regression)' -+echo abc\ndef | ../test/root/bin/fish -i -c 'read a; read b; show $a; show $b' -diff --git a/tests/read.out b/tests/read.out -index d35a9146a..88b445a40 100644 ---- a/tests/read.out -+++ b/tests/read.out -@@ -58,3 +58,8 @@ newline - - # chunked read tests - Chunked reads test pass -+# Confirm reading non-interactively works (#4206 regression) -+count=1 -+|abc| -+count=1 -+|def| diff --git a/packages/fish/build.sh b/packages/fish/build.sh index 118646f27..7f3647f9e 100644 --- a/packages/fish/build.sh +++ b/packages/fish/build.sh @@ -1,9 +1,8 @@ TERMUX_PKG_HOMEPAGE=http://fishshell.com/ TERMUX_PKG_DESCRIPTION="Shell geared towards interactive use" -TERMUX_PKG_VERSION=2.6.0 -TERMUX_PKG_REVISION=3 +TERMUX_PKG_VERSION=2.7.0 +TERMUX_PKG_SHA256=3a76b7cae92f9f88863c35c832d2427fb66082f98e92a02203dc900b8fa87bcb TERMUX_PKG_SRCURL=https://github.com/fish-shell/fish-shell/releases/download/$TERMUX_PKG_VERSION/fish-${TERMUX_PKG_VERSION}.tar.gz -TERMUX_PKG_SHA256=7ee5bbd671c73e5323778982109241685d58a836e52013e18ee5d9f2e638fdfb # fish calls 'tput' from ncurses-utils, at least when cancelling (Ctrl+C) a command line. # man is needed since fish calls apropos during command completion. TERMUX_PKG_DEPENDS="ncurses, libandroid-support, ncurses-utils, man, bc, pcre2" diff --git a/packages/fish/src-builtin_argparse.cpp.patch b/packages/fish/src-builtin_argparse.cpp.patch new file mode 100644 index 000000000..321907258 --- /dev/null +++ b/packages/fish/src-builtin_argparse.cpp.patch @@ -0,0 +1,12 @@ +diff -u -r ../fish-2.7.0/src/builtin_argparse.cpp ./src/builtin_argparse.cpp +--- ../fish-2.7.0/src/builtin_argparse.cpp 2017-11-23 06:45:49.000000000 +0100 ++++ ./src/builtin_argparse.cpp 2017-11-30 00:33:41.800475273 +0100 +@@ -444,7 +444,7 @@ + + if (!opt_spec->long_flag.empty()) { + long_options.get()[i++] = {opt_spec->long_flag.c_str(), arg_type, NULL, +- opt_spec->short_flag}; ++ (int) opt_spec->short_flag}; + } + } + long_options.get()[i] = {NULL, 0, NULL, 0};