Revision: 37291 http://trac.macosforge.org/projects/macports/changeset/37291 Author: jmr@macports.org Date: 2008-06-02 08:07:07 -0700 (Mon, 02 Jun 2008) Log Message: ----------- ubench: enable building 64-bit and universal Modified Paths: -------------- trunk/dports/benchmarks/ubench/Portfile Added Paths: ----------- trunk/dports/benchmarks/ubench/files/patch-configure.diff Modified: trunk/dports/benchmarks/ubench/Portfile =================================================================== --- trunk/dports/benchmarks/ubench/Portfile 2008-06-02 15:05:26 UTC (rev 37290) +++ trunk/dports/benchmarks/ubench/Portfile 2008-06-02 15:07:07 UTC (rev 37291) @@ -19,9 +19,27 @@ master_sites http://www.phystech.com/ftp/ \ ftp://ftp.phystech.com/pub/ checksums md5 b03ddb52867a80890999b56cda8e69b7 -patchfiles patch-cpubench.c patch-membench.c +patchfiles patch-cpubench.c patch-membench.c \ + patch-configure.diff build.target destroot.destdir INSTALLDIR=${destroot}${prefix}/bin post-destroot { xinstall -m 444 ${worksrcpath}/ubench.8 ${destroot}${prefix}/share/man/man8 } + +variant use_64_bit conflicts universal 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"} { + configure.cflags-append -arch x86_64 + } elseif {${os.arch} == "powerpc"} { + configure.cflags-append -arch ppc64 + } else { + ui_warn "Unknown arch: ${os.arch}" + } +} Added: trunk/dports/benchmarks/ubench/files/patch-configure.diff =================================================================== --- trunk/dports/benchmarks/ubench/files/patch-configure.diff (rev 0) +++ trunk/dports/benchmarks/ubench/files/patch-configure.diff 2008-06-02 15:07:07 UTC (rev 37291) @@ -0,0 +1,17 @@ +--- configure.orig 2000-08-06 04:53:16.000000000 +1000 ++++ configure 2008-06-02 23:11:47.000000000 +1000 +@@ -113,10 +113,10 @@ + ;; + *) + cat <<! >> Makefile +-CC = cc +-CFLAGS = +-LDFLAGS = -lm +-INCLUDES = -I. ++CC = $CC ++CFLAGS = $CFLAGS ++LDFLAGS += $LDFLAGS -lm ++INCLUDES += $CPPFLAGS -I. + + ! + ;;
participants (1)
-
jmr@macports.org