# HG changeset patch
# User Sean Farley <sean@farley.io>
# Date 1441301774 25200
# Thu Sep 03 10:36:14 2015 -0700
# Node ID 6c788e327e17aaa03ecb963556f657919568497d
# Parent 0ad9327c4965be3bac5ddc4ee4f9d2882b4e5aff
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
|
b
|
|
4 | 4 | PortSystem 1.0 |
5 | 5 | PortGroup active_variants 1.1 |
6 | 6 | PortGroup compiler_blacklist_versions 1.0 |
7 | 7 | |
8 | 8 | name rust |
9 | | version 1.0.0 |
| 9 | version 1.2.0 |
10 | 10 | categories lang devel |
11 | 11 | platforms darwin |
12 | 12 | supported_archs i386 x86_64 |
13 | 13 | # https://github.com/mozilla/rust/issues/2024 |
14 | 14 | universal_variant no |
… |
… |
pre-fetch { |
37 | 37 | # snapshot compiler, we let base treat it as the distfile and deal with |
38 | 38 | # the actual Rust source "manually". |
39 | 39 | |
40 | 40 | # Download the snapshot compiler; see src/snapshots.txt in the Rust |
41 | 41 | # distribution. |
42 | | master_sites https://static.rust-lang.org/dist/:main \ |
43 | | https://static.rust-lang.org/stage0-snapshots/:snap |
| 42 | master_sites https://static.rust-lang.org/dist/:main |
44 | 43 | |
45 | 44 | distfiles ${name}c-${version}-src${extract.suffix}:main |
46 | 45 | worksrcdir ${name}c-${version} |
47 | 46 | |
48 | 47 | checksums ${name}c-${version}-src${extract.suffix} \ |
49 | | rmd160 b1127e616619fcd981e33896d4f00c4bf548ce6b \ |
50 | | sha256 c304cbd4f7b25d116b73c249f66bdb5c9da8645855ce195a41bda5077b995eba |
51 | | |
52 | | set stage0(distdir) rust-stage0 |
53 | | set stage0(date) 2015-03-27 |
54 | | set stage0(rev) 5520801 |
55 | | set stage0(platform) macos-${configure.build_arch} |
56 | | set stage0(hash) [expr {${configure.build_arch} eq "i386" ? |
57 | | "0310b1a970f2da7e61770fd14dbbbdca3b518234" : |
58 | | "5f35d9c920b8083a7420ef8cf5b00d5ef3085dfa"}] |
59 | | |
60 | | set stage0_name [join "rust stage0 ${stage0(date)} |
61 | | ${stage0(rev)} |
62 | | ${stage0(platform)} |
63 | | ${stage0(hash)}" -].tar.bz2 |
64 | | |
65 | | distfiles-append ${stage0_name}:snap |
66 | | |
67 | | switch ${configure.build_arch} { |
68 | | i386 {checksums-append ${stage0_name} \ |
69 | | rmd160 15a0ffbcee0def1a056d69aa851edf2b8ca490b6 \ |
70 | | sha256 0cc20c5f3c808d6332bcc192b60d6a1e9ee313d481030d8d07ff42a831492ba2} |
71 | | default {checksums-append ${stage0_name} \ |
72 | | rmd160 a5ef6ad68e6e49b40d045e45227ad858b0935988 \ |
73 | | sha256 38076751be5a52a61285cced36879832a7a106d7ce0bfd2b2080c3cfc42de1ce} |
74 | | } |
| 48 | rmd160 83a98c67a0aca97467d21150fa6a95fc77d10cc1 \ |
| 49 | sha256 ea6eb983daf2a073df57186a58f0d4ce0e85c711bec13c627a8c85d51b6a6d78 |
75 | 50 | |
76 | 51 | # Only use compilers supported by upstream |
77 | 52 | # (https://github.com/rust-lang/rust#building-from-source). |
78 | 53 | compiler.blacklist {clang < 211} \ |
79 | 54 | *dragonegg* \ |
… |
… |
if {${configure.build_arch} eq "i386"} { |
112 | 87 | # We need to use "--enable-rpath" as of a0546de, otherwise the build |
113 | 88 | # produces improperly linked binaries. |
114 | 89 | # (https://github.com/rust-lang/rust/issues/11747) |
115 | 90 | # TODO: Build docs also, probably in a subport. |
116 | 91 | configure.args --disable-docs \ |
117 | | --enable-local-rust \ |
118 | 92 | --enable-rpath \ |
119 | | --local-rust-root=${workpath}/${stage0(distdir)} |
| 93 | --enable-clang |
120 | 94 | |
121 | 95 | build.type gnu |
122 | 96 | build.args VERBOSE=1 \ |
123 | 97 | CC=${configure.cc} \ |
124 | 98 | CXX=${configure.cxx} \ |