From 035993580fab9beb358067183a78219d9f2d6511 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Mon, 5 Jun 2017 21:32:37 +0200 Subject: [PATCH] fish: Update from 2.5.0 to 2.6.0 --- packages/fish/build.sh | 5 ++- packages/fish/create_manpage_completions.py.patch | 38 ++++++++++++++-------- .../share-functions-__fish_print_help.fish.patch | 19 ++++++----- 3 files changed, 36 insertions(+), 26 deletions(-) diff --git a/packages/fish/build.sh b/packages/fish/build.sh index b8cd4c35..50024194 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.5.0 -TERMUX_PKG_REVISION=1 +TERMUX_PKG_VERSION=2.6.0 TERMUX_PKG_SRCURL=https://github.com/fish-shell/fish-shell/releases/download/$TERMUX_PKG_VERSION/fish-${TERMUX_PKG_VERSION}.tar.gz -TERMUX_PKG_SHA256=f8c0edadca2de379ccf305aeace660a9255fa2180c72e85e97705a24c256b2a5 +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" diff --git a/packages/fish/create_manpage_completions.py.patch b/packages/fish/create_manpage_completions.py.patch index b66572b8..f7a8dd27 100644 --- a/packages/fish/create_manpage_completions.py.patch +++ b/packages/fish/create_manpage_completions.py.patch @@ -1,17 +1,27 @@ -diff -u -r ../fish-2.4.0/share/tools/create_manpage_completions.py ./share/tools/create_manpage_completions.py ---- ../fish-2.4.0/share/tools/create_manpage_completions.py 2016-11-07 22:20:54.000000000 -0500 -+++ ./share/tools/create_manpage_completions.py 2016-12-23 15:09:00.703224799 -0500 -@@ -857,12 +857,7 @@ - def get_paths_from_manpath(): - # Return all the paths to man(1) and man(8) files in the manpath - import subprocess, os -- proc = subprocess.Popen(['manpath'], stdout=subprocess.PIPE) -- manpath, err_data = proc.communicate() -- parent_paths = manpath.decode().strip().split(':') -- if not parent_paths: -- sys.stderr.write("Unable to get the manpath (tried manpath)\n") -- sys.exit(-1) -+ parent_paths = ['@TERMUX_PREFIX@/share/man'] +diff -u -r ../fish-2.6.0/share/tools/create_manpage_completions.py ./share/tools/create_manpage_completions.py +--- ../fish-2.6.0/share/tools/create_manpage_completions.py 2017-06-03 14:45:13.000000000 +0200 ++++ ./share/tools/create_manpage_completions.py 2017-06-05 21:27:41.796125049 +0200 +@@ -862,22 +862,7 @@ + if os.getenv("MANPATH"): + parent_paths = os.getenv("MANPATH").strip().split(':') + else: +- # Some systems have manpath, others have `man --path` (like Haiku). +- # TODO: Deal with systems that have neither (OpenBSD) +- 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(':') +- if (not parent_paths) or (proc and proc.returncode > 0): +- # HACK: Use some fallback in case we can't get anything else. +- # `mandoc` does not provide `manpath` or `man --path` and $MANPATH might not be set, so just use the default for mandoc (minus /usr/X11R6/man, because that's not relevant). +- # The alternative is reading its config file (/etc/man.conf) +- sys.stderr.write("Unable to get the manpath, falling back to /usr/share/man:/usr/local/share/man. Please set $MANPATH if that is not correct.\n") +- parent_paths = ["/usr/share/man", "/usr/local/share/man"] ++ parent_paths = ["@TERMUX_PREFIX@/share/man"] result = [] for parent_path in parent_paths: for section in ['man1', 'man6', 'man8']: diff --git a/packages/fish/share-functions-__fish_print_help.fish.patch b/packages/fish/share-functions-__fish_print_help.fish.patch index 62eb6f09..e0e196fb 100644 --- a/packages/fish/share-functions-__fish_print_help.fish.patch +++ b/packages/fish/share-functions-__fish_print_help.fish.patch @@ -1,19 +1,20 @@ ---- ./share/functions/__fish_print_help.fish 2017-02-03 07:16:58.000000000 +0530 -+++ ../__fish_print_help.fish 2017-02-12 11:36:23.477232262 +0530 -@@ -41,7 +41,7 @@ +diff -u -r ../fish-2.6.0/share/functions/__fish_print_help.fish ./share/functions/__fish_print_help.fish +--- ../fish-2.6.0/share/functions/__fish_print_help.fish 2017-06-03 14:45:13.000000000 +0200 ++++ ./share/functions/__fish_print_help.fish 2017-06-05 21:29:51.794696261 +0200 +@@ -45,7 +45,7 @@ + set mfish -mfish end - set -lx GROFF_TMAC_PATH $__fish_datadir/groff if test -e "$__fish_datadir/man/man1/$item.1" -- set help (nroff -c -man -mfish -t $rLL "$__fish_datadir/man/man1/$item.1" ^/dev/null) -+ set help (mandoc "$__fish_datadir/man/man1/$item.1" ^/dev/null)) +- set help (nroff -c -man $mfish -t $rLL "$__fish_datadir/man/man1/$item.1" ^/dev/null) ++ set help (mandoc "$__fish_datadir/man/man1/$item.1" ^/dev/null) else if test -e "$__fish_datadir/man/man1/$item.1.gz" - set help (gunzip -c "$__fish_datadir/man/man1/$item.1.gz" ^/dev/null | nroff -c -man -mfish -t $rLL ^/dev/null) + set help (gunzip -c "$__fish_datadir/man/man1/$item.1.gz" ^/dev/null | nroff -c -man $mfish -t $rLL ^/dev/null) end -@@ -99,6 +99,6 @@ +@@ -103,6 +103,6 @@ # skip it end end - end | ul # post-process with `ul`, to interpret the old-style grotty escapes -+ end # post-process with `ul`, to interpret the old-style grotty escapes ++ end echo # print a trailing blank line end -- 2.11.0