diff options
| author | Mike McQuaid | 2013-03-01 17:44:58 +0000 | 
|---|---|---|
| committer | Mike McQuaid | 2013-03-01 17:49:09 +0000 | 
| commit | 041060e28fa0e0c6ed6995ec34bb62188f159d2a (patch) | |
| tree | 7b2a909a1587dc2a8fbd9583e7f33ca9e7233e26 /Library | |
| parent | 82ecb69a53166c8c2fa0e507ac32c86241b66343 (diff) | |
| download | homebrew-041060e28fa0e0c6ed6995ec34bb62188f159d2a.tar.bz2 | |
Support 32-bit 10.6 bottles.
Closes #17735.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/bottles.rb | 1 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/info.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/extend/ARGV.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/formula.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/macos.rb | 13 | ||||
| -rw-r--r-- | Library/Homebrew/test/test_bottles.rb | 38 | 
6 files changed, 17 insertions, 41 deletions
diff --git a/Library/Homebrew/bottles.rb b/Library/Homebrew/bottles.rb index 07eb2c5f3..a11350fed 100644 --- a/Library/Homebrew/bottles.rb +++ b/Library/Homebrew/bottles.rb @@ -14,7 +14,6 @@ def install_bottle? f      and f.downloader.local_bottle_path    return false if ARGV.build_from_source? -  return false unless MacOS.bottles_supported?    return false unless f.pour_bottle?    return false unless f.build.used_options.empty?    return false unless bottle_current?(f) diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb index b0ef8560e..655cbdeea 100644 --- a/Library/Homebrew/cmd/info.rb +++ b/Library/Homebrew/cmd/info.rb @@ -74,7 +74,7 @@ module Homebrew extend self    def info_formula f      specs = []      stable = "stable #{f.stable.version}" if f.stable -    stable += " (bottled)" if f.bottle and MacOS.bottles_supported? +    stable += " (bottled)" if f.bottle      specs << stable if stable      specs << "devel #{f.devel.version}" if f.devel      specs << "HEAD" if f.head diff --git a/Library/Homebrew/extend/ARGV.rb b/Library/Homebrew/extend/ARGV.rb index 5f9b992a8..047a5d8fd 100644 --- a/Library/Homebrew/extend/ARGV.rb +++ b/Library/Homebrew/extend/ARGV.rb @@ -126,7 +126,7 @@ module HomebrewArgvExtension    end    def build_bottle? -    include? '--build-bottle' and MacOS.bottles_supported?(true) +    include? '--build-bottle'    end    def build_from_source? diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index d1ef58f50..0a1847fa5 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -478,7 +478,7 @@ class Formula        "homepage" => homepage,        "versions" => {          "stable" => (stable.version.to_s if stable), -        "bottle" => bottle && MacOS.bottles_supported? || false, +        "bottle" => bottle || false,          "devel" => (devel.version.to_s if devel),          "head" => (head.version.to_s if head)        }, diff --git a/Library/Homebrew/macos.rb b/Library/Homebrew/macos.rb index bc886ce4b..dae0a1126 100644 --- a/Library/Homebrew/macos.rb +++ b/Library/Homebrew/macos.rb @@ -11,7 +11,8 @@ module MacOS extend self    def cat      if version == :mountain_lion then :mountain_lion      elsif version == :lion then :lion -    elsif version == :snow_leopard then :snow_leopard +    elsif version == :snow_leopard +      Hardware.is_64_bit? ? :snow_leopard : :snow_leopard_32      elsif version == :leopard then :leopard      else nil      end @@ -234,16 +235,6 @@ module MacOS extend self    def pkgutil_info id      `/usr/sbin/pkgutil --pkg-info "#{id}" 2>/dev/null`.strip    end - -  def bottles_supported? raise_if_failed=false -    # We support bottles on all versions of OS X except 32-bit Snow Leopard. -    if Hardware.is_32_bit? and MacOS.version == :snow_leopard -      return false unless raise_if_failed -      raise "Bottles are not supported on 32-bit Snow Leopard." -    end - -    true -  end  end  require 'macos/xcode' diff --git a/Library/Homebrew/test/test_bottles.rb b/Library/Homebrew/test/test_bottles.rb index 19d502b72..5c18cc681 100644 --- a/Library/Homebrew/test/test_bottles.rb +++ b/Library/Homebrew/test/test_bottles.rb @@ -1,36 +1,22 @@  require 'testing_env'  require 'test/testball' -# We temporarily redefine bottles_supported? because the -# following tests assume it is true, but other tests may -# expect the real value. -module MacOS extend self -  def bottles_are_supported -    alias :old_bottles_supported? :bottles_supported? -    def bottles_supported?; true end -    yield -    def bottles_supported?; old_bottles_supported? end -  end -end -  class BottleTests < Test::Unit::TestCase    def test_bottle_spec_selection -    MacOS.bottles_are_supported do -      f = SnowLeopardBottleSpecTestBall.new +    f = SnowLeopardBottleSpecTestBall.new -      assert_equal case MacOS.cat -        when :snow_leopard then f.bottle -        else f.stable -        end, f.active_spec +    assert_equal case MacOS.cat +      when :snow_leopard then f.bottle +      else f.stable +      end, f.active_spec -      f = LionBottleSpecTestBall.new -      assert_equal case MacOS.cat -        when :lion then f.bottle -        else f.stable -        end, f.active_spec +    f = LionBottleSpecTestBall.new +    assert_equal case MacOS.cat +      when :lion then f.bottle +      else f.stable +      end, f.active_spec -      f = AllCatsBottleSpecTestBall.new -      assert_equal f.bottle, f.active_spec -    end +    f = AllCatsBottleSpecTestBall.new +    assert_equal f.bottle, f.active_spec    end  end  | 
