From 71bcb06b9832b0aef048b41b40b1f976c229e256 Mon Sep 17 00:00:00 2001 From: Alfred Wingate Date: Thu, 2 Jul 2026 11:13:17 +0300 Subject: [PATCH] dev-vcs/git: handle cargo properly The build system calls cargo in a script meaning cargo eclass has to be used to set the proper toolchain values. Closes: https://bugs.gentoo.org/978391 Signed-off-by: Alfred Wingate Part-of: https://codeberg.org/gentoo/gentoo/pulls/1295 Merges: https://codeberg.org/gentoo/gentoo/pulls/1295 Signed-off-by: Sam James --- dev-vcs/git/git-2.52.0.ebuild | 13 +++++++++---- dev-vcs/git/git-2.53.0.ebuild | 13 +++++++++---- dev-vcs/git/git-2.54.0.ebuild | 13 +++++++++---- dev-vcs/git/git-2.55.0.ebuild | 13 +++++++++---- dev-vcs/git/git-9999-r1.ebuild | 13 +++++++++---- dev-vcs/git/git-9999-r2.ebuild | 13 +++++++++---- dev-vcs/git/git-9999-r3.ebuild | 13 +++++++++---- dev-vcs/git/git-9999.ebuild | 13 +++++++++---- 8 files changed, 72 insertions(+), 32 deletions(-) diff --git a/dev-vcs/git/git-2.52.0.ebuild b/dev-vcs/git/git-2.52.0.ebuild index de2865405d727..b261ac505b38d 100644 --- a/dev-vcs/git/git-2.52.0.ebuild +++ b/dev-vcs/git/git-2.52.0.ebuild @@ -7,9 +7,9 @@ GENTOO_DEPEND_ON_PERL=no # bug #329479: git-remote-testgit is not multiple-version aware PYTHON_COMPAT=( python3_{11..14} ) -RUST_OPTIONAL=1 -inherit flag-o-matic toolchain-funcs perl-module shell-completion optfeature -inherit plocale python-single-r1 rust systemd meson +CARGO_OPTIONAL=1 +inherit cargo flag-o-matic toolchain-funcs perl-module shell-completion +inherit optfeature plocale python-single-r1 systemd meson PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN" @@ -192,6 +192,7 @@ src_unpack() { git-r3_src_unpack fi + use rust && cargo_gen_config } src_prepare() { @@ -319,7 +320,11 @@ git_emake() { } src_compile() { - meson_src_compile + if use rust; then # bug #978391 + cargo_env meson_src_compile + else + meson_src_compile + fi if use tk ; then local tkdir diff --git a/dev-vcs/git/git-2.53.0.ebuild b/dev-vcs/git/git-2.53.0.ebuild index 20b909278e887..3819cecd30659 100644 --- a/dev-vcs/git/git-2.53.0.ebuild +++ b/dev-vcs/git/git-2.53.0.ebuild @@ -7,9 +7,9 @@ GENTOO_DEPEND_ON_PERL=no # bug #329479: git-remote-testgit is not multiple-version aware PYTHON_COMPAT=( python3_{11..14} ) -RUST_OPTIONAL=1 -inherit flag-o-matic toolchain-funcs perl-module shell-completion optfeature -inherit plocale python-single-r1 rust systemd meson +CARGO_OPTIONAL=1 +inherit cargo flag-o-matic toolchain-funcs perl-module shell-completion +inherit optfeature plocale python-single-r1 systemd meson PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN" @@ -187,6 +187,7 @@ src_unpack() { git-r3_src_unpack fi + use rust && cargo_gen_config } src_prepare() { @@ -314,7 +315,11 @@ git_emake() { } src_compile() { - meson_src_compile + if use rust; then # bug #978391 + cargo_env meson_src_compile + else + meson_src_compile + fi if use tk ; then local tkdir diff --git a/dev-vcs/git/git-2.54.0.ebuild b/dev-vcs/git/git-2.54.0.ebuild index fad4034f26eeb..69bacea1f95d2 100644 --- a/dev-vcs/git/git-2.54.0.ebuild +++ b/dev-vcs/git/git-2.54.0.ebuild @@ -7,9 +7,9 @@ GENTOO_DEPEND_ON_PERL=no # bug #329479: git-remote-testgit is not multiple-version aware PYTHON_COMPAT=( python3_{11..14} ) -RUST_OPTIONAL=1 -inherit flag-o-matic toolchain-funcs perl-module shell-completion optfeature -inherit plocale python-single-r1 rust systemd meson +CARGO_OPTIONAL=1 +inherit cargo flag-o-matic toolchain-funcs perl-module shell-completion +inherit optfeature plocale python-single-r1 systemd meson PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN" @@ -187,6 +187,7 @@ src_unpack() { git-r3_src_unpack fi + use rust && cargo_gen_config } src_prepare() { @@ -304,7 +305,11 @@ git_emake() { } src_compile() { - meson_src_compile + if use rust; then # bug #978391 + cargo_env meson_src_compile + else + meson_src_compile + fi if use doc ; then # Workaround fragments that still use the Makefile and can't diff --git a/dev-vcs/git/git-2.55.0.ebuild b/dev-vcs/git/git-2.55.0.ebuild index 44496f65006ea..ed400d0e4ed15 100644 --- a/dev-vcs/git/git-2.55.0.ebuild +++ b/dev-vcs/git/git-2.55.0.ebuild @@ -7,9 +7,9 @@ GENTOO_DEPEND_ON_PERL=no # bug #329479: git-remote-testgit is not multiple-version aware PYTHON_COMPAT=( python3_{11..14} ) -RUST_OPTIONAL=1 -inherit flag-o-matic toolchain-funcs perl-module shell-completion optfeature -inherit plocale python-single-r1 rust systemd meson +CARGO_OPTIONAL=1 +inherit cargo flag-o-matic toolchain-funcs perl-module shell-completion +inherit optfeature plocale python-single-r1 systemd meson PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN" @@ -187,6 +187,7 @@ src_unpack() { git-r3_src_unpack fi + use rust && cargo_gen_config } src_prepare() { @@ -304,7 +305,11 @@ git_emake() { } src_compile() { - meson_src_compile + if use rust; then # bug #978391 + cargo_env meson_src_compile + else + meson_src_compile + fi if use doc ; then # Workaround fragments that still use the Makefile and can't diff --git a/dev-vcs/git/git-9999-r1.ebuild b/dev-vcs/git/git-9999-r1.ebuild index 44496f65006ea..ed400d0e4ed15 100644 --- a/dev-vcs/git/git-9999-r1.ebuild +++ b/dev-vcs/git/git-9999-r1.ebuild @@ -7,9 +7,9 @@ GENTOO_DEPEND_ON_PERL=no # bug #329479: git-remote-testgit is not multiple-version aware PYTHON_COMPAT=( python3_{11..14} ) -RUST_OPTIONAL=1 -inherit flag-o-matic toolchain-funcs perl-module shell-completion optfeature -inherit plocale python-single-r1 rust systemd meson +CARGO_OPTIONAL=1 +inherit cargo flag-o-matic toolchain-funcs perl-module shell-completion +inherit optfeature plocale python-single-r1 systemd meson PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN" @@ -187,6 +187,7 @@ src_unpack() { git-r3_src_unpack fi + use rust && cargo_gen_config } src_prepare() { @@ -304,7 +305,11 @@ git_emake() { } src_compile() { - meson_src_compile + if use rust; then # bug #978391 + cargo_env meson_src_compile + else + meson_src_compile + fi if use doc ; then # Workaround fragments that still use the Makefile and can't diff --git a/dev-vcs/git/git-9999-r2.ebuild b/dev-vcs/git/git-9999-r2.ebuild index 44496f65006ea..ed400d0e4ed15 100644 --- a/dev-vcs/git/git-9999-r2.ebuild +++ b/dev-vcs/git/git-9999-r2.ebuild @@ -7,9 +7,9 @@ GENTOO_DEPEND_ON_PERL=no # bug #329479: git-remote-testgit is not multiple-version aware PYTHON_COMPAT=( python3_{11..14} ) -RUST_OPTIONAL=1 -inherit flag-o-matic toolchain-funcs perl-module shell-completion optfeature -inherit plocale python-single-r1 rust systemd meson +CARGO_OPTIONAL=1 +inherit cargo flag-o-matic toolchain-funcs perl-module shell-completion +inherit optfeature plocale python-single-r1 systemd meson PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN" @@ -187,6 +187,7 @@ src_unpack() { git-r3_src_unpack fi + use rust && cargo_gen_config } src_prepare() { @@ -304,7 +305,11 @@ git_emake() { } src_compile() { - meson_src_compile + if use rust; then # bug #978391 + cargo_env meson_src_compile + else + meson_src_compile + fi if use doc ; then # Workaround fragments that still use the Makefile and can't diff --git a/dev-vcs/git/git-9999-r3.ebuild b/dev-vcs/git/git-9999-r3.ebuild index 44496f65006ea..ed400d0e4ed15 100644 --- a/dev-vcs/git/git-9999-r3.ebuild +++ b/dev-vcs/git/git-9999-r3.ebuild @@ -7,9 +7,9 @@ GENTOO_DEPEND_ON_PERL=no # bug #329479: git-remote-testgit is not multiple-version aware PYTHON_COMPAT=( python3_{11..14} ) -RUST_OPTIONAL=1 -inherit flag-o-matic toolchain-funcs perl-module shell-completion optfeature -inherit plocale python-single-r1 rust systemd meson +CARGO_OPTIONAL=1 +inherit cargo flag-o-matic toolchain-funcs perl-module shell-completion +inherit optfeature plocale python-single-r1 systemd meson PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN" @@ -187,6 +187,7 @@ src_unpack() { git-r3_src_unpack fi + use rust && cargo_gen_config } src_prepare() { @@ -304,7 +305,11 @@ git_emake() { } src_compile() { - meson_src_compile + if use rust; then # bug #978391 + cargo_env meson_src_compile + else + meson_src_compile + fi if use doc ; then # Workaround fragments that still use the Makefile and can't diff --git a/dev-vcs/git/git-9999.ebuild b/dev-vcs/git/git-9999.ebuild index 44496f65006ea..ed400d0e4ed15 100644 --- a/dev-vcs/git/git-9999.ebuild +++ b/dev-vcs/git/git-9999.ebuild @@ -7,9 +7,9 @@ GENTOO_DEPEND_ON_PERL=no # bug #329479: git-remote-testgit is not multiple-version aware PYTHON_COMPAT=( python3_{11..14} ) -RUST_OPTIONAL=1 -inherit flag-o-matic toolchain-funcs perl-module shell-completion optfeature -inherit plocale python-single-r1 rust systemd meson +CARGO_OPTIONAL=1 +inherit cargo flag-o-matic toolchain-funcs perl-module shell-completion +inherit optfeature plocale python-single-r1 systemd meson PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN" @@ -187,6 +187,7 @@ src_unpack() { git-r3_src_unpack fi + use rust && cargo_gen_config } src_prepare() { @@ -304,7 +305,11 @@ git_emake() { } src_compile() { - meson_src_compile + if use rust; then # bug #978391 + cargo_env meson_src_compile + else + meson_src_compile + fi if use doc ; then # Workaround fragments that still use the Makefile and can't