[packages/rust/DEVEL] - started update to 1.22.1 (but fails with system llvm 4.0.1 although it's bundled version) - remove
qboosh
qboosh at pld-linux.org
Fri Dec 22 19:35:00 CET 2017
commit a1a3d56f72cfd9f17f34148edc5f6619a8b4ba3c
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Dec 22 19:36:01 2017 +0100
- started update to 1.22.1 (but fails with system llvm 4.0.1 although it's bundled version)
- removed obsolete exclude-compiler-rt-test patch
- added configure patch
rust-1.21.0-44203-exclude-compiler-rt-test.patch | 28 ----------------
rust-configure.patch | 42 ++++++++++++++++++++++++
rust.spec | 32 +++++++++---------
3 files changed, 59 insertions(+), 43 deletions(-)
---
diff --git a/rust.spec b/rust.spec
index 4264b07..ed556c2 100644
--- a/rust.spec
+++ b/rust.spec
@@ -4,6 +4,7 @@
#
# Conditional build:
%bcond_with bootstrap # bootstrap using precompiled binaries
+%bcond_without system_llvm # system LLVM
%bcond_with tests # build without tests
# The channel can be stable, beta, or nightly
@@ -18,31 +19,31 @@
# 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.20.0
-%define bootstrap_cargo 0.21.0
-%define bootstrap_date 2017-08-31
+%define bootstrap_rust 1.21.0
+%define bootstrap_cargo 0.22.0
+%define bootstrap_date 2017-10-12
Summary: The Rust Programming Language
Summary(pl.UTF-8): Język programowania Rust
Name: rust
-Version: 1.21.0
-Release: 1
+Version: 1.22.1
+Release: 0.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.gz
-# Source0-md5: bc494706b764276613064aad52922f53
+# Source0-md5: 7272ddba14f512e6d2612ef60460bed8
Source1: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-x86_64-unknown-linux-gnu.tar.gz
-# Source1-md5: 5b63778b4877bcfd431b56c485f4876b
+# Source1-md5: 55f58f561dc06210623b96f389e025cf
Source2: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-i686-unknown-linux-gnu.tar.gz
-# Source2-md5: 5e8c3a6a7b94e6a32f85230111a684a3
-Patch0: rust-1.21.0-44203-exclude-compiler-rt-test.patch
+# Source2-md5: f48f6cb6e9fda1cc74f0103541ac3d74
+Patch0: %{name}-configure.patch
URL: https://www.rust-lang.org/
# for src/compiler-rt
BuildRequires: cmake >= 3.4.3
BuildRequires: curl
BuildRequires: libstdc++-devel
-BuildRequires: llvm-devel
+%{?with_system_llvm:BuildRequires: llvm-devel < 5}
BuildRequires: ncurses-devel
BuildRequires: python >= 1:2.7
BuildRequires: zlib-devel
@@ -73,7 +74,7 @@ ExclusiveArch: %{x8664} %{ix86}
# We're going to override --libdir when configuring to get rustlib into a
# common path, but we'll fix the shared libraries during install.
-# Without this ugly hack, rust would not be able to buld itself
+# Without this ugly hack, rust would not be able to build itself
# for non-bootstrap build, lib64 is just too complicated for it.
%define common_libdir %{_prefix}/lib
%define rustlibdir %{common_libdir}/rustlib
@@ -158,7 +159,6 @@ programowania Rust i jego biblioteki standardowej.
%prep
%setup -q -n %{rustc_package}
-%patch0 -p1
%if %{with bootstrap}
%ifarch %{x8664}
@@ -175,11 +175,12 @@ tar xf %{SOURCE2}
test -f %{local_rust_root}/bin/cargo
test -f %{local_rust_root}/bin/rustc
%endif
+%patch0 -p1
# unbundle
# We're disabling jemalloc, but rust-src still wants it.
-#%{__rm} -r src/jemalloc/
-%{__rm} -r src/llvm/
+#%{__rm} -r src/jemalloc
+%{?with_system_llvm:%{__rm} -r src/llvm}
# extract bundled licenses for packaging
cp -p src/rt/hoedown/LICENSE src/rt/hoedown/LICENSE-hoedown
@@ -212,9 +213,10 @@ find src/vendor -name .cargo-checksum.json \
--enable-llvm-link-shared \
--enable-local-rust --local-rust-root=%{local_rust_root} \
--enable-vendor \
- --llvm-root=%{_prefix} \
+ %{?with_system_llvm:--llvm-root=%{_prefix}} \
--release-channel=%{channel}
+RUST_BACKTRACE=full \
./x.py dist
%{?with_tests:./x.py test}
diff --git a/rust-1.21.0-44203-exclude-compiler-rt-test.patch b/rust-1.21.0-44203-exclude-compiler-rt-test.patch
deleted file mode 100644
index feba8ab..0000000
--- a/rust-1.21.0-44203-exclude-compiler-rt-test.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 35f8a2065b7d17d39481a75cefa739df7a061084 Mon Sep 17 00:00:00 2001
-From: Josh Stone <jistone at redhat.com>
-Date: Wed, 30 Aug 2017 18:20:59 -0700
-Subject: [PATCH] rustbuild: update the rust-src filter for compiler-rt
-
-We wanted `src/compiler-rt/test` filtered from the `rust-src` package,
-but that path is now `src/libcompiler_builtins/compiler-rt/test`. This
-saves over half of the installed rust-src size. (50MB -> 22MB)
----
- src/bootstrap/dist.rs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
-index 746f85a9d59d..05d59e7d5956 100644
---- a/src/bootstrap/dist.rs
-+++ b/src/bootstrap/dist.rs
-@@ -754,7 +754,7 @@ impl Step for Src {
- "src/libprofiler_builtins",
- ];
- let std_src_dirs_exclude = [
-- "src/compiler-rt/test",
-+ "src/libcompiler_builtins/compiler-rt/test",
- "src/jemalloc/test/unit",
- ];
-
---
-2.13.5
-
diff --git a/rust-configure.patch b/rust-configure.patch
new file mode 100644
index 0000000..ed31396
--- /dev/null
+++ b/rust-configure.patch
@@ -0,0 +1,42 @@
+--- rustc-1.22.1-src/src/bootstrap/configure.py.orig 2017-11-22 22:33:00.000000000 +0100
++++ rustc-1.22.1-src/src/bootstrap/configure.py 2017-12-08 20:46:48.108604258 +0100
+@@ -73,10 +73,7 @@
+ o("debug-jemalloc", "rust.debug-jemalloc", "build jemalloc with --enable-debug --enable-fill")
+
+ v("prefix", "install.prefix", "set installation prefix")
+-v("localstatedir", "install.localstatedir", "local state directory")
+-v("datadir", "install.datadir", "install data")
+ v("sysconfdir", "install.sysconfdir", "install system configuration files")
+-v("infodir", "install.infodir", "install additional info")
+ v("libdir", "install.libdir", "install libraries")
+ v("mandir", "install.mandir", "install man pages in PATH")
+ v("docdir", "install.docdir", "install documentation in PATH")
+@@ -217,7 +217,7 @@
+ unknown_args.append(arg)
+ p("")
+
+-if 'option-checking' not in known_args or known_args['option-checking'][1]:
++if 'option-checking' not in known_args or known_args['option-checking'][-1][1]:
+ if len(unknown_args) > 0:
+ err("Option '" + unknown_args[0] + "' is not recognized")
+ if len(need_value_args) > 0:
+@@ -226,7 +226,7 @@
+
+ def build():
+ if 'build' in known_args:
+- return known_args['build'][0][1]
++ return known_args['build'][-1][1]
+ return bootstrap.default_build_triple()
+
+ def set(key, value):
+@@ -266,8 +266,8 @@
+ # Ensure each option is only passed once
+ arr = known_args[key]
+ if len(arr) > 1:
+- err("Option '{}' provided more than once".format(key))
+- option, value = arr[0]
++ p("Warning: option '{}' provided more than once, using '{}'".format(key, arr[-1][1]))
++ option, value = arr[-1]
+
+ # If we have a clear avenue to set our value in rustbuild, do so
+ if option.rustbuild is not None:
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rust.git/commitdiff/a1a3d56f72cfd9f17f34148edc5f6619a8b4ba3c
More information about the pld-cvs-commit
mailing list