14 |
# e.g. 1.10.0 wants rustc: 1.9.0-2016-05-24 |
# e.g. 1.10.0 wants rustc: 1.9.0-2016-05-24 |
15 |
# or nightly wants some beta-YYYY-MM-DD |
# or nightly wants some beta-YYYY-MM-DD |
16 |
# Note that cargo matches the program version here, not its crate version. |
# Note that cargo matches the program version here, not its crate version. |
17 |
%global bootstrap_rust 1.48.0 |
%global bootstrap_rust 1.49.0 |
18 |
%global bootstrap_cargo 1.48.0 |
%global bootstrap_cargo 1.49.0 |
19 |
%global bootstrap_channel 1.48.0 |
%global bootstrap_channel 1.49.0 |
20 |
%global bootstrap_date 2020-11-19 |
%global bootstrap_date 2020-12-31 |
21 |
|
|
22 |
# Only the specified arches will use bootstrap binaries. |
# Only the specified arches will use bootstrap binaries. |
23 |
#global bootstrap_arches %%{rust_arches} |
#global bootstrap_arches %%{rust_arches} |
37 |
%bcond_with llvm_static |
%bcond_with llvm_static |
38 |
|
|
39 |
# We can also choose to just use Rust's bundled LLVM, in case the system LLVM |
# We can also choose to just use Rust's bundled LLVM, in case the system LLVM |
40 |
# is insufficient. Rust currently requires LLVM 8.0+. |
# is insufficient. Rust currently requires LLVM 9.0+. |
41 |
%bcond_with bundled_llvm |
%bcond_with bundled_llvm |
42 |
# (akien) Hacks below are needed on mga's buildsystem when we have to rebootstrap llvm. |
# (akien) Hacks below are needed on mga's buildsystem when we have to rebootstrap llvm. |
43 |
## Bundled LLVM has underlinking issues: |
## Bundled LLVM has underlinking issues: |
47 |
#%%global optflags %%(echo %%{optflags} | sed 's/-g /-g1 /') |
#%%global optflags %%(echo %%{optflags} | sed 's/-g /-g1 /') |
48 |
#%%endif |
#%%endif |
49 |
|
|
50 |
# Requires stable libgit2 1.0 |
# Requires stable libgit2 1.1 |
51 |
%if 0%{?fedora} >= 32 || 0%{?mageia} >= 8 |
%if 0%{?fedora} >= 34 || 0%{?mageia} >= 8 |
52 |
%bcond_with bundled_libgit2 |
%bcond_with bundled_libgit2 |
53 |
%else |
%else |
54 |
%bcond_without bundled_libgit2 |
%bcond_without bundled_libgit2 |
80 |
%endif |
%endif |
81 |
|
|
82 |
Name: rust |
Name: rust |
83 |
Version: 1.49.0 |
Version: 1.50.0 |
84 |
Release: %mkrel 2 |
Release: %mkrel 2 |
85 |
Summary: The Rust Programming Language |
Summary: The Rust Programming Language |
86 |
%if 0%{?mageia} |
%if 0%{?mageia} |
98 |
%endif |
%endif |
99 |
Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz |
Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz |
100 |
|
|
101 |
|
# This internal rust-abi change broke s390x -- revert for now. |
102 |
|
# https://github.com/rust-lang/rust/issues/80810#issuecomment-781784032 |
103 |
|
Patch1: 0001-Revert-Auto-merge-of-79547.patch |
104 |
|
|
105 |
### RHEL-specific patches below ### |
### RHEL-specific patches below ### |
106 |
|
|
107 |
# Disable cargo->libgit2->libssh2 on RHEL, as it's not approved for FIPS (rhbz1732949) |
# Disable cargo->libgit2->libssh2 on RHEL, as it's not approved for FIPS (rhbz1732949) |
189 |
BuildRequires: pkgconfig(zlib) |
BuildRequires: pkgconfig(zlib) |
190 |
|
|
191 |
%if %without bundled_libgit2 |
%if %without bundled_libgit2 |
192 |
BuildRequires: pkgconfig(libgit2) >= 1.0.0 |
BuildRequires: pkgconfig(libgit2) >= 1.1.0 |
193 |
%endif |
%endif |
194 |
|
|
195 |
%if %{without disabled_libssh2} |
%if %{without disabled_libssh2} |
444 |
|
|
445 |
%setup -q -n %{rustc_package} |
%setup -q -n %{rustc_package} |
446 |
|
|
447 |
|
%patch1 -p1 |
448 |
|
|
449 |
%if %with disabled_libssh2 |
%if %with disabled_libssh2 |
450 |
%patch100 -p1 |
%patch100 -p1 |
451 |
%endif |
%endif |
579 |
--enable-vendor \ |
--enable-vendor \ |
580 |
--enable-verbose-tests \ |
--enable-verbose-tests \ |
581 |
%{?codegen_units_std} \ |
%{?codegen_units_std} \ |
582 |
--release-channel=%{channel} |
--release-channel=%{channel} \ |
583 |
|
--release-description="%{?mageia:Mageia }%{?rhel:Red Hat }%{version}-%{release}" |
584 |
|
|
585 |
%{python} ./x.py build -j "$ncpus" --stage 2 |
%{python} ./x.py build -j "$ncpus" --stage 2 |
586 |
%{python} ./x.py doc --stage 2 |
%{python} ./x.py doc --stage 2 |
654 |
rm -f %{buildroot}%{rustlibdir}/etc/lldb_* |
rm -f %{buildroot}%{rustlibdir}/etc/lldb_* |
655 |
%endif |
%endif |
656 |
|
|
657 |
|
# We don't want Rust copies of LLVM tools (rust-lld, rust-llvm-dwp) |
658 |
|
rm -f %{buildroot}%{rustlibdir}/%{rust_triple}/bin/rust-ll* |
659 |
|
|
660 |
|
|
661 |
%check |
%check |
662 |
export %{rust_env} |
export %{rust_env} |
741 |
%license src/tools/cargo/LICENSE-APACHE src/tools/cargo/LICENSE-MIT src/tools/cargo/LICENSE-THIRD-PARTY |
%license src/tools/cargo/LICENSE-APACHE src/tools/cargo/LICENSE-MIT src/tools/cargo/LICENSE-THIRD-PARTY |
742 |
%doc src/tools/cargo/README.md |
%doc src/tools/cargo/README.md |
743 |
%{_bindir}/cargo |
%{_bindir}/cargo |
744 |
|
%{_libexecdir}/cargo* |
745 |
%{_mandir}/man1/cargo*.1* |
%{_mandir}/man1/cargo*.1* |
746 |
%{_sysconfdir}/bash_completion.d/cargo |
%{_sysconfdir}/bash_completion.d/cargo |
747 |
%{_datadir}/zsh/site-functions/_cargo |
%{_datadir}/zsh/site-functions/_cargo |