summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Schmaus <flow@gentoo.org>2024-02-22 10:17:17 +0100
committerFlorian Schmaus <flow@gentoo.org>2024-02-22 10:17:50 +0100
commitcd99c9384d60752d15561204c02c85acb9107ff4 (patch)
treec48fd5406248675176836abfbfe12ae514251073
parentsci-libs/datasets: add 2.17.1, drop 2.16.0 (diff)
downloadgentoo-cd99c9384d60752d15561204c02c85acb9107ff4.tar.gz
gentoo-cd99c9384d60752d15561204c02c85acb9107ff4.tar.bz2
gentoo-cd99c9384d60752d15561204c02c85acb9107ff4.zip
app-crypt/sequoia-sq: fix installation of shell completions
Also use shell-completion.eclass. Closes: https://bugs.gentoo.org/923572 Signed-off-by: Florian Schmaus <flow@gentoo.org>
-rw-r--r--app-crypt/sequoia-sq/sequoia-sq-0.33.0.ebuild19
1 files changed, 12 insertions, 7 deletions
diff --git a/app-crypt/sequoia-sq/sequoia-sq-0.33.0.ebuild b/app-crypt/sequoia-sq/sequoia-sq-0.33.0.ebuild
index 1719811decfa..b7a023d4f417 100644
--- a/app-crypt/sequoia-sq/sequoia-sq-0.33.0.ebuild
+++ b/app-crypt/sequoia-sq/sequoia-sq-0.33.0.ebuild
@@ -461,7 +461,7 @@ CRATES="
LLVM_MAX_SLOT=17
-inherit bash-completion-r1 cargo llvm
+inherit bash-completion-r1 cargo shell-completion llvm
DESCRIPTION="CLI of the Sequoia OpenPGP implementation"
HOMEPAGE="https://sequoia-pgp.org/ https://gitlab.com/sequoia-pgp/sequoia-sq"
@@ -518,11 +518,16 @@ src_install() {
doman target/$(usex debug debug release)/build/sequoia-sq-*/out/man-pages/*.1
- newbashcomp target/$(usex debug debug release)/build/sequoia-sq-*/out/shell-completions/sq.bash sq
+ # Since 0.33 sequoia-sq creates two shell-completions/ directories
+ # with indentical content. Select one of them. See also
+ # https://bugs.gentoo.org/923572
+ local completion_dirs=(
+ $(ls -1d target/$(usex debug debug release)/build/sequoia-sq-*/out/shell-completions)
+ )
+ [[ ${#completion_dirs[@]} -lt 1 ]] && die "No completion directories found"
+ local completion_dir="${completion_dirs[0]}"
- insinto /usr/share/zsh/site-functions
- doins target/$(usex debug debug release)/build/sequoia-sq-*/out/shell-completions/_sq
-
- insinto /usr/share/fish/vendor_completions.d
- doins target/$(usex debug debug release)/build/sequoia-sq-*/out/shell-completions/sq.fish
+ newbashcomp "${completion_dir}"/sq.bash sq
+ dozshcomp "${completion_dir}"/_sq
+ dofishcomp "${completion_dir}"/sq.fish
}