gentoo-ebuilds/app-misc/anki/files/23.12.1/ninja-rules-for-cargo.patch
Lucio Sauer a45888ffd8
app-misc/anki: clean up patches
* We no longer invoke the build system for running cargo-nextest since
  5cd794. Now, I'm removing the corresponding patch in
  ninja-rules-for-cargo.patch, which formerly prevented network access
  in that scenario.

Fixes: 5cd7947a1b
Signed-off-by: Lucio Sauer <watermanpaint@posteo.net>
Part-of: https://github.com/gentoo/gentoo/pull/42917
Signed-off-by: Sam James <sam@gentoo.org>
2025-07-08 20:47:35 +01:00

17 lines
725 B
Diff

Fix the output path for Rust binaries in the Ninja file to match
Cargo's target directory when CARGO_BUILD_TARGET is set. This prevents
file-not-found errors for some build steps.
From: Lucio Sauer <watermanpaint@posteo.net>
--- a/build/ninja_gen/src/cargo.rs
+++ b/build/ninja_gen/src/cargo.rs
@@ -61,6 +61,9 @@ impl RustOutput<'_> {
let mut path: Utf8PathBuf = rust_base.into();
if let Some(target) = target {
path = path.join(target);
+ } else {
+ let triple = std::env::var("CARGO_BUILD_TARGET").unwrap_or_default();
+ path = path.join(triple);
}
path = path.join(profile_output_dir(build_profile)).join(filename);
path.to_string()