*/*: change rust project's hardcoded target/release path [1/4]

Recently I had to fix bug 975031, which was the same issue. Hardcoded
target/release paths in the ebuilds for rust projects. And this will
fail if the debug use flag is enabled. Because then, instead of
target/release, rust compiles the binary to target/debug

using cargo_target_dir from the cargo.eclass fixes this problem

It does not touch some ebuilds tho because for some I wasn't fully sure
if I should change the paths, and for some I wanted to do it in a
separate commit

Signed-off-by: ingenarel (NeoJesus) <ingenarel_neojesus@disroot.org>
Part-of: https://codeberg.org/gentoo/guru/pulls/21
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
ingenarel (NeoJesus) authored and Michał Górny committed 2026-09-10 16:43:55 +02:00
1 parent 0ec44dfb1d
commit c56c9ffa99
7 files changed
+19 -15

No files matched your search

@@ -72,7 +72,7 @@ src_compile() {
src_install() {
cargo_src_install
dobin target/release/deepcool-digital-linux
dobin "$(cargo_target_dir)/deepcool-digital-linux"
newinitd "${FILESDIR}"/deepcool-digital-linux.initd deepcool-digital-linux
systemd_dounit "${FILESDIR}"/deepcool-digital-linux.service
@@ -71,7 +71,7 @@ src_compile() {
src_install() {
cargo_src_install
dobin target/release/deepcool-digital-linux
dobin "$(cargo_target_dir)/deepcool-digital-linux"
newinitd "${FILESDIR}"/deepcool-digital-linux.initd deepcool-digital-linux
systemd_dounit "${FILESDIR}"/deepcool-digital-linux.service
+4 -3
View File
@@ -107,10 +107,11 @@ src_install() {
einstalldocs
doman "doc/${PN}.1"
"target/release/${PN}" --completion bash > "${PN}"
local bin_path="$(cargo_target_dir)/${PN}"
"${bin_path}" --completion bash > "${PN}"
dobashcomp "${PN}"
"target/release/${PN}" --completion zsh > "_${PN}"
"${bin_path}" --completion zsh > "_${PN}"
dozshcomp "_${PN}"
"target/release/${PN}" --completion fish > "${PN}.fish"
"${bin_path}" --completion fish > "${PN}.fish"
dofishcomp "${PN}.fish"
}