summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAgostino Sarubbo <ago@gentoo.org>2024-03-28 15:24:03 +0100
committerAgostino Sarubbo <ago@gentoo.org>2024-03-28 15:24:03 +0100
commitd2a235a030c96ad9d3fb967b91c9c102884430eb (patch)
treef127100f3755e197dc2ec2eca35c64056f26b0d7 /dev-util/bugbite-cli
parentx11-misc/dmenu: update live ebuild (diff)
downloadgentoo-d2a235a030c96ad9d3fb967b91c9c102884430eb.tar.gz
gentoo-d2a235a030c96ad9d3fb967b91c9c102884430eb.tar.bz2
gentoo-d2a235a030c96ad9d3fb967b91c9c102884430eb.zip
dev-util/bugbite-cli: add a revision to hack around a static build
Signed-off-by: Agostino Sarubbo <ago@gentoo.org>
Diffstat (limited to 'dev-util/bugbite-cli')
-rw-r--r--dev-util/bugbite-cli/bugbite-cli-0.0.7-r1.ebuild48
1 files changed, 48 insertions, 0 deletions
diff --git a/dev-util/bugbite-cli/bugbite-cli-0.0.7-r1.ebuild b/dev-util/bugbite-cli/bugbite-cli-0.0.7-r1.ebuild
new file mode 100644
index 000000000000..8389e8b00161
--- /dev/null
+++ b/dev-util/bugbite-cli/bugbite-cli-0.0.7-r1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cargo edo shell-completion
+
+DESCRIPTION="A command line tool for bug, issue, and ticket mangling"
+HOMEPAGE="https://github.com/radhermit/bugbite"
+SRC_URI="https://github.com/radhermit/bugbite/releases/download/${P}/${P}.tar.xz"
+LICENSE="0BSD Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD BSD-2 Boost-1.0 CC0-1.0 ISC MIT MPL-2.0 Unicode-DFS-2016 Unlicense ZLIB"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="static test"
+RESTRICT="!test? ( test ) "
+
+BDEPEND="
+ >=virtual/rust-1.75
+ test? ( dev-util/cargo-nextest )
+"
+
+QA_FLAGS_IGNORED="usr/bin/bite"
+
+pkg_setup() {
+ if [[ ${MERGE_TYPE} != binary ]] && use static ; then
+ local rust_target=$( rustc -vV 2>/dev/null | sed -n 's|^host: ||p' )
+ [[ -z ${rust_target} ]] && die "Failed to read host target from rustc!"
+ export RUSTFLAGS="-C target-feature=+crt-static ${RUSTFLAGS}"
+ export static_stuff="--target ${rust_target}"
+ fi
+}
+
+src_configure() {
+ cargo_src_configure ${static_stuff}
+}
+
+src_test() {
+ edo cargo nextest run $(usev !debug '--release') --color always --all-features --tests ${static_stuff}
+}
+
+src_install() {
+ cargo_src_install
+
+ doman man/*
+ dofishcomp shell/bite.fish
+ dozshcomp shell/_bite
+ newbashcomp shell/bite.bash bite
+}