aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorJack Nagel2012-09-04 18:15:31 -0500
committerJack Nagel2012-09-04 18:15:31 -0500
commita1c0cc67178136b455dd207b3dbdae12723e3198 (patch)
treef0089511762198e151f50213c2d4ff5b3c243c1e /Library/Formula
parent5bd2bac511ddabfbe52770cdb35a574009de3054 (diff)
downloadhomebrew-a1c0cc67178136b455dd207b3dbdae12723e3198.tar.bz2
Avoid referencing MACOS_VERSION directly
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/dnsmasq.rb2
-rw-r--r--Library/Formula/fuse4x-kext.rb4
-rw-r--r--Library/Formula/gfortran.rb9
-rw-r--r--Library/Formula/ghostscript.rb2
-rw-r--r--Library/Formula/imagesnap.rb2
-rw-r--r--Library/Formula/isc-dhcp.rb2
-rw-r--r--Library/Formula/mupdf.rb2
-rw-r--r--Library/Formula/octave.rb2
-rw-r--r--Library/Formula/thrift.rb2
9 files changed, 13 insertions, 14 deletions
diff --git a/Library/Formula/dnsmasq.rb b/Library/Formula/dnsmasq.rb
index 175e6c9a6..4ae11c138 100644
--- a/Library/Formula/dnsmasq.rb
+++ b/Library/Formula/dnsmasq.rb
@@ -21,7 +21,7 @@ class Dnsmasq < Formula
end
# Fix compilation on Lion
- ENV.append_to_cflags "-D__APPLE_USE_RFC_3542" if 10.7 <= MACOS_VERSION
+ ENV.append_to_cflags "-D__APPLE_USE_RFC_3542" if MacOS.version >= :lion
inreplace "Makefile" do |s|
s.change_make_var! "CFLAGS", ENV.cflags
end
diff --git a/Library/Formula/fuse4x-kext.rb b/Library/Formula/fuse4x-kext.rb
index 6f49a905e..aca632298 100644
--- a/Library/Formula/fuse4x-kext.rb
+++ b/Library/Formula/fuse4x-kext.rb
@@ -22,10 +22,10 @@ class Fuse4xKext < Formula
args = [
"-sdk",
- "macosx#{MACOS_VERSION}",
+ "macosx#{MacOS.version}",
"-configuration", "Release",
"-alltargets",
- "MACOSX_DEPLOYMENT_TARGET=#{MACOS_VERSION}",
+ "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}",
"SYMROOT=build",
# Build a 32-bit kernel extension on Leopard and a fat binary for Snow
# Leopard/Lion.
diff --git a/Library/Formula/gfortran.rb b/Library/Formula/gfortran.rb
index 007c357ef..36c606175 100644
--- a/Library/Formula/gfortran.rb
+++ b/Library/Formula/gfortran.rb
@@ -15,13 +15,12 @@ class GfortranPkgDownloadStrategy < CurlDownloadStrategy
end
class Gfortran < Formula
- if MacOS.leopard?
+ if MacOS.version == :leopard
url 'http://r.research.att.com/gfortran-42-5577.pkg'
md5 '30fb495c93cf514003cdfcb7846dc701'
version "4.2.4-5577"
- elsif MACOS_VERSION == 10.6
- # Snow Leopard
- case gcc_42_build
+ elsif MacOS.version == :snow_leopard
+ case MacOS.gcc_42_build_version
when 5659
url 'http://r.research.att.com/gfortran-42-5659.pkg'
md5 '71bd546baa45c9c0fb4943cdd72ee274'
@@ -64,7 +63,7 @@ class Gfortran < Formula
skip_clean :all
def install
- if MacOS::Xcode.version >= '4.2' and MACOS_VERSION >= 10.7
+ if MacOS::Xcode.version >= '4.2' and MacOS.version >= :lion
ohai "Installing gfortran 4.2.4 for XCode 4.2 (build 5666) or higher"
safe_system "pax --insecure -rz -f Payload.gz -s ',./usr,#{prefix},'"
diff --git a/Library/Formula/ghostscript.rb b/Library/Formula/ghostscript.rb
index 4c999f0e3..372b2dc50 100644
--- a/Library/Formula/ghostscript.rb
+++ b/Library/Formula/ghostscript.rb
@@ -35,7 +35,7 @@ class Ghostscript < Formula
# the version included in ghostscript, we get errors
# Taken from the MacPorts portfile - http://bit.ly/ghostscript-portfile
renames = %w(jpeg libpng tiff zlib lcms2 jbig2dec)
- renames << "freetype" if 10.7 <= MACOS_VERSION
+ renames << "freetype" if MacOS.version >= :lion
renames.each do |lib|
mv lib, "#{lib}_local"
end
diff --git a/Library/Formula/imagesnap.rb b/Library/Formula/imagesnap.rb
index 76dff6d6a..9285fbc0a 100644
--- a/Library/Formula/imagesnap.rb
+++ b/Library/Formula/imagesnap.rb
@@ -8,7 +8,7 @@ class Imagesnap < Formula
depends_on :xcode # For working xcodebuild.
def install
- system "xcodebuild -project ImageSnap.xcodeproj SYMROOT=build -sdk macosx#{MACOS_VERSION}"
+ system "xcodebuild -project ImageSnap.xcodeproj SYMROOT=build -sdk macosx#{MacOS.version}"
bin.install "build/Release/imagesnap"
end
end
diff --git a/Library/Formula/isc-dhcp.rb b/Library/Formula/isc-dhcp.rb
index fc1456ee4..7611e4b13 100644
--- a/Library/Formula/isc-dhcp.rb
+++ b/Library/Formula/isc-dhcp.rb
@@ -33,7 +33,7 @@ class IscDhcp < Formula
end
# See discussion at: https://gist.github.com/1157223
- if 10.7 <= MACOS_VERSION
+ if MacOS.version >= :lion
ENV.append 'CFLAGS', "-D__APPLE_USE_RFC_3542"
end
diff --git a/Library/Formula/mupdf.rb b/Library/Formula/mupdf.rb
index 7be93697c..b19641caf 100644
--- a/Library/Formula/mupdf.rb
+++ b/Library/Formula/mupdf.rb
@@ -2,7 +2,7 @@ require 'formula'
class NeedsSnowLeopard < Requirement
def satisfied?
- MACOS_VERSION >= 10.6
+ MacOS.version >= :snow_leopard
end
def fatal?
diff --git a/Library/Formula/octave.rb b/Library/Formula/octave.rb
index c4df5340f..caf014b51 100644
--- a/Library/Formula/octave.rb
+++ b/Library/Formula/octave.rb
@@ -14,7 +14,7 @@ end
def snow_leopard_64?
# 64 bit builds on 10.6 require some special handling.
- MACOS_VERSION == 10.6 and MacOS.prefer_64_bit?
+ MacOS.version == :snow_leopard and MacOS.prefer_64_bit?
end
class Octave < Formula
diff --git a/Library/Formula/thrift.rb b/Library/Formula/thrift.rb
index bcbe6a154..a7da52697 100644
--- a/Library/Formula/thrift.rb
+++ b/Library/Formula/thrift.rb
@@ -13,7 +13,7 @@ class Thrift < Formula
# No reason for this step is known. On Lion at least the pkg.m4 doesn't
# even exist. Turns out that it isn't needed on Lion either. Possibly it
# isn't needed anymore at all but I can't test that.
- cp "#{MacOS::X11.share}/aclocal/pkg.m4", "aclocal" if MACOS_VERSION < 10.7
+ cp "#{MacOS::X11.share}/aclocal/pkg.m4", "aclocal" if MacOS.version < :lion
system "./bootstrap.sh" if build.head?