X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=rust.spec;h=0b3991703e8710d0f18d38fefb78aba20a5a218f;hb=3776565;hp=35ff2b497a321ab6f4c174b61fc2a0fb07fb6df6;hpb=badbe44d8fde3170b6186fc31aea615e9775c70b;p=packages%2Frust.git diff --git a/rust.spec b/rust.spec index 35ff2b4..0b39917 100644 --- 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.36.0 -%define bootstrap_cargo 0.37.0 -%define bootstrap_date 2019-07-04 +%define bootstrap_rust 1.41.1 +%define bootstrap_cargo 1.41.0 +%define bootstrap_date 2020-02-27 %ifarch x32 %undefine with_cargo @@ -34,24 +34,26 @@ Summary: The Rust Programming Language Summary(pl.UTF-8): Język programowania Rust Name: rust -Version: 1.37.0 -Release: 1 +Version: 1.42.0 +Release: 3 # 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.gz -# Source0-md5: e67432b37150f13e186ebfb67e5192fb -Source1: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-x86_64-unknown-linux-gnu.tar.gz -# Source1-md5: 487d17bbb86891f58160ccf6f0347b49 -Source2: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-i686-unknown-linux-gnu.tar.gz -# Source2-md5: 5f969ed3c9ef2a7e2a8011be7eb796c3 +Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz +# Source0-md5: 03a6111956f8d3bfdfc21aedce7f06bc +Source1: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-x86_64-unknown-linux-gnu.tar.xz +# Source1-md5: 3336c39311a33005d51298c60b99f2c1 +Source2: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-i686-unknown-linux-gnu.tar.xz +# Source2-md5: be3f4d5143483c754a3c272eb213cd07 +Source3: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-std-%{bootstrap_rust}-x86_64-unknown-linux-gnux32.tar.xz +# Source3-md5: 38da0bf057e0801669f18f74555830bf 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} @@ -100,6 +102,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,12 +225,19 @@ Dopełnianie parametrów polecenia cargo w powłoce Zsh. %setup -q -n %{rustc_package} %if %{with bootstrap} -%ifarch %{x8664} x32 +%ifarch %{x8664} tar xf %{SOURCE1} %endif %ifarch %{ix86} tar xf %{SOURCE2} %endif +%ifarch x32 +tar xf %{SOURCE1} +cd %{bootstrap_root} +tar xf %{SOURCE3} +%{__mv} rust-std-%{bootstrap_rust}-%{rust_triple} rust-std-%{rust_triple} +cd .. +%endif %{__mv} %{bootstrap_root} %{bootstrap_root}-root %{bootstrap_root}-root/install.sh \ --components=cargo,rustc,rust-std-%{rust_bootstrap_triple} \ @@ -228,6 +245,12 @@ tar xf %{SOURCE2} --disable-ldconfig test -f %{local_rust_root}/bin/cargo test -f %{local_rust_root}/bin/rustc +%ifarch x32 +%{bootstrap_root}-root/rust-std-%{rust_triple}/install.sh \ + --components=rust-std-%{rust_triple} \ + --prefix=%{local_rust_root} \ + --disable-ldconfig +%endif %endif # unbundle @@ -274,16 +297,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}" @@ -342,24 +366,14 @@ rm -rf $RPM_BUILD_ROOT %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