void-packages/srcpkgs/auto-auto-complete/patches/fish-completion-vendor.patch
Đoàn Trần Công Danh ae69000001 srcpkgs/a*: convert patches to -Np1
* arduino and antiword is kept at -Np0

```sh

git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

34 lines
1.3 KiB
Diff

#reason: fish-shell requires 3rd-party completion files to be installed to vendor_completions.d
#upstream: https://github.com/maandree/auto-auto-complete/pull/7
From 4dd203d77f65559931249c258ab2a1588798f6d6 Mon Sep 17 00:00:00 2001
From: Piraty <piraty1@inbox.ru>
Date: Tue, 25 Feb 2020 10:15:10 +0100
Subject: [PATCH] install fish completion to vendor_completions.d
As noted in the docs[1], third-party software vendors should install
completion files into a different dir than upstream fish-shell to avoid
conflicts. Docs suggest `/usr/share/fish/vendor_completions.d`.
This isn't an issue here (yet) but it conforms to the docs.
[1] https://fishshell.com/docs/current/#where-to-put-completions
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index d7e331d..6506628 100644
--- a/Makefile
+++ b/Makefile
@@ -188,8 +188,8 @@ install-zsh: bin/auto-auto-complete.zsh
.PHONY: install-fish
install-fish: bin/auto-auto-complete.fish
- install -dm755 -- "$(DESTDIR)$(DATADIR)/fish/completions"
- install -m644 $< -- "$(DESTDIR)$(DATADIR)/fish/completions/$(COMMAND).fish"
+ install -dm755 -- "$(DESTDIR)$(DATADIR)/fish/vendor_completions.d"
+ install -m644 $< -- "$(DESTDIR)$(DATADIR)/fish/vendor_completions.d/$(COMMAND).fish"
# Uninstall rules