fish: Fix fish_update_completions
authorFredrik Fornwall <fredrik@fornwall.net>
Fri, 23 Dec 2016 20:12:50 +0000 (15:12 -0500)
committerFredrik Fornwall <fredrik@fornwall.net>
Fri, 23 Dec 2016 20:12:50 +0000 (15:12 -0500)
We don't have the 'manpath' program and don't need it.

Fixes #617.

packages/fish/build.sh
packages/fish/create_manpage_completions.py.patch [new file with mode: 0644]

index 6235d0e..6050675 100644 (file)
@@ -1,6 +1,7 @@
 TERMUX_PKG_HOMEPAGE=http://fishshell.com/
 TERMUX_PKG_DESCRIPTION="Shell geared towards interactive use"
 TERMUX_PKG_VERSION=2.4.0
+TERMUX_PKG_BUILD_REVISION=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.
 # man is needed since fish calls apropos during command completion.
diff --git a/packages/fish/create_manpage_completions.py.patch b/packages/fish/create_manpage_completions.py.patch
new file mode 100644 (file)
index 0000000..b66572b
--- /dev/null
@@ -0,0 +1,17 @@
+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']
+     result = []
+     for parent_path in parent_paths:
+         for section in ['man1', 'man6', 'man8']: