Skip to content

Commit

Permalink
rust: Update to 1.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
martell committed May 10, 2017
1 parent 4bfdb66 commit 271243e
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 99 deletions.
61 changes: 0 additions & 61 deletions mingw-w64-rust/0001-add-missing-libs.patch

This file was deleted.

19 changes: 9 additions & 10 deletions mingw-w64-rust/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Maintainer: Alexey Pavlov <[email protected]>
# Contributor: Martell Malone <[email protected]>
# Contributor: Zion Nimchuk <[email protected]>
# Contributor: Mateusz Mikuła <[email protected]


_realname=rust
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=1.16.0
pkgver=1.17.0
pkgrel=1
pkgdesc="Systems programming language focused on safety, speed and concurrency (mingw-w64)"
arch=('any')
Expand All @@ -15,6 +17,7 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs")
makedepends=("bison"
"flex"
"git"
"diffutils"
"${MINGW_PACKAGE_PREFIX}-cmake>=3.4.3"
"${MINGW_PACKAGE_PREFIX}-curl"
"${MINGW_PACKAGE_PREFIX}-jemalloc"
Expand All @@ -26,21 +29,18 @@ makedepends=("bison"
options=('!makeflags' 'staticlibs')
#install=rust.install
source=("https://static.rust-lang.org/dist/${_realname}c-${pkgver}-src.tar.gz"
"git+https://github.com/rust-lang/cargo.git#tag=0.17.0"
"git+https://github.com/rust-lang/cargo.git#tag=0.18.0"
"force-curl-rust.patch"
"fix-jemalloc.patch"
"0001-add-missing-libs.patch")
sha256sums=('f966b31eb1cd9bd2df817c391a338eeb5b9253ae0a19bf8a11960c560f96e8b4'
"fix-jemalloc.patch")
sha256sums=('4baba3895b75f2492df6ce5a28a916307ecd1c088dc1fd02dbfa8a8e86174f87'
'SKIP'
'83dee26bafd634eea2a1e630f757a3a38a419157560b4889437ec08d3e5fb9bb'
'7fabd72d1611ef1e46191c245d356d88909ea19062ea6999e1e1a049ebe8784d'
'919976d50c0538e5f240ed85063c3d91cf5720c97c20734ebc14caa74ee554d3')
'24a156ca440a5724a645e428e853d3f1fa09b7ab9dd44a2f9502bf80edb63216'
'7fabd72d1611ef1e46191c245d356d88909ea19062ea6999e1e1a049ebe8784d')

prepare() {
cd ${srcdir}/${_realname}c-${pkgver}-src
patch -p1 -i "${srcdir}/force-curl-rust.patch"
patch -p1 -i "${srcdir}/fix-jemalloc.patch"
patch -p1 -i "${srcdir}/0001-add-missing-libs.patch"

cd ${srcdir}/cargo

Expand All @@ -64,7 +64,6 @@ build() {
--target=$OSTYPE \
--release-channel=stable \
--enable-ninja \
--enable-local-rust \
--disable-codegen-tests \
--jemalloc-root=${MINGW_PREFIX}/lib \
--local-rust-root=$(cygpath -m ${MINGW_PREFIX})
Expand Down
24 changes: 0 additions & 24 deletions mingw-w64-rust/force-curl-cargo.patch

This file was deleted.

24 changes: 20 additions & 4 deletions mingw-w64-rust/force-curl-rust.patch
Original file line number Diff line number Diff line change
@@ -1,18 +1,34 @@
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index 17a7c9c..4e3ca0d 100644
index 3233a73b00..b506f84f19 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -61,13 +61,6 @@
def download(path, url, probably_big, verbose):
@@ -72,14 +72,21 @@ def download(path, url, probably_big, verbose):
def _download(path, url, probably_big, verbose, exception):
if probably_big or verbose:
print("downloading {}".format(url))
- # see http://serverfault.com/questions/301128/how-to-download
- if sys.platform == 'win32':
- run(["PowerShell.exe", "/nologo", "-Command",
- "(New-Object System.Net.WebClient)"
- ".DownloadFile('{}', '{}')".format(url, path)],
- verbose=verbose)
- verbose=verbose,
- exception=exception)
- else:
+ try:
+ default_encoding = sys.getdefaultencoding()
+ subprocess.check_output(['uname', '-s']).strip().decode(default_encoding)
+ except (subprocess.CalledProcessError, OSError):
+ # see http://serverfault.com/questions/301128/how-to-download
+ if sys.platform == 'win32':
+ run(["PowerShell.exe", "/nologo", "-Command",
+ "(New-Object System.Net.WebClient)"
+ ".DownloadFile('{}', '{}')".format(url, path)],
+ verbose=verbose,
+ exception=exception)
+ return
+ else:
+ raise Exception(err)
+ sys.exit(err)
if probably_big or verbose:
option = "-#"
else:

0 comments on commit 271243e

Please sign in to comment.