app-shells/atuin: add missing local, style improvements, 14.0.1 also requires rust 1.67

Signed-off-by: Florian Schmaus <flow@gentoo.org>
This commit is contained in:
Florian Schmaus 2023-05-29 22:52:50 +02:00
parent 24937797da
commit e7e0ae2304
No known key found for this signature in database
GPG Key ID: 2239A7E8F5852052
2 changed files with 20 additions and 13 deletions

View File

@ -316,9 +316,7 @@ SLOT="0"
KEYWORDS="~amd64"
IUSE="doc"
DEPEND=""
RDEPEND="${DEPEND}"
BDEPEND="dev-lang/rust"
BDEPEND=">=dev-lang/rust-1.67.1"
QA_FLAGS_IGNORED="usr/bin/${PN}"
@ -331,16 +329,22 @@ DOCS=(
src_install() {
cargo install --path "${PN}"
local atuin_bin="target/$(usex debug debug release)/${PN}"
exeinto "/usr/bin"
doexe "target/$(usex debug debug release)/${PN}"
doexe "${atuin_bin}"
use doc && dodoc -r "${DOCS[@]}"
# Prepare shell completion generation
mkdir completions || die
for shell in 'bash' 'fish' 'zsh'; do
"target/$(usex debug debug release)/${PN}" gen-completions -s "$shell" -o completions || die
done
local shell
for shell in bash fish zsh; do
"${atuin_bin}" gen-completions \
-s ${shell} \
-o completions \
|| die
done
newbashcomp "completions/${PN}.bash" "${PN}"
dozshcomp "completions/_${PN}"

View File

@ -326,10 +326,7 @@ SRC_URI="
LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD Boost-1.0 ISC MIT MPL-2.0 Unicode-DFS-2016 Unlicense ZLIB"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""
DEPEND=""
RDEPEND="${DEPEND}"
BDEPEND=">=dev-lang/rust-1.67.1"
QA_FLAGS_IGNORED="usr/bin/${PN}"
@ -343,15 +340,21 @@ DOCS=(
src_install() {
cargo install --path "${PN}"
local atuin_bin="target/$(usex debug debug release)/${PN}"
exeinto "/usr/bin"
doexe "target/$(usex debug debug release)/${PN}"
doexe "${atuin_bin}"
dodoc -r "${DOCS[@]}"
# Prepare shell completion generation
mkdir completions || die
for shell in 'bash' 'fish' 'zsh'; do
"target/$(usex debug debug release)/${PN}" gen-completions -s "$shell" -o completions || die
local shell
for shell in bash fish zsh; do
"${atuin_bin}" gen-completions \
-s ${shell} \
-o completions \
|| die
done
newbashcomp "completions/${PN}.bash" "${PN}"