aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Library/Formula/abyss.rb2
-rw-r--r--Library/Formula/alpine.rb2
-rw-r--r--Library/Formula/aria2.rb2
-rw-r--r--Library/Formula/avidemux.rb2
-rw-r--r--Library/Formula/bind.rb4
-rw-r--r--Library/Formula/cairo.rb2
-rw-r--r--Library/Formula/clisp.rb2
-rw-r--r--Library/Formula/collectd.rb2
-rw-r--r--Library/Formula/couchdb.rb2
-rw-r--r--Library/Formula/disco.rb2
-rw-r--r--Library/Formula/e2fsprogs.rb2
-rw-r--r--Library/Formula/ejabberd.rb4
-rw-r--r--Library/Formula/erlang.rb2
-rw-r--r--Library/Formula/ffmbc.rb2
-rw-r--r--Library/Formula/ffmpeg.rb4
-rw-r--r--Library/Formula/fontforge.rb2
-rw-r--r--Library/Formula/ghc.rb2
-rw-r--r--Library/Formula/git.rb2
-rw-r--r--Library/Formula/gnunet.rb2
-rw-r--r--Library/Formula/google-js-test.rb2
-rw-r--r--Library/Formula/graphicsmagick.rb2
-rw-r--r--Library/Formula/grass.rb6
-rw-r--r--Library/Formula/imap-uw.rb2
-rw-r--r--Library/Formula/iodine.rb2
-rw-r--r--Library/Formula/jstalk.rb2
-rw-r--r--Library/Formula/lftp.rb2
-rw-r--r--Library/Formula/libagg.rb2
-rw-r--r--Library/Formula/libmemcached.rb2
-rw-r--r--Library/Formula/libmms.rb2
-rw-r--r--Library/Formula/librasterlite.rb2
-rw-r--r--Library/Formula/librets.rb2
-rw-r--r--Library/Formula/libvirt.rb2
-rw-r--r--Library/Formula/libxml++.rb2
-rw-r--r--Library/Formula/macvim.rb2
-rw-r--r--Library/Formula/mapserver.rb4
-rw-r--r--Library/Formula/md.rb2
-rw-r--r--Library/Formula/mpd.rb2
-rw-r--r--Library/Formula/mysql.rb4
-rw-r--r--Library/Formula/nmap.rb4
-rw-r--r--Library/Formula/node.rb2
-rw-r--r--Library/Formula/nspr.rb2
-rw-r--r--Library/Formula/nu.rb2
-rw-r--r--Library/Formula/octave.rb13
-rw-r--r--Library/Formula/open-scene-graph.rb2
-rw-r--r--Library/Formula/opencolorio.rb2
-rw-r--r--Library/Formula/phantomjs.rb2
-rw-r--r--Library/Formula/portaudio.rb2
-rw-r--r--Library/Formula/postgresql.rb4
-rw-r--r--Library/Formula/povray.rb2
-rw-r--r--Library/Formula/qt.rb10
-rw-r--r--Library/Formula/rabbitmq.rb2
-rw-r--r--Library/Formula/recode.rb2
-rw-r--r--Library/Formula/rtmpdump.rb2
-rw-r--r--Library/Formula/rtorrent.rb2
-rw-r--r--Library/Formula/sdl.rb2
-rw-r--r--Library/Formula/spidermonkey.rb2
-rw-r--r--Library/Formula/stormfs.rb2
-rw-r--r--Library/Formula/subversion.rb2
-rw-r--r--Library/Formula/swi-prolog.rb2
-rw-r--r--Library/Formula/tcpflow.rb2
-rw-r--r--Library/Formula/texi2html.rb2
-rw-r--r--Library/Formula/trafshow.rb2
-rw-r--r--Library/Formula/vpnc.rb2
-rw-r--r--Library/Formula/wget.rb2
-rw-r--r--Library/Formula/wine.rb2
-rw-r--r--Library/Formula/xmlrpc-c.rb4
-rw-r--r--Library/Formula/ykpers.rb2
-rw-r--r--Library/Homebrew/compat/compatibility.rb1
-rw-r--r--Library/Homebrew/macos.rb4
-rw-r--r--Library/Homebrew/superenv.rb6
70 files changed, 94 insertions, 90 deletions
diff --git a/Library/Formula/abyss.rb b/Library/Formula/abyss.rb
index eaf7244b6..f4a0fd5ca 100644
--- a/Library/Formula/abyss.rb
+++ b/Library/Formula/abyss.rb
@@ -11,7 +11,7 @@ class Abyss < Formula
depends_on 'google-sparsehash' => :build
# Snow Leopard comes with mpi but Lion does not
- depends_on 'open-mpi' if MacOS.lion?
+ depends_on 'open-mpi' if MacOS.version >= :lion
# strip breaks the ability to read compressed files.
skip_clean 'bin'
diff --git a/Library/Formula/alpine.rb b/Library/Formula/alpine.rb
index 50cfe2a18..8971dac5b 100644
--- a/Library/Formula/alpine.rb
+++ b/Library/Formula/alpine.rb
@@ -10,7 +10,7 @@ class Alpine < Formula
# http://trac.macports.org/ticket/20971
def patches
"https://trac.macports.org/export/89747/trunk/dports/mail/alpine/files/alpine-osx-10.6.patch"
- end if MacOS.snow_leopard?
+ end if MacOS.version >= :snow_leopard
def install
ENV.j1
diff --git a/Library/Formula/aria2.rb b/Library/Formula/aria2.rb
index 6dd1106ab..a3f48ec5f 100644
--- a/Library/Formula/aria2.rb
+++ b/Library/Formula/aria2.rb
@@ -8,7 +8,7 @@ class Aria2 < Formula
depends_on 'pkg-config' => :build
# Leopard's libxml2 is too old.
- depends_on 'libxml2' if MacOS.leopard?
+ depends_on 'libxml2' if MacOS.version == :leopard
def install
system "./configure", "--disable-dependency-tracking",
diff --git a/Library/Formula/avidemux.rb b/Library/Formula/avidemux.rb
index 73da1e162..9f6b55cd8 100644
--- a/Library/Formula/avidemux.rb
+++ b/Library/Formula/avidemux.rb
@@ -63,7 +63,7 @@ class Avidemux < Formula
# For 32-bit compilation under gcc 4.2, see:
# http://trac.macports.org/ticket/20938#comment:22
- if MacOS.leopard? or Hardware.is_32_bit?
+ if MacOS.version == :leopard or Hardware.is_32_bit?
inreplace 'cmake/admFFmpegBuild.cmake',
'${CMAKE_INSTALL_PREFIX})',
'${CMAKE_INSTALL_PREFIX} --extra-cflags=-mdynamic-no-pic)'
diff --git a/Library/Formula/bind.rb b/Library/Formula/bind.rb
index 1d27a8107..3a2f89916 100644
--- a/Library/Formula/bind.rb
+++ b/Library/Formula/bind.rb
@@ -6,7 +6,7 @@ class Bind < Formula
version '9.9.1-p2'
sha1 '449b12c32682b5bef64c7b53cd0fc0c6b731c8a7'
- depends_on "openssl" if MacOS.leopard?
+ depends_on "openssl" if MacOS.version == :leopard
def install
ENV.libxml2
@@ -23,7 +23,7 @@ class Bind < Formula
# For Xcode-only systems we help a bit to find openssl.
# If CLT.installed?, it evaluates to "/usr", which works.
- args << "--with-openssl=#{MacOS.sdk_path.to_s}/usr" unless MacOS.leopard?
+ args << "--with-openssl=#{MacOS.sdk_path.to_s}/usr" unless MacOS.version == :leopard
system "./configure", *args
diff --git a/Library/Formula/cairo.rb b/Library/Formula/cairo.rb
index da8acab3f..b5b8d6ee8 100644
--- a/Library/Formula/cairo.rb
+++ b/Library/Formula/cairo.rb
@@ -29,7 +29,7 @@ class Cairo < Formula
]
args << '--with-x' unless build.include? 'without-x'
- args << '--enable-xcb=no' if MacOS.leopard?
+ args << '--enable-xcb=no' if MacOS.version == :leopard
system "./configure", *args
system "make install"
diff --git a/Library/Formula/clisp.rb b/Library/Formula/clisp.rb
index b106fb2a3..a36afb629 100644
--- a/Library/Formula/clisp.rb
+++ b/Library/Formula/clisp.rb
@@ -42,7 +42,7 @@ class Clisp < Formula
# The ulimit must be set, otherwise `make` will fail and tell you to do so
system "ulimit -s 16384 && make"
- if MacOS.lion?
+ if MacOS.version >= :lion
opoo "`make check` fails on Lion, so we are skipping it."
puts "But it probably means there will be other issues too."
puts "Please take them upstream to the clisp project itself."
diff --git a/Library/Formula/collectd.rb b/Library/Formula/collectd.rb
index e8a13c5cc..ba3b76373 100644
--- a/Library/Formula/collectd.rb
+++ b/Library/Formula/collectd.rb
@@ -27,7 +27,7 @@ class Collectd < Formula
--localstatedir=#{var}
--with-python=/usr/bin]
- args << "--disable-embedded-perl" if MacOS.leopard?
+ args << "--disable-embedded-perl" if MacOS.version == :leopard
system "./configure", *args
system "make install"
diff --git a/Library/Formula/couchdb.rb b/Library/Formula/couchdb.rb
index 3f0b3b302..a2963970e 100644
--- a/Library/Formula/couchdb.rb
+++ b/Library/Formula/couchdb.rb
@@ -11,7 +11,7 @@ class Couchdb < Formula
depends_on 'spidermonkey'
depends_on 'icu4c'
depends_on 'erlang'
- depends_on 'curl' if MacOS.leopard?
+ depends_on 'curl' if MacOS.version == :leopard
def install
system "./bootstrap" if File.exists? "bootstrap"
diff --git a/Library/Formula/disco.rb b/Library/Formula/disco.rb
index 5fcf969b7..3f2b6529d 100644
--- a/Library/Formula/disco.rb
+++ b/Library/Formula/disco.rb
@@ -9,7 +9,7 @@ class Disco < Formula
head 'https://github.com/tuulos/disco.git'
depends_on 'erlang'
- depends_on 'simplejson' => :python if MacOS.leopard?
+ depends_on 'simplejson' => :python if MacOS.version == :leopard
depends_on 'libcmph'
def install
diff --git a/Library/Formula/e2fsprogs.rb b/Library/Formula/e2fsprogs.rb
index c069be8c1..8a426602e 100644
--- a/Library/Formula/e2fsprogs.rb
+++ b/Library/Formula/e2fsprogs.rb
@@ -18,7 +18,7 @@ class E2fsprogs < Formula
]}
# MacPorts patch to allow compilation on Leopard.
- if MacOS.leopard?
+ if MacOS.version == :leopard
p[:p0] << "https://trac.macports.org/export/92117/trunk/dports/sysutils/e2fsprogs/files/patch-lib-ext2fs-inline.c.diff"
end
diff --git a/Library/Formula/ejabberd.rb b/Library/Formula/ejabberd.rb
index ec4cff17b..981c9dc17 100644
--- a/Library/Formula/ejabberd.rb
+++ b/Library/Formula/ejabberd.rb
@@ -5,7 +5,7 @@ class Ejabberd < Formula
url "http://www.process-one.net/downloads/ejabberd/2.1.11/ejabberd-2.1.11.tgz"
sha1 'ae2c521d5e93fbd5bc826052c5524b5222dcfae6'
- depends_on "openssl" if MacOS.leopard?
+ depends_on "openssl" if MacOS.version == :leopard
depends_on "erlang"
option "32-bit"
@@ -28,7 +28,7 @@ class Ejabberd < Formula
"--sysconfdir=#{etc}",
"--localstatedir=#{var}"]
- if MacOS.leopard?
+ if MacOS.version == :leopard
openssl = Formula.factory('openssl')
args << "--with-openssl=#{openssl.prefix}"
end
diff --git a/Library/Formula/erlang.rb b/Library/Formula/erlang.rb
index 6ebfc5ebc..8f9c90b7b 100644
--- a/Library/Formula/erlang.rb
+++ b/Library/Formula/erlang.rb
@@ -76,7 +76,7 @@ class Erlang < Formula
"--enable-shared-zlib",
"--enable-smp-support"]
- args << "--with-dynamic-trace=dtrace" unless MacOS.leopard?
+ args << "--with-dynamic-trace=dtrace" unless MacOS.version == :leopard
unless build.include? 'disable-hipe'
# HIPE doesn't strike me as that reliable on OS X
diff --git a/Library/Formula/ffmbc.rb b/Library/Formula/ffmbc.rb
index 54f8dfab6..4b086a875 100644
--- a/Library/Formula/ffmbc.rb
+++ b/Library/Formula/ffmbc.rb
@@ -17,7 +17,7 @@ class Ffmbc < Formula
option "with-libvpx", "Enable VP8 video format"
# manpages won't be built without texi2html
- depends_on 'texi2html' => :build if MacOS.mountain_lion?
+ depends_on 'texi2html' => :build if MacOS.version >= :mountain_lion
depends_on 'yasm' => :build
depends_on 'x264' unless build.include? 'without-x264'
diff --git a/Library/Formula/ffmpeg.rb b/Library/Formula/ffmpeg.rb
index 9470c7975..90bb53590 100644
--- a/Library/Formula/ffmpeg.rb
+++ b/Library/Formula/ffmpeg.rb
@@ -26,7 +26,7 @@ class Ffmpeg < Formula
option 'with-tools', 'Enable additional FFmpeg tools'
# manpages won't be built without texi2html
- depends_on 'texi2html' => :build if MacOS.mountain_lion?
+ depends_on 'texi2html' => :build if MacOS.version >= :mountain_lion
depends_on 'yasm' => :build
depends_on 'x264' unless build.include? 'without-x264'
@@ -79,7 +79,7 @@ class Ffmpeg < Formula
# For 32-bit compilation under gcc 4.2, see:
# http://trac.macports.org/ticket/20938#comment:22
- ENV.append_to_cflags "-mdynamic-no-pic" if MacOS.leopard? or Hardware.is_32_bit?
+ ENV.append_to_cflags "-mdynamic-no-pic" if MacOS.version == :leopard or Hardware.is_32_bit?
system "./configure", *args
diff --git a/Library/Formula/fontforge.rb b/Library/Formula/fontforge.rb
index 671425842..9cc5f093c 100644
--- a/Library/Formula/fontforge.rb
+++ b/Library/Formula/fontforge.rb
@@ -31,7 +31,7 @@ class Fontforge < Formula
# MACOSX_DEPLOYMENT_TARGET fixes ensuing Python 10.7 vs 10.8 clash.
# Discussed: https://github.com/mxcl/homebrew/pull/14097
# Reported: Not yet.
- if MacOS.mountain_lion?
+ if MacOS.version >= :mountain_lion
ENV.macosxsdk("10.7")
ENV.append "CFLAGS", "-isysroot #{MacOS.sdk_path(10.7)}"
ENV["MACOSX_DEPLOYMENT_TARGET"] = "10.8"
diff --git a/Library/Formula/ghc.rb b/Library/Formula/ghc.rb
index 42a301f2e..04bbb02ef 100644
--- a/Library/Formula/ghc.rb
+++ b/Library/Formula/ghc.rb
@@ -2,7 +2,7 @@ require 'formula'
class NeedsSnowLeopard < Requirement
def satisfied?
- MacOS.snow_leopard?
+ MacOS.version >= :snow_leopard
end
def message; <<-EOS.undent
diff --git a/Library/Formula/git.rb b/Library/Formula/git.rb
index d1e1b13b6..bd78b5fe8 100644
--- a/Library/Formula/git.rb
+++ b/Library/Formula/git.rb
@@ -33,7 +33,7 @@ class Git < Formula
ENV['PYTHON_PATH'] = which 'python' # python can be brewed or unbrewed
# Clean XCode 4.x installs don't include Perl MakeMaker
- ENV['NO_PERL_MAKEMAKER'] = '1' if MacOS.lion?
+ ENV['NO_PERL_MAKEMAKER'] = '1' if MacOS.version >= :lion
ENV['BLK_SHA1'] = '1' if build.include? 'with-blk-sha1'
diff --git a/Library/Formula/gnunet.rb b/Library/Formula/gnunet.rb
index 4934963f3..08cf0914e 100644
--- a/Library/Formula/gnunet.rb
+++ b/Library/Formula/gnunet.rb
@@ -8,7 +8,7 @@ class Gnunet < Formula
depends_on 'libgcrypt'
depends_on 'libextractor'
- depends_on 'curl' unless MacOS.lion? # needs >= v7.20.1
+ depends_on 'curl' if MacOS.version < :lion # needs >= v7.20.1
def install
system "./configure", "--disable-debug",
diff --git a/Library/Formula/google-js-test.rb b/Library/Formula/google-js-test.rb
index af44f9b0c..5329f01ec 100644
--- a/Library/Formula/google-js-test.rb
+++ b/Library/Formula/google-js-test.rb
@@ -6,7 +6,7 @@ class NeedsSnowLeopard < Requirement
end
def satisfied?
- MacOS.snow_leopard?
+ MacOS.version >= :snow_leopard
end
end
diff --git a/Library/Formula/graphicsmagick.rb b/Library/Formula/graphicsmagick.rb
index b5cdd6c2a..6067635bc 100644
--- a/Library/Formula/graphicsmagick.rb
+++ b/Library/Formula/graphicsmagick.rb
@@ -56,7 +56,7 @@ class Graphicsmagick < Formula
"--prefix=#{prefix}",
"--enable-shared", "--disable-static"]
args << "--without-magick-plus-plus" if build.include? 'without-magick-plus-plus'
- args << "--disable-openmp" if MacOS.leopard? or ENV.compiler == :clang # libgomp unavailable
+ args << "--disable-openmp" if MacOS.version == :leopard or ENV.compiler == :clang # libgomp unavailable
args << "--with-gslib" if ghostscript_srsly?
args << "--with-gs-font-dir=#{HOMEBREW_PREFIX}/share/ghostscript/fonts" \
unless ghostscript_fonts?
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}"
diff --git a/Library/Formula/imap-uw.rb b/Library/Formula/imap-uw.rb
index 65a400b3d..a74723a3f 100644
--- a/Library/Formula/imap-uw.rb
+++ b/Library/Formula/imap-uw.rb
@@ -6,7 +6,7 @@ class ImapUw < Formula
sha1 '7a82ebd5aae57a5dede96ac4923b63f850ff4fa7'
def patches
- if MacOS.snow_leopard?
+ if MacOS.version >= :snow_leopard
{ :p0 =>
'https://trac.macports.org/export/63088/trunk/dports/mail/imap-uw/files/patch-snowleopard.diff'
}
diff --git a/Library/Formula/iodine.rb b/Library/Formula/iodine.rb
index f331d7baf..426753b1c 100644
--- a/Library/Formula/iodine.rb
+++ b/Library/Formula/iodine.rb
@@ -6,7 +6,7 @@ class Iodine < Formula
sha1 '4fa9a248b8a84df8a727a5d749e669e58136edca'
def install
- unless MacOS.leopard?
+ unless MacOS.version == :leopard
inreplace ["src/common.c", "src/dns.c", "src/iodine.c", "src/iodined.c"],
"arpa/nameser8_compat", "arpa/nameser_compat"
end
diff --git a/Library/Formula/jstalk.rb b/Library/Formula/jstalk.rb
index 3a0ab01fb..ac31ad240 100644
--- a/Library/Formula/jstalk.rb
+++ b/Library/Formula/jstalk.rb
@@ -2,7 +2,7 @@ require 'formula'
class NeedsSnowLeopard < Requirement
def satisfied?
- MacOS.snow_leopard?
+ MacOS.version >= :snow_leopard
end
def message
diff --git a/Library/Formula/lftp.rb b/Library/Formula/lftp.rb
index cc460f859..40b39c1f5 100644
--- a/Library/Formula/lftp.rb
+++ b/Library/Formula/lftp.rb
@@ -11,7 +11,7 @@ class Lftp < Formula
def install
# Bus error
- ENV.no_optimization if MacOS.leopard?
+ ENV.no_optimization if MacOS.version == :leopard
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
system "make install"
diff --git a/Library/Formula/libagg.rb b/Library/Formula/libagg.rb
index cc58b2b68..6b952173c 100644
--- a/Library/Formula/libagg.rb
+++ b/Library/Formula/libagg.rb
@@ -11,7 +11,7 @@ class Libagg < Formula
depends_on 'pkg-config' => :build
depends_on 'sdl'
depends_on :freetype => :optional if build.include? "with-freetype"
- depends_on :libtool unless MacOS.mountain_lion?
+ depends_on :libtool unless MacOS.version >= :mountain_lion
fails_with :clang do
build 421
diff --git a/Library/Formula/libmemcached.rb b/Library/Formula/libmemcached.rb
index 77a9bfd59..9d83e2fce 100644
--- a/Library/Formula/libmemcached.rb
+++ b/Library/Formula/libmemcached.rb
@@ -8,7 +8,7 @@ class Libmemcached < Formula
depends_on 'memcached'
def install
- ENV.append_to_cflags "-undefined dynamic_lookup" if MacOS.leopard?
+ ENV.append_to_cflags "-undefined dynamic_lookup" if MacOS.version == :leopard
system "./configure", "--prefix=#{prefix}"
system "make install"
diff --git a/Library/Formula/libmms.rb b/Library/Formula/libmms.rb
index aa9095a7a..0a9755368 100644
--- a/Library/Formula/libmms.rb
+++ b/Library/Formula/libmms.rb
@@ -10,7 +10,7 @@ class Libmms < Formula
def patches
# see https://trac.macports.org/ticket/27988
- if MacOS.leopard?
+ if MacOS.version == :leopard
{ :p0 => "https://trac.macports.org/export/87883/trunk/dports/multimedia/libmms/files/src_mms-common.h.patch" }
end
end
diff --git a/Library/Formula/librasterlite.rb b/Library/Formula/librasterlite.rb
index 5ee4fbb0c..7ba176b78 100644
--- a/Library/Formula/librasterlite.rb
+++ b/Library/Formula/librasterlite.rb
@@ -5,7 +5,7 @@ class Librasterlite < Formula
url 'http://www.gaia-gis.it/gaia-sins/librasterlite-sources/librasterlite-1.1c.tar.gz'
sha1 'c54f38ef2974bc92410e2c2196088af14bd9c21a'
- depends_on "pkg-config" => :build unless MacOS.mountain_lion?
+ depends_on "pkg-config" => :build unless MacOS.version >= :mountain_lion
depends_on :libpng
depends_on "libgeotiff"
depends_on "libspatialite"
diff --git a/Library/Formula/librets.rb b/Library/Formula/librets.rb
index 01ff50a84..f184acb36 100644
--- a/Library/Formula/librets.rb
+++ b/Library/Formula/librets.rb
@@ -6,7 +6,7 @@ class Librets < Formula
sha1 '2de4d9e9cb26533eb0a9a090b3354a70ed3c41ec'
depends_on 'boost'
- depends_on 'swig' if MacOS.lion?
+ depends_on 'swig' if MacOS.version >= :lion
def install
system "./configure", "--disable-debug",
diff --git a/Library/Formula/libvirt.rb b/Library/Formula/libvirt.rb
index fec1a445d..05f28ed57 100644
--- a/Library/Formula/libvirt.rb
+++ b/Library/Formula/libvirt.rb
@@ -16,7 +16,7 @@ class Libvirt < Formula
depends_on "gnutls"
depends_on "yajl"
- if MacOS.leopard?
+ if MacOS.version == :leopard
# Definitely needed on Leopard, but not on Snow Leopard.
depends_on "readline"
depends_on "libxml2"
diff --git a/Library/Formula/libxml++.rb b/Library/Formula/libxml++.rb
index 058fd5418..dd63db58e 100644
--- a/Library/Formula/libxml++.rb
+++ b/Library/Formula/libxml++.rb
@@ -7,7 +7,7 @@ class Libxmlxx < Formula
depends_on 'glibmm'
# LibXML++ can't compile agains the version of LibXML shipped with Leopard
- depends_on 'libxml2' if MacOS.leopard?
+ depends_on 'libxml2' if MacOS.version == :leopard
def install
system "./configure", "--disable-dependency-tracking",
diff --git a/Library/Formula/macvim.rb b/Library/Formula/macvim.rb
index d442adc06..fa5a94960 100644
--- a/Library/Formula/macvim.rb
+++ b/Library/Formula/macvim.rb
@@ -25,7 +25,7 @@ class Macvim < Formula
# If building for 10.8, make sure that CC is set to "clang".
# Reference: https://github.com/b4winckler/macvim/wiki/building
- ENV['CC'] = "clang" if MacOS.mountain_lion?
+ ENV['CC'] = "clang" if MacOS.version >= :mountain_lion
args = %W[
--with-features=huge
diff --git a/Library/Formula/mapserver.rb b/Library/Formula/mapserver.rb
index e17a48d1e..edbc1f345 100644
--- a/Library/Formula/mapserver.rb
+++ b/Library/Formula/mapserver.rb
@@ -18,7 +18,7 @@ class Mapserver < Formula
depends_on 'gdal'
depends_on 'geos' if build.include? 'with-geos'
- depends_on 'postgresql' if build.include? 'with-postgresql' and not MacOS.lion?
+ depends_on 'postgresql' if build.include? 'with-postgresql' and not MacOS.version >= :lion
depends_on 'fcgi' if build.include? 'with-fastcgi'
def patches
@@ -41,7 +41,7 @@ class Mapserver < Formula
args << "--with-php=/usr/include/php" if build.include? 'with-php'
if build.include? 'with-postgresql'
- if MacOS.lion? # Lion ships with PostgreSQL libs
+ if MacOS.version >= :lion # Lion ships with PostgreSQL libs
args << "--with-postgis"
else
args << "--with-postgis=#{HOMEBREW_PREFIX}/bin/pg_config"
diff --git a/Library/Formula/md.rb b/Library/Formula/md.rb
index e113b1504..fdd757985 100644
--- a/Library/Formula/md.rb
+++ b/Library/Formula/md.rb
@@ -6,7 +6,7 @@ class Md < Formula
sha1 '0128de65a4da2ef9655f3b1e6a94d2f8ae292414'
# OS X up to and including Lion 10.7 includes 'md'
- keg_only :provided_by_osx unless MacOS.mountain_lion?
+ keg_only :provided_by_osx unless MacOS.version >= :mountain_lion
def install
cd 'md' do
diff --git a/Library/Formula/mpd.rb b/Library/Formula/mpd.rb
index d347376d3..29db0e828 100644
--- a/Library/Formula/mpd.rb
+++ b/Library/Formula/mpd.rb
@@ -36,7 +36,7 @@ class Mpd < Formula
"--enable-fluidsynth",
"--enable-zip",
"--enable-lame-encoder"]
- args << "--disable-curl" if MacOS.leopard?
+ args << "--disable-curl" if MacOS.version == :leopard
args << "--enable-lastfm" if build.include?("lastfm")
system "./configure", *args
diff --git a/Library/Formula/mysql.rb b/Library/Formula/mysql.rb
index 1788d2a44..d094422ef 100644
--- a/Library/Formula/mysql.rb
+++ b/Library/Formula/mysql.rb
@@ -13,7 +13,7 @@ class Mysql < Formula
end
depends_on 'cmake' => :build
- depends_on 'pidof' unless MacOS.mountain_lion?
+ depends_on 'pidof' unless MacOS.version >= :mountain_lion
option :universal
option 'with-tests', 'Build with unit tests'
@@ -99,7 +99,7 @@ class Mysql < Formula
inreplace "#{prefix}/support-files/mysql.server" do |s|
s.gsub!(/^(PATH=".*)(")/, "\\1:#{HOMEBREW_PREFIX}/bin\\2")
# pidof can be replaced with pgrep from proctools on Mountain Lion
- s.gsub!(/pidof/, 'pgrep') if MacOS.mountain_lion?
+ s.gsub!(/pidof/, 'pgrep') if MacOS.version >= :mountain_lion
end
ln_s "#{prefix}/support-files/mysql.server", bin
end
diff --git a/Library/Formula/nmap.rb b/Library/Formula/nmap.rb
index 158374b2a..6f9e0a36c 100644
--- a/Library/Formula/nmap.rb
+++ b/Library/Formula/nmap.rb
@@ -8,7 +8,7 @@ class Nmap < Formula
head 'https://guest:@svn.nmap.org/nmap/', :using => :svn
# Leopard's version of OpenSSL isn't new enough
- depends_on "openssl" if MacOS.leopard?
+ depends_on "openssl" if MacOS.version == :leopard
fails_with :llvm do
build 2334
@@ -23,7 +23,7 @@ class Nmap < Formula
--without-zenmap
--disable-universal]
- if MacOS.leopard?
+ if MacOS.version == :leopard
openssl = Formula.factory('openssl')
args << "--with-openssl=#{openssl.prefix}"
end
diff --git a/Library/Formula/node.rb b/Library/Formula/node.rb
index d8689eeaa..e522ad021 100644
--- a/Library/Formula/node.rb
+++ b/Library/Formula/node.rb
@@ -50,7 +50,7 @@ class Node < Formula
head 'https://github.com/joyent/node.git'
# Leopard OpenSSL is not new enough, so use our keg-only one
- depends_on 'openssl' if MacOS.leopard?
+ depends_on 'openssl' if MacOS.version == :leopard
depends_on NpmNotInstalled.new unless build.include? 'without-npm'
depends_on PythonVersion.new
diff --git a/Library/Formula/nspr.rb b/Library/Formula/nspr.rb
index 9c2b820a7..30972ec28 100644
--- a/Library/Formula/nspr.rb
+++ b/Library/Formula/nspr.rb
@@ -10,7 +10,7 @@ class Nspr < Formula
cd "mozilla/nsprpub" do
# Fixes a bug with linking against CoreFoundation, needed to work with SpiderMonkey
# See: http://openradar.appspot.com/7209349
- target_frameworks = (Hardware.is_32_bit? or MacOS.leopard?) ? "-framework Carbon" : ""
+ target_frameworks = (Hardware.is_32_bit? or MacOS.version == :leopard) ? "-framework Carbon" : ""
inreplace "pr/src/Makefile.in", "-framework CoreServices -framework CoreFoundation", target_frameworks
args = ["--prefix=#{prefix}", "--disable-debug", "--enable-strip", "--enable-optimize"]
diff --git a/Library/Formula/nu.rb b/Library/Formula/nu.rb
index 2a30da9df..20f0eadb3 100644
--- a/Library/Formula/nu.rb
+++ b/Library/Formula/nu.rb
@@ -2,7 +2,7 @@ require 'formula'
class NeedsLion < Requirement
def satisfied?
- MacOS.lion?
+ MacOS.version >= :lion
end
def message
"Nu requires Mac OS X 10.7 or newer"
diff --git a/Library/Formula/octave.rb b/Library/Formula/octave.rb
index ab7b7c875..b4d38fea6 100644
--- a/Library/Formula/octave.rb
+++ b/Library/Formula/octave.rb
@@ -1,6 +1,9 @@
require 'formula'
-def snow_leopard_64?
+# Leading underscore because this method is defined differently
+# in compat, and anything that loads this file would end up with
+# this definition instead!
+def _snow_leopard_64?
# 64 bit builds on 10.6 require some special handling.
MacOS.version == :snow_leopard and MacOS.prefer_64_bit?
end
@@ -28,10 +31,10 @@ class Octave < Formula
# http://www.macresearch.org/lapackblas-fortran-106
#
# We can work around the issues using dotwrp.
- depends_on 'dotwrp' if snow_leopard_64?
+ depends_on 'dotwrp' if _snow_leopard_64?
# octave refuses to work with BSD readline, so it's either this or --disable-readline
depends_on 'readline'
- depends_on 'curl' if MacOS.leopard? # Leopard's libcurl is too old
+ depends_on 'curl' if MacOS.version == :leopard # Leopard's libcurl is too old
# additional features
depends_on 'suite-sparse'
@@ -63,11 +66,11 @@ class Octave < Formula
"--prefix=#{prefix}",
# Cant use `-framework Accelerate` because `mkoctfile`, the tool used to
# compile extension packages, can't parse `-framework` flags.
- "--with-blas=#{'-ldotwrp ' if snow_leopard_64?}-Wl,-framework -Wl,Accelerate",
+ "--with-blas=#{'-ldotwrp ' if _snow_leopard_64?}-Wl,-framework -Wl,Accelerate",
# SuiteSparse-4.x.x fix, see http://savannah.gnu.org/bugs/?37031
"--with-umfpack=-lumfpack -lsuitesparseconfig",
]
- args << "--without-framework-carbon" if MacOS.lion?
+ args << "--without-framework-carbon" if MacOS.version >= :lion
# avoid spurious 'invalid assignment to cs-list' erorrs on 32 bit installs:
args << 'CXXFLAGS=-O0' unless MacOS.prefer_64_bit?
diff --git a/Library/Formula/open-scene-graph.rb b/Library/Formula/open-scene-graph.rb
index 585290765..e60597b71 100644
--- a/Library/Formula/open-scene-graph.rb
+++ b/Library/Formula/open-scene-graph.rb
@@ -41,7 +41,7 @@ class OpenSceneGraph < Formula
args = std_cmake_args
args << '-DBUILD_DOCUMENTATION=' + ((build.include? 'docs') ? 'ON' : 'OFF')
- if snow_leopard_64?
+ if MacOS.prefer_64_bit?
args << "-DCMAKE_OSX_ARCHITECTURES=x86_64"
args << "-DOSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX=imageio"
args << "-DOSG_WINDOWING_SYSTEM=Cocoa"
diff --git a/Library/Formula/opencolorio.rb b/Library/Formula/opencolorio.rb
index f7ffa2e69..c62f027a2 100644
--- a/Library/Formula/opencolorio.rb
+++ b/Library/Formula/opencolorio.rb
@@ -36,7 +36,7 @@ class Opencolorio < Formula
# /usr/include
# So we just set the sysroot to /
- args << "-DCMAKE_OSX_SYSROOT=/" if ENV.compiler == :llvm and MacOS.lion?
+ args << "-DCMAKE_OSX_SYSROOT=/" if ENV.compiler == :llvm and MacOS.version >= :lion
diff --git a/Library/Formula/phantomjs.rb b/Library/Formula/phantomjs.rb
index 9a30857cf..565de7b90 100644
--- a/Library/Formula/phantomjs.rb
+++ b/Library/Formula/phantomjs.rb
@@ -2,7 +2,7 @@ require 'formula'
class SnowLeopardOrNewer < Requirement
def satisfied?
- MacOS.snow_leopard?
+ MacOS.version >= :snow_leopard
end
def message
diff --git a/Library/Formula/portaudio.rb b/Library/Formula/portaudio.rb
index 250ee5721..292b66b61 100644
--- a/Library/Formula/portaudio.rb
+++ b/Library/Formula/portaudio.rb
@@ -18,7 +18,7 @@ class Portaudio < Formula
{ :p0 =>
"https://trac.macports.org/export/94150/trunk/dports/audio/portaudio/files/patch-include__pa_mac_core.h.diff"
}
- end if MacOS.lion?
+ end if MacOS.version >= :lion
def install
ENV.universal_binary if build.universal?
diff --git a/Library/Formula/postgresql.rb b/Library/Formula/postgresql.rb
index 4c846a2bf..27f96c464 100644
--- a/Library/Formula/postgresql.rb
+++ b/Library/Formula/postgresql.rb
@@ -6,7 +6,7 @@ class Postgresql < Formula
sha1 '8411f39e7cff8d691d908de7823b72426433faa2'
depends_on 'readline'
- depends_on 'libxml2' if MacOS.leopard? # Leopard libxml is too old
+ depends_on 'libxml2' if MacOS.version == :leopard # Leopard libxml is too old
depends_on 'ossp-uuid' unless build.include? 'without-ossp-uuid'
option '32-bit'
@@ -24,7 +24,7 @@ class Postgresql < Formula
end
def install
- ENV.libxml2 if MacOS.snow_leopard?
+ ENV.libxml2 if MacOS.version >= :snow_leopard
args = ["--disable-debug",
"--prefix=#{prefix}",
diff --git a/Library/Formula/povray.rb b/Library/Formula/povray.rb
index e88718db1..961e66b8e 100644
--- a/Library/Formula/povray.rb
+++ b/Library/Formula/povray.rb
@@ -11,7 +11,7 @@ class Povray < Formula
# TODO give this a build number (2326?)
fails_with :llvm do
cause "povray fails with 'terminate called after throwing an instance of int'"
- end if MacOS.leopard?
+ end if MacOS.version == :leopard
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
diff --git a/Library/Formula/qt.rb b/Library/Formula/qt.rb
index 241409e81..1c18c8c0d 100644
--- a/Library/Formula/qt.rb
+++ b/Library/Formula/qt.rb
@@ -22,7 +22,7 @@ class Qt < Formula
option 'developer', 'Compile and link Qt with developer options'
depends_on "d-bus" if build.include? 'with-qtdbus'
- depends_on 'sqlite' if MacOS.leopard?
+ depends_on 'sqlite' if MacOS.version == :leopard
fails_with :clang do
build 421
@@ -31,11 +31,11 @@ class Qt < Formula
def patches
# fixes conflict on osx 10.5. See qt bug:
# https://bugreports.qt-project.org/browse/QTBUG-23258
- if MacOS.leopard?
+ if MacOS.version == :leopard
"http://bugreports.qt-project.org/secure/attachment/26712/Patch-Qt-4.8-for-10.5"
# add support for Mountain Lion
# should be unneeded for 4.8.3
- elsif MacOS.mountain_lion?
+ elsif MacOS.version >= :mountain_lion
[ "https://qt.gitorious.org/qt/qt/commit/422f1b?format=patch",
"https://qt.gitorious.org/qt/qt/commit/665355?format=patch",
"https://raw.github.com/gist/3187034/893252db0ae3bb9bb5fa3ff7c530c7978399b101/0001-Fix-WebKit-on-OS-X-Mountain-Lion.patch" ]
@@ -46,7 +46,7 @@ class Qt < Formula
def install
# Apply binary git patch; normal patch ignores this.
# TODO: Autodetect binary patches and apply them correctly.
- system "git apply --exclude=*/QtWebKit.pro 002-homebrew.diff" if MacOS.mountain_lion?
+ system "git apply --exclude=*/QtWebKit.pro 002-homebrew.diff" if MacOS.version >= :mountain_lion
ENV.append "CXXFLAGS", "-fvisibility=hidden"
args = ["-prefix", prefix,
@@ -55,7 +55,7 @@ class Qt < Formula
"-cocoa", "-fast" ]
# See: https://github.com/mxcl/homebrew/issues/issue/744
- args << "-system-sqlite" if MacOS.leopard?
+ args << "-system-sqlite" if MacOS.version == :leopard
args << "-plugin-sql-mysql" if (HOMEBREW_CELLAR+"mysql").directory?
diff --git a/Library/Formula/rabbitmq.rb b/Library/Formula/rabbitmq.rb
index 54c34a6f8..ab341f364 100644
--- a/Library/Formula/rabbitmq.rb
+++ b/Library/Formula/rabbitmq.rb
@@ -6,7 +6,7 @@ class Rabbitmq < Formula
sha1 '50ad453ae6a293c7b314dd2dd24a29648f1acc11'
depends_on 'erlang'
- depends_on 'simplejson' => :python if MacOS.leopard?
+ depends_on 'simplejson' => :python if MacOS.version == :leopard
def install
# Install the base files
diff --git a/Library/Formula/recode.rb b/Library/Formula/recode.rb
index 9e1d13f79..bcf52e35b 100644
--- a/Library/Formula/recode.rb
+++ b/Library/Formula/recode.rb
@@ -19,7 +19,7 @@ class Recode < Formula
s = Formula.factory('libtool').share
d = "#{s}/libtool/config"
cp ["#{d}/config.guess", "#{d}/config.sub"], "."
- elsif MacOS.leopard?
+ elsif MacOS.version == :leopard
cp Dir["#{MacOS::Xcode.prefix}/usr/share/libtool/config.*"], "."
else
cp Dir["#{MacOS::Xcode.prefix}/usr/share/libtool/config/config.*"], "."
diff --git a/Library/Formula/rtmpdump.rb b/Library/Formula/rtmpdump.rb
index c4365755b..3a10345a1 100644
--- a/Library/Formula/rtmpdump.rb
+++ b/Library/Formula/rtmpdump.rb
@@ -7,7 +7,7 @@ class Rtmpdump < Formula
head 'git://git.ffmpeg.org/rtmpdump'
- depends_on 'openssl' if MacOS.leopard?
+ depends_on 'openssl' if MacOS.version == :leopard
fails_with :llvm do
build '2336'
diff --git a/Library/Formula/rtorrent.rb b/Library/Formula/rtorrent.rb
index 3a12cae33..62150e19e 100644
--- a/Library/Formula/rtorrent.rb
+++ b/Library/Formula/rtorrent.rb
@@ -13,7 +13,7 @@ class Rtorrent < Formula
def install
args = ["--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}"]
args << "--with-xmlrpc-c" if Formula.factory("xmlrpc-c").installed?
- if MacOS.leopard?
+ if MacOS.version == :leopard
inreplace 'configure' do |s|
s.gsub! ' pkg_cv_libcurl_LIBS=`$PKG_CONFIG --libs "libcurl >= 7.15.4" 2>/dev/null`',
' pkg_cv_libcurl_LIBS=`$PKG_CONFIG --libs "libcurl >= 7.15.4" | sed -e "s/-arch [^-]*/-arch $(uname -m) /" 2>/dev/null`'
diff --git a/Library/Formula/sdl.rb b/Library/Formula/sdl.rb
index 02d423d52..195e981c3 100644
--- a/Library/Formula/sdl.rb
+++ b/Library/Formula/sdl.rb
@@ -25,7 +25,7 @@ class Sdl < Formula
system "./autogen.sh" if build.head?
args = %W[--prefix=#{prefix}]
- args << "--disable-nasm" unless MacOS.mountain_lion? # might work with earlier, might only work with new clang
+ args << "--disable-nasm" unless MacOS.version >= :mountain_lion # might work with earlier, might only work with new clang
# LLVM-based compilers choke on the assembly code packaged with SDL.
args << '--disable-assembly' if ENV.compiler == :llvm or ENV.compiler == :clang and MacOS.clang_build_version < 421
args << '--without-x'
diff --git a/Library/Formula/spidermonkey.rb b/Library/Formula/spidermonkey.rb
index 1c22628b3..847d42e5b 100644
--- a/Library/Formula/spidermonkey.rb
+++ b/Library/Formula/spidermonkey.rb
@@ -24,7 +24,7 @@ class Spidermonkey < Formula
def install
# aparently this flag causes the build to fail for ivanvc on 10.5 with a
# penryn (core 2 duo) CPU. So lets be cautious here and remove it.
- ENV['CFLAGS'] = ENV['CFLAGS'].gsub(/-msse[^\s]+/, '') if MacOS.leopard?
+ ENV['CFLAGS'] = ENV['CFLAGS'].gsub(/-msse[^\s]+/, '') if MacOS.version == :leopard
# For some reason SpiderMonkey requires Autoconf-2.13
ac213_prefix = buildpath/'ac213'
diff --git a/Library/Formula/stormfs.rb b/Library/Formula/stormfs.rb
index 8a57a605e..71dfe2e02 100644
--- a/Library/Formula/stormfs.rb
+++ b/Library/Formula/stormfs.rb
@@ -8,7 +8,7 @@ class Stormfs < Formula
depends_on 'pkg-config' => :build
depends_on 'glib'
depends_on 'fuse4x'
- depends_on 'curl' if MacOS.leopard?
+ depends_on 'curl' if MacOS.version == :leopard
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
diff --git a/Library/Formula/subversion.rb b/Library/Formula/subversion.rb
index 63db26768..ff649a10b 100644
--- a/Library/Formula/subversion.rb
+++ b/Library/Formula/subversion.rb
@@ -165,7 +165,7 @@ class Subversion < Formula
# Remove hard-coded ppc target, add appropriate ones
if build.universal?
arches = "-arch x86_64 -arch i386"
- elsif MacOS.leopard?
+ elsif MacOS.version == :leopard
arches = "-arch i386"
else
arches = "-arch x86_64"
diff --git a/Library/Formula/swi-prolog.rb b/Library/Formula/swi-prolog.rb
index 84352e031..6f96b1cc0 100644
--- a/Library/Formula/swi-prolog.rb
+++ b/Library/Formula/swi-prolog.rb
@@ -21,7 +21,7 @@ class SwiProlog < Formula
end
# 10.5 versions of these are too old
- if MacOS.leopard?
+ if MacOS.version == :leopard
depends_on 'fontconfig'
depends_on 'expat'
end
diff --git a/Library/Formula/tcpflow.rb b/Library/Formula/tcpflow.rb
index 8f9b221d0..d5de90da3 100644
--- a/Library/Formula/tcpflow.rb
+++ b/Library/Formula/tcpflow.rb
@@ -12,7 +12,7 @@ class Tcpflow < Formula
s = Formula.factory('libtool').share
d = "#{s}/libtool/config"
cp ["#{d}/config.guess", "#{d}/config.sub"], "."
- elsif MacOS.leopard?
+ elsif MacOS.version == :leopard
cp Dir["#{MacOS::Xcode.prefix}/usr/share/libtool/config.*"], "."
else
cp Dir["#{MacOS::Xcode.prefix}/usr/share/libtool/config/config.*"], "."
diff --git a/Library/Formula/texi2html.rb b/Library/Formula/texi2html.rb
index 701a9ed42..209baadbe 100644
--- a/Library/Formula/texi2html.rb
+++ b/Library/Formula/texi2html.rb
@@ -5,7 +5,7 @@ class Texi2html < Formula
url 'http://download.savannah.gnu.org/releases/texi2html/texi2html-1.70.tar.gz'
sha1 'b3472fb5ef80824177a56a1a37983c13497b23be'
- keg_only :provided_by_osx unless MacOS.mountain_lion?
+ keg_only :provided_by_osx unless MacOS.version >= :mountain_lion
def install
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}",
diff --git a/Library/Formula/trafshow.rb b/Library/Formula/trafshow.rb
index 6e1f1758c..cf8322cac 100644
--- a/Library/Formula/trafshow.rb
+++ b/Library/Formula/trafshow.rb
@@ -20,7 +20,7 @@ class Trafshow < Formula
s = Formula.factory('libtool').share
d = "#{s}/libtool/config"
cp ["#{d}/config.guess", "#{d}/config.sub"], "."
- elsif MacOS.leopard?
+ elsif MacOS.version == :leopard
cp Dir["#{MacOS::Xcode.prefix}/usr/share/libtool/config.*"], "."
else
cp Dir["#{MacOS::Xcode.prefix}/usr/share/libtool/config/config.*"], "."
diff --git a/Library/Formula/vpnc.rb b/Library/Formula/vpnc.rb
index 380ed1959..78d16a298 100644
--- a/Library/Formula/vpnc.rb
+++ b/Library/Formula/vpnc.rb
@@ -16,7 +16,7 @@ class Vpnc < Formula
# Patch from user @Imagesafari to enable compilation on Lion
def patches
- DATA if MacOS.lion?
+ DATA if MacOS.version >= :lion
end
def install
diff --git a/Library/Formula/wget.rb b/Library/Formula/wget.rb
index 2ad9dba58..f776f20cc 100644
--- a/Library/Formula/wget.rb
+++ b/Library/Formula/wget.rb
@@ -14,7 +14,7 @@ class Wget < Formula
option "enable-iri", "Enable iri support"
option "enable-debug", "Build with debug support"
- depends_on "openssl" if MacOS.leopard?
+ depends_on "openssl" if MacOS.version == :leopard
depends_on "libidn" if build.include? "enable-iri"
if build.head?
diff --git a/Library/Formula/wine.rb b/Library/Formula/wine.rb
index 2a36a67f0..43ce8a8d4 100644
--- a/Library/Formula/wine.rb
+++ b/Library/Formula/wine.rb
@@ -72,7 +72,7 @@ class Wine < Formula
"--with-x",
"--with-coreaudio",
"--with-opengl"]
- args << "--disable-win16" if MacOS.leopard? or ENV.compiler == :clang
+ args << "--disable-win16" if MacOS.version == :leopard or ENV.compiler == :clang
# 64-bit builds of mpg123 are incompatible with 32-bit builds of Wine
args << "--without-mpg123" if Hardware.is_64_bit?
diff --git a/Library/Formula/xmlrpc-c.rb b/Library/Formula/xmlrpc-c.rb
index f7793cd0e..ff1f7e527 100644
--- a/Library/Formula/xmlrpc-c.rb
+++ b/Library/Formula/xmlrpc-c.rb
@@ -9,9 +9,7 @@ class XmlrpcC < Formula
# Backport patch for deprecated curl/types.h include, which is gone on 10.8
# On 10.6 and 10.7 it's empty, so could probably patch unconditionally
# see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636457#10
- if MacOS.mountain_lion?
- DATA
- end
+ DATA if MacOS.version >= :mountain_lion
end
def install
diff --git a/Library/Formula/ykpers.rb b/Library/Formula/ykpers.rb
index 04c813d21..c1d823548 100644
--- a/Library/Formula/ykpers.rb
+++ b/Library/Formula/ykpers.rb
@@ -12,7 +12,7 @@ class Ykpers < Formula
def patches
{:p0 =>
"https://trac.macports.org/export/96037/trunk/dports/security/ykpers/files/patch-pre-Lion-strnlen.diff"
- } unless MacOS.lion?
+ } unless MacOS.version >= :lion
end
def install
diff --git a/Library/Homebrew/compat/compatibility.rb b/Library/Homebrew/compat/compatibility.rb
index aff8e0be9..b6e01b290 100644
--- a/Library/Homebrew/compat/compatibility.rb
+++ b/Library/Homebrew/compat/compatibility.rb
@@ -165,6 +165,7 @@ class FailsWithLLVM
end
end
+# TODO eventually some of these should print deprecation warnings
module MacOS extend self
def xcode_folder
Xcode.folder
diff --git a/Library/Homebrew/macos.rb b/Library/Homebrew/macos.rb
index a58f980b0..e186760b3 100644
--- a/Library/Homebrew/macos.rb
+++ b/Library/Homebrew/macos.rb
@@ -1,5 +1,7 @@
module MacOS extend self
+ # This can be compared to numerics, strings, or symbols
+ # using the standard Ruby Comparable methods.
def version
require 'version'
MacOSVersion.new(MACOS_VERSION.to_s)
@@ -221,7 +223,7 @@ module MacOS extend self
def bottles_supported?
# We support bottles on all versions of OS X except 32-bit Snow Leopard.
- (Hardware.is_64_bit? or not MacOS.snow_leopard?) \
+ (Hardware.is_64_bit? or not MacOS.version >= :snow_leopard) \
and HOMEBREW_PREFIX.to_s == '/usr/local' \
and HOMEBREW_CELLAR.to_s == '/usr/local/Cellar' \
end
diff --git a/Library/Homebrew/superenv.rb b/Library/Homebrew/superenv.rb
index 96606d108..bdc271c3e 100644
--- a/Library/Homebrew/superenv.rb
+++ b/Library/Homebrew/superenv.rb
@@ -119,7 +119,7 @@ class << ENV
# we put our paths before X because we dupe some of the X libraries
paths << "#{MacSystem.x11_prefix}/lib/pkgconfig" << "#{MacSystem.x11_prefix}/share/pkgconfig" if x11?
# Mountain Lion no longer ships some .pcs; ensure we pick up our versions
- paths << "#{HOMEBREW_REPOSITORY}/Library/Homebrew/pkgconfig" if MacOS.mountain_lion?
+ paths << "#{HOMEBREW_REPOSITORY}/Library/Homebrew/pkgconfig" if MacOS.version >= :mountain_lion
paths.to_path_s
end
@@ -173,9 +173,9 @@ class << ENV
s = ""
s << 'b' if ARGV.build_bottle?
# Fix issue with sed barfing on unicode characters on Mountain Lion
- s << 's' if MacOS.mountain_lion?
+ s << 's' if MacOS.version >= :mountain_lion
# Fix issue with 10.8 apr-1-config having broken paths
- s << 'a' if MacOS.cat == :mountainlion
+ s << 'a' if MacOS.version == :mountain_lion
s
end