[123556] trunk/dports/lang/rust/Portfile

larryv at macports.org larryv at macports.org
Sun Aug 10 16:44:05 PDT 2014


Revision: 123556
          https://trac.macports.org/changeset/123556
Author:   larryv at macports.org
Date:     2014-08-10 16:44:05 -0700 (Sun, 10 Aug 2014)
Log Message:
-----------
rust: Reorganize.

- Remove unnecessary platform blocks.
- Split up hash and checksums for snapshot.
- Always put i386 before x86_64, for consistency.

Modified Paths:
--------------
    trunk/dports/lang/rust/Portfile

Modified: trunk/dports/lang/rust/Portfile
===================================================================
--- trunk/dports/lang/rust/Portfile	2014-08-10 21:55:43 UTC (rev 123555)
+++ trunk/dports/lang/rust/Portfile	2014-08-10 23:44:05 UTC (rev 123556)
@@ -43,41 +43,39 @@
 set stage0(distdir)             rust-stage0
 set stage0(date)                2014-06-21
 set stage0(rev)                 db9af1d
-platform darwin i386 {
-    set stage0(platform)        macos-${configure.build_arch}
-    switch ${configure.build_arch} {
-        x86_64 {
-            set stage0(hash)    4a8c2e1b7634d73406bac32a1a97893ec3ed818d
-            set stage0(rmd160)  6c7da644b90a567c615d83ff4af99b411a81a419
-            set stage0(sha256)  2c63e45ae276812f4429389584cf1eb0a9c0ef182f6f9e15a2731d3e30c03ea8
-        }
-        i386 -
-        default {
-            set stage0(hash)    3f25b2680efbab16ad074477a19d49dcce475977
-            set stage0(rmd160)  7c344247d62a417d703de720ac01881bcbf4fc25
-            set stage0(sha256)  42cef980dee52ad2cbd07795df07d3a3e96d013e08ea5a83cd54c266eecab698
-        }
-    }
-    set stage0(distfile)        [join "rust stage0 ${stage0(date)}
-                                                   ${stage0(rev)}
-                                                   ${stage0(platform)}
-                                                   ${stage0(hash)}" -].tar.bz2
+set stage0(platform)        macos-${configure.build_arch}
+set stage0(hash)        [expr {${configure.build_arch} eq "i386" ?
+                                "3f25b2680efbab16ad074477a19d49dcce475977" :
+                                "4a8c2e1b7634d73406bac32a1a97893ec3ed818d"}]
+set stage0(distfile)        [join "rust stage0 ${stage0(date)}
+                                               ${stage0(rev)}
+                                               ${stage0(platform)}
+                                               ${stage0(hash)}" -].tar.bz2
 
-    master_sites-append         http://static.rust-lang.org/stage0-snapshots:stage0
-    distfiles-append            ${stage0(distfile)}:stage0
-    checksums-append            ${stage0(distfile)} \
-                                    rmd160  ${stage0(rmd160)} \
-                                    sha256  ${stage0(sha256)}
-
-    depends_extract             bin:bzip2:bzip2
-    extract.only-delete         ${stage0(distfile)}
-    post-extract {
-        set expand "bzip2 -dc ${distpath}/${stage0(distfile)}"
-        set untar "${portutil::autoconf::tar_command} -xf -"
-        system -W ${workpath} "${expand} | ${untar}"
+master_sites-append         http://static.rust-lang.org/stage0-snapshots:stage0
+distfiles-append            ${stage0(distfile)}:stage0
+switch ${configure.build_arch} {
+    i386 {
+        set stage0(rmd160)  7c344247d62a417d703de720ac01881bcbf4fc25
+        set stage0(sha256)  42cef980dee52ad2cbd07795df07d3a3e96d013e08ea5a83cd54c266eecab698
     }
+    default {
+        set stage0(rmd160)  6c7da644b90a567c615d83ff4af99b411a81a419
+        set stage0(sha256)  2c63e45ae276812f4429389584cf1eb0a9c0ef182f6f9e15a2731d3e30c03ea8
+    }
 }
+checksums-append            ${stage0(distfile)} \
+                                rmd160  ${stage0(rmd160)} \
+                                sha256  ${stage0(sha256)}
 
+depends_extract             bin:bzip2:bzip2
+extract.only-delete         ${stage0(distfile)}
+post-extract {
+    set expand "bzip2 -dc ${distpath}/${stage0(distfile)}"
+    set untar "${portutil::autoconf::tar_command} -xf -"
+    system -W ${workpath} "${expand} | ${untar}"
+}
+
 # Only use compilers supported by upstream
 # (https://github.com/rust-lang/rust#building-from-source).
 compiler.blacklist  {clang < 211} \
@@ -112,19 +110,17 @@
 }
 
 # TODO: Test whether i386 machines can cross-compile for x86_64.
-platform darwin i386 {
-    set tgts {i686-apple-darwin x86_64-apple-darwin}
+set tgts {i686-apple-darwin x86_64-apple-darwin}
 
-    # TODO: Trying to build a cross-compiler breaks Intel 64 builds as
-    # of 0.11.0. Worth fixing?
-    #
-    #configure.pre_args-append       --target=[join $tgts ,]
+# TODO: Trying to build a cross-compiler breaks Intel 64 builds as
+# of 0.11.0. Worth fixing?
+#
+#configure.pre_args-append       --target=[join $tgts ,]
 
-    if {${configure.build_arch} eq "i386"} {
-        configure.pre_args-append   --build=[lindex $tgts 0]
-    } else {
-        configure.pre_args-append   --build=[lindex $tgts 1]
-    }
+if {${configure.build_arch} eq "i386"} {
+    configure.pre_args-append   --build=[lindex $tgts 0]
+} else {
+    configure.pre_args-append   --build=[lindex $tgts 1]
 }
 # TODO: Build docs also, probably in a subport.
 configure.args              --disable-docs \
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140810/24bc5062/attachment-0001.html>


More information about the macports-changes mailing list