Ignore:
Timestamp:
Apr 17, 2013, 1:08:16 PM (7 years ago)
Author:
vince@…
Message:

Fix a bug caused by Macports ‘sysctl’ misbehaving with strings outputs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/math/atlas/Portfile

    r105259 r105307  
    179179
    180180# Finds the type of CPU we are running on
    181 set native_arch $build_arch
     181set native_arch ${build_arch}
     182
    182183if {${os.arch} == "i386"} {
    183184
    184185    set universal_archs_supported {i386 x86_64}
    185     if {![catch {sysctl hw.machine} result]} {
    186         set native_arch $result
     186    if {![catch {exec sysctl -n hw.machine} result]} {
     187        set native_arch ${result}
    187188    }
    188189} elseif {${os.arch} == "powerpc"} {
    189190
    190191    set universal_archs_supported {ppc  ppc64}
    191     if {![catch {sysctl hw.cpusubtype} result] && $result == 100} {
     192    if {![catch {exec sysctl -n hw.cpusubtype} result] && $result == 100} {
    192193        set native_arch "ppc64"
    193194    } else {
     
    315316                                            -A 22 \
    316317                                            -V 64 \
     318                                            -t 2 \
    317319                                            -s gas_x86_32
    318320
     
    420422    reinplace    "s|-no-cpp-precomp||g" \
    421423                    ${worksrcpath}/CONFIG/src/atlcomp.txt
    422                    
     424               
    423425    # Non-universal builds
    424426    if {${universal} == 0} {
     
    527529            if {${arch} == ${native_arch} && ${build_arch} != "ppc"} {
    528530               
     531                # Don’t add -march=native to a GCC build on an AVX
     532                # machine because this flag overrides -msse4.2
    529533                if {${has_avx} == "no"} {
    530534               
     
    535539           
    536540            # Non-native targets. Apply a priori flags.
    537            
     541
    538542            # Clamp i386 optimization to -sse3 in universal builds and
    539543            # forces clang/gcc to use -m32 flag
Note: See TracChangeset for help on using the changeset viewer.