commit:     af302b0e2469f0fa1e5d8953a46267ee55f0372b
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Tue Jan  6 11:07:24 2026 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Thu Jan  8 22:58:49 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af302b0e

media-libs/mesa: Drop Rust hacks following meson.eclass improvements

It's not clear exactly how, but recent multilib changes have broken Mesa when
VIDEO_CARD="nouveau nvk". The existing Rust hacks were not enough to make this
work, but they're now unnecessary following the meson.eclass improvements.

I have verified that this also works as an alternative fix for the workaround
that was applied in bug #939803.

Closes: https://bugs.gentoo.org/968424
Merges: https://codeberg.org/gentoo/gentoo/pulls/9
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 media-libs/mesa/mesa-25.3.3.ebuild | 26 ++------------------------
 media-libs/mesa/mesa-9999.ebuild   | 28 +++-------------------------
 2 files changed, 5 insertions(+), 49 deletions(-)

diff --git a/media-libs/mesa/mesa-25.3.3.ebuild 
b/media-libs/mesa/mesa-25.3.3.ebuild
index 65c9e98431e7..21888cc886a1 100644
--- a/media-libs/mesa/mesa-25.3.3.ebuild
+++ b/media-libs/mesa/mesa-25.3.3.ebuild
@@ -8,7 +8,7 @@ LLVM_OPTIONAL=1
 CARGO_OPTIONAL=1
 PYTHON_COMPAT=( python3_{11..14} )
 
-inherit flag-o-matic llvm-r1 meson-multilib python-any-r1 linux-info 
rust-toolchain
+inherit flag-o-matic llvm-r1 meson-multilib python-any-r1 linux-info
 
 MY_P="${P/_/-}"
 
@@ -344,21 +344,12 @@ multilib_src_configure() {
                vulkan_enable video_cards_imagination imagination
                vulkan_enable video_cards_intel intel intel_hasvk
                vulkan_enable video_cards_lavapipe swrast
+               vulkan_enable video_cards_nvk nouveau
                vulkan_enable video_cards_panfrost panfrost
                vulkan_enable video_cards_radeonsi amd
                vulkan_enable video_cards_v3d broadcom
                vulkan_enable video_cards_vc4 broadcom
                vulkan_enable video_cards_virgl virtio
-               if use video_cards_nvk; then
-                       vulkan_enable video_cards_nvk nouveau
-                       if ! multilib_is_native_abi; then
-                               echo -e "[binaries]\nrust = ['rustc', 
'--target=$(rust_abi $CBUILD)']" > "${T}/rust_fix.ini"
-                               emesonargs+=(
-                                       --native-file "${T}"/rust_fix.ini
-                               )
-                       fi
-               fi
-
                emesonargs+=(-Dvulkan-layers=anti-lag,device-select,overlay)
        fi
 
@@ -415,19 +406,6 @@ multilib_src_configure() {
                -Db_ndebug=$(usex debug false true)
        )
        meson_src_configure
-
-       if ! multilib_is_native_abi && use video_cards_nvk; then
-               sed -i -E '{N; s/(rule rust_COMPILER_FOR_BUILD\n command = 
rustc) --target=[a-zA-Z0-9=:-]+ (.*) -C link-arg=-m[[:digit:]]+/\1 \2/g}' 
build.ninja || die
-       fi
-}
-
-multilib_src_compile() {
-       if [[ ${ABI} == x86 ]]; then
-               # Bug 939803
-               BINDGEN_EXTRA_CLANG_ARGS="-m32" meson_src_compile
-       else
-               meson_src_compile
-       fi
 }
 
 multilib_src_test() {

diff --git a/media-libs/mesa/mesa-9999.ebuild b/media-libs/mesa/mesa-9999.ebuild
index c46f826238bc..21888cc886a1 100644
--- a/media-libs/mesa/mesa-9999.ebuild
+++ b/media-libs/mesa/mesa-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2025 Gentoo Authors
+# Copyright 1999-2026 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -8,7 +8,7 @@ LLVM_OPTIONAL=1
 CARGO_OPTIONAL=1
 PYTHON_COMPAT=( python3_{11..14} )
 
-inherit flag-o-matic llvm-r1 meson-multilib python-any-r1 linux-info 
rust-toolchain
+inherit flag-o-matic llvm-r1 meson-multilib python-any-r1 linux-info
 
 MY_P="${P/_/-}"
 
@@ -344,21 +344,12 @@ multilib_src_configure() {
                vulkan_enable video_cards_imagination imagination
                vulkan_enable video_cards_intel intel intel_hasvk
                vulkan_enable video_cards_lavapipe swrast
+               vulkan_enable video_cards_nvk nouveau
                vulkan_enable video_cards_panfrost panfrost
                vulkan_enable video_cards_radeonsi amd
                vulkan_enable video_cards_v3d broadcom
                vulkan_enable video_cards_vc4 broadcom
                vulkan_enable video_cards_virgl virtio
-               if use video_cards_nvk; then
-                       vulkan_enable video_cards_nvk nouveau
-                       if ! multilib_is_native_abi; then
-                               echo -e "[binaries]\nrust = ['rustc', 
'--target=$(rust_abi $CBUILD)']" > "${T}/rust_fix.ini"
-                               emesonargs+=(
-                                       --native-file "${T}"/rust_fix.ini
-                               )
-                       fi
-               fi
-
                emesonargs+=(-Dvulkan-layers=anti-lag,device-select,overlay)
        fi
 
@@ -415,19 +406,6 @@ multilib_src_configure() {
                -Db_ndebug=$(usex debug false true)
        )
        meson_src_configure
-
-       if ! multilib_is_native_abi && use video_cards_nvk; then
-               sed -i -E '{N; s/(rule rust_COMPILER_FOR_BUILD\n command = 
rustc) --target=[a-zA-Z0-9=:-]+ (.*) -C link-arg=-m[[:digit:]]+/\1 \2/g}' 
build.ninja || die
-       fi
-}
-
-multilib_src_compile() {
-       if [[ ${ABI} == x86 ]]; then
-               # Bug 939803
-               BINDGEN_EXTRA_CLANG_ARGS="-m32" meson_src_compile
-       else
-               meson_src_compile
-       fi
 }
 
 multilib_src_test() {

Reply via email to