Accepting request 452508 from devel:languages:rust
1 OBS-URL: https://build.opensuse.org/request/show/452508 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rust?expand=0&rev=2
This commit is contained in:
@@ -1,40 +0,0 @@
|
||||
From 706b2253ff96a46ff98d347842a122299c3eb5cd Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Firth <locallycompact@gmail.com>
|
||||
Date: Sun, 22 May 2016 20:47:59 +0100
|
||||
Subject: [PATCH] Fix misleading intentation errors on gcc 6.0
|
||||
|
||||
---
|
||||
src/rt/miniz.c | 10 ++++++++--
|
||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/rt/miniz.c b/src/rt/miniz.c
|
||||
index 2b803b0..2daca93 100644
|
||||
--- a/src/rt/miniz.c
|
||||
+++ b/src/rt/miniz.c
|
||||
@@ -575,7 +575,10 @@ tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_nex
|
||||
{
|
||||
mz_uint8 *p = r->m_tables[0].m_code_size; mz_uint i;
|
||||
r->m_table_sizes[0] = 288; r->m_table_sizes[1] = 32; TINFL_MEMSET(r->m_tables[1].m_code_size, 5, 32);
|
||||
- for ( i = 0; i <= 143; ++i) *p++ = 8; for ( ; i <= 255; ++i) *p++ = 9; for ( ; i <= 279; ++i) *p++ = 7; for ( ; i <= 287; ++i) *p++ = 8;
|
||||
+ for ( i = 0; i <= 143; ++i) *p++ = 8;
|
||||
+ for ( ; i <= 255; ++i) *p++ = 9;
|
||||
+ for ( ; i <= 279; ++i) *p++ = 7;
|
||||
+ for ( ; i <= 287; ++i) *p++ = 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1393,7 +1396,10 @@ static MZ_FORCEINLINE void tdefl_find_match(tdefl_compressor *d, mz_uint lookahe
|
||||
if ((d->m_dict[probe_pos + match_len] == c0) && (d->m_dict[probe_pos + match_len - 1] == c1)) break;
|
||||
TDEFL_PROBE; TDEFL_PROBE; TDEFL_PROBE;
|
||||
}
|
||||
- if (!dist) break; p = s; q = d->m_dict + probe_pos; for (probe_len = 0; probe_len < max_match_len; probe_len++) if (*p++ != *q++) break;
|
||||
+ if (!dist) break;
|
||||
+ p = s; q = d->m_dict + probe_pos;
|
||||
+ for (probe_len = 0; probe_len < max_match_len; probe_len++)
|
||||
+ if (*p++ != *q++) break;
|
||||
if (probe_len > match_len)
|
||||
{
|
||||
*pMatch_dist = dist; if ((*pMatch_len = match_len = probe_len) == max_match_len) return;
|
||||
--
|
||||
2.8.4
|
||||
|
@@ -1,26 +0,0 @@
|
||||
From 89ea75c4545bbc870712571a1c00b2f5b436939a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= <krig@koru.se>
|
||||
Date: Mon, 27 Jun 2016 18:44:17 +0200
|
||||
Subject: [PATCH] Fix GCC 6 misleading indentation error in hoedown
|
||||
|
||||
---
|
||||
src/rt/hoedown/src/document.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/rt/hoedown/src/document.c b/src/rt/hoedown/src/document.c
|
||||
index e2731da..53652e7 100644
|
||||
--- a/src/rt/hoedown/src/document.c
|
||||
+++ b/src/rt/hoedown/src/document.c
|
||||
@@ -1158,7 +1158,8 @@ char_link(hoedown_buffer *ob, hoedown_document *doc, uint8_t *data, size_t offse
|
||||
}
|
||||
else if (data[i] == ')') {
|
||||
if (nb_p == 0) break;
|
||||
- else nb_p--; i++;
|
||||
+ else nb_p--;
|
||||
+ i++;
|
||||
} else if (i >= 1 && _isspace(data[i-1]) && (data[i] == '\'' || data[i] == '"')) break;
|
||||
else i++;
|
||||
}
|
||||
--
|
||||
2.8.4
|
||||
|
@@ -1,25 +0,0 @@
|
||||
From 99735fbdb242e1d853456913266944ff6e1f24f3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= <krig@koru.se>
|
||||
Date: Wed, 6 Jul 2016 13:07:37 +0200
|
||||
Subject: [PATCH] Disable embedding timestamp information
|
||||
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/llvm/CMakeLists.txt b/src/llvm/CMakeLists.txt
|
||||
index 4dd43e7..de5e766 100644
|
||||
--- a/src/llvm/CMakeLists.txt
|
||||
+++ b/src/llvm/CMakeLists.txt
|
||||
@@ -230,7 +230,7 @@ set(LLVM_EXPERIMENTAL_TARGETS_TO_BUILD ""
|
||||
option(BUILD_SHARED_LIBS
|
||||
"Build all libraries as shared libraries instead of static" OFF)
|
||||
|
||||
-option(LLVM_ENABLE_TIMESTAMPS "Enable embedding timestamp information in build" ON)
|
||||
+option(LLVM_ENABLE_TIMESTAMPS "Enable embedding timestamp information in build" OFF)
|
||||
if(LLVM_ENABLE_TIMESTAMPS)
|
||||
set(ENABLE_TIMESTAMPS 1)
|
||||
endif()
|
||||
--
|
||||
2.9.0
|
||||
|
35
add-soname.patch
Normal file
35
add-soname.patch
Normal file
@@ -0,0 +1,35 @@
|
||||
Description: Set DT_SONAME when building dylibs
|
||||
In Rust, library filenames include a version-specific hash to help
|
||||
the run-time linker find the correct version. Unlike in C/C++, the
|
||||
compiler looks for all libraries matching a glob that ignores the
|
||||
hash and reads embedded metadata to work out versions, etc.
|
||||
.
|
||||
The upshot is that there is no need for the usual "libfoo.so ->
|
||||
libfoo-1.2.3.so" symlink common with C/C++ when building with Rust,
|
||||
and no need to communicate an alternate filename to use at run-time
|
||||
vs compile time. If linking to a Rust dylib from C/C++ however, a
|
||||
"libfoo.so -> libfoo-$hash.so" symlink may well be useful and in
|
||||
this case DT_SONAME=libfoo-$hash.so would be required. More
|
||||
mundanely, various tools (eg: dpkg-shlibdeps) complain if they don't
|
||||
find DT_SONAME on shared libraries in public directories.
|
||||
.
|
||||
This patch passes -Wl,-soname=$outfile when building dylibs (and
|
||||
using a GNU linker).
|
||||
Author: Angus Lees <gus@debian.org>
|
||||
Forwarded: no
|
||||
|
||||
--- a/src/librustc_trans/back/link.rs
|
||||
+++ b/src/librustc_trans/back/link.rs
|
||||
@@ -840,6 +840,12 @@
|
||||
cmd.args(&rpath::get_rpath_flags(&mut rpath_config));
|
||||
}
|
||||
|
||||
+ if (crate_type == config::CrateTypeDylib || crate_type == config::CrateTypeCdylib) && t.options.linker_is_gnu {
|
||||
+ let filename = String::from(out_filename.file_name().unwrap().to_str().unwrap());
|
||||
+ let soname = [String::from("-Wl,-soname=") + &filename];
|
||||
+ cmd.args(&soname);
|
||||
+ }
|
||||
+
|
||||
// Finally add all the linker arguments provided on the command line along
|
||||
// with any #[link_args] attributes found inside the crate
|
||||
if let Some(ref args) = sess.opts.cg.link_args {
|
82
rust.changes
82
rust.changes
@@ -1,3 +1,85 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 23 08:22:26 UTC 2016 - luke.nukem.jones@gmail.com
|
||||
|
||||
- Remove patch 0001-Fix-armv7-autodetection.patch
|
||||
+ appears to have been fixed upstream.
|
||||
- Building armv7hl arch with bootstrap binary since previously
|
||||
packaged versions haven't successfully built in the past
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 23 07:57:24 UTC 2016 - luke.nukem.jones@gmail.com
|
||||
|
||||
- Update to version 1.14.0
|
||||
+ Announcement: https://blog.rust-lang.org/2016/12/22/Rust-1.14.html
|
||||
+ Details: https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1140-2016-12-22
|
||||
- Release highlights:
|
||||
+ support for RFC 1492. This small addition lets you use `..`
|
||||
in more places, for example when destructuring a struct or tuple
|
||||
+ println!(), with no arguments, prints newline
|
||||
+ Wrapping impls standard binary and unary operators on
|
||||
references, as well as the Sum and Product iterators, making
|
||||
references to these types easier to use
|
||||
+ Implement From<Cow<str>> for String and From<Cow<[T]>> for
|
||||
Vec<T>. These implementations make sense, but were not yet added.
|
||||
+ Expand .zip() specialization to .map() and .cloned() for
|
||||
improved performance.
|
||||
+ Implement RefUnwindSafe for atomic types, as these types are
|
||||
“unwind safe,” though that wasn’t obvious at first.
|
||||
+ Specialize Vec::extend to Vec::extend_from_slice for
|
||||
performance gains.
|
||||
+ Don’t reuse HashMap random seeds. This helps to mitigate one
|
||||
type of DDoS attack.
|
||||
+ The internal memory layout of HashMap is more cache-friendly,
|
||||
for significant improvements in some operations
|
||||
+ Impl Add<{str, Cow<str>}> for Cow<str>. We already support Add
|
||||
for other string types, so not having it on Cow is inconsistent.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 18 09:27:44 UTC 2016 - luke.nukem.jones@gmail.com
|
||||
|
||||
- Update to 1.13.0
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 18 09:03:52 UTC 2016 - luke.nukem.jones@gmail.com
|
||||
|
||||
- Add conflicts to help avoid situations where previous versions
|
||||
or rustc-bootstrap may be installed
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 18 02:41:25 UTC 2016 - luke.nukem.jones@gmail.com
|
||||
|
||||
- Update to 1.12.1
|
||||
- Remove patches:
|
||||
+ 0003-Disable-embedding-timestamp-information.patch - fixed
|
||||
by upstream
|
||||
+ 0002-Add-armv6l-autodetection.patch - no-longer viable
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 16 23:27:42 UTC 2016 - luke.nukem.jones@gmail.com
|
||||
|
||||
- Revert from v1.13 to v1.11 in preparation for alternative
|
||||
packaging.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 2 08:42:44 UTC 2016 - matwey.kornilov@gmail.com
|
||||
|
||||
- Add 0001-Fix-armv7-autodetection.patch
|
||||
- Add 0002-Add-armv6l-autodetection.patch
|
||||
* fix armv6 and armv7 builds
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 20 11:46:53 UTC 2016 - kgronlund@suse.com
|
||||
|
||||
- Update to 1.11
|
||||
+ Add support for cdylib crate types
|
||||
|
||||
- Remove merged patches:
|
||||
* 0001-Fix-misleading-intentation-errors-on-gcc-6.0.patch
|
||||
* 0002-Fix-GCC-6-misleading-indentation-error-in-hoedown.patch
|
||||
|
||||
- Set DT_SONAME when building dylibs
|
||||
* Add add-soname.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 6 06:35:03 UTC 2016 - kgronlund@suse.com
|
||||
|
||||
|
106
rust.spec
106
rust.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package rust
|
||||
#
|
||||
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -14,50 +14,50 @@
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
%global rustc_version 1_10
|
||||
%global rustc_build_version 1_9
|
||||
|
||||
|
||||
%global prev_version 1.13.0
|
||||
%bcond_with bootstrap
|
||||
Name: rust
|
||||
Version: 1.10.0
|
||||
Version: 1.14.0
|
||||
Release: 0
|
||||
Summary: A systems programming language
|
||||
License: MIT or Apache-2.0
|
||||
Group: Development/Languages/Other
|
||||
Url: http://www.rust-lang.org
|
||||
ExclusiveArch: %ix86 x86_64
|
||||
# renamed to match upstream and other distros
|
||||
Provides: rustc-%{rustc_version} = %{version}
|
||||
Obsoletes: rustc-%{rustc_version} <= 1.5
|
||||
Provides: rustc = %{version}
|
||||
Provides: rustc-stable = %{version}
|
||||
#FIXME: currently there's no way to have rustc and rustc-beta installed
|
||||
# some alternatives system should be implemented
|
||||
Conflicts: rustc < %{version}
|
||||
|
||||
BuildRequires: rustc-%{rustc_build_version}
|
||||
|
||||
Recommends: cargo
|
||||
|
||||
Source0: https://static.rust-lang.org/dist/rustc-%{version}-src.tar.gz
|
||||
|
||||
#use snap.sh to update following lines from "magic" constanst from src/snapshots.txt
|
||||
Source100: %{name}-rpmlintrc
|
||||
# PATCH-FIX-UPSTREAM: Fix misleading intentation errors on gcc 6.0
|
||||
Patch1: 0001-Fix-misleading-intentation-errors-on-gcc-6.0.patch
|
||||
# PATCH-FIX-UPSTREAM: Fix GCC 6 misleading indentation error in hoedown
|
||||
Patch2: 0002-Fix-GCC-6-misleading-indentation-error-in-hoedown.patch
|
||||
# PATCH-FIX-OPENSUSE: Disable embedding timestamp information
|
||||
Patch3: 0003-Disable-embedding-timestamp-information.patch
|
||||
# PATCH-FIX-OPENSUSE: Set DT_SONAME when building dylibs
|
||||
Patch1: add-soname.patch
|
||||
BuildRequires: cmake
|
||||
BuildRequires: curl
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: python
|
||||
Recommends: cargo
|
||||
#FIXME: currently there's no way to have rustc and rustc-beta installed
|
||||
|
||||
Conflicts: rust < %{version}
|
||||
Conflicts: rustc <= %{version}
|
||||
Conflicts: rustc-bootstrap <= %{version}
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
BuildRequires: curl
|
||||
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64
|
||||
%if 0%{?suse_version}
|
||||
BuildRequires: fdupes
|
||||
%endif
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: python
|
||||
BuildRequires: cmake
|
||||
%if %{with bootstrap}
|
||||
BuildRequires: rustc-bootstrap <= %{prev_version}
|
||||
BuildRequires: rustc-bootstrap >= %{prev_version}
|
||||
%else
|
||||
%ifnarch armv7hl
|
||||
BuildRequires: rust <= %{version}
|
||||
BuildRequires: rust >= %{prev_version}
|
||||
%endif
|
||||
%ifarch armv7hl
|
||||
BuildRequires: rustc-bootstrap <= %{prev_version}
|
||||
BuildRequires: rustc-bootstrap >= %{prev_version}
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%description
|
||||
Rust is a systems programming language focused on three goals:
|
||||
@@ -84,10 +84,9 @@ Documentation for the Rust language.
|
||||
%package gdb
|
||||
Summary: Gdb integration for rust binaries
|
||||
Group: Development/Languages/Other
|
||||
Provides: rustc:/usr/bin/rust-gdb
|
||||
Provides: rust-%{rustc_version}-gdb = %{version}
|
||||
Obsoletes: rust-%{rustc_build_version}-gdb
|
||||
Supplements: packageand(%{name}:gdb)
|
||||
Provides: rust-gdb = %{version}
|
||||
Provides: rustc:%{_bindir}/rust-gdb
|
||||
|
||||
%description gdb
|
||||
This subpackage provides pretty printers and a wrapper script for
|
||||
@@ -96,37 +95,40 @@ invoking gdb on rust binaries.
|
||||
%prep
|
||||
%setup -q -n rustc-%{version}
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
%build
|
||||
export CPPFLAGS="$RPM_OPT_FLAGS" # eliminate complain from RPMlint
|
||||
export CPPFLAGS="%{optflags}" # eliminate complain from RPMlint
|
||||
# FIXME: you should use the %%configure macro
|
||||
./configure \
|
||||
--enable-local-rust \
|
||||
--local-rust-root=%{_prefix} \
|
||||
--prefix=%{_prefix}
|
||||
--prefix=%{_prefix} \
|
||||
--release-channel=stable
|
||||
make %{?_smp_mflags}
|
||||
%if %{with bootstrap_tarball}
|
||||
make %{?_smp_mflags} dist-tar-bins
|
||||
%endif
|
||||
|
||||
%install
|
||||
make %{?_smp_mflags} install DESTDIR=$RPM_BUILD_ROOT
|
||||
make %{?_smp_mflags} DESTDIR=%{buildroot} install
|
||||
|
||||
# Remove executable permission from HTML documentation
|
||||
# to prevent RPMLINT errors.
|
||||
chmod -R -x+X $RPM_BUILD_ROOT%{_prefix}/share/doc/rust/html
|
||||
chmod -R -x+X %{buildroot}%{_datadir}/doc/rust/html
|
||||
|
||||
# Remove files which mention buildroot to prevent RPMLINT errors.
|
||||
rm $RPM_BUILD_ROOT%{_prefix}/lib/rustlib/manifest-rust*
|
||||
rm $RPM_BUILD_ROOT%{_prefix}/lib/rustlib/install.log
|
||||
rm %{buildroot}%{_prefix}/lib/rustlib/manifest-rust*
|
||||
rm %{buildroot}%{_prefix}/lib/rustlib/install.log
|
||||
|
||||
# Remove lockfile to avoid errors.
|
||||
rm $RPM_BUILD_ROOT%{_prefix}/share/doc/rust/html/.lock
|
||||
rm %{buildroot}%{_datadir}/doc/rust/html/.lock
|
||||
|
||||
# allow parallel installation of docs
|
||||
mv %{buildroot}%{_prefix}/share/doc/rust \
|
||||
%{buildroot}%{_prefix}/share/doc/rust-%{version}
|
||||
mv %{buildroot}%{_datadir}/doc/rust \
|
||||
%{buildroot}%{_datadir}/doc/rust-%{version}
|
||||
|
||||
%if 0%{?suse_version}
|
||||
%fdupes $RPM_BUILD_ROOT%{_prefix}
|
||||
%fdupes %{buildroot}%{_prefix}
|
||||
%endif
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
@@ -137,20 +139,20 @@ mv %{buildroot}%{_prefix}/share/doc/rust \
|
||||
%{_bindir}/rustc
|
||||
%{_bindir}/rustdoc
|
||||
%{_mandir}/*/rust*
|
||||
%exclude %{_prefix}/share/doc/rust
|
||||
%exclude %{_datadir}/doc/rust
|
||||
%{_prefix}/lib/*.so
|
||||
%{_prefix}/lib/rustlib
|
||||
%exclude %{_prefix}/lib/rustlib/etc/gdb_load_rust_pretty_printers.py
|
||||
%exclude %{_prefix}/lib/rustlib/etc/gdb_rust_pretty_printing.py
|
||||
%exclude %{_prefix}/lib/rustlib%{_sysconfdir}/gdb_load_rust_pretty_printers.py
|
||||
%exclude %{_prefix}/lib/rustlib%{_sysconfdir}/gdb_rust_pretty_printing.py
|
||||
|
||||
%files doc
|
||||
%defattr(-,root,root)
|
||||
%{_prefix}/share/doc/rust-%{version}
|
||||
%{_datadir}/doc/rust-%{version}
|
||||
|
||||
%files gdb
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/rust-gdb
|
||||
%{_prefix}/lib/rustlib/etc/gdb_load_rust_pretty_printers.py
|
||||
%{_prefix}/lib/rustlib/etc/gdb_rust_pretty_printing.py
|
||||
%{_prefix}/lib/rustlib%{_sysconfdir}/gdb_load_rust_pretty_printers.py
|
||||
%{_prefix}/lib/rustlib%{_sysconfdir}/gdb_rust_pretty_printing.py
|
||||
|
||||
%changelog
|
||||
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a4015aacf4f6d8a8239253c4da46e7abaa8584f8214d1828d2ff0a8f56176869
|
||||
size 25967780
|
3
rustc-1.14.0-src.tar.gz
Normal file
3
rustc-1.14.0-src.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c790edd2e915bd01bea46122af2942108479a2fda9a6f76d1094add520ac3b6b
|
||||
size 27572650
|
Reference in New Issue
Block a user