Upgrading rust to 1.2.0
Sean Farley
sean at macports.org
Thu Sep 3 10:43:17 PDT 2015
I've been looking at rust and thought I'd upgrade it to 1.2.0. I think
the bootstrapping is no longer needed since version 1.0 (the one we were
using was old as well).
Here is the patch I've come up with for upgrading. I was hoping to get
some feedback from those that know rust better than I. Thanks!
# HG changeset patch
# User Sean Farley <sean at farley.io>
# Date 1441301774 25200
# Thu Sep 03 10:36:14 2015 -0700
# Node ID 7e8d821769e7bd4fd3083688841bc505afe5e779
# Parent b7d548b79f4fec0a1126d3a47e96c12584ff975e
rust: update to 1.2.0 and prefer clang
This also drops the code to download a specific staging distribution because
rust has been able to do that since 1.0.0.
diff --git a/dports/lang/rust/Portfile b/dports/lang/rust/Portfile
--- a/dports/lang/rust/Portfile
+++ b/dports/lang/rust/Portfile
@@ -4,11 +4,11 @@
PortSystem 1.0
PortGroup active_variants 1.1
PortGroup compiler_blacklist_versions 1.0
name rust
-version 1.0.0
+version 1.2.0
categories lang devel
platforms darwin
supported_archs i386 x86_64
# https://github.com/mozilla/rust/issues/2024
universal_variant no
@@ -37,43 +37,18 @@ pre-fetch {
# snapshot compiler, we let base treat it as the distfile and deal with
# the actual Rust source "manually".
# Download the snapshot compiler; see src/snapshots.txt in the Rust
# distribution.
-master_sites https://static.rust-lang.org/dist/:main \
- https://static.rust-lang.org/stage0-snapshots/:snap
+master_sites https://static.rust-lang.org/dist/:main
distfiles ${name}c-${version}-src${extract.suffix}:main
worksrcdir ${name}c-${version}
checksums ${name}c-${version}-src${extract.suffix} \
- rmd160 b1127e616619fcd981e33896d4f00c4bf548ce6b \
- sha256 c304cbd4f7b25d116b73c249f66bdb5c9da8645855ce195a41bda5077b995eba
-
-set stage0(distdir) rust-stage0
-set stage0(date) 2015-03-27
-set stage0(rev) 5520801
-set stage0(platform) macos-${configure.build_arch}
-set stage0(hash) [expr {${configure.build_arch} eq "i386" ?
- "0310b1a970f2da7e61770fd14dbbbdca3b518234" :
- "5f35d9c920b8083a7420ef8cf5b00d5ef3085dfa"}]
-
-set stage0_name [join "rust stage0 ${stage0(date)}
- ${stage0(rev)}
- ${stage0(platform)}
- ${stage0(hash)}" -].tar.bz2
-
-distfiles-append ${stage0_name}:snap
-
-switch ${configure.build_arch} {
- i386 {checksums-append ${stage0_name} \
- rmd160 15a0ffbcee0def1a056d69aa851edf2b8ca490b6 \
- sha256 0cc20c5f3c808d6332bcc192b60d6a1e9ee313d481030d8d07ff42a831492ba2}
- default {checksums-append ${stage0_name} \
- rmd160 a5ef6ad68e6e49b40d045e45227ad858b0935988 \
- sha256 38076751be5a52a61285cced36879832a7a106d7ce0bfd2b2080c3cfc42de1ce}
-}
+ rmd160 83a98c67a0aca97467d21150fa6a95fc77d10cc1 \
+ sha256 ea6eb983daf2a073df57186a58f0d4ce0e85c711bec13c627a8c85d51b6a6d78
# Only use compilers supported by upstream
# (https://github.com/rust-lang/rust#building-from-source).
compiler.blacklist {clang < 211} \
*dragonegg* \
@@ -112,13 +87,12 @@ if {${configure.build_arch} eq "i386"} {
# We need to use "--enable-rpath" as of a0546de, otherwise the build
# produces improperly linked binaries.
# (https://github.com/rust-lang/rust/issues/11747)
# TODO: Build docs also, probably in a subport.
configure.args --disable-docs \
- --enable-local-rust \
--enable-rpath \
- --local-rust-root=${workpath}/${stage0(distdir)}
+ --enable-clang
build.type gnu
build.args VERBOSE=1 \
CC=${configure.cc} \
CXX=${configure.cxx} \
More information about the macports-dev
mailing list