Ignore:
Timestamp:
Jun 2, 2008, 3:07:07 PM (12 years ago)
Author:
jmr@…
Message:

ubench: enable building 64-bit and universal

Location:
trunk/dports/benchmarks/ubench
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/benchmarks/ubench/Portfile

    r30220 r37291  
    2020                 ftp://ftp.phystech.com/pub/
    2121checksums        md5 b03ddb52867a80890999b56cda8e69b7
    22 patchfiles       patch-cpubench.c patch-membench.c
     22patchfiles       patch-cpubench.c patch-membench.c \
     23                 patch-configure.diff
    2324build.target
    2425destroot.destdir INSTALLDIR=${destroot}${prefix}/bin
     
    2627    xinstall -m 444 ${worksrcpath}/ubench.8 ${destroot}${prefix}/share/man/man8
    2728}
     29
     30variant use_64_bit conflicts universal description {Build a 64-bit executable} {
     31    pre-fetch {
     32        if {${os.platform} != "darwin"} {
     33            return -code error "The use_64_bit variant only works on Darwin"
     34        } elseif {${os.major} < 8} {
     35            return -code error "The use_64_bit variant needs Darwin 8 or later"
     36        }
     37    }
     38    if {${os.arch} == "i386"} {
     39        configure.cflags-append -arch x86_64
     40    } elseif {${os.arch} == "powerpc"} {
     41        configure.cflags-append -arch ppc64
     42    } else {
     43        ui_warn "Unknown arch: ${os.arch}"
     44    }
     45}
Note: See TracChangeset for help on using the changeset viewer.