summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Müller <deso@posteo.net>2023-01-02 10:17:54 -0800
committerJoonas Niilola <juippis@gentoo.org>2023-01-12 16:20:17 +0200
commit3c265c179aa02408713c500e2d13ab80556b12db (patch)
treeccb3a483711e36cb229af9721fbbc94146e65df0 /app-crypt/nitrocli/nitrocli-0.4.1.ebuild
parentx11-terms/terminator: add 2.1.2 (diff)
downloadgentoo-3c265c179aa02408713c500e2d13ab80556b12db.tar.gz
gentoo-3c265c179aa02408713c500e2d13ab80556b12db.tar.bz2
gentoo-3c265c179aa02408713c500e2d13ab80556b12db.zip
app-crypt/nitrocli: Use cargo install for shell-complete
The way we access the shell-complete binary during the build has always been a hack. There is no way to know for sure where it is located ahead of time and cargo does not expose this information in an easily accessible manner. That may lead to shenanigans such as https://bugs.gentoo.org/889360, where it appears as if a debug build was forced and that resulted in the executable being available in target/debug/ as opposed to target/release/. Fix this issue by using cargo install internally, to force "temporary" installation in less undefined path. Closes: https://bugs.gentoo.org/889360 Signed-off-by: Daniel Müller <deso@posteo.net> Closes: https://github.com/gentoo/gentoo/pull/28938 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'app-crypt/nitrocli/nitrocli-0.4.1.ebuild')
-rw-r--r--app-crypt/nitrocli/nitrocli-0.4.1.ebuild13
1 files changed, 10 insertions, 3 deletions
diff --git a/app-crypt/nitrocli/nitrocli-0.4.1.ebuild b/app-crypt/nitrocli/nitrocli-0.4.1.ebuild
index 769a5bd019b6..fcfc2efba490 100644
--- a/app-crypt/nitrocli/nitrocli-0.4.1.ebuild
+++ b/app-crypt/nitrocli/nitrocli-0.4.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2017-2021 Gentoo Authors
+# Copyright 2017-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -93,13 +93,20 @@ RDEPEND="
RESTRICT="test"
QA_FLAGS_IGNORED="usr/bin/nitrocli"
+src_compile() {
+ cargo_src_compile --bin=nitrocli
+ # Install shell-complete binary into source directory to be able to
+ # use it later on.
+ cargo install --bin=shell-complete --path . --root "${S}" || die
+}
+
src_install() {
cargo_src_install --bin=nitrocli
- target/release/shell-complete bash > ${PN}.bash || die
+ "${S}"/bin/shell-complete bash > ${PN}.bash || die
newbashcomp ${PN}.bash ${PN}
- target/release/shell-complete fish > ${PN}.fish || die
+ "${S}"/bin/shell-complete fish > ${PN}.fish || die
insinto /usr/share/fish/vendor_conf.d/
insopts -m0755
doins ${PN}.fish