summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucio Sauer <watermanpaint@posteo.net>2024-08-07 15:05:00 +0200
committerJoonas Niilola <juippis@gentoo.org>2024-08-20 11:31:45 +0300
commitdbb73d2c2716f419f1fe3c320c79ae3f97b1ac45 (patch)
tree9db635d46febda0ba2eebbc734344ba4567b9f3b /app-misc
parentapp-misc/anki: Patch to use newer time (diff)
downloadgentoo-dbb73d2c2716f419f1fe3c320c79ae3f97b1ac45.tar.gz
gentoo-dbb73d2c2716f419f1fe3c320c79ae3f97b1ac45.tar.bz2
gentoo-dbb73d2c2716f419f1fe3c320c79ae3f97b1ac45.zip
app-misc/anki: ensure build runner and configure are built for CBUILD
These changes have not yet been tested in an actual cross environment but since the build system respects Cargo environment variables, this should hopefully work. Bump the revision of this ebuild because the build now honors LDFLAGS among other RUSTFLAGS set in cargo_env in the cargo eclass. Signed-off-by: Lucio Sauer <watermanpaint@posteo.net> Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'app-misc')
-rw-r--r--app-misc/anki/files/23.12.1/ninja-rules-for-cargo.patch (renamed from app-misc/anki/files/23.12.1/use-system-nextest.patch)18
1 files changed, 16 insertions, 2 deletions
diff --git a/app-misc/anki/files/23.12.1/use-system-nextest.patch b/app-misc/anki/files/23.12.1/ninja-rules-for-cargo.patch
index 8f931b97da86..cf9356bbc24c 100644
--- a/app-misc/anki/files/23.12.1/use-system-nextest.patch
+++ b/app-misc/anki/files/23.12.1/ninja-rules-for-cargo.patch
@@ -1,10 +1,24 @@
-Provide the binary ourselves to prevent network access.
+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.
+
+Provide the cargo-nextest binary ourselves to prevent network access.
Set test runner options in the ebuild.
From: Lucio Sauer <watermanpaint@posteo.net>
--- a/build/ninja_gen/src/cargo.rs
+++ b/build/ninja_gen/src/cargo.rs
-@@ -152,19 +152,11 @@ impl BuildAction for CargoTest {
+@@ -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()
+@@ -152,19 +155,11 @@ impl BuildAction for CargoTest {
fn files(&mut self, build: &mut impl FilesHandle) {
build.add_inputs("", &self.inputs);