Revision: 90189 http://trac.macports.org/changeset/90189 Author: jmr@macports.org Date: 2012-02-25 11:06:59 -0800 (Sat, 25 Feb 2012) Log Message: ----------- atlas: avoid failure to parse the portfile if the sysctls at the top level fail Modified Paths: -------------- trunk/dports/math/atlas/Portfile Modified: trunk/dports/math/atlas/Portfile =================================================================== --- trunk/dports/math/atlas/Portfile 2012-02-25 18:55:00 UTC (rev 90188) +++ trunk/dports/math/atlas/Portfile 2012-02-25 19:06:59 UTC (rev 90189) @@ -176,12 +176,14 @@ } -if { (${os.major} == 11 && [sysctl hw.optional.avx1_0] == 1) || \ - (${os.major} > 8 && [sysctl hw.cpufamily] == 1418770316) } { - # Corei2 is not supported yet because gcc4.5 does not - # support AVX instructions and gcc4.6 does not compile yet. - # Set CPU to Corei1 instead - configure.args-append -A 18 +platform darwin { + if { (${os.major} >= 11 && ![catch {sysctl hw.optional.avx1_0} result] && $result == 1) || \ + (${os.major} > 8 && ![catch {sysctl hw.cpufamily} result] && $result == 1418770316) } { + # Corei2 is not supported yet because gcc4.5 does not + # support AVX instructions and gcc4.6 does not compile yet. + # Set CPU to Corei1 instead + configure.args-append -A 18 + } } if { [variant_isset universal] } {
participants (1)
-
jmr@macports.org