Add MacOS.prefer_64_bit?

Moved snow_leopard_64? to compatibility and replaced it with
a function MacOS.prefer_64_bit?. This method is in a better
place and has a better name once Lion comes out.

Fixes Homebrew/homebrew#4710
This commit is contained in:
Adam Vandenberg 2011-03-18 10:30:26 -07:00
parent 22afb1cc43
commit d8c2642b6d
3 changed files with 9 additions and 4 deletions

View File

@ -1,3 +1,4 @@
## Compatibility layer introduced in 0.8 (refactor)
# maybe never used by anyone, but alas it must continue to exist # maybe never used by anyone, but alas it must continue to exist
def versions_of(keg_name) def versions_of(keg_name)
@ -50,6 +51,10 @@ def search_brews text
Homebrew.search_brews text Homebrew.search_brews text
end end
def snow_leopard_64?
MacOS.prefer_64_bit?
end
class Formula class Formula
# in compatability because the naming is somewhat confusing # in compatability because the naming is somewhat confusing
def self.resolve_alias name def self.resolve_alias name

View File

@ -69,7 +69,3 @@ protected
$?.success? && result == 1 # sysctl call succeded and printed 1 $?.success? && result == 1 # sysctl call succeded and printed 1
end end
end end
def snow_leopard_64?
MACOS_VERSION >= 10.6 and Hardware.is_64_bit?
end

View File

@ -301,6 +301,10 @@ module MacOS extend self
false false
end end
def prefer_64_bit?
MACOS_VERSION >= 10.6 and Hardware.is_64_bit?
end
end end
module GitHub extend self module GitHub extend self