diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/enscript.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/python3.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/doctor.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/compat/compatibility.rb | 19 | ||||
| -rw-r--r-- | Library/Homebrew/dependencies.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/extend/ENV.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/macos.rb | 36 |
8 files changed, 31 insertions, 36 deletions
diff --git a/Library/Formula/enscript.rb b/Library/Formula/enscript.rb index 75e7e3058..4f5be6fcb 100644 --- a/Library/Formula/enscript.rb +++ b/Library/Formula/enscript.rb @@ -8,7 +8,7 @@ class Enscript < Formula head 'git://git.savannah.gnu.org/enscript.git' - keg_only 'Lion and below provide enscript' unless MacOS::mountain_lion_or_newer? + keg_only :provided_by_osx unless MacOS.version >= :mountain_lion depends_on 'gettext' diff --git a/Library/Formula/python3.rb b/Library/Formula/python3.rb index abfce4ca9..1bb9e2c13 100644 --- a/Library/Formula/python3.rb +++ b/Library/Formula/python3.rb @@ -168,7 +168,7 @@ class Python3 < Formula See: https://github.com/mxcl/homebrew/wiki/Homebrew-and-Python EOS - text += tk_caveats unless MacOS.lion_or_newer? + text += tk_caveats unless MacOS.version >= :lion text += general_caveats return text end diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index 377873d16..7d5a4711a 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -796,7 +796,7 @@ def check_git_status end def check_for_leopard_ssl - if MacOS.leopard? and not ENV['GIT_SSL_NO_VERIFY'] + if MacOS.version == :leopard and not ENV['GIT_SSL_NO_VERIFY'] <<-EOS.undent The version of libcurl provided with Mac OS X Leopard has outdated SSL certificates. diff --git a/Library/Homebrew/compat/compatibility.rb b/Library/Homebrew/compat/compatibility.rb index a8b6afb70..bbd349249 100644 --- a/Library/Homebrew/compat/compatibility.rb +++ b/Library/Homebrew/compat/compatibility.rb @@ -197,4 +197,23 @@ module MacOS extend self def x11_prefix X11.prefix end + + def leopard? + 10.5 == MACOS_VERSION + end + + def snow_leopard? + 10.6 <= MACOS_VERSION # Actually Snow Leopard or newer + end + alias_method :snow_leopard_or_newer?, :snow_leopard? + + def lion? + 10.7 <= MACOS_VERSION # Actually Lion or newer + end + alias_method :lion_or_newer?, :lion? + + def mountain_lion? + 10.8 <= MACOS_VERSION # Actually Mountain Lion or newer + end + alias_method :mountain_lion_or_newer?, :mountain_lion? end diff --git a/Library/Homebrew/dependencies.rb b/Library/Homebrew/dependencies.rb index 43d77f531..c35bce9fd 100644 --- a/Library/Homebrew/dependencies.rb +++ b/Library/Homebrew/dependencies.rb @@ -63,7 +63,7 @@ private # Xcode no longer provides autotools or some other build tools Dependency.new(spec.to_s) unless MacOS::Xcode.provides_autotools? when :libpng, :freetype, :pixman, :fontconfig, :cairo - if MacOS.lion_or_newer? + if MacOS.version >= :lion MacOS::XQuartz.installed? ? X11Dependency.new(tag) : Dependency.new(spec.to_s) else X11Dependency.new(tag) diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index d589273ee..d5da87b93 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -261,7 +261,7 @@ class SubversionDownloadStrategy < AbstractDownloadStrategy svncommand = target.exist? ? 'up' : 'checkout' args = [svn, svncommand] # SVN shipped with XCode 3.1.4 can't force a checkout. - args << '--force' unless MacOS.leopard? and svn == '/usr/bin/svn' + args << '--force' unless MacOS.version == :leopard and svn == '/usr/bin/svn' args << url if !target.exist? args << target args << '-r' << revision if revision diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb index 436886318..c8952b186 100644 --- a/Library/Homebrew/extend/ENV.rb +++ b/Library/Homebrew/extend/ENV.rb @@ -9,7 +9,7 @@ module HomebrewEnvExtension delete('CLICOLOR_FORCE') # autotools doesn't like this remove_cc_etc - if MacOS.mountain_lion? + if MacOS.version >= :mountain_lion # Fix issue with sed barfing on unicode characters on Mountain Lion. delete('LC_ALL') self['LC_CTYPE']="C" diff --git a/Library/Homebrew/macos.rb b/Library/Homebrew/macos.rb index 1fd7d928f..cee790242 100644 --- a/Library/Homebrew/macos.rb +++ b/Library/Homebrew/macos.rb @@ -8,16 +8,11 @@ module MacOS extend self end def cat - if mountain_lion? - :mountainlion - elsif lion? - :lion - elsif snow_leopard? - :snowleopard - elsif leopard? - :leopard - else - nil + if version == :mountain_lion then :mountainlion + elsif version == :lion then :lion + elsif version == :snow_leopard then :snowleopard + elsif version == :leopard then :leopard + else nil end end @@ -200,27 +195,8 @@ module MacOS extend self false end - def leopard? - 10.5 == MACOS_VERSION - end - - def snow_leopard? - 10.6 <= MACOS_VERSION # Actually Snow Leopard or newer - end - alias :snow_leopard_or_newer? :snow_leopard? - - def lion? - 10.7 <= MACOS_VERSION # Actually Lion or newer - end - alias :lion_or_newer? :lion? - - def mountain_lion? - 10.8 <= MACOS_VERSION # Actually Mountain Lion or newer - end - alias :mountain_lion_or_newer? :mountain_lion? - def prefer_64_bit? - Hardware.is_64_bit? and not leopard? + Hardware.is_64_bit? and version != :leopard end StandardCompilers = { |
