diff options
| -rw-r--r-- | Library/Formula/asterisk.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/chicken.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/erlang.rb | 20 | ||||
| -rw-r--r-- | Library/Formula/ffmpeg.rb | 10 | ||||
| -rw-r--r-- | Library/Formula/ical-buddy.rb | 6 | ||||
| -rw-r--r-- | Library/Formula/icu4c.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/mad.rb | 7 | ||||
| -rw-r--r-- | Library/Formula/mpg123.rb | 6 | ||||
| -rw-r--r-- | Library/Formula/mplayer.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/mz-scheme.rb | 9 | ||||
| -rw-r--r-- | Library/Formula/nspr.rb | 6 | ||||
| -rw-r--r-- | Library/Formula/postgresql.rb | 6 | ||||
| -rw-r--r-- | Library/Formula/qt.rb | 46 | ||||
| -rw-r--r-- | Library/Formula/rrdtool.rb | 6 | ||||
| -rw-r--r-- | Library/Formula/ruby-odbc.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/sbcl.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/tbb.rb | 7 | ||||
| -rw-r--r-- | Library/Formula/virtuoso.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/wine.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/x264.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/hardware.rb | 4 |
21 files changed, 63 insertions, 88 deletions
diff --git a/Library/Formula/asterisk.rb b/Library/Formula/asterisk.rb index 808705933..99b5488d5 100644 --- a/Library/Formula/asterisk.rb +++ b/Library/Formula/asterisk.rb @@ -12,7 +12,7 @@ class Asterisk <Formula def install configure_flags = [ "--prefix=#{prefix}", "--localstatedir=#{var}", "--sysconfdir=#{etc}" ] # Avoid "src/add.c:1: error: CPU you selected does not support x86-64 instruction set" - configure_flags << "--host=x86_64-darwin" if Hardware.is_64_bit? and MACOS_VERSION >= 10.6 + configure_flags << "--host=x86_64-darwin" if snow_leopard_64? system "./configure", *configure_flags system "make" system "make install" diff --git a/Library/Formula/chicken.rb b/Library/Formula/chicken.rb index 388517123..c6d41882b 100644 --- a/Library/Formula/chicken.rb +++ b/Library/Formula/chicken.rb @@ -8,7 +8,7 @@ class Chicken <Formula def install ENV.deparallelize settings = "PREFIX=#{prefix} PLATFORM=macosx" - settings << " ARCH=x86-64" if Hardware.is_64_bit? and MACOS_VERSION >= 10.6 + settings << " ARCH=x86-64" if snow_leopard_64? system "make #{settings}" system "make install #{settings}" end diff --git a/Library/Formula/erlang.rb b/Library/Formula/erlang.rb index 950a893cb..20656f68e 100644 --- a/Library/Formula/erlang.rb +++ b/Library/Formula/erlang.rb @@ -36,25 +36,23 @@ class Erlang <Formula # If building from GitHub, this step is required (but not for tarball downloads.) system "./otp_build autoconf" if File.exist? "otp_build" - config_flags = ["--disable-debug", - "--prefix=#{prefix}", - "--enable-kernel-poll", - "--enable-threads", - "--enable-dynamic-ssl-lib", - "--enable-smp-support"] + args = ["--disable-debug", + "--prefix=#{prefix}", + "--enable-kernel-poll", + "--enable-threads", + "--enable-dynamic-ssl-lib", + "--enable-smp-support"] unless ARGV.include? '--disable-hipe' # HIPE doesn't strike me as that reliable on OS X # http://syntatic.wordpress.com/2008/06/12/macports-erlang-bus-error-due-to-mac-os-x-1053-update/ # http://www.erlang.org/pipermail/erlang-patches/2008-September/000293.html - config_flags << '--enable-hipe' + args << '--enable-hipe' end - if Hardware.is_64_bit? and MACOS_VERSION >= 10.6 - config_flags << "--enable-darwin-64bit" - end + args << "--enable-darwin-64bit" if snow_leopard_64? - system "./configure", *config_flags + system "./configure", *args system "touch lib/wx/SKIP" if MACOS_VERSION >= 10.6 system "make" system "make install" diff --git a/Library/Formula/ffmpeg.rb b/Library/Formula/ffmpeg.rb index bc038c7ce..1ac3511db 100644 --- a/Library/Formula/ffmpeg.rb +++ b/Library/Formula/ffmpeg.rb @@ -5,10 +5,6 @@ class Ffmpeg <Formula homepage 'http://ffmpeg.org/' sha1 'c130e3bc368251b9130ce6eafb44fe8c3993ff5c' - # Before 0.6, the head version was: - # head 'svn://svn.ffmpeg.org/ffmpeg/trunk', - # :revisions => { :trunk => 22916, 'libswscale' => 31045 } - # We probably need new revisions specified here: head 'svn://svn.ffmpeg.org/ffmpeg/trunk' depends_on 'x264' => :optional @@ -26,7 +22,7 @@ class Ffmpeg <Formula "--enable-pthreads", "--enable-nonfree", "--enable-gpl", - "--disable-indev=jack" ] + "--disable-indev=jack"] args << "--enable-libx264" if Formula.factory('x264').installed? args << "--enable-libfaac" if Formula.factory('faac').installed? @@ -43,8 +39,8 @@ class Ffmpeg <Formula system "./configure", *args - inreplace 'config.mak' do |s| - if MACOS_VERSION >= 10.6 and Hardware.is_64_bit? + if snow_leopard_64? + inreplace 'config.mak' do |s| shflags = s.get_make_var 'SHFLAGS' s.change_make_var! 'SHFLAGS', shflags.gsub!(' -Wl,-read_only_relocs,suppress', '') end diff --git a/Library/Formula/ical-buddy.rb b/Library/Formula/ical-buddy.rb index 93cdddd99..56f0d5f61 100644 --- a/Library/Formula/ical-buddy.rb +++ b/Library/Formula/ical-buddy.rb @@ -5,11 +5,7 @@ class IcalBuddy <Formula head "http://hasseg.org/git-public/icalBuddy.git", :using => :git def install - if MACOS_VERSION >= 10.6 and Hardware.is_64_bit? - arch = "x86_64" - else - arch = "i386" - end + arch = snow_leopard_64? ? "x86_64" : "i386" inreplace "Makefile", "-arch i386 -arch x86_64 -arch ppc", "-arch #{arch}" system "make icalBuddy icalBuddy.1 icalBuddyLocalization.1 icalBuddyConfig.1" diff --git a/Library/Formula/icu4c.rb b/Library/Formula/icu4c.rb index 7b9b6b408..2ee1e40e1 100644 --- a/Library/Formula/icu4c.rb +++ b/Library/Formula/icu4c.rb @@ -15,7 +15,7 @@ class Icu4c <Formula def install ENV.append "LDFLAGS", "-headerpad_max_install_names" config_flags = ["--prefix=#{prefix}", "--disable-samples", "--enable-static"] - config_flags << "--with-library-bits=64" if Hardware.is_64_bit? and MACOS_VERSION == 10.6 + config_flags << "--with-library-bits=64" if snow_leopard_64? Dir.chdir "source" do system "./configure", *config_flags system "make" diff --git a/Library/Formula/mad.rb b/Library/Formula/mad.rb index e81fbc468..775e3861e 100644 --- a/Library/Formula/mad.rb +++ b/Library/Formula/mad.rb @@ -23,12 +23,7 @@ Cflags: -I${includedir} end def install - if MACOS_VERSION >= 10.6 and Hardware.is_64_bit? - fpm = '64bit' - else - fpm = 'intel' - end - + fpm = snow_leopard_64? ? '64bit': 'intel' system "./configure", "--disable-debugging", "--enable-fpm=#{fpm}", "--prefix=#{prefix}" # See: http://github.com/mxcl/homebrew/issues/issue/1263 diff --git a/Library/Formula/mpg123.rb b/Library/Formula/mpg123.rb index 7855332db..8f49e8f01 100644 --- a/Library/Formula/mpg123.rb +++ b/Library/Formula/mpg123.rb @@ -17,17 +17,15 @@ class Mpg123 <Formula "--with-audio=coreaudio", "--with-default-audio=coreaudio"] - # Don't build 64-bit on Leopard - if MACOS_VERSION >= 10.6 and Hardware.is_64_bit? + if snow_leopard_64? args << "--with-cpu=x86-64" else - # there are no Intel Mac computers without SSE args << "--with-cpu=sse_alone" end system "./configure", *args - # ./configure incorrectly detects 10.5 as 10.4. Cut that crap out. + # ./configure incorrectly detects 10.5 as 10.4; fix it. ['.', 'src', 'src/output', 'src/libmpg123'].each do |path| inreplace "#{path}/Makefile" do |s| s.gsub! "-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk", "" diff --git a/Library/Formula/mplayer.rb b/Library/Formula/mplayer.rb index 0bfc43bed..af8c850e9 100644 --- a/Library/Formula/mplayer.rb +++ b/Library/Formula/mplayer.rb @@ -21,7 +21,7 @@ class Mplayer <Formula ENV['CXXFLAGS'] = '' args = ["--prefix=#{prefix}", "--enable-largefiles", "--enable-apple-remote"] - args << "--target=x86_64-Darwin" if Hardware.is_64_bit? and MACOS_VERSION >= 10.6 + args << "--target=x86_64-Darwin" if snow_leopard_64? system './configure', *args system "make" diff --git a/Library/Formula/mz-scheme.rb b/Library/Formula/mz-scheme.rb index 7aad7d27f..b31b94838 100644 --- a/Library/Formula/mz-scheme.rb +++ b/Library/Formula/mz-scheme.rb @@ -9,11 +9,10 @@ class MzScheme <Formula def install cd "src" - args = [ "--disable-debug", "--disable-dependency-tracking", - "--disable-pthread", "--disable-mred", "--enable-xonx", - "--prefix=#{prefix}" ] - - args << "--enable-mac64" if Hardware.is_64_bit? && MACOS_VERSION >= 10.6 + args = ["--disable-debug", "--disable-dependency-tracking", + "--disable-pthread", "--disable-mred", "--enable-xonx", + "--prefix=#{prefix}"] + args << "--enable-mac64" if snow_leopard_64? system "./configure", *args system "make" diff --git a/Library/Formula/nspr.rb b/Library/Formula/nspr.rb index 33a1c8605..f7a827076 100644 --- a/Library/Formula/nspr.rb +++ b/Library/Formula/nspr.rb @@ -13,9 +13,9 @@ class Nspr <Formula target_frameworks = Hardware.is_32_bit? ? "-framework Carbon" : "" inreplace "pr/src/Makefile.in", "-framework CoreServices -framework CoreFoundation", target_frameworks - conf = ["--prefix=#{prefix}", "--disable-debug", "--enable-strip", "--enable-optimize"] - conf << "--enable-64bit" if Hardware.is_64_bit? and MACOS_VERSION >= 10.6 - system "./configure", *conf + args = ["--prefix=#{prefix}", "--disable-debug", "--enable-strip", "--enable-optimize"] + args << "--enable-64bit" if snow_leopard_64? + system "./configure", *args # Remove the broken (for anyone but Firefox) install_name inreplace "config/autoconf.mk", "-install_name @executable_path/$@ ", "" diff --git a/Library/Formula/postgresql.rb b/Library/Formula/postgresql.rb index 93cf895ef..bb526f39f 100644 --- a/Library/Formula/postgresql.rb +++ b/Library/Formula/postgresql.rb @@ -1,8 +1,6 @@ require 'formula' require 'hardware' -def bits_64?; MACOS_VERSION >= 10.6 && Hardware.is_64_bit?; end - class Postgresql <Formula homepage 'http://www.postgresql.org/' url 'http://ftp2.uk.postgresql.org/sites/ftp.postgresql.org/source/v8.4.4/postgresql-8.4.4.tar.bz2' @@ -41,7 +39,7 @@ class Postgresql <Formula ENV.append 'LDFLAGS', `uuid-config --ldflags`.strip ENV.append 'LIBS', `uuid-config --libs`.strip - if bits_64? and not ARGV.include? '--no-python' + if snow_leopard_64? and not ARGV.include? '--no-python' args << "ARCHFLAGS='-arch x86_64'" check_python_arch end @@ -112,7 +110,7 @@ And stop with: pg_ctl -D #{var}/postgres stop -s -m fast EOS - if bits_64? then + if snow_leopard_64? then s << <<-EOS If you want to install the postgres gem, including ARCHFLAGS is recommended: diff --git a/Library/Formula/qt.rb b/Library/Formula/qt.rb index 7d5062067..5976274b8 100644 --- a/Library/Formula/qt.rb +++ b/Library/Formula/qt.rb @@ -22,46 +22,46 @@ class Qt <Formula depends_on 'sqlite' if MACOS_VERSION <= 10.5 def install - conf_args = ["-prefix", prefix, - "-system-libpng", "-system-zlib", - "-nomake", "demos", "-nomake", "examples", - "-release", "-cocoa", - "-confirm-license", "-opensource", - "-fast"] + args = ["-prefix", prefix, + "-system-libpng", "-system-zlib", + "-nomake", "demos", "-nomake", "examples", + "-release", "-cocoa", + "-confirm-license", "-opensource", + "-fast"] # See: http://github.com/mxcl/homebrew/issues/issue/744 - conf_args << "-system-sqlite" if MACOS_VERSION <= 10.5 - conf_args << "-plugin-sql-mysql" if (HOMEBREW_CELLAR+"mysql").directory? + args << "-system-sqlite" if MACOS_VERSION <= 10.5 + args << "-plugin-sql-mysql" if (HOMEBREW_CELLAR+"mysql").directory? if ARGV.include? '--with-qtdbus' - conf_args << "-I#{Formula.factory('d-bus').lib}/dbus-1.0/include" - conf_args << "-I#{Formula.factory('d-bus').include}/dbus-1.0" - conf_args << "-L#{Formula.factory('d-bus').lib}" - conf_args << "-ldbus-1" - conf_args << "-dbus-linked" + args << "-I#{Formula.factory('d-bus').lib}/dbus-1.0/include" + args << "-I#{Formula.factory('d-bus').include}/dbus-1.0" + args << "-L#{Formula.factory('d-bus').lib}" + args << "-ldbus-1" + args << "-dbus-linked" end if ARGV.include? '--with-qt3support' - conf_args << "-qt3support" + args << "-qt3support" else - conf_args << "-no-qt3support" + args << "-no-qt3support" end if Qt.x11? - conf_args << "-L/usr/X11R6/lib" - conf_args << "-I/usr/X11R6/include" + args << "-L/usr/X11R6/lib" + args << "-I/usr/X11R6/include" else - conf_args << "-L#{Formula.factory('libpng').lib}" - conf_args << "-I#{Formula.factory('libpng').include}" + args << "-L#{Formula.factory('libpng').lib}" + args << "-I#{Formula.factory('libpng').include}" end - if MACOS_VERSION >= 10.6 and Hardware.is_64_bit? - conf_args << '-arch' << 'x86_64' + if snow_leopard_64? + args << '-arch' << 'x86_64' else - conf_args << '-arch' << 'x86' + args << '-arch' << 'x86' end - system "./configure", *conf_args + system "./configure", *args system "make install" # stop crazy disk usage diff --git a/Library/Formula/rrdtool.rb b/Library/Formula/rrdtool.rb index cb1eab615..4be02d981 100644 --- a/Library/Formula/rrdtool.rb +++ b/Library/Formula/rrdtool.rb @@ -39,11 +39,7 @@ class Rrdtool <Formula system "./configure", *args # Needed to build proper Ruby bundle - if Hardware.is_64_bit? and MACOS_VERSION >= 10.6 - ENV["ARCHFLAGS"] = "-arch x86_64" - else - ENV["ARCHFLAGS"] = "-arch i386" - end + ENV["ARCHFLAGS"] = snow_leopard_64? ? "-arch x86_64" : "-arch i386" system "make install" prefix.install "bindings/ruby/test.rb" diff --git a/Library/Formula/ruby-odbc.rb b/Library/Formula/ruby-odbc.rb index d0ddcba3d..e20217c18 100644 --- a/Library/Formula/ruby-odbc.rb +++ b/Library/Formula/ruby-odbc.rb @@ -19,7 +19,7 @@ class RubyOdbc < Formula s.change_make_var! "prefix", prefix s.change_make_var! "sitearchdir", lib - if Hardware.is_64_bit? and MACOS_VERSION >= 10.6 + if snow_leopard_64? # ruby-odbc still chooses iODBC over unixODBC (even with --with-odbc-dir) # apparently because unixODBC is compiled for only x86_64 and ruby-odbc # and iODBC are both i386 and x86_64. The solution (which works for me on Snow Leopard) diff --git a/Library/Formula/sbcl.rb b/Library/Formula/sbcl.rb index 9f475a3dc..dce232adb 100644 --- a/Library/Formula/sbcl.rb +++ b/Library/Formula/sbcl.rb @@ -2,7 +2,7 @@ require 'formula' require 'hardware' class Sbcl <Formula - if MACOS_VERSION >= 10.6 and Hardware.is_64_bit? + if snow_leopard_64? url 'http://downloads.sourceforge.net/project/sbcl/sbcl/1.0.29/sbcl-1.0.29-x86_64-darwin-binary-r2.tar.bz2' md5 '47c99c60ec44e57070807c0890ba1c90' else diff --git a/Library/Formula/tbb.rb b/Library/Formula/tbb.rb index 795afa89b..ce2a67e80 100644 --- a/Library/Formula/tbb.rb +++ b/Library/Formula/tbb.rb @@ -10,12 +10,7 @@ class Tbb <Formula # Override build prefix so we can copy the dylibs out of the same place # no matter what system we're on args = ['tbb_build_prefix=BUILDPREFIX'] - - if MACOS_VERSION >= 10.6 and Hardware.is_64_bit? - args << "arch=intel64" - else - args << "arch=ia32" - end + args << (snow_leopard_64? ? "arch=intel64" : "arch=ia32") system "make", *args lib.install Dir['build/BUILDPREFIX_release/*.dylib'] diff --git a/Library/Formula/virtuoso.rb b/Library/Formula/virtuoso.rb index 96526cf3c..2dbccb9c5 100644 --- a/Library/Formula/virtuoso.rb +++ b/Library/Formula/virtuoso.rb @@ -11,7 +11,7 @@ class Virtuoso <Formula skip_clean :all def install - ENV.m64 if MACOS_VERSION >= 10.6 and Hardware.is_64_bit? + ENV.m64 if snow_leopard_64? system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" system "make install" end diff --git a/Library/Formula/wine.rb b/Library/Formula/wine.rb index 5ed70c061..b89ceac0a 100644 --- a/Library/Formula/wine.rb +++ b/Library/Formula/wine.rb @@ -28,7 +28,7 @@ EOS ENV.append "LDFLAGS", "#{build32} -framework CoreServices -lz -lGL -lGLU" args = ["--prefix=#{prefix}", "--x-include=/usr/X11/include/", "--x-lib=/usr/X11/lib/"] - args << "--without-freetype" if MACOS_VERSION >= 10.6 and Hardware.is_64_bit? + args << "--without-freetype" if snow_leopard_64? args << "--disable-win16" if MACOS_VERSION < 10.6 if Hardware.is_64_bit? and Formula.factory('mpg123').installed? diff --git a/Library/Formula/x264.rb b/Library/Formula/x264.rb index bc5951dc5..af16ce2ce 100644 --- a/Library/Formula/x264.rb +++ b/Library/Formula/x264.rb @@ -16,7 +16,7 @@ class X264 <Formula ldflags = s.get_make_var 'LDFLAGS' s.change_make_var! 'LDFLAGS', ldflags.gsub!(' -s', '') - if MACOS_VERSION >= 10.6 and Hardware.is_64_bit? + if snow_leopard_64? soflags = s.get_make_var 'SOFLAGS' s.change_make_var! 'SOFLAGS', soflags.gsub!(' -Wl,-read_only_relocs,suppress', '') end diff --git a/Library/Homebrew/hardware.rb b/Library/Homebrew/hardware.rb index 3d76a74db..4c7924372 100644 --- a/Library/Homebrew/hardware.rb +++ b/Library/Homebrew/hardware.rb @@ -69,3 +69,7 @@ protected $?.success? && result == 1 # sysctl call succeded and printed 1 end end + +def snow_leopard_64? + MACOS_VERSION >= 10.6 and Hardware.is_64_bit? +end |
