diff --git a/Library/Homebrew/brewkit.rb b/Library/Homebrew/brewkit.rb index bc208236a5..efd55913ec 100644 --- a/Library/Homebrew/brewkit.rb +++ b/Library/Homebrew/brewkit.rb @@ -41,7 +41,7 @@ case hw_model #ENV['CFLAGS']="#{ENV['CFLAGS']} -march=nocona -msse3 -mmmx -m64" #ENV['LDFLAGS']="-arch x86_64" - when :xeon, :macpro + when :xeon # TODO what optimisations for xeon? when :ppc then abort "Sorry, Homebrew does not support PowerPC architectures" diff --git a/Library/Homebrew/hw.model.rb b/Library/Homebrew/hw.model.rb index 87e6a6b3c7..6ff81fb6e3 100644 --- a/Library/Homebrew/hw.model.rb +++ b/Library/Homebrew/hw.model.rb @@ -13,66 +13,44 @@ def hw_model when "iMac" if major <=4 :core1 - elsif major <=8 - :core2 else - $unknown_hw_model=true + $unknown_hw_model=true if major >8 :core2 end when "MacBookAir" - if major <= 1 - :core2 - else - $unknown_hw_model=true - :core2 - end + $unknown_hw_model=true if major > 1 + :core2 when "MacBook" if major <= 1 :core1 - elsif major <= 4 - :core2 else - $unknown_hw_model=true + $unknown_hw_model=true if major > 4 :core2 end when "MacBookPro" if major <= 1 :core1 - elsif major <= 5 - :core2 else - $unknown_hw_model=true + $unknown_hw_model=true if major > 5 :core2 end when "Macmini" # Mac mini (Core Duo/Solo) - if major <= 1 - :core - else - $unknown_hw_model=true - :core - end + $unknown_hw_model=true if major > 1 + :core when "MacPro" - if major <= 3 - :xeon - else - $unknown_hw_model=true - :xeon - end + $unknown_hw_model=true if major > 3 + :xeon when "PowerBook", "PowerMac", "RackMac" then :ppc when "Xserve" - if major <=2 - :xeon - else - $unknown_hw_model=true - :xeon - end + $unknown_hw_model=true if major > 2 + :xeon when "ADP" then :dunno # Developer Transition Kit when "M43ADP" then :dunno # Development Mac Pro diff --git a/Library/Homebrew/unittest.rb b/Library/Homebrew/unittest.rb index b23db7d58d..5371ee36e2 100755 --- a/Library/Homebrew/unittest.rb +++ b/Library/Homebrew/unittest.rb @@ -19,10 +19,9 @@ at_exit { Pathname.new(HOMEBREW_CACHE).rmtree } require 'test/unit' # must be after at_exit -class TestFormula