Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(mesa): remove rpmbuild/meson workarounds in mesa.spec #1165

Merged
merged 1 commit into from
May 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 13 additions & 15 deletions spec_files/mesa/mesa.spec
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ BuildRequires: pkgconfig(LLVMSPIRVLib)
%endif
%if 0%{?with_nvk}
BuildRequires: (rust >= 1.78.0 with rust < 2)
# BuildRequires: (crate(proc-macro2) >= 1.0.56 with crate(proc-macro2) < 2)
BuildRequires: (crate(proc-macro2) >= 1.0.56 with crate(proc-macro2) < 2)
BuildRequires: (crate(quote) >= 1.0.25 with crate(quote) < 2)
# BuildRequires: (crate(syn/clone-impls) >= 2.0.15 with crate(syn/clone-impls) < 3)
BuildRequires: (crate(syn/clone-impls) >= 2.0.15 with crate(syn/clone-impls) < 3)
BuildRequires: (crate(unicode-ident) >= 1.0.6 with crate(unicode-ident) < 2)
BuildRequires: (crate(paste) >= 1.0.14 with crate(paste) < 2)
%endif
Expand Down Expand Up @@ -380,27 +380,25 @@ cp %{SOURCE1} docs/
# ensure standard Rust compiler flags are set
export RUSTFLAGS="%build_rustflags"

# %if 0%{?with_nvk}
# export MESON_PACKAGE_CACHE_DIR="%{cargo_registry}/"
# # So... Meson can't actually find them without tweaks
# %define inst_crate_nameversion() %(basename %{cargo_registry}/%{1}-*)
# %define rewrite_wrap_file() sed -e "/source.*/d" -e "s/%{1}-.*/%{inst_crate_nameversion %{1}}/" -i subprojects/%{1}.wrap
%if 0%{?with_nvk}
export MESON_PACKAGE_CACHE_DIR="%{cargo_registry}/"
# So... Meson can't actually find them without tweaks
%define inst_crate_nameversion() %(basename %{cargo_registry}/%{1}-*)
%define rewrite_wrap_file() sed -e "/source.*/d" -e "s/%{1}-.*/%{inst_crate_nameversion %{1}}/" -i subprojects/%{1}.wrap

# %rewrite_wrap_file proc-macro2
# %rewrite_wrap_file quote
# %rewrite_wrap_file syn
# %rewrite_wrap_file unicode-ident
# %rewrite_wrap_file paste
# %endif
%rewrite_wrap_file proc-macro2
%rewrite_wrap_file quote
%rewrite_wrap_file syn
%rewrite_wrap_file unicode-ident
%rewrite_wrap_file paste
%endif

# We've gotten a report that enabling LTO for mesa breaks some games. See
# https://bugzilla.redhat.com/show_bug.cgi?id=1862771 for details.
# Disable LTO for now
%define _lto_cflags %{nil}

%meson \
--wrap-mode=default \
--force-fallback-for=proc-macro2,syn \
%ifnarch x86_64
-Dintel-rt=disabled \
%endif
Expand Down