diff options
| author | Jack Nagel | 2012-09-04 23:04:01 -0500 |
|---|---|---|
| committer | Jack Nagel | 2012-09-10 16:16:54 -0500 |
| commit | 6b8d25f2d21a3c19ecb0809d619999137cb94565 (patch) | |
| tree | 402f61e324fc981a56a2064bb0d4f5680ca135ed /Library/Formula/grass.rb | |
| parent | db74b9b4776aced4f4ac59076eebe10a98768f09 (diff) | |
| download | homebrew-6b8d25f2d21a3c19ecb0809d619999137cb94565.tar.bz2 | |
Clean up MacOS version method usage
The MacOS.version? family of methods (other than "leopard?") are poorly
defined and lead to confusing code. Replace them in formulae with more
explicit comparisons.
"MacOS.version" is a special version object that can be compared to
numerics, symbols, and strings using the standard Ruby comparison
methods.
The old methods were moved to compat when the version comparison code
was merged, and they must remain there "forever", but they should not be
used in new code.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula/grass.rb')
| -rw-r--r-- | Library/Formula/grass.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Formula/grass.rb b/Library/Formula/grass.rb index 97517a31e..ecae20a27 100644 --- a/Library/Formula/grass.rb +++ b/Library/Formula/grass.rb @@ -14,7 +14,7 @@ def headless? # # This restriction can be lifted once WxMac hits a stable release that is # 64-bit capable. - ARGV.include? '--without-gui' or MacOS.lion? + ARGV.include? '--without-gui' or MacOS.version >= :lion end class Grass < Formula @@ -31,7 +31,7 @@ class Grass < Formula depends_on "libtiff" depends_on "unixodbc" depends_on "fftw" - depends_on "cairo" if MacOS.leopard? + depends_on "cairo" if MacOS.version == :leopard depends_on :x11 # Patches ensure 32 bit system python is used for wxWidgets and that files @@ -101,7 +101,7 @@ class Grass < Formula end # Deal with Cairo support - if MacOS.leopard? + if MacOS.version == :leopard cairo = Formula.factory('cairo') args << "--with-cairo-includes=#{cairo.include}/cairo" args << "--with-cairo-libs=#{cairo.lib}" |
