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.42.0 |
%global bootstrap_rust 1.43.1 |
18 |
%global bootstrap_cargo 1.42.0 |
%global bootstrap_cargo 1.43.1 |
19 |
%global bootstrap_channel 1.42.0 |
%global bootstrap_channel 1.43.1 |
20 |
%global bootstrap_date 2020-03-12 |
%global bootstrap_date 2020-05-07 |
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} |
76 |
%endif |
%endif |
77 |
|
|
78 |
Name: rust |
Name: rust |
79 |
Version: 1.43.1 |
Version: 1.44.1 |
80 |
Release: %mkrel 1 |
Release: %mkrel 1 |
81 |
Summary: The Rust Programming Language |
Summary: The Rust Programming Language |
82 |
%if 0%{?mageia} |
%if 0%{?mageia} |
94 |
%endif |
%endif |
95 |
Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz |
Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz |
96 |
|
|
|
# Revert https://github.com/rust-lang/rust/pull/57840 |
|
|
# We do have the necessary fix in our LLVM 7. |
|
|
Patch1: rust-pr57840-llvm7-debuginfo-variants.patch |
|
|
|
|
|
# Ensure LLVM is in the link path for rustc tools and "fulldeps" tests |
|
|
# https://github.com/rust-lang/rust/pull/70123 |
|
|
# https://github.com/rust-lang/rust/pull/70591 |
|
|
Patch2: rust-pr70123-ensure-llvm-is-in-the-link-path.patch |
|
|
Patch3: rust-pr70591-ensure-llvm-is-in-the-link-path.patch |
|
|
|
|
|
# Prepare for LLVM 10 upgrade |
|
|
# https://github.com/rust-lang/rust/pull/70163 |
|
|
Patch4: rust-pr70163-prepare-for-llvm-10-upgrade.patch |
|
|
|
|
97 |
# https://github.com/rust-lang/rust/pull/71782 |
# https://github.com/rust-lang/rust/pull/71782 |
98 |
Patch5: rust-pr71782-Use-a-non-existent-test-path.patch |
Patch1: rust-pr71782-Use-a-non-existent-test-path.patch |
99 |
|
|
100 |
# Upstream patch to fix typenum crate build on i386/i486/i586. |
# Upstream patch to fix typenum crate build on i386/i486/i586. |
101 |
Patch10: typenum-pr115-fix-log2-rounding-error.patch |
Patch10: typenum-pr115-fix-log2-rounding-error.patch |
169 |
BuildRequires: pkgconfig(zlib) |
BuildRequires: pkgconfig(zlib) |
170 |
|
|
171 |
%if %without bundled_libgit2 |
%if %without bundled_libgit2 |
172 |
BuildRequires: pkgconfig(libgit2) >= 0.27 |
BuildRequires: pkgconfig(libgit2) >= 1.0.0 |
173 |
%endif |
%endif |
174 |
|
|
175 |
%if %without bundled_libssh2 |
%if %without bundled_libssh2 |
186 |
|
|
187 |
%if %with bundled_llvm |
%if %with bundled_llvm |
188 |
BuildRequires: cmake3 >= 3.4.3 |
BuildRequires: cmake3 >= 3.4.3 |
189 |
Provides: bundled(llvm) = 9.0.0 |
Provides: bundled(llvm) = 9.0.1 |
190 |
%else |
%else |
191 |
BuildRequires: cmake >= 2.8.11 |
BuildRequires: cmake >= 2.8.11 |
192 |
%if 0%{?epel} |
%if 0%{?epel} |
193 |
%global llvm llvm7.0 |
%global llvm llvm9.0 |
194 |
%endif |
%endif |
195 |
%if %defined llvm |
%if %defined llvm |
196 |
%global llvm_root %{_libdir}/%{llvm} |
%global llvm_root %{_libdir}/%{llvm} |
198 |
%global llvm llvm |
%global llvm llvm |
199 |
%global llvm_root %{_prefix} |
%global llvm_root %{_prefix} |
200 |
%endif |
%endif |
201 |
BuildRequires: %{llvm}-devel >= 7.0 |
BuildRequires: %{llvm}-devel >= 8.0 |
202 |
%if %with llvm_static |
%if %with llvm_static |
203 |
BuildRequires: %{llvm}-static |
BuildRequires: %{llvm}-static |
204 |
BuildRequires: libffi-devel |
BuildRequires: libffi-devel |
212 |
BuildRequires: gdb |
BuildRequires: gdb |
213 |
|
|
214 |
# TODO: work on unbundling these! |
# TODO: work on unbundling these! |
215 |
Provides: bundled(libbacktrace) = 8.1.0 |
Provides: bundled(libbacktrace) = 1.0.20200219 |
216 |
|
|
217 |
# Virtual provides for folks who attempt "dnf install rustc" |
# Virtual provides for folks who attempt "dnf install rustc" |
218 |
Provides: rustc = %{version}-%{release} |
Provides: rustc = %{version}-%{release} |
327 |
%package -n cargo |
%package -n cargo |
328 |
Summary: Rust's package manager and build tool |
Summary: Rust's package manager and build tool |
329 |
%if %with bundled_libgit2 |
%if %with bundled_libgit2 |
330 |
Provides: bundled(libgit2) = 0.99.0 |
Provides: bundled(libgit2) = 1.0.0 |
331 |
%endif |
%endif |
332 |
%if %with bundled_libssh2 |
%if %with bundled_libssh2 |
333 |
Provides: bundled(libssh2) = 1.9.0~dev |
Provides: bundled(libssh2) = 1.9.0~dev |
373 |
%package -n rls |
%package -n rls |
374 |
Summary: Rust Language Server for IDE integration |
Summary: Rust Language Server for IDE integration |
375 |
%if %with bundled_libgit2 |
%if %with bundled_libgit2 |
376 |
Provides: bundled(libgit2) = 0.99.0 |
Provides: bundled(libgit2) = 1.0.0 |
377 |
%endif |
%endif |
378 |
%if %with bundled_libssh2 |
%if %with bundled_libssh2 |
379 |
Provides: bundled(libssh2) = 1.9.0~dev |
Provides: bundled(libssh2) = 1.9.0~dev |
438 |
|
|
439 |
%setup -q -n %{rustc_package} |
%setup -q -n %{rustc_package} |
440 |
|
|
441 |
%patch1 -p1 -R |
%patch1 -p1 |
|
%patch2 -p1 |
|
|
%patch3 -p1 |
|
|
%patch4 -p1 |
|
|
%patch5 -p1 |
|
442 |
%patch10 -p1 |
%patch10 -p1 |
443 |
|
|
444 |
%if "%{python}" == "python3" |
%if "%{python}" == "python3" |
495 |
|
|
496 |
|
|
497 |
%build |
%build |
498 |
|
# This package fails to build with LTO due to undefined symbols. LTO |
499 |
|
# was disabled in OpenSuSE as well, but with no real explanation why |
500 |
|
# beyond the undefined symbols. It really should be investigated further. |
501 |
|
# Disable LTO |
502 |
|
%define _lto_cflags %{nil} |
503 |
|
|
504 |
%if %without bundled_libgit2 |
%if %without bundled_libgit2 |
505 |
# convince libgit2-sys to use the distro libgit2 |
# convince libgit2-sys to use the distro libgit2 |