Skip to content
This repository
Browse code

Replace snow_leopard_64? in brews.

  • Loading branch information...
commit 46c553ad431193c1cac98484b9610b6fe1a0136b 1 parent edeace5
Adam Vandenberg authored March 18, 2011
2  Library/Formula/asterisk.rb
@@ -12,7 +12,7 @@ def patches
12 12
   def install
13 13
     configure_flags = [ "--prefix=#{prefix}", "--localstatedir=#{var}", "--sysconfdir=#{etc}" ]
14 14
     # Avoid "src/add.c:1: error: CPU you selected does not support x86-64 instruction set"
15  
-    configure_flags << "--host=x86_64-darwin" if snow_leopard_64?
  15
+    configure_flags << "--host=x86_64-darwin" if MacOS.prefer_64_bit?
16 16
     system "./configure", *configure_flags
17 17
     system "make"
18 18
     system "make install"
2  Library/Formula/bigloo.rb
@@ -18,7 +18,7 @@ def install
18 18
              "--os-macosx" ]
19 19
 
20 20
     # SRFI 27 is 32-bit only
21  
-    args << "--disable-srfi27" if snow_leopard_64?
  21
+    args << "--disable-srfi27" if MacOS.prefer_64_bit?
22 22
 
23 23
     system "./configure", *args
24 24
     system "make"
2  Library/Formula/cantera.rb
@@ -16,7 +16,7 @@ def patches
16 16
 
17 17
   def install
18 18
 
19  
-    if snow_leopard_64?
  19
+    if MacOS.prefer_64_bit?
20 20
       # There is probably a better way to do this, but this seems to work for my purposes:
21 21
       ENV['CFLAGS'] += " -arch x86_64"
22 22
       ENV['CXX_OPT'] = "-arch x86_64"
2  Library/Formula/chicken.rb
@@ -9,7 +9,7 @@ class Chicken < Formula
9 9
   def install
10 10
     ENV.deparallelize
11 11
     args = ["PREFIX=#{prefix}", "PLATFORM=macosx"]
12  
-    args << "ARCH=x86-64" if snow_leopard_64?
  12
+    args << "ARCH=x86-64" if MacOS.prefer_64_bit?
13 13
     system "make", *args
14 14
     system "make", "install", *args
15 15
   end
2  Library/Formula/clisp.rb
@@ -17,7 +17,7 @@ def install
17 17
 
18 18
     # Clisp requires to select word size explicitly this way,
19 19
     # set it in CFLAGS won't work.
20  
-    ENV['CC'] = "#{ENV.cc} -m#{snow_leopard_64? ? 64 : 32}"
  20
+    ENV['CC'] = "#{ENV.cc} -m#{MacOS.prefer_64_bit? ? 64 : 32}"
21 21
 
22 22
     system "./configure", "--prefix=#{prefix}",
23 23
                           "--with-readline=yes"
2  Library/Formula/cppdom.rb
@@ -15,7 +15,7 @@ def install
15 15
     args = ["prefix=#{prefix}", "build_test=no", "var_type=optimized",
16 16
       "BoostBaseDir=#{HOMEBREW_PREFIX}/"]
17 17
 
18  
-    if snow_leopard_64?
  18
+    if MacOS.prefer_64_bit?
19 19
       args << 'var_arch=x64'
20 20
     else
21 21
       args << 'var_arch=ia32'
2  Library/Formula/dcmtk.rb
@@ -14,7 +14,7 @@ def options
14 14
 
15 15
   def install
16 16
     ENV.deparallelize
17  
-    ENV.m64 if snow_leopard_64?
  17
+    ENV.m64 if MacOS.prefer_64_bit?
18 18
     ENV.x11
19 19
     system "./configure", "--disable-dependency-tracking", "--disable-debug",
20 20
                           "--prefix=#{prefix}",
2  Library/Formula/erlang.rb
@@ -53,7 +53,7 @@ def install
53 53
       args << '--enable-hipe'
54 54
     end
55 55
 
56  
-    args << "--enable-darwin-64bit" if snow_leopard_64?
  56
+    args << "--enable-darwin-64bit" if MacOS.prefer_64_bit?
57 57
 
58 58
     system "./configure", *args
59 59
     system "touch lib/wx/SKIP" if MACOS_VERSION >= 10.6
2  Library/Formula/ffmpeg.rb
@@ -46,7 +46,7 @@ def install
46 46
 
47 47
     system "./configure", *args
48 48
 
49  
-    if snow_leopard_64?
  49
+    if MacOS.prefer_64_bit?
50 50
       inreplace 'config.mak' do |s|
51 51
         shflags = s.get_make_var 'SHFLAGS'
52 52
         s.change_make_var! 'SHFLAGS', shflags.gsub!(' -Wl,-read_only_relocs,suppress', '')
2  Library/Formula/gdal.rb
@@ -173,7 +173,7 @@ def install
173 173
 
174 174
       # `python-config` may try to talk us into building bindings for more
175 175
       # architectures than we really should.
176  
-      if snow_leopard_64?
  176
+      if MacOS.prefer_64_bit?
177 177
         ENV.append_to_cflags '-arch x86_64'
178 178
       else
179 179
         ENV.append_to_cflags '-arch i386'
2  Library/Formula/gnu-smalltalk.rb
@@ -25,7 +25,7 @@ def install
25 25
     # 64-bit version doesn't build, so force 32 bits.
26 26
     ENV.m32
27 27
 
28  
-    if snow_leopard_64? and Formula.factory('gdbm').installed?
  28
+    if MacOS.prefer_64_bit? and Formula.factory('gdbm').installed?
29 29
       onoe "A 64-bit gdbm will cause linker errors"
30 30
       puts <<-EOS.undent
31 31
         GNU Smalltak doesn't compile 64-bit clean on OS X, so having a
2  Library/Formula/hiredis.rb
@@ -9,7 +9,7 @@ class Hiredis < Formula
9 9
 
10 10
   def install
11 11
     # Architecture isn't detected correctly on 32bit Snow Leopard without help
12  
-    ENV["OBJARCH"] = snow_leopard_64? ? "-arch x86_64" : "-arch i386"
  12
+    ENV["OBJARCH"] = MacOS.prefer_64_bit? ? "-arch x86_64" : "-arch i386"
13 13
 
14 14
     system "make PREFIX=#{prefix}"
15 15
     system "make install PREFIX=#{prefix}"
2  Library/Formula/ical-buddy.rb
@@ -5,7 +5,7 @@ class IcalBuddy < Formula
5 5
   head "http://hasseg.org/git-public/icalBuddy.git", :using => :git
6 6
 
7 7
   def install
8  
-    arch = snow_leopard_64? ? "x86_64" : "i386"
  8
+    arch = MacOS.prefer_64_bit? ? "x86_64" : "i386"
9 9
 
10 10
     inreplace "Makefile", "-arch i386 -arch x86_64 -arch ppc", "-arch #{arch}"
11 11
     system "make icalBuddy icalBuddy.1 icalBuddyLocalization.1 icalBuddyConfig.1"
2  Library/Formula/icu4c.rb
@@ -15,7 +15,7 @@ def patches
15 15
   def install
16 16
     ENV.append "LDFLAGS", "-headerpad_max_install_names"
17 17
     config_flags = ["--prefix=#{prefix}", "--disable-samples", "--enable-static"]
18  
-    config_flags << "--with-library-bits=64" if snow_leopard_64?
  18
+    config_flags << "--with-library-bits=64" if MacOS.prefer_64_bit?
19 19
     Dir.chdir "source" do
20 20
       system "./configure", *config_flags
21 21
       system "make"
2  Library/Formula/mad.rb
@@ -23,7 +23,7 @@ def mad_pc
23 23
   end
24 24
 
25 25
   def install
26  
-    fpm = snow_leopard_64? ? '64bit': 'intel'
  26
+    fpm = MacOS.prefer_64_bit? ? '64bit': 'intel'
27 27
     system "./configure", "--disable-debugging", "--enable-fpm=#{fpm}", "--prefix=#{prefix}"
28 28
 
29 29
     # See: https://github.com/mxcl/homebrew/issues/issue/1263
2  Library/Formula/mpg123.rb
@@ -17,7 +17,7 @@ def install
17 17
             "--with-audio=coreaudio",
18 18
             "--with-default-audio=coreaudio"]
19 19
 
20  
-    if snow_leopard_64?
  20
+    if MacOS.prefer_64_bit?
21 21
       args << "--with-cpu=x86-64"
22 22
     else
23 23
       args << "--with-cpu=sse_alone"
2  Library/Formula/mz-scheme.rb
@@ -12,7 +12,7 @@ def install
12 12
     args = ["--disable-debug", "--disable-dependency-tracking",
13 13
             "--disable-pthread", "--disable-mred", "--enable-xonx",
14 14
             "--prefix=#{prefix}"]
15  
-    args << "--enable-mac64" if snow_leopard_64?
  15
+    args << "--enable-mac64" if MacOS.prefer_64_bit?
16 16
 
17 17
     system "./configure", *args
18 18
     system "make"
2  Library/Formula/nspr.rb
@@ -14,7 +14,7 @@ def install
14 14
       inreplace "pr/src/Makefile.in", "-framework CoreServices -framework CoreFoundation", target_frameworks
15 15
 
16 16
       args = ["--prefix=#{prefix}", "--disable-debug", "--enable-strip", "--enable-optimize"]
17  
-      args << "--enable-64bit" if snow_leopard_64?
  17
+      args << "--enable-64bit" if MacOS.prefer_64_bit?
18 18
       system "./configure", *args
19 19
 
20 20
       # Remove the broken (for anyone but Firefox) install_name
2  Library/Formula/plt-racket.rb
@@ -16,7 +16,7 @@ def install
16 16
               "--enable-shared",
17 17
               "--prefix=#{prefix}" ]
18 18
 
19  
-      if snow_leopard_64?
  19
+      if MacOS.prefer_64_bit?
20 20
         args += ["--enable-mac64", "--enable-sgc", "--disable-gracket"]
21 21
       end
22 22
 
4  Library/Formula/postgresql.rb
@@ -39,7 +39,7 @@ def install
39 39
     ENV.append 'LDFLAGS', `uuid-config --ldflags`.strip
40 40
     ENV.append 'LIBS', `uuid-config --libs`.strip
41 41
 
42  
-    if snow_leopard_64? and not ARGV.include? '--no-python'
  42
+    if MacOS.prefer_64_bit? and not ARGV.include? '--no-python'
43 43
       args << "ARCHFLAGS='-arch x86_64'"
44 44
       check_python_arch
45 45
     end
@@ -116,7 +116,7 @@ def caveats
116 116
     pg_ctl -D #{var}/postgres stop -s -m fast
117 117
 EOS
118 118
 
119  
-    if snow_leopard_64? then
  119
+    if MacOS.prefer_64_bit? then
120 120
       s << <<-EOS
121 121
 
122 122
 If you want to install the postgres gem, including ARCHFLAGS is recommended:
2  Library/Formula/pypy.rb
@@ -2,7 +2,7 @@
2 2
 require 'hardware'
3 3
 
4 4
 class Pypy < Formula
5  
-  if snow_leopard_64?
  5
+  if MacOS.prefer_64_bit?
6 6
     url 'http://pypy.org/download/pypy-1.4.1-osx64.tar.bz2'
7 7
     md5 '769b3fb134944ee8c22ad0834970de3b'
8 8
   else
4  Library/Formula/qt.rb
@@ -64,11 +64,11 @@ def install
64 64
       args << "-I#{Formula.factory('libpng').include}"
65 65
     end
66 66
 
67  
-    if snow_leopard_64? or ARGV.include? '--universal'
  67
+    if MacOS.prefer_64_bit? or ARGV.include? '--universal'
68 68
       args << '-arch' << 'x86_64'
69 69
     end
70 70
 
71  
-    if !snow_leopard_64? or ARGV.include? '--universal'
  71
+    if !MacOS.prefer_64_bit? or ARGV.include? '--universal'
72 72
       args << '-arch' << 'x86'
73 73
     end
74 74
 
2  Library/Formula/redis.rb
@@ -10,7 +10,7 @@ def install
10 10
     fails_with_llvm "Fails with \"reference out of range from _linenoise\""
11 11
 
12 12
     # Architecture isn't detected correctly on 32bit Snow Leopard without help
13  
-    ENV["OBJARCH"] = snow_leopard_64? ? "-arch x86_64" : "-arch i386"
  13
+    ENV["OBJARCH"] = MacOS.prefer_64_bit? ? "-arch x86_64" : "-arch i386"
14 14
 
15 15
     # Head and stable have different code layouts
16 16
     src = File.exists?('src/Makefile') ? 'src' : '.'
2  Library/Formula/rrdtool.rb
@@ -39,7 +39,7 @@ def install
39 39
     system "./configure", *args
40 40
 
41 41
     # Needed to build proper Ruby bundle
42  
-    ENV["ARCHFLAGS"] = snow_leopard_64? ? "-arch x86_64" : "-arch i386"
  42
+    ENV["ARCHFLAGS"] = MacOS.prefer_64_bit? ? "-arch x86_64" : "-arch i386"
43 43
 
44 44
     system "make install"
45 45
     prefix.install "bindings/ruby/test.rb"
2  Library/Formula/ruby-odbc.rb
@@ -19,7 +19,7 @@ def install
19 19
       s.change_make_var! "prefix", prefix
20 20
       s.change_make_var! "sitearchdir", lib
21 21
 
22  
-      if snow_leopard_64?
  22
+      if MacOS.prefer_64_bit?
23 23
         # ruby-odbc still chooses iODBC over unixODBC (even with --with-odbc-dir)
24 24
         # apparently because unixODBC is compiled for only x86_64 and ruby-odbc
25 25
         # and iODBC are both i386 and x86_64. The solution (which works for me on Snow Leopard)
2  Library/Formula/tbb.rb
@@ -10,7 +10,7 @@ def install
10 10
     # Override build prefix so we can copy the dylibs out of the same place
11 11
     # no matter what system we're on
12 12
     args = ['tbb_build_prefix=BUILDPREFIX']
13  
-    args << (snow_leopard_64? ? "arch=intel64" : "arch=ia32")
  13
+    args << (MacOS.prefer_64_bit? ? "arch=intel64" : "arch=ia32")
14 14
 
15 15
     system "make", *args
16 16
     lib.install Dir['build/BUILDPREFIX_release/*.dylib']
2  Library/Formula/valgrind.rb
@@ -16,7 +16,7 @@ def install
16 16
     system "./autogen.sh" if File.exists? "autogen.sh"
17 17
 
18 18
     args = ["--prefix=#{prefix}", "--mandir=#{man}"]
19  
-    if snow_leopard_64?
  19
+    if MacOS.prefer_64_bit?
20 20
       args << "--enable-only64bit" << "--build=amd64-darwin"
21 21
     end
22 22
 
2  Library/Formula/virtuoso.rb
@@ -11,7 +11,7 @@ class Virtuoso < Formula
11 11
   skip_clean :all
12 12
 
13 13
   def install
14  
-    ENV.m64 if snow_leopard_64?
  14
+    ENV.m64 if MacOS.prefer_64_bit?
15 15
     system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
16 16
     system "make install"
17 17
   end
2  Library/Formula/x264.rb
@@ -21,7 +21,7 @@ def install
21 21
       ldflags = s.get_make_var 'LDFLAGS'
22 22
       s.change_make_var! 'LDFLAGS', ldflags.gsub!(' -s', '')
23 23
 
24  
-      if snow_leopard_64?
  24
+      if MacOS.prefer_64_bit?
25 25
         soflags = s.get_make_var 'SOFLAGS'
26 26
         s.change_make_var! 'SOFLAGS', soflags.gsub!(' -Wl,-read_only_relocs,suppress', '')
27 27
       end

0 notes on commit 46c553a

Please sign in to comment.
Something went wrong with that request. Please try again.