]> git.pld-linux.org Git - packages/rust.git/blobdiff - rust.spec
- added x32 patch, librustc* libs now build (but build then fails when trying to...
[packages/rust.git] / rust.spec
index 7bc9d73f12c91ac8d82cac2d38041a26a283eef8..60937c2646589a09dc23f5bc72d6f2d656730369 100644 (file)
--- a/rust.spec
+++ b/rust.spec
@@ -23,9 +23,9 @@
 # To bootstrap from scratch, set the channel and date from src/stage0.txt
 # e.g. 1.10.0 wants rustc: 1.9.0-2016-05-24
 # or nightly wants some beta-YYYY-MM-DD
-%define                bootstrap_rust  1.37.0
-%define                bootstrap_cargo 0.38.0
-%define                bootstrap_date  2019-08-15
+%define                bootstrap_rust  1.43.1
+%define                bootstrap_cargo 1.43.1
+%define                bootstrap_date  2020-05-07
 
 %ifarch x32
 %undefine      with_cargo
 Summary:       The Rust Programming Language
 Summary(pl.UTF-8):     Język programowania Rust
 Name:          rust
-Version:       1.38.0
+Version:       1.44.1
 Release:       1
 # Licenses: (rust itself) and (bundled libraries)
 License:       (Apache v2.0 or MIT) and (BSD and ISC and MIT)
 Group:         Development/Languages
 Source0:       https://static.rust-lang.org/dist/%{rustc_package}.tar.xz
-# Source0-md5: 492d3fbedc865606119336d55b9c4f29
+# Source0-md5: 0cc3b079ddb1eb9a17f9e7e52efcebc5
 Source1:       https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-x86_64-unknown-linux-gnu.tar.xz
-# Source1-md5: 5d874193878390be4acec3f2f54fff9c
+# Source1-md5: 62b0974a4bad5aeabd50c7a7fa74518c
 Source2:       https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-i686-unknown-linux-gnu.tar.xz
-# Source2-md5: c543ba5b28cc1c90eaf509e9d89effe9
+# Source2-md5: 758d55172c8dddb1ec71913b5f532bb2
 Source3:       https://static.rust-lang.org/dist/%{bootstrap_date}/rust-std-%{bootstrap_rust}-x86_64-unknown-linux-gnux32.tar.xz
-# Source3-md5: d3c7de339814808e79bd78f92e18f75b
+# Source3-md5: 4b07c6922a0965791cf8eb28fee9e89d
+Source4:       https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-aarch64-unknown-linux-gnu.tar.xz
+# Source4-md5: 3a9d54ab96f96664b2f6077cccb4e70b
+Patch0:                %{name}-x32.patch
 URL:           https://www.rust-lang.org/
 # for src/compiler-rt
 BuildRequires: cmake >= 3.4.3
 BuildRequires: curl
 BuildRequires: libstdc++-devel
-%{?with_system_llvm:BuildRequires:     llvm-devel}
-BuildRequires: ncurses-devel
+%{?with_system_llvm:BuildRequires:     llvm-devel >= 7.0}
+BuildRequires: openssl-devel >= 1.0.1
 BuildRequires: python >= 1:2.7
 BuildRequires: zlib-devel
 %if %{without bootstrap}
@@ -69,8 +72,8 @@ BuildRequires:        procps
 Requires:      gcc
 # Only x86_64 and i686 are Tier 1 platforms at this time.
 # x32 is Tier 2, only rust-std is available (no rustc or cargo).
-# https://doc.rust-lang.org/stable/book/getting-started.html#tier-1
-ExclusiveArch: %{x8664} %{ix86} x32
+# https://doc.rust-lang.org/nightly/rustc/platform-support.html
+ExclusiveArch: %{x8664} %{ix86} x32 aarch64
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %ifarch x32
@@ -102,6 +105,14 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define                _noautoreqfiles         lib.*-[[:xdigit:]]{8}[.]so.*
 %define                _noautoprovfiles        lib.*-[[:xdigit:]]{8}[.]so.*
 
+%define                x_py { \
+       x_py() { \
+               local cmd="$1"; \
+               shift; \
+               %{?__jobs:CARGO_BUILD_JOBS=%__jobs }./x.py "$cmd" %{?__jobs:-j %__jobs} "$@"; \
+       }; x_py }
+
+
 %description
 Rust is a systems programming language that runs blazingly fast,
 prevents segfaults, and guarantees thread safety.
@@ -215,9 +226,10 @@ Dopełnianie parametrów polecenia cargo w powłoce Zsh.
 
 %prep
 %setup -q -n %{rustc_package}
+%patch0 -p1
 
 %if %{with bootstrap}
-%ifarch %{x8664}
+%ifarch %{x8664} x32
 tar xf %{SOURCE1}
 %endif
 %ifarch %{ix86}
@@ -230,6 +242,9 @@ tar xf %{SOURCE3}
 %{__mv} rust-std-%{bootstrap_rust}-%{rust_triple} rust-std-%{rust_triple}
 cd ..
 %endif
+%ifarch aarch64
+tar xf %{SOURCE4}
+%endif
 %{__mv} %{bootstrap_root} %{bootstrap_root}-root
 %{bootstrap_root}-root/install.sh \
        --components=cargo,rustc,rust-std-%{rust_bootstrap_triple} \
@@ -265,6 +280,7 @@ find vendor -name .cargo-checksum.json \
        -exec sed -i.uncheck -e 's/"files":{[^}]*}/"files":{ }/' '{}' '+'
 
 %build
+export PKG_CONFIG_ALLOW_CROSS=1
 %configure \
        --build=%{rust_triple} \
        --host=%{rust_triple} \
@@ -289,16 +305,17 @@ find vendor -name .cargo-checksum.json \
        --llvm-root=%{_prefix} \
        --release-channel=%{channel}
 
-RUST_BACKTRACE=full \
-./x.py dist --verbose
+export RUST_BACKTRACE=full
+%x_py dist --verbose
 
-%{?with_tests:./x.py test}
+%{?with_tests:%x_py test}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-DESTDIR=$RPM_BUILD_ROOT ./x.py install
-DESTDIR=$RPM_BUILD_ROOT ./x.py install src
+export DESTDIR=$RPM_BUILD_ROOT
+%x_py install
+%x_py install src
 
 # Make sure the shared libraries are in the proper libdir
 %if "%{_libdir}" != "%{common_libdir}"
@@ -352,29 +369,18 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc COPYRIGHT LICENSE-APACHE LICENSE-MIT README.md vendor/backtrace-sys/src/libbacktrace/LICENSE-libbacktrace
-%attr(755,root,root) %{_bindir}/miri
 %attr(755,root,root) %{_bindir}/rls
 %attr(755,root,root) %{_bindir}/rustc
 %attr(755,root,root) %{_bindir}/rustdoc
 %attr(755,root,root) %{_bindir}/rustfmt
-%attr(755,root,root) %{_libdir}/libarena-*.so
-%attr(755,root,root) %{_libdir}/libfmt_macros-*.so
-%attr(755,root,root) %{_libdir}/libgraphviz-*.so
 %attr(755,root,root) %{_libdir}/librustc*-*.so
-%attr(755,root,root) %{_libdir}/libserialize-*.so
 %attr(755,root,root) %{_libdir}/libstd-*.so
-%attr(755,root,root) %{_libdir}/libsyntax-*.so
-%attr(755,root,root) %{_libdir}/libsyntax_ext-*.so
-%attr(755,root,root) %{_libdir}/libsyntax_pos-*.so
-%attr(755,root,root) %{_libdir}/libterm-*.so
 %attr(755,root,root) %{_libdir}/libtest-*.so
 %{_mandir}/man1/rustc.1*
 %{_mandir}/man1/rustdoc.1*
 %dir %{rustlibdir}
 %dir %{rustlibdir}/%{rust_triple}
 %{rustlibdir}/%{rust_triple}/analysis
-%dir %{rustlibdir}/%{rust_triple}/codegen-backends
-%attr(755,root,root) %{rustlibdir}/%{rust_triple}/codegen-backends/*.so
 %dir %{rustlibdir}/%{rust_triple}/lib
 %attr(755,root,root) %{rustlibdir}/%{rust_triple}/lib/*.so
 %{rustlibdir}/%{rust_triple}/lib/*.rlib
@@ -406,7 +412,6 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/cargo
 %attr(755,root,root) %{_bindir}/cargo-clippy
 %attr(755,root,root) %{_bindir}/cargo-fmt
-%attr(755,root,root) %{_bindir}/cargo-miri
 %attr(755,root,root) %{_bindir}/clippy-driver
 %{_mandir}/man1/cargo*.1*
 %dir %{_datadir}/cargo
This page took 0.124247 seconds and 4 git commands to generate.