Browse Source

fish: Update from 3.0.2 to 3.1.0

build-on-device
Fredrik Fornwall 5 years ago
parent
commit
2a9a1c8304
  1. 11
      packages/fish/build.sh
  2. 42
      packages/fish/create_manpage_completions.py.patch
  3. 20
      packages/fish/share-functions-__fish_print_help.fish.patch
  4. 12
      packages/fish/src-env.cpp.patch

11
packages/fish/build.sh

@ -1,18 +1,17 @@
TERMUX_PKG_HOMEPAGE=https://fishshell.com/
TERMUX_PKG_DESCRIPTION="Shell geared towards interactive use"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_VERSION=3.0.2
TERMUX_PKG_REVISION=1
TERMUX_PKG_VERSION=3.1.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=14728ccc6b8e053d01526ebbd0822ca4eb0235e6487e832ec1d0d22f1395430e
TERMUX_PKG_SHA256=e5db1e6839685c56f172e1000c138e290add4aa521f187df4cd79d4eab294368
# 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"
TERMUX_PKG_BUILD_IN_SRC=true
# Prevent clash with ripgrep package:
TERMUX_PKG_RM_AFTER_INSTALL="share/fish/completions/rg.fish"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
ac_cv_file__proc_self_stat=yes
ac_cv_func_wcstod_l=no
--without-included-pcre2
-DBUILD_DOCS=OFF
"
termux_step_pre_configure() {

42
packages/fish/create_manpage_completions.py.patch

@ -1,34 +1,22 @@
diff -u -r ../fish-3.0.0/share/tools/create_manpage_completions.py ./share/tools/create_manpage_completions.py
--- ../fish-3.0.0/share/tools/create_manpage_completions.py 2018-12-28 13:01:03.000000000 +0000
+++ ./share/tools/create_manpage_completions.py 2018-12-28 22:54:12.034220150 +0000
@@ -865,29 +865,7 @@
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(':')
parent_paths = os.getenv("MANPATH").strip().split(":")
else:
- # Some systems have manpath, others have `man --path` (like Haiku).
- for prog in [['manpath'], ['man', '--path']]:
- 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
- proc = subprocess.Popen(
- prog, stdout=subprocess.PIPE, stderr=subprocess.PIPE
- )
- except OSError: # Command does not exist, keep trying
- continue
- break # Command exists, use it.
- 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 fallbacks in case we can't get anything else.
- # `mandoc` does not provide `manpath` or `man --path` and $MANPATH might not be set.
- # The alternative is reading its config file (/etc/man.conf)
- if os.path.isfile('/etc/man.conf'):
- data = open('/etc/man.conf', 'r')
- for line in data:
- if ('manpath' in line or 'MANPATH' in line):
- p = line.split(' ')[1]
- p = p.split()[0]
- parent_paths.append(p)
- if (not parent_paths):
- 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 = manpath.decode().strip().split(":")
+ parent_paths = ["@TERMUX_PREFIX@/share/man"]
result = []
for parent_path in parent_paths:
for section in ['man1', 'man6', 'man8']:
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.

20
packages/fish/share-functions-__fish_print_help.fish.patch

@ -1,20 +0,0 @@
diff -u -r ../fish-3.0.0/share/functions/__fish_print_help.fish ./share/functions/__fish_print_help.fish
--- ../fish-3.0.0/share/functions/__fish_print_help.fish 2018-12-28 13:01:03.000000000 +0000
+++ ./share/functions/__fish_print_help.fish 2018-12-28 22:55:42.761223014 +0000
@@ -22,7 +22,7 @@
set mfish -mfish
end
if test -e "$__fish_data_dir/man/man1/$item.1"
- set help (nroff -c -man $mfish -t $rLL "$__fish_data_dir/man/man1/$item.1" 2>/dev/null)
+ set help (mandoc "$__fish_datadir/man/man1/$item.1" ^/dev/null)
else if test -e "$__fish_data_dir/man/man1/$item.1.gz"
set help (gunzip -c "$__fish_data_dir/man/man1/$item.1.gz" 2>/dev/null | nroff -c -man $mfish -t $rLL 2>/dev/null)
end
@@ -80,6 +80,6 @@
# skip it
end
end
- end | ul # post-process with `ul`, to interpret the old-style grotty escapes
+ end
echo # print a trailing blank line
end

12
packages/fish/src-env.cpp.patch

@ -1,12 +0,0 @@
diff -u -r ../fish-3.0.1/src/env.cpp ./src/env.cpp
--- ../fish-3.0.1/src/env.cpp 2019-02-11 12:13:15.000000000 +0000
+++ ./src/env.cpp 2019-02-13 22:19:56.975817836 +0000
@@ -1663,7 +1663,7 @@
auto pwuid = getpwuid(geteuid());
const char *uname = pwuid ? pwuid->pw_name : NULL;
// /tmp/fish.user
- std::string tmpdir = "/tmp/fish.";
+ std::string tmpdir = "@TERMUX_PREFIX@/tmp/fish.";
if (uname) {
tmpdir.append(uname);
}
Loading…
Cancel
Save