[37288] trunk/dports/benchmarks/nbench-byte

jmr at macports.org jmr at macports.org
Mon Jun 2 05:38:20 PDT 2008


Revision: 37288
          http://trac.macosforge.org/projects/macports/changeset/37288
Author:   jmr at macports.org
Date:     2008-06-02 05:38:18 -0700 (Mon, 02 Jun 2008)

Log Message:
-----------
nbench-byte: add a use_64_bit variant

Modified Paths:
--------------
    trunk/dports/benchmarks/nbench-byte/Portfile
    trunk/dports/benchmarks/nbench-byte/files/patch-Makefile.diff

Modified: trunk/dports/benchmarks/nbench-byte/Portfile
===================================================================
--- trunk/dports/benchmarks/nbench-byte/Portfile	2008-06-02 11:02:40 UTC (rev 37287)
+++ trunk/dports/benchmarks/nbench-byte/Portfile	2008-06-02 12:38:18 UTC (rev 37288)
@@ -39,3 +39,27 @@
     ui_msg "${prefix}/share/nbench/NNET.DAT to be in the same directory"
     ui_msg "that you start nbench from."
 }
+
+variant use_64_bit description {Build a 64-bit executable} {
+    pre-fetch {
+        if {${os.platform} != "darwin"} {
+            return -code error "The use_64_bit variant only works on Darwin"
+        } elseif {${os.major} < 8} {
+            return -code error "The use_64_bit variant needs Darwin 8 or later"
+        }
+    }
+    if {${os.arch} == "i386"} {
+        build.env-append CFLAGS="-arch x86_64"
+    } elseif {${os.arch} == "powerpc"} {
+        build.env-append CFLAGS="-arch ppc64"
+    } else {
+        ui_warn "Unknown arch: ${os.arch}"
+    }
+}
+
+platform darwin 8 {
+    build.args-append CC=/usr/bin/gcc-4.0
+}
+platform darwin 9 {
+    build.args-append CC=/usr/bin/gcc-4.0
+}

Modified: trunk/dports/benchmarks/nbench-byte/files/patch-Makefile.diff
===================================================================
--- trunk/dports/benchmarks/nbench-byte/files/patch-Makefile.diff	2008-06-02 11:02:40 UTC (rev 37287)
+++ trunk/dports/benchmarks/nbench-byte/files/patch-Makefile.diff	2008-06-02 12:38:18 UTC (rev 37288)
@@ -1,13 +1,26 @@
---- Makefile.old	Wed Jan 14 06:32:54 2004
-+++ Makefile	Wed Jan 14 06:33:14 2004
-@@ -64,8 +64,8 @@
+--- Makefile.orig	2004-12-30 13:23:30.000000000 +1100
++++ Makefile	2008-06-02 21:22:06.000000000 +1000
+@@ -19,10 +19,10 @@
+ # You should leave -static in the CFLAGS so that your sysinfo can be
+ # compiled into the executable.
+ 
+-CC = gcc
++#CC = gcc
+ 
+ # generic options for gcc
+-CFLAGS = -s -static -Wall -O3
++#CFLAGS = -s -static -Wall -O3
+ 
+ # if your gcc lets you do it, then try this one
+ #CFLAGS = -s -static -Wall -O3 -fomit-frame-pointer -funroll-loops
+@@ -74,8 +74,8 @@
  #LINKFLAGS = -s
  
  # for a Mac with OsX and the Darwin environment
 -#CC = cc
 -#CFLAGS = -O3 -DOSX
-+CC = cc
-+CFLAGS = -O3 -DOSX
++CC ?= cc
++CFLAGS += -O3 -DOSX
  
  # For debugging using cc
  #CC = cc

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080602/a8f7fd8a/attachment.htm 


More information about the macports-changes mailing list