Ignore:
Timestamp:
Feb 25, 2012, 7:06:59 PM (8 years ago)
Author:
jmr@…
Message:

atlas: avoid failure to parse the portfile if the sysctls at the top level fail

File:
1 edited

Legend:

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

    r82758 r90189  
    177177}
    178178
    179 if { (${os.major} == 11 && [sysctl hw.optional.avx1_0] == 1) || \
    180          (${os.major} > 8 && [sysctl hw.cpufamily] == 1418770316) } {
    181         # Corei2 is not supported yet because gcc4.5 does not
    182         # support AVX instructions and gcc4.6 does not compile yet.
    183         # Set CPU to Corei1 instead
    184         configure.args-append -A 18
     179platform darwin {
     180    if { (${os.major} >= 11 && ![catch {sysctl hw.optional.avx1_0} result] && $result == 1) || \
     181         (${os.major} > 8 && ![catch {sysctl hw.cpufamily} result] && $result == 1418770316) } {
     182        # Corei2 is not supported yet because gcc4.5 does not
     183        # support AVX instructions and gcc4.6 does not compile yet.
     184        # Set CPU to Corei1 instead
     185        configure.args-append -A 18
     186    }
    185187}
    186188
Note: See TracChangeset for help on using the changeset viewer.