Define "snow_leopard_64?"
snow_leopard_64? (defined in Hardware) is a short-cut for: MACOS_VERSION >= 10.6 and Hardware.is_64_bit? Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
parent
e7351d9722
commit
576185d345
20 changed files with 59 additions and 88 deletions
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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", ""
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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/$@ ", ""
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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']
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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?
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue