From d8c2642b6d4892d139083147b0b91da734fd1a0f Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Fri, 18 Mar 2011 10:30:26 -0700 Subject: [PATCH] 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 --- Library/Homebrew/compatibility.rb | 5 +++++ Library/Homebrew/hardware.rb | 4 ---- Library/Homebrew/utils.rb | 4 ++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/compatibility.rb b/Library/Homebrew/compatibility.rb index 70a55f1ae0..8e1a028de4 100644 --- a/Library/Homebrew/compatibility.rb +++ b/Library/Homebrew/compatibility.rb @@ -1,3 +1,4 @@ +## Compatibility layer introduced in 0.8 (refactor) # maybe never used by anyone, but alas it must continue to exist def versions_of(keg_name) @@ -50,6 +51,10 @@ def search_brews text Homebrew.search_brews text end +def snow_leopard_64? + MacOS.prefer_64_bit? +end + class Formula # in compatability because the naming is somewhat confusing def self.resolve_alias name diff --git a/Library/Homebrew/hardware.rb b/Library/Homebrew/hardware.rb index 4c79243727..3d76a74db5 100644 --- a/Library/Homebrew/hardware.rb +++ b/Library/Homebrew/hardware.rb @@ -69,7 +69,3 @@ protected $?.success? && result == 1 # sysctl call succeded and printed 1 end end - -def snow_leopard_64? - MACOS_VERSION >= 10.6 and Hardware.is_64_bit? -end diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index bd33f86400..5b43480800 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -301,6 +301,10 @@ module MacOS extend self false end + + def prefer_64_bit? + MACOS_VERSION >= 10.6 and Hardware.is_64_bit? + end end module GitHub extend self