diff --git a/packages/fish/CMakeLists.txt.patch b/packages/fish/CMakeLists.txt.patch index c028f53e9..eab9e924e 100644 --- a/packages/fish/CMakeLists.txt.patch +++ b/packages/fish/CMakeLists.txt.patch @@ -1,11 +1,11 @@ ---- ../CMakeLists.txt.orig 2020-07-08 08:28:32.537413275 +0000 -+++ ./CMakeLists.txt 2020-07-08 08:29:04.404046585 +0000 -@@ -191,7 +191,7 @@ - TARGET_SOURCES(fishlib PRIVATE ${FISH_HEADERS}) - TARGET_LINK_LIBRARIES(fishlib +--- ../CMakeLists.txt.orig 2021-03-18 00:06:20.429297758 +0530 ++++ ./CMakeLists.txt 2021-03-18 00:12:26.125297619 +0530 +@@ -179,7 +179,7 @@ + target_sources(fishlib PRIVATE ${FISH_HEADERS}) + target_link_libraries(fishlib ${CURSES_LIBRARY} ${CURSES_EXTRA_LIBRARY} Threads::Threads ${CMAKE_DL_LIBS} - ${PCRE2_LIB} ${Intl_LIBRARIES} ${ATOMIC_LIBRARY}) + ${PCRE2_LIB} ${Intl_LIBRARIES} ${ATOMIC_LIBRARY} -landroid-spawn) + target_include_directories(fishlib PRIVATE + ${CURSES_INCLUDE_DIRS}) - # Define fish. - ADD_EXECUTABLE(fish src/fish.cpp) diff --git a/packages/fish/build.sh b/packages/fish/build.sh index ace1e27ba..67f802d9f 100644 --- a/packages/fish/build.sh +++ b/packages/fish/build.sh @@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://fishshell.com/ TERMUX_PKG_DESCRIPTION="Shell geared towards interactive use" TERMUX_PKG_LICENSE="GPL-2.0" TERMUX_PKG_MAINTAINER="@termux" -TERMUX_PKG_VERSION=3.1.2 -TERMUX_PKG_SRCURL=https://github.com/fish-shell/fish-shell/releases/download/$TERMUX_PKG_VERSION/fish-${TERMUX_PKG_VERSION}.tar.gz -TERMUX_PKG_SHA256=d5b927203b5ca95da16f514969e2a91a537b2f75bec9b21a584c4cd1c7aa74ed +TERMUX_PKG_VERSION=3.2.0 +TERMUX_PKG_SRCURL=https://github.com/fish-shell/fish-shell/releases/download/$TERMUX_PKG_VERSION/fish-${TERMUX_PKG_VERSION}.tar.xz +TERMUX_PKG_SHA256=4f0293ed9f6a6b77e47d41efabe62f3319e86efc8bf83cc58733044fbc6f9211 # 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="libc++, ncurses, libandroid-support, ncurses-utils, man, bc, pcre2, libandroid-spawn" diff --git a/packages/fish/create_manpage_completions.py.patch b/packages/fish/create_manpage_completions.py.patch index d99c1a76c..b3f31e7ab 100644 --- a/packages/fish/create_manpage_completions.py.patch +++ b/packages/fish/create_manpage_completions.py.patch @@ -1,22 +1,12 @@ -diff -u -r ../fish-3.1.0/share/tools/create_manpage_completions.py ./share/tools/create_manpage_completions.py ---- ../fish-3.1.0/share/tools/create_manpage_completions.py 2020-02-12 14:04:07.000000000 +0000 -+++ ./share/tools/create_manpage_completions.py 2020-02-15 21:40:21.963831000 +0000 -@@ -953,17 +953,7 @@ - if os.getenv("MANPATH"): - parent_paths = os.getenv("MANPATH").strip().split(":") - else: -- # Some systems have manpath, others have `man --path` (like Haiku). -- for prog in [["manpath"], ["man", "--path"]]: -- try: -- proc = subprocess.Popen( -- prog, stdout=subprocess.PIPE, stderr=subprocess.PIPE -- ) -- except OSError: # Command does not exist, keep trying -- continue -- break # Command exists, use it. -- manpath, err_data = proc.communicate() -- parent_paths = manpath.decode().strip().split(":") -+ parent_paths = ["@TERMUX_PREFIX@/share/man"] - if (not parent_paths) or (proc and proc.returncode > 0): - # HACK: Use some fallbacks in case we can't get anything else. - # `mandoc` does not provide `manpath` or `man --path` and $MANPATH might not be set. +diff -u -r ../fish-3.2.0/share/tools/create_manpage_completions.py ./share/tools/create_manpage_completions.py +--- ../fish-3.2.0/share/tools/create_manpage_completions.py.o 2021-03-18 00:14:41.517297567 +0530 ++++ ./share/tools/create_manpage_completions.py 2021-03-18 00:44:55.699988162 +0530 +@@ -971,7 +971,7 @@ + def get_paths_from_man_locations(): + # Return all the paths to man(1) and man(8) files in the manpath + +- parent_paths = [] ++ parent_paths = ["@TERMUX_PREFIX@/share/man"] + + # Most (GNU, macOS, Haiku) modern implementations of man support being called with `--path`. + # Traditional implementations require a second `manpath` program: examples include FreeBSD and Solaris. diff --git a/packages/fish/termios.patch b/packages/fish/termios.patch new file mode 100644 index 000000000..267260942 --- /dev/null +++ b/packages/fish/termios.patch @@ -0,0 +1,25 @@ +From d948b34420736c06d020ce0a910018e6f09a52a5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C3=89rico=20Rolim?= +Date: Mon, 1 Mar 2021 15:34:31 -0300 +Subject: [PATCH] Include instead of . + +Slipped by with ffa24eb3610dc2853c1a468b8aa2fd327cd0d3fa. Given +daf5ef1bbd4b8ceb005294c512004010010897b8, fish should be using + in all cases. +--- + src/termsize.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/termsize.cpp b/src/termsize.cpp +index f1547632d2..8a1b231d93 100644 +--- a/src/termsize.cpp ++++ b/src/termsize.cpp +@@ -8,7 +8,7 @@ + #include "wutil.h" + + #ifdef HAVE_WINSIZE +-#include ++#include + #endif + + // A counter which is incremented every SIGWINCH, or when the tty is otherwise invalidated.