rust: WIP fixes

This commit is contained in:
Alexey Pavlov
2017-02-03 14:19:44 +03:00
parent 9c38fa7929
commit f747da045d
2 changed files with 20 additions and 12 deletions

View File

@@ -32,21 +32,21 @@ source=(https://static.rust-lang.org/dist/${_realname}c-${pkgver}-src.tar.gz
"fix-jemalloc.patch"
"git+https://github.com/rust-lang/cargo.git#tag=0.16.0")
sha256sums=('33f3747d231ede34b56c6cc0ae6be8cbaa29d2fdb39d86f25693dceb9fc5f164'
'1325ffce8d8ea2b95ed1be0911d5730e82e879ca526422a0458f5da990fb04c1'
'c11cd761809d08a108ddc3ac126a38caca740b3d11ed493cf317178b0e0f6f58'
'50c979b48ebc86dfddb295f2bea62e491ce868eb4308a0ae2324514c8d45e4fd'
'7f32bd7c43f13a61b2e4f66c40be47fc5fd025b2aad3fa6507d20316b02e3c17'
'9d5e57a67d98427eb3d34c2e19b3b9f5beadd5ddf62c76c2fd65905034eae84d'
'SKIP')
prepare() {
cd ${srcdir}/${_realname}c-${pkgver}
cd ${srcdir}/${_realname}c-${pkgver}-src
patch -p1 -i "${srcdir}/force-curl-rust.patch"
patch -p1 -i "${srcdir}/force-pthread.patch"
patch -p1 -i "${srcdir}/fix-jemalloc.patch"
cd ${srcdir}/cargo
git submodule update --init --recursive
patch -p1 -i "${srcdir}/force-curl-cargo.patch"
#git submodule update --init --recursive
#patch -p1 -i "${srcdir}/force-curl-cargo.patch"
sed 's^share/doc^share/licenses^g' -i Makefile.in
}
@@ -59,7 +59,7 @@ build() {
#We have to do the following because rust doesn't count x86_64-w64-mingw32 as a target triple
OSTYPE="$CARCH-pc-windows-gnu"
../${_realname}c-${pkgver}/configure \
../${_realname}c-${pkgver}-src/configure \
--prefix=${MINGW_PREFIX} \
--build=$OSTYPE \
--host=$OSTYPE \
@@ -84,8 +84,8 @@ package() {
rm -f ${pkgdir}${MINGW_PREFIX}/bin/libgcc*.dll
rm -f ${pkgdir}${MINGW_PREFIX}/bin/libstd*.dll
install -Dm644 ${srcdir}/${_realname}c-${pkgver}/LICENSE-APACHE "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE-APACHE"
install -Dm644 ${srcdir}/${_realname}c-${pkgver}/LICENSE-MIT "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE-MIT"
install -Dm644 ${srcdir}/${_realname}c-${pkgver}-src/LICENSE-APACHE "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE-APACHE"
install -Dm644 ${srcdir}/${_realname}c-${pkgver}-src/LICENSE-MIT "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE-MIT"
#build cargo
#We need to build cargo here because it requires rustc, so we need to wait until rustc is packaged.

View File

@@ -2,10 +2,10 @@ diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index 17a7c9c..4e3ca0d 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -56,14 +56,7 @@ def delete_if_present(path):
def download(path, url, verbose):
print("downloading {} to {}".format(url, path))
@@ -56,18 +56,11 @@ def delete_if_present(path):
def download(path, url, probably_big, verbose):
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",
@@ -13,7 +13,15 @@ index 17a7c9c..4e3ca0d 100644
- ".DownloadFile('{}', '{}')".format(url, path)],
- verbose=verbose)
- else:
- run(["curl", "-o", path, url], verbose=verbose)
- if probably_big or verbose:
- option = "-#"
- else:
- option = "-s"
- run(["curl", option, "-Sf", "-o", path, url], verbose=verbose)
+ if probably_big or verbose:
+ option = "-#"
+ else:
+ option = "-s"
+ run(["curl", "-o", path, url], verbose=verbose)