gentoo-ebuilds/dev-vcs/git/files/git-2.52.0-0002-rust-respect-CARGO-environment-variable.patch
Sam James 0ae9bfd139
dev-vcs/git: Rust fixes for >=2.52.0
* Improve the cargo wrapper script that Meson calls by respecting $CARGO
  and not passing --quiet.

  These could go upstream but the Rust discussions haven't been a great
  atmosphere so I don't really want to do that at this time.

* Actually call rust_pkg_setup

Signed-off-by: Sam James <sam@gentoo.org>
2025-11-18 18:19:39 +00:00

32 lines
1.1 KiB
Diff

From 1eba2788aab9f63ff55ac453b0d885aaa60c77af Mon Sep 17 00:00:00 2001
Message-ID: <1eba2788aab9f63ff55ac453b0d885aaa60c77af.1763489487.git.sam@gentoo.org>
In-Reply-To: <35f637fbabb3b8181a29ba7d96a505b49ea0ba0d.1763489487.git.sam@gentoo.org>
References: <35f637fbabb3b8181a29ba7d96a505b49ea0ba0d.1763489487.git.sam@gentoo.org>
From: Sam James <sam@gentoo.org>
Date: Tue, 18 Nov 2025 18:10:47 +0000
Subject: [PATCH 2/2] rust: respect $CARGO environment variable
Respect the CARGO environment variable if set. Gentoo uses this to
control the version of rust/cargo for a build.
Signed-off-by: Sam James <sam@gentoo.org>
---
src/cargo-meson.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cargo-meson.sh b/src/cargo-meson.sh
index 63a5e7c6ac..bbf3f91178 100755
--- a/src/cargo-meson.sh
+++ b/src/cargo-meson.sh
@@ -19,7 +19,7 @@ do
esac
done
-cargo build --lib --manifest-path="$SOURCE_DIR/Cargo.toml" --target-dir="$BUILD_DIR" "$@"
+${CARGO:-cargo} build --lib --manifest-path="$SOURCE_DIR/Cargo.toml" --target-dir="$BUILD_DIR" "$@"
RET=$?
if test $RET -ne 0
then
--
2.51.2