zathura: install fish completion to vendor_completions.d
This commit is contained in:
parent
4f405feee9
commit
e682477211
2 changed files with 78 additions and 1 deletions
77
srcpkgs/zathura/patches/fish-completion-vendor.patch
Normal file
77
srcpkgs/zathura/patches/fish-completion-vendor.patch
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
# upstream: yes
|
||||||
|
|
||||||
|
From bf46e4de707f364082570f4818846f2944b0ccfa Mon Sep 17 00:00:00 2001
|
||||||
|
From: Eli Schwartz <eschwartz@archlinux.org>
|
||||||
|
Date: Tue, 21 Jan 2020 21:39:00 -0500
|
||||||
|
Subject: [PATCH] Fix installation of bash/fish completions using pkg-config
|
||||||
|
|
||||||
|
Both shells provide pkg-config files which declare their designated
|
||||||
|
completionsdir. Use this as the primary source of truth.
|
||||||
|
---
|
||||||
|
data/meson.build | 18 ++++++++++++++++--
|
||||||
|
1 file changed, 16 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/data/meson.build b/data/meson.build
|
||||||
|
index c1e9231..557b630 100644
|
||||||
|
--- data/meson.build
|
||||||
|
+++ data/meson.build
|
||||||
|
@@ -70,6 +70,20 @@ fish_completion = configure_file(
|
||||||
|
configuration: conf_data
|
||||||
|
)
|
||||||
|
|
||||||
|
-install_data(bash_completion, install_dir: join_paths(datadir, 'bash-completion', 'completions'))
|
||||||
|
+bash_comp = dependency('bash-completion', required: false)
|
||||||
|
+if bash_comp.found()
|
||||||
|
+ bash_compdir = bash_comp.get_pkgconfig_variable('completionsdir')
|
||||||
|
+else
|
||||||
|
+ bash_compdir = join_paths(datadir, 'bash-completion', 'completions')
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
+fish_comp = dependency('fish', required: false)
|
||||||
|
+if fish_comp.found()
|
||||||
|
+ fish_compdir = fish_comp.get_pkgconfig_variable('completionsdir')
|
||||||
|
+else
|
||||||
|
+ fish_compdir = join_paths(datadir, 'fish', 'completions')
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
+install_data(bash_completion, install_dir: bash_compdir)
|
||||||
|
install_data(zsh_completion, install_dir: join_paths(datadir, 'zsh', 'site-functions'))
|
||||||
|
-install_data(fish_completion, install_dir: join_paths(datadir, 'fish', 'completions'))
|
||||||
|
+install_data(fish_completion, install_dir: fish_compdir)
|
||||||
|
--
|
||||||
|
2.25.0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
From d21d0406630eaf5e20d180524e6d396611e7243a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Eli Schwartz <eschwartz@archlinux.org>
|
||||||
|
Date: Tue, 21 Jan 2020 21:39:26 -0500
|
||||||
|
Subject: [PATCH] fish-completion: use the correct fallback directory
|
||||||
|
|
||||||
|
fish completions should never be installed to share/fish/completions/ as
|
||||||
|
that directory is reserved exclusively for completions shipped as part
|
||||||
|
of the fish source code.
|
||||||
|
|
||||||
|
Use the same vendor_completions.d/ directory which the default fish
|
||||||
|
configuration uses.
|
||||||
|
---
|
||||||
|
data/meson.build | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/data/meson.build b/data/meson.build
|
||||||
|
index 557b630..4649160 100644
|
||||||
|
--- data/meson.build
|
||||||
|
+++ data/meson.build
|
||||||
|
@@ -81,7 +81,7 @@ fish_comp = dependency('fish', required: false)
|
||||||
|
if fish_comp.found()
|
||||||
|
fish_compdir = fish_comp.get_pkgconfig_variable('completionsdir')
|
||||||
|
else
|
||||||
|
- fish_compdir = join_paths(datadir, 'fish', 'completions')
|
||||||
|
+ fish_compdir = join_paths(datadir, 'fish', 'vendor_completions.d')
|
||||||
|
endif
|
||||||
|
|
||||||
|
install_data(bash_completion, install_dir: bash_compdir)
|
||||||
|
--
|
||||||
|
2.25.0
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'zathura'
|
# Template file for 'zathura'
|
||||||
pkgname=zathura
|
pkgname=zathura
|
||||||
version=0.4.5
|
version=0.4.5
|
||||||
revision=1
|
revision=2
|
||||||
build_style=meson
|
build_style=meson
|
||||||
configure_args="-Dsynctex=disabled -Dtests=disabled"
|
configure_args="-Dsynctex=disabled -Dtests=disabled"
|
||||||
hostmakedepends="pkg-config intltool python3-Sphinx desktop-file-utils
|
hostmakedepends="pkg-config intltool python3-Sphinx desktop-file-utils
|
||||||
|
|
Loading…
Reference in a new issue