[103854] trunk/dports/lang/rust

larryv at macports.org larryv at macports.org
Fri Mar 8 15:08:47 PST 2013


Revision: 103854
          https://trac.macports.org/changeset/103854
Author:   larryv at macports.org
Date:     2013-03-08 15:08:47 -0800 (Fri, 08 Mar 2013)
Log Message:
-----------
rust: Force configure to respect build_arch.

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

Added Paths:
-----------
    trunk/dports/lang/rust/files/
    trunk/dports/lang/rust/files/patch-configure.diff

Modified: trunk/dports/lang/rust/Portfile
===================================================================
--- trunk/dports/lang/rust/Portfile	2013-03-08 22:49:54 UTC (rev 103853)
+++ trunk/dports/lang/rust/Portfile	2013-03-08 23:08:47 UTC (rev 103854)
@@ -5,8 +5,10 @@
 
 name                rust
 version             0.5
+revision            1
 categories          lang devel
 platforms           darwin
+supported_archs     i386 x86_64
 license             {MIT Apache-2} BSD zlib NCSA Permissive
 maintainers         g5pw openmaintainer
 
@@ -19,6 +21,11 @@
 checksums           rmd160  b4988da7be984aa1337f4076e96e6d0c72e3170d \
                     sha256  d326d22707f0562d669c11efbc33ae812ddbf76ab78f07087fc5beb095a8928a
 
+patchfiles          patch-configure.diff
+post-patch {
+    reinplace "s/__BUILD_ARCH__/${configure.build_arch}/g" \
+        ${worksrcpath}/configure
+}
 configure.universal_args-delete \
                     --disable-dependency-tracking
 

Added: trunk/dports/lang/rust/files/patch-configure.diff
===================================================================
--- trunk/dports/lang/rust/files/patch-configure.diff	                        (rev 0)
+++ trunk/dports/lang/rust/files/patch-configure.diff	2013-03-08 23:08:47 UTC (rev 103854)
@@ -0,0 +1,21 @@
+--- configure.orig	2012-12-18 18:29:12.000000000 -0500
++++ configure	2013-03-08 17:52:39.000000000 -0500
+@@ -234,17 +234,7 @@
+ msg "inspecting environment"
+ 
+ CFG_OSTYPE=$(uname -s)
+-CFG_CPUTYPE=$(uname -m)
+-
+-if [ $CFG_OSTYPE = Darwin -a $CFG_CPUTYPE = i386 ]
+-then
+-    # Darwin's `uname -s` lies and always returns i386. We have to use sysctl
+-    # instead.
+-    if sysctl hw.optional.x86_64 | grep -q ': 1'
+-    then
+-        CFG_CPUTYPE=x86_64
+-    fi
+-fi
++CFG_CPUTYPE=__BUILD_ARCH__
+ 
+ # The goal here is to come up with the same triple as LLVM would,
+ # at least for the subset of platforms we're willing to target.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130308/16a3c3f4/attachment-0001.html>


More information about the macports-changes mailing list