Skip to content

Commit c93f45d

Browse files
committed
rust: Update to 1.18.0
1 parent 4bfdb66 commit c93f45d

5 files changed

+63
-98
lines changed

mingw-w64-rust/0001-add-missing-libs.patch

Lines changed: 0 additions & 61 deletions
This file was deleted.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
From f3b4afc073e0f96ee80297bbeb18396433dbcf34 Mon Sep 17 00:00:00 2001
2+
From: Martell Malone <[email protected]>
3+
Date: Wed, 14 Jun 2017 01:36:09 +0100
4+
Subject: [PATCH] bootstrap: use stable release for stage0
5+
6+
7+
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
8+
index 6cd9496b7a..644eb6f0f4 100644
9+
--- a/src/bootstrap/bootstrap.py
10+
+++ b/src/bootstrap/bootstrap.py
11+
@@ -201,7 +201,7 @@ class RustBuild(object):
12+
if self.cargo().startswith(self.bin_root()) and \
13+
(not os.path.exists(self.cargo()) or self.cargo_out_of_date()):
14+
self.print_what_it_means_to_bootstrap()
15+
- filename = "cargo-{}-{}.tar.gz".format('0.18.0', self.build)
16+
+ filename = "cargo-{}-{}.tar.gz".format('0.19.0', self.build)
17+
url = "https://static.rust-lang.org/dist/" + self.stage0_rustc_date()
18+
tarball = os.path.join(rustc_cache, filename)
19+
if not os.path.exists(tarball):
20+
diff --git a/src/stage0.txt b/src/stage0.txt
21+
index 38cbfa0dec..75b3cb86e0 100644
22+
--- a/src/stage0.txt
23+
+++ b/src/stage0.txt
24+
@@ -12,4 +12,4 @@
25+
# tarball for a stable release you'll likely see `1.x.0-$date` where `1.x.0` was
26+
# released on `$date`
27+
28+
-rustc: 1.17.0-2017-04-27
29+
+rustc: 1.18.0-2017-06-08
30+
--
31+
2.13.0
32+

mingw-w64-rust/PKGBUILD

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# Maintainer: Alexey Pavlov <[email protected]>
2+
# Contributor: Martell Malone <[email protected]>
23
# Contributor: Zion Nimchuk <[email protected]>
34
# Contributor: Mateusz Mikuła <[email protected]
45

6+
57
_realname=rust
68
pkgbase=mingw-w64-${_realname}
79
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
8-
pkgver=1.16.0
10+
pkgver=1.18.0
911
pkgrel=1
1012
pkgdesc="Systems programming language focused on safety, speed and concurrency (mingw-w64)"
1113
arch=('any')
@@ -15,6 +17,7 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs")
1517
makedepends=("bison"
1618
"flex"
1719
"git"
20+
"diffutils"
1821
"${MINGW_PACKAGE_PREFIX}-cmake>=3.4.3"
1922
"${MINGW_PACKAGE_PREFIX}-curl"
2023
"${MINGW_PACKAGE_PREFIX}-jemalloc"
@@ -26,21 +29,22 @@ makedepends=("bison"
2629
options=('!makeflags' 'staticlibs')
2730
#install=rust.install
2831
source=("https://static.rust-lang.org/dist/${_realname}c-${pkgver}-src.tar.gz"
29-
"git+https://github.com/rust-lang/cargo.git#tag=0.17.0"
32+
"git+https://github.com/rust-lang/cargo.git#tag=0.19.0"
3033
"force-curl-rust.patch"
3134
"fix-jemalloc.patch"
32-
"0001-add-missing-libs.patch")
33-
sha256sums=('f966b31eb1cd9bd2df817c391a338eeb5b9253ae0a19bf8a11960c560f96e8b4'
35+
"0001-bootstrap-use-stable-release-for-stage0.patch")
36+
sha256sums=('d2dc36e99b9e2269488b2bcddde43c234e6bde03edf70cba82a027ff49c36111'
3437
'SKIP'
35-
'83dee26bafd634eea2a1e630f757a3a38a419157560b4889437ec08d3e5fb9bb'
38+
'b2a16e472e8d162affb3f56410a1dc971ae918ade099a2ef33dcaee10e449c68'
3639
'7fabd72d1611ef1e46191c245d356d88909ea19062ea6999e1e1a049ebe8784d'
37-
'919976d50c0538e5f240ed85063c3d91cf5720c97c20734ebc14caa74ee554d3')
40+
'd8d9b70c453403f2985ced8f6baf8dec0518741b7398fd27196e24e189a0b3ef'
41+
'3c56719f4fec822277d37f0c56aef230e4b8033e005d538037da4632cdc064ba')
3842

3943
prepare() {
4044
cd ${srcdir}/${_realname}c-${pkgver}-src
4145
patch -p1 -i "${srcdir}/force-curl-rust.patch"
4246
patch -p1 -i "${srcdir}/fix-jemalloc.patch"
43-
patch -p1 -i "${srcdir}/0001-add-missing-libs.patch"
47+
patch -p1 -i "${srcdir}/0001-bootstrap-use-stable-release-for-stage0.patch"
4448

4549
cd ${srcdir}/cargo
4650

@@ -64,14 +68,12 @@ build() {
6468
--target=$OSTYPE \
6569
--release-channel=stable \
6670
--enable-ninja \
67-
--enable-local-rust \
6871
--disable-codegen-tests \
6972
--jemalloc-root=${MINGW_PREFIX}/lib \
7073
--local-rust-root=$(cygpath -m ${MINGW_PREFIX})
7174
# LLVM 4.0 is unsupported
7275
#--llvm-root=${MINGW_PREFIX} \
7376

74-
export RUSTFLAGS="-lffi -lgcc_eh -lpthread"
7577
python2 ../${_realname}c-${pkgver}-src/x.py build
7678
}
7779

mingw-w64-rust/force-curl-cargo.patch

Lines changed: 0 additions & 24 deletions
This file was deleted.

mingw-w64-rust/force-curl-rust.patch

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,34 @@
11
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
2-
index 17a7c9c..4e3ca0d 100644
2+
index 3233a73b00..b506f84f19 100644
33
--- a/src/bootstrap/bootstrap.py
44
+++ b/src/bootstrap/bootstrap.py
5-
@@ -61,13 +61,6 @@
6-
def download(path, url, probably_big, verbose):
5+
@@ -72,14 +72,21 @@ def download(path, url, probably_big, verbose):
6+
def _download(path, url, probably_big, verbose, exception):
77
if probably_big or verbose:
88
print("downloading {}".format(url))
99
- # see http://serverfault.com/questions/301128/how-to-download
1010
- if sys.platform == 'win32':
1111
- run(["PowerShell.exe", "/nologo", "-Command",
1212
- "(New-Object System.Net.WebClient)"
1313
- ".DownloadFile('{}', '{}')".format(url, path)],
14-
- verbose=verbose)
14+
- verbose=verbose,
15+
- exception=exception)
1516
- else:
17+
+ try:
18+
+ default_encoding = sys.getdefaultencoding()
19+
+ subprocess.check_output(['uname', '-s']).strip().decode(default_encoding)
20+
+ except (subprocess.CalledProcessError, OSError):
21+
+ # see http://serverfault.com/questions/301128/how-to-download
22+
+ if sys.platform == 'win32':
23+
+ run(["PowerShell.exe", "/nologo", "-Command",
24+
+ "(New-Object System.Net.WebClient)"
25+
+ ".DownloadFile('{}', '{}')".format(url, path)],
26+
+ verbose=verbose,
27+
+ exception=exception)
28+
+ return
29+
+ else:
30+
+ raise Exception(err)
31+
+ sys.exit(err)
1632
if probably_big or verbose:
1733
option = "-#"
1834
else:

0 commit comments

Comments
 (0)