aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/alpine.rb13
-rw-r--r--Library/Formula/bdw-gc.rb11
-rw-r--r--Library/Formula/cairomm.rb7
-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/ejabberd.rb4
-rw-r--r--Library/Formula/erlang.rb2
-rw-r--r--Library/Formula/ffmpeg.rb2
-rw-r--r--Library/Formula/gerbv.rb2
-rw-r--r--Library/Formula/gfortran.rb3
-rw-r--r--Library/Formula/graphicsmagick.rb2
-rw-r--r--Library/Formula/graphviz.rb2
-rw-r--r--Library/Formula/grass.rb36
-rw-r--r--Library/Formula/gtk+.rb2
-rw-r--r--Library/Formula/imagemagick.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/libmemcached.rb4
-rw-r--r--Library/Formula/libnet.rb2
-rw-r--r--Library/Formula/libsvg-cairo.rb2
-rw-r--r--Library/Formula/libvirt.rb2
-rw-r--r--Library/Formula/madplay.rb2
-rw-r--r--Library/Formula/mpd.rb2
-rw-r--r--Library/Formula/nmap.rb4
-rw-r--r--Library/Formula/nspr.rb2
-rw-r--r--Library/Formula/pango.rb2
-rw-r--r--Library/Formula/pbrt.rb2
-rw-r--r--Library/Formula/postgresql.rb4
-rw-r--r--Library/Formula/qt.rb4
-rw-r--r--Library/Formula/rabbitmq.rb2
-rw-r--r--Library/Formula/recode.rb6
-rw-r--r--Library/Formula/rogue.rb2
-rw-r--r--Library/Formula/rtmpdump.rb2
-rw-r--r--Library/Formula/rtorrent.rb2
-rw-r--r--Library/Formula/spidermonkey.rb9
-rw-r--r--Library/Formula/subversion.rb8
-rw-r--r--Library/Formula/swi-prolog.rb6
-rw-r--r--Library/Formula/tcpflow.rb6
-rw-r--r--Library/Formula/wget.rb2
-rw-r--r--Library/Formula/wine.rb2
-rw-r--r--Library/Homebrew/utils.rb10
43 files changed, 97 insertions, 92 deletions
diff --git a/Library/Formula/alpine.rb b/Library/Formula/alpine.rb
index 0dc3ba8a6..dc29a8f6e 100644
--- a/Library/Formula/alpine.rb
+++ b/Library/Formula/alpine.rb
@@ -5,16 +5,17 @@ class Alpine < Formula
homepage 'http://www.washington.edu/alpine/'
md5 '0f4757167baf5c73aa44f2ffa4860093'
- def install
- system "./configure", "--prefix=#{prefix}", "--disable-debug", "--with-ssl-include-dir=/usr/include/openssl"
+ def patches
+ DATA unless MacOS.snow_leopard?
+ end
+ def install
ENV.j1
+ system "./configure", "--disable-debug",
+ "--prefix=#{prefix}",
+ "--with-ssl-include-dir=/usr/include/openssl"
system "make install"
end
-
- def patches
- DATA if MACOS_VERSION >= 10.6
- end
end
__END__
diff --git a/Library/Formula/bdw-gc.rb b/Library/Formula/bdw-gc.rb
index 8a270e719..20932e21a 100644
--- a/Library/Formula/bdw-gc.rb
+++ b/Library/Formula/bdw-gc.rb
@@ -8,13 +8,12 @@ class BdwGc < Formula
fails_with_llvm "LLVM gives an unsupported inline asm error"
def install
- if 10.6 <= MACOS_VERSION
- # ucontext has been deprecated in 10.6
- # use this flag to force the header to compile
- ENV.append 'CPPFLAGS', "-D_XOPEN_SOURCE"
- end
+ # ucontext has been deprecated in 10.6
+ # use this flag to force the header to compile
+ ENV.append 'CPPFLAGS', "-D_XOPEN_SOURCE" if MacOS.snow_leopard?
- system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"
+ system "./configure", "--disable-debug", "--disable-dependency-tracking",
+ "--prefix=#{prefix}"
system "make install"
end
end
diff --git a/Library/Formula/cairomm.rb b/Library/Formula/cairomm.rb
index 1037c4999..87b8780e1 100644
--- a/Library/Formula/cairomm.rb
+++ b/Library/Formula/cairomm.rb
@@ -5,6 +5,8 @@ class Cairomm < Formula
homepage 'http://cairographics.org/cairomm/'
md5 '559afbc47484ba3fad265e38a3dafe90'
+ # patch for universal compilation from:
+ # http://trac.macports.org/browser/trunk/dports/graphics/cairomm/files/patch-quartz-lp64.diff
def patches
{ :p0 => DATA }
end
@@ -12,7 +14,7 @@ class Cairomm < Formula
depends_on 'pkg-config' => :build
depends_on 'libsigc++'
# cairo is available on 10.6 via X11 but not on 10.5
- depends_on 'cairo' if MACOS_VERSION == 10.5
+ depends_on 'cairo' if MacOS.leopard?
def install
system "./configure", "--disable-dependency-tracking",
@@ -25,8 +27,7 @@ class Cairomm < Formula
end
end
-# patch for universal compilation from:
-# http://trac.macports.org/browser/trunk/dports/graphics/cairomm/files/patch-quartz-lp64.diff
+
__END__
diff -urN cairomm/quartz_font.cc cairomm-1.8.2/cairomm/quartz_font.cc
--- cairomm/quartz_font.cc 2008-12-20 18:37:46.000000000 +0100
diff --git a/Library/Formula/collectd.rb b/Library/Formula/collectd.rb
index 9f134730e..fbd629e6c 100644
--- a/Library/Formula/collectd.rb
+++ b/Library/Formula/collectd.rb
@@ -15,7 +15,7 @@ class Collectd < Formula
"--with-python=/usr/bin",
"--prefix=#{prefix}",
"--localstatedir=#{var}"]
- args << "--disable-embedded-perl" if MACOS_VERSION < 10.6
+ args << "--disable-embedded-perl" if MacOS.leopard?
system "./configure", *args
system "make install"
diff --git a/Library/Formula/couchdb.rb b/Library/Formula/couchdb.rb
index eb08c3a8c..c69d49e22 100644
--- a/Library/Formula/couchdb.rb
+++ b/Library/Formula/couchdb.rb
@@ -8,7 +8,7 @@ class Couchdb < Formula
depends_on 'spidermonkey'
depends_on 'icu4c'
depends_on 'erlang'
- depends_on 'curl' if MACOS_VERSION < 10.6
+ depends_on 'curl' if MacOS.leopard?
def install
system "./bootstrap" if File.exists? "bootstrap"
diff --git a/Library/Formula/disco.rb b/Library/Formula/disco.rb
index 7a290fc76..334470c44 100644
--- a/Library/Formula/disco.rb
+++ b/Library/Formula/disco.rb
@@ -9,7 +9,7 @@ class Disco < Formula
head 'git://github.com/tuulos/disco.git'
depends_on 'erlang'
- depends_on 'simplejson' => :python if MACOS_VERSION < 10.6
+ depends_on 'simplejson' => :python if MacOS.leopard?
depends_on 'libcmph'
def install
diff --git a/Library/Formula/ejabberd.rb b/Library/Formula/ejabberd.rb
index a6ce841a1..09705a7b4 100644
--- a/Library/Formula/ejabberd.rb
+++ b/Library/Formula/ejabberd.rb
@@ -5,7 +5,7 @@ class Ejabberd < Formula
homepage 'http://www.ejabberd.im'
md5 '2029ceca45584d704ca821a771d6d928'
- depends_on "openssl" if MACOS_VERSION < 10.6
+ depends_on "openssl" if MacOS.leopard?
depends_on "erlang"
def install
@@ -18,7 +18,7 @@ class Ejabberd < Formula
"--sysconfdir=#{etc}",
"--localstatedir=#{var}"]
- if MACOS_VERSION < 10.6
+ if MacOS.leopard?
openssl = Formula.factory('openssl')
args << "--with-openssl=#{openssl.prefix}"
end
diff --git a/Library/Formula/erlang.rb b/Library/Formula/erlang.rb
index b4289f9d1..4a806ec1b 100644
--- a/Library/Formula/erlang.rb
+++ b/Library/Formula/erlang.rb
@@ -67,7 +67,7 @@ class Erlang < Formula
args << "--enable-darwin-64bit" if MacOS.prefer_64_bit?
system "./configure", *args
- system "touch lib/wx/SKIP" if MACOS_VERSION >= 10.6
+ system "touch lib/wx/SKIP" if MacOS.snow_leopard?
system "make"
system "make install"
diff --git a/Library/Formula/ffmpeg.rb b/Library/Formula/ffmpeg.rb
index 7ed359eb8..3a90a914b 100644
--- a/Library/Formula/ffmpeg.rb
+++ b/Library/Formula/ffmpeg.rb
@@ -40,7 +40,7 @@ class Ffmpeg < Formula
# For 32-bit compilation under gcc 4.2, see:
# http://trac.macports.org/ticket/20938#comment:22
- if MACOS_VERSION >= 10.6 and Hardware.is_32_bit?
+ if MacOS.snow_leopard? and Hardware.is_32_bit?
ENV.append_to_cflags "-mdynamic-no-pic"
end
diff --git a/Library/Formula/gerbv.rb b/Library/Formula/gerbv.rb
index 2973ea082..da94a3d3a 100644
--- a/Library/Formula/gerbv.rb
+++ b/Library/Formula/gerbv.rb
@@ -7,7 +7,7 @@ class Gerbv < Formula
depends_on 'pkg-config' => :build
depends_on 'gtk+'
- depends_on 'cairo' if MACOS_VERSION < 10.6
+ depends_on 'cairo' if MacOS.leopard?
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
diff --git a/Library/Formula/gfortran.rb b/Library/Formula/gfortran.rb
index b1cff791b..2b49015ca 100644
--- a/Library/Formula/gfortran.rb
+++ b/Library/Formula/gfortran.rb
@@ -15,8 +15,7 @@ class GfortranPkgDownloadStrategy <CurlDownloadStrategy
end
class Gfortran < Formula
- if MACOS_VERSION < 10.6
- # Leopard
+ if MacOS.leopard?
url 'http://r.research.att.com/gfortran-42-5577.pkg'
md5 '30fb495c93cf514003cdfcb7846dc701'
version "4.2.4-5577"
diff --git a/Library/Formula/graphicsmagick.rb b/Library/Formula/graphicsmagick.rb
index 5512aa89b..dd1dc2768 100644
--- a/Library/Formula/graphicsmagick.rb
+++ b/Library/Formula/graphicsmagick.rb
@@ -51,7 +51,7 @@ class Graphicsmagick < Formula
"--prefix=#{prefix}",
"--enable-shared", "--disable-static"]
args << "--without-magick-plus-plus" unless ARGV.include? '--with-magick-plus-plus'
- args << "--disable-openmp" if MACOS_VERSION < 10.6 # libgomp unavailable
+ args << "--disable-openmp" if MacOS.leopard? # 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/graphviz.rb b/Library/Formula/graphviz.rb
index 84602c601..6a9a8e18f 100644
--- a/Library/Formula/graphviz.rb
+++ b/Library/Formula/graphviz.rb
@@ -9,7 +9,7 @@ class Graphviz < Formula
if ARGV.include? '--with-pdf'
depends_on 'pango'
- depends_on 'cairo' if MACOS_VERSION < 10.6
+ depends_on 'cairo' if MacOS.leopard?
end
def options
diff --git a/Library/Formula/grass.rb b/Library/Formula/grass.rb
index f9e8443bf..28ebe8c55 100644
--- a/Library/Formula/grass.rb
+++ b/Library/Formula/grass.rb
@@ -21,7 +21,7 @@ class Grass < Formula
depends_on "unixodbc"
depends_on "fftw"
- depends_on "cairo" if MACOS_VERSION < 10.6
+ depends_on "cairo" if MacOS.leopard?
def patches
DATA
@@ -38,9 +38,8 @@ class Grass < Formula
readline = Formula.factory( 'readline' )
gettext = Formula.factory( 'gettext' )
- configure_args = [
- "--disable-debug",
- "--disable-dependency-tracking",
+ args = [
+ "--disable-debug", "--disable-dependency-tracking",
"--with-libs=/usr/X11/lib #{HOMEBREW_PREFIX}/lib",
"--with-includes=#{HOMEBREW_PREFIX}/include",
"--enable-largefile",
@@ -70,32 +69,33 @@ class Grass < Formula
]
if MacOS.prefer_64_bit?
- configure_args << "--enable-64bit"
- configure_args << "--with-macosx-archs=x86_64"
+ args << "--enable-64bit"
+ args << "--with-macosx-archs=x86_64"
else
- configure_args << "--with-macosx-archs=i386"
+ args << "--with-macosx-archs=i386"
end
# Deal with Cairo support
- if MACOS_VERSION >= 10.6
- configure_args << "--with-cairo-includes=/usr/X11/include /usr/X11/include/cairo"
- else
+ if MacOS.leopard?
cairo = Formula.factory('cairo')
- configure_args << "--with-cairo-includes=#{cairo.include + 'cairo'}"
- configure_args << "--with-cairo-libs=#{cairo.lib}"
+ args << "--with-cairo-includes=#{cairo.include}/cairo"
+ args << "--with-cairo-libs=#{cairo.lib}"
+ else
+ args << "--with-cairo-includes=/usr/X11/include /usr/X11/include/cairo"
end
- configure_args << "--with-cairo"
+
+ args << "--with-cairo"
# Database support
- configure_args << "--with-postgres" if postgres?
+ args << "--with-postgres" if postgres?
if mysql?
mysql = Formula.factory('mysql')
- configure_args << "--with-mysql-includes=#{mysql.include + 'mysql'}"
- configure_args << "--with-mysql-libs=#{mysql.lib + 'mysql'}"
- configure_args << "--with-mysql"
+ args << "--with-mysql-includes=#{mysql.include + 'mysql'}"
+ args << "--with-mysql-libs=#{mysql.lib + 'mysql'}"
+ args << "--with-mysql"
end
- system "./configure", "--prefix=#{prefix}", *configure_args
+ system "./configure", "--prefix=#{prefix}", *args
system "make" # make and make install must be seperate steps.
system "make install"
end
diff --git a/Library/Formula/gtk+.rb b/Library/Formula/gtk+.rb
index 79d6a8483..da1b832a6 100644
--- a/Library/Formula/gtk+.rb
+++ b/Library/Formula/gtk+.rb
@@ -13,7 +13,7 @@ class Gtkx < Formula
# Used by pango, but keg-only, so needs to be added to
# the flags for gtk+ explicitly.
- depends_on 'cairo' if MACOS_VERSION < 10.6
+ depends_on 'cairo' if MacOS.leopard?
depends_on 'pango'
depends_on 'jasper' => :optional
diff --git a/Library/Formula/imagemagick.rb b/Library/Formula/imagemagick.rb
index 1379d1934..fa1cfa33f 100644
--- a/Library/Formula/imagemagick.rb
+++ b/Library/Formula/imagemagick.rb
@@ -74,7 +74,7 @@ class Imagemagick < Formula
"--disable-static",
"--with-modules"]
- args << "--disable-openmp" if MACOS_VERSION < 10.6 or disable_openmp?
+ args << "--disable-openmp" if MacOS.leopard? or disable_openmp?
args << "--without-gslib" unless ghostscript_srsly?
args << "--with-gs-font-dir=#{HOMEBREW_PREFIX}/share/ghostscript/fonts" \
unless ghostscript_srsly? or ghostscript_fonts?
diff --git a/Library/Formula/iodine.rb b/Library/Formula/iodine.rb
index ab0158a65..0c5885f43 100644
--- a/Library/Formula/iodine.rb
+++ b/Library/Formula/iodine.rb
@@ -6,7 +6,7 @@ class Iodine < Formula
md5 'a15bb4faba020d217016fde6e231074a'
def install
- if MACOS_VERSION >= 10.6
+ unless MacOS.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 797b4206c..8ec93cf03 100644
--- a/Library/Formula/jstalk.rb
+++ b/Library/Formula/jstalk.rb
@@ -6,7 +6,7 @@ class Jstalk < Formula
version '1.0.1'
def install
- if MACOS_VERSION < 10.6
+ if MacOS.leopard?
onoe "jstalk requires Mac OS X 10.6+"
exit 1
end
diff --git a/Library/Formula/lftp.rb b/Library/Formula/lftp.rb
index 51d212f19..cfb113145 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_VERSION == 10.5
+ ENV.no_optimization if MacOS.leopard?
system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking"
system "make install"
diff --git a/Library/Formula/libmemcached.rb b/Library/Formula/libmemcached.rb
index 456849fd7..88ceeefb8 100644
--- a/Library/Formula/libmemcached.rb
+++ b/Library/Formula/libmemcached.rb
@@ -8,9 +8,7 @@ class Libmemcached < Formula
depends_on 'memcached'
def install
- if MACOS_VERSION < 10.6
- ENV.append_to_cflags "-undefined dynamic_lookup"
- end
+ ENV.append_to_cflags "-undefined dynamic_lookup" if MacOS.leopard?
system "./configure", "--prefix=#{prefix}"
system "make install"
diff --git a/Library/Formula/libnet.rb b/Library/Formula/libnet.rb
index 636bbc923..bce2f4d74 100644
--- a/Library/Formula/libnet.rb
+++ b/Library/Formula/libnet.rb
@@ -11,7 +11,7 @@ class Libnet < Formula
inreplace "autogen.sh", "libtoolize", "glibtoolize"
system "./autogen.sh"
- if MACOS_VERSION >= 10.6
+ unless MacOS.leopard?
cp "/usr/share/libtool/config/config.guess", "."
cp "/usr/share/libtool/config/config.sub", "."
end
diff --git a/Library/Formula/libsvg-cairo.rb b/Library/Formula/libsvg-cairo.rb
index ecf4c59f8..54637b803 100644
--- a/Library/Formula/libsvg-cairo.rb
+++ b/Library/Formula/libsvg-cairo.rb
@@ -8,7 +8,7 @@ class LibsvgCairo < Formula
depends_on 'pkg-config' => :build
depends_on 'libsvg'
- depends_on 'cairo' if MACOS_VERSION < 10.6
+ depends_on 'cairo' if MacOS.leopard?
def install
system "./configure", "--disable-dependency-tracking", "--disable-debug", "--prefix=#{prefix}"
diff --git a/Library/Formula/libvirt.rb b/Library/Formula/libvirt.rb
index 8d59e4e9a..79a05fe9a 100644
--- a/Library/Formula/libvirt.rb
+++ b/Library/Formula/libvirt.rb
@@ -13,7 +13,7 @@ class Libvirt < Formula
depends_on "gnutls"
depends_on "yajl"
- if MACOS_VERSION < 10.6
+ if MacOS.leopard?
# Definitely needed on Leopard, but not on Snow Leopard.
depends_on "readline"
depends_on "libxml2"
diff --git a/Library/Formula/madplay.rb b/Library/Formula/madplay.rb
index 3ede1f54f..d9af0950f 100644
--- a/Library/Formula/madplay.rb
+++ b/Library/Formula/madplay.rb
@@ -18,7 +18,7 @@ class Madplay < Formula
def install
configure_flags = ["--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"]
# Avoid "error: CPU you selected does not support x86-64 instruction set"
- configure_flags << "--build=x86_64" if Hardware.is_64_bit? and MACOS_VERSION >= 10.6
+ configure_flags << "--build=x86_64" if MacOS.prefer_64_bit?
system "./configure", *configure_flags
system "make install"
end
diff --git a/Library/Formula/mpd.rb b/Library/Formula/mpd.rb
index 010f6c757..f4aae5836 100644
--- a/Library/Formula/mpd.rb
+++ b/Library/Formula/mpd.rb
@@ -34,7 +34,7 @@ class Mpd < Formula
"--enable-fluidsynth",
"--enable-zip",
"--enable-lame-encoder"]
- args << "--disable-curl" if MACOS_VERSION <= 10.5
+ args << "--disable-curl" if MacOS.leopard?
args << "--enable-lastfm" if ARGV.include?("--lastfm")
system "./configure", *args
diff --git a/Library/Formula/nmap.rb b/Library/Formula/nmap.rb
index 7425db500..c1c943b3d 100644
--- a/Library/Formula/nmap.rb
+++ b/Library/Formula/nmap.rb
@@ -6,7 +6,7 @@ class Nmap < Formula
md5 '0b80d2cb92ace5ebba8095a4c2850275'
# namp needs newer version of openssl on Leopard
- depends_on "openssl" if MACOS_VERSION < 10.6
+ depends_on "openssl" if MacOS.leopard?
fails_with_llvm
@@ -15,7 +15,7 @@ class Nmap < Formula
args = ["--prefix=#{prefix}", "--without-zenmap"]
- if MACOS_VERSION < 10.6
+ if MacOS.leopard?
openssl = Formula.factory('openssl')
args << "--with-openssl=#{openssl.prefix}"
end
diff --git a/Library/Formula/nspr.rb b/Library/Formula/nspr.rb
index 9ab75df65..24ac8b152 100644
--- a/Library/Formula/nspr.rb
+++ b/Library/Formula/nspr.rb
@@ -10,7 +10,7 @@ class Nspr < Formula
Dir.chdir "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_VERSION == 10.5) ? "-framework Carbon" : ""
+ target_frameworks = (Hardware.is_32_bit? or MacOS.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/pango.rb b/Library/Formula/pango.rb
index ec9e80665..40fd2e2dd 100644
--- a/Library/Formula/pango.rb
+++ b/Library/Formula/pango.rb
@@ -10,7 +10,7 @@ class Pango < Formula
fails_with_llvm "Undefined symbols when linking", :build => "2326"
- if MACOS_VERSION < 10.6
+ if MacOS.leopard?
depends_on 'fontconfig' # Leopard's fontconfig is too old.
depends_on 'cairo' # Leopard doesn't come with Cairo.
end
diff --git a/Library/Formula/pbrt.rb b/Library/Formula/pbrt.rb
index f6015ccb0..fbf7b1345 100644
--- a/Library/Formula/pbrt.rb
+++ b/Library/Formula/pbrt.rb
@@ -27,7 +27,7 @@ class Pbrt < Formula
s.change_make_var! "EXR_LIBDIR", "-L#{openexr.lib} -L#{ilmbase.lib}"
# Change settings if we are using a 32bit system
- if MACOS_VERSION < 10.6 or Hardware.is_32_bit?
+ if MacOS.leopard? or Hardware.is_32_bit?
s.change_make_var! "MARCH", "-m32 -msse2 -mfpmath=sse"
end
end
diff --git a/Library/Formula/postgresql.rb b/Library/Formula/postgresql.rb
index 50d4ebb94..fe8194932 100644
--- a/Library/Formula/postgresql.rb
+++ b/Library/Formula/postgresql.rb
@@ -7,7 +7,7 @@ class Postgresql < Formula
md5 '928df8c40bb012ad10756e58b70516fb'
depends_on 'readline'
- depends_on 'libxml2' if MACOS_VERSION < 10.6 # Leopard libxml is too old
+ depends_on 'libxml2' if MacOS.leopard? # Leopard libxml is too old
depends_on 'ossp-uuid'
def options
@@ -20,7 +20,7 @@ class Postgresql < Formula
skip_clean :all
def install
- ENV.libxml2 if MACOS_VERSION >= 10.6
+ ENV.libxml2 if MacOS.snow_leopard?
args = ["--disable-debug",
"--prefix=#{prefix}",
diff --git a/Library/Formula/qt.rb b/Library/Formula/qt.rb
index d861df051..227e89b19 100644
--- a/Library/Formula/qt.rb
+++ b/Library/Formula/qt.rb
@@ -21,7 +21,7 @@ class Qt < Formula
end
depends_on "d-bus" if ARGV.include? '--with-qtdbus'
- depends_on 'sqlite' if MACOS_VERSION <= 10.5
+ depends_on 'sqlite' if MacOS.leopard?
def install
ENV.x11
@@ -33,7 +33,7 @@ class Qt < Formula
"-cocoa", "-fast" ]
# See: https://github.com/mxcl/homebrew/issues/issue/744
- args << "-system-sqlite" if MACOS_VERSION <= 10.5
+ args << "-system-sqlite" if MacOS.leopard?
args << "-plugin-sql-mysql" if (HOMEBREW_CELLAR+"mysql").directory?
if ARGV.include? '--with-qtdbus'
diff --git a/Library/Formula/rabbitmq.rb b/Library/Formula/rabbitmq.rb
index ced87dc75..d11bfe2c2 100644
--- a/Library/Formula/rabbitmq.rb
+++ b/Library/Formula/rabbitmq.rb
@@ -6,7 +6,7 @@ class Rabbitmq < Formula
md5 '6db31b4353bd44f8ae9b6756b0a831e6'
depends_on 'erlang'
- depends_on 'simplejson' => :python if MACOS_VERSION < 10.6
+ depends_on 'simplejson' => :python if MacOS.leopard?
def patches
# Can't build manpages without a lot of other junk, so disable
diff --git a/Library/Formula/recode.rb b/Library/Formula/recode.rb
index 05505ba9e..263dd1e99 100644
--- a/Library/Formula/recode.rb
+++ b/Library/Formula/recode.rb
@@ -13,10 +13,10 @@ class Recode < Formula
end
def install
- if MACOS_VERSION >= 10.6
- cp Dir["#{MacOS.xcode_prefix}/usr/share/libtool/config/config.*"], "."
- else
+ if MacOS.leopard?
cp Dir["#{MacOS.xcode_prefix}/usr/share/libtool/config.*"], "."
+ else
+ cp Dir["#{MacOS.xcode_prefix}/usr/share/libtool/config/config.*"], "."
end
system "./configure", "--disable-debug", "--disable-dependency-tracking",
diff --git a/Library/Formula/rogue.rb b/Library/Formula/rogue.rb
index 3bf54dd69..194688664 100644
--- a/Library/Formula/rogue.rb
+++ b/Library/Formula/rogue.rb
@@ -7,7 +7,7 @@ class Rogue < Formula
sha1 'aef9e589c4f31eb6d3eeb9d543ab8787b00fb022'
def install
- ENV.ncurses_define if MACOS_VERSION == 10.6
+ ENV.ncurses_define if MacOS.snow_leopard?
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}"
diff --git a/Library/Formula/rtmpdump.rb b/Library/Formula/rtmpdump.rb
index 35ebe0d93..558dcaa1d 100644
--- a/Library/Formula/rtmpdump.rb
+++ b/Library/Formula/rtmpdump.rb
@@ -5,7 +5,7 @@ class Rtmpdump < Formula
homepage 'http://rtmpdump.mplayerhq.hu'
md5 'eb961f31cd55f0acf5aad1a7b900ef59'
- depends_on 'openssl' if MACOS_VERSION < 10.6
+ depends_on 'openssl' if MacOS.leopard?
# Use dylib instead of so
def patches; DATA; end
diff --git a/Library/Formula/rtorrent.rb b/Library/Formula/rtorrent.rb
index 34494b203..a24fa45d7 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_VERSION == 10.5
+ if MacOS.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`'
end
diff --git a/Library/Formula/spidermonkey.rb b/Library/Formula/spidermonkey.rb
index e15349884..7ef6b9dbc 100644
--- a/Library/Formula/spidermonkey.rb
+++ b/Library/Formula/spidermonkey.rb
@@ -18,12 +18,9 @@ class Spidermonkey < Formula
end
def install
- if MACOS_VERSION == 10.5
- # 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.
- # It might not be need with newer spidermonkeys anymore tho.
- ENV['CFLAGS'] = ENV['CFLAGS'].gsub(/-msse[^\s]+/, '')
- end
+ # 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?
# For some reason SpiderMonkey requires Autoconf-2.13
ac213_prefix = Pathname.pwd.join('ac213')
diff --git a/Library/Formula/subversion.rb b/Library/Formula/subversion.rb
index ae7b17f1a..09e33cfff 100644
--- a/Library/Formula/subversion.rb
+++ b/Library/Formula/subversion.rb
@@ -22,7 +22,7 @@ class Subversion < Formula
depends_on 'pkg-config' => :build
# On Snow Leopard, build a new neon. For Leopard, the deps above include this.
- depends_on 'neon' if MACOS_VERSION >= 10.6
+ depends_on 'neon' if MacOS.snow_leopard?
def options
[
@@ -82,7 +82,7 @@ class Subversion < Formula
ENV.universal_binary if build_universal?
- if MACOS_VERSION < 10.6
+ if MacOS.leopard?
setup_leopard
else
check_neon_arch if build_universal?
@@ -122,14 +122,14 @@ class Subversion < Formula
# Remove hard-coded ppc target, add appropriate ones
if build_universal?
arches = "-arch x86_64 -arch i386"
- elsif MACOS_VERSION < 10.6
+ elsif MacOS.leopard?
arches = "-arch i386"
else
arches = "-arch x86_64"
end
# Use verison-appropriate system Perl
- if MACOS_VERSION < 10.6
+ if MacOS.leopard?
perl_version = "5.8.8"
else
perl_version = "5.10.0"
diff --git a/Library/Formula/swi-prolog.rb b/Library/Formula/swi-prolog.rb
index c7647284c..6b9943982 100644
--- a/Library/Formula/swi-prolog.rb
+++ b/Library/Formula/swi-prolog.rb
@@ -14,8 +14,10 @@ class SwiProlog < Formula
depends_on 'gawk'
# 10.5 versions of these are too old
- depends_on 'fontconfig' if MACOS_VERSION < 10.6
- depends_on 'expat' if MACOS_VERSION < 10.6
+ if MacOS.leopard?
+ depends_on 'fontconfig'
+ depends_on 'expat'
+ end
fails_with_llvm "Exported procedure chr_translate:chr_translate_line_info/3 is not defined"
diff --git a/Library/Formula/tcpflow.rb b/Library/Formula/tcpflow.rb
index b4f0a7c83..0f848cfc8 100644
--- a/Library/Formula/tcpflow.rb
+++ b/Library/Formula/tcpflow.rb
@@ -11,10 +11,10 @@ class Tcpflow < Formula
end
def install
- if MACOS_VERSION >= 10.6
- cp Dir["#{MacOS.xcode_prefix}/usr/share/libtool/config/config.*"], "."
- else
+ if MacOS.leopard?
cp Dir["#{MacOS.xcode_prefix}/usr/share/libtool/config.*"], "."
+ else
+ cp Dir["#{MacOS.xcode_prefix}/usr/share/libtool/config/config.*"], "."
end
system "./configure", "--disable-debug", "--disable-dependency-tracking",
diff --git a/Library/Formula/wget.rb b/Library/Formula/wget.rb
index 1c2e9455b..5eda029f1 100644
--- a/Library/Formula/wget.rb
+++ b/Library/Formula/wget.rb
@@ -5,7 +5,7 @@ class Wget < Formula
url 'http://ftp.gnu.org/gnu/wget/wget-1.12.tar.bz2'
md5 '308a5476fc096a8a525d07279a6f6aa3'
- depends_on "openssl" if MACOS_VERSION < 10.6
+ depends_on "openssl" if MacOS.leopard?
depends_on "libidn" if ARGV.include? "--enable-iri"
def options
diff --git a/Library/Formula/wine.rb b/Library/Formula/wine.rb
index 19c897d13..09b56bf8a 100644
--- a/Library/Formula/wine.rb
+++ b/Library/Formula/wine.rb
@@ -50,7 +50,7 @@ EOS
"--with-x",
"--with-coreaudio",
"--with-opengl"]
- args << "--disable-win16" if MACOS_VERSION < 10.6
+ args << "--disable-win16" if MacOS.leopard?
# 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/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index 0dc1a4b51..080a099ea 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -316,8 +316,16 @@ 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
+
def prefer_64_bit?
- MACOS_VERSION >= 10.6 and Hardware.is_64_bit?
+ Hardware.is_64_bit? and 10.6 <= MACOS_VERSION
end
end