diff options
| author | Misty De Meo | 2013-08-01 20:40:42 -0700 |
|---|---|---|
| committer | Misty De Meo | 2013-08-15 22:46:56 -0700 |
| commit | a354451a1aeb7b3094001554bd5b683cdc538ed0 (patch) | |
| tree | 56e58684105d24ea767d3b38b7c72b473918e681 /Library/Formula | |
| parent | 89eecf23369de6829a01c68249a42562b1a30247 (diff) | |
| download | homebrew-a354451a1aeb7b3094001554bd5b683cdc538ed0.tar.bz2 | |
Use Hardware::CPU.arch(32|64)_bit in formulae
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/aircrack-ng.rb | 4 | ||||
| -rw-r--r-- | Library/Formula/boost.rb | 8 | ||||
| -rw-r--r-- | Library/Formula/cantera.rb | 8 | ||||
| -rw-r--r-- | Library/Formula/ejabberd.rb | 4 | ||||
| -rw-r--r-- | Library/Formula/flac.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/gdal.rb | 4 | ||||
| -rw-r--r-- | Library/Formula/madplay.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/monotone.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/open-scene-graph.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/subversion.rb | 4 | ||||
| -rw-r--r-- | Library/Formula/wkhtmltopdf.rb | 4 | ||||
| -rw-r--r-- | Library/Formula/yaws.rb | 4 | ||||
| -rw-r--r-- | Library/Formula/zookeeper.rb | 2 |
13 files changed, 25 insertions, 25 deletions
diff --git a/Library/Formula/aircrack-ng.rb b/Library/Formula/aircrack-ng.rb index bcec7fd9f..c99a3aff6 100644 --- a/Library/Formula/aircrack-ng.rb +++ b/Library/Formula/aircrack-ng.rb @@ -16,8 +16,8 @@ class AircrackNg < Formula # sha1-sse2.S:190:32-bit absolute addressing is not supported for x86-64 # sha1-sse2.S:190:cannot do signed 4 byte relocation %w{ CFLAGS CXXFLAGS LDFLAGS OBJCFLAGS OBJCXXFLAGS }.each do |compiler_flag| - ENV.remove compiler_flag, "-arch x86_64" - ENV.append compiler_flag, "-arch i386" + ENV.remove compiler_flag, "-arch #{Hardware::CPU.arch_64_bit}" + ENV.append compiler_flag, "-arch #{Hardware::CPU.arch_32_bit}" end # Fix incorrect OUI url diff --git a/Library/Formula/boost.rb b/Library/Formula/boost.rb index 13f8c6c0f..dc10e555b 100644 --- a/Library/Formula/boost.rb +++ b/Library/Formula/boost.rb @@ -147,12 +147,12 @@ class Boost < Formula if MacOS.version >= :lion and build.with? 'c++11' args << "toolset=clang" << "cxxflags=-std=c++11" args << "cxxflags=-stdlib=libc++" << "cxxflags=-fPIC" - args << "cxxflags=-arch x86_64" if MacOS.prefer_64_bit? or build.universal? - args << "cxxflags=-arch i386" if !MacOS.prefer_64_bit? or build.universal? + args << "cxxflags=-arch #{Hardware::CPU.arch_64_bit}" if MacOS.prefer_64_bit? or build.universal? + args << "cxxflags=-arch #{Hardware::CPU.arch_32_bit}" if !MacOS.prefer_64_bit? or build.universal? args << "linkflags=-stdlib=libc++" args << "linkflags=-headerpad_max_install_names" - args << "linkflags=-arch x86_64" if MacOS.prefer_64_bit? or build.universal? - args << "linkflags=-arch i386" if !MacOS.prefer_64_bit? or build.universal? + args << "linkflags=-arch #{Hardware::CPU.arch_64_bit}" if MacOS.prefer_64_bit? or build.universal? + args << "linkflags=-arch #{Hardware::CPU.arch_32_bit}" if !MacOS.prefer_64_bit? or build.universal? end args << "address-model=32_64" << "architecture=x86" << "pch=off" if build.universal? diff --git a/Library/Formula/cantera.rb b/Library/Formula/cantera.rb index 6ff375d77..861e18e16 100644 --- a/Library/Formula/cantera.rb +++ b/Library/Formula/cantera.rb @@ -18,12 +18,12 @@ class Cantera < Formula def install if MacOS.prefer_64_bit? # There is probably a better way to do this, but this seems to work for my purposes: - ENV['CFLAGS'] += " -arch x86_64" - ENV['CXX_OPT'] = "-arch x86_64" - ENV['ARCHFLAGS'] = "-arch x86_64" + ENV['CFLAGS'] += " -arch #{Hardware::CPU.arch_64_bit}" + ENV['CXX_OPT'] = "-arch #{Hardware::CPU.arch_64_bit}" + ENV['ARCHFLAGS'] = "-arch #{Hardware::CPU.arch_64_bit}" # Maybe this does all that's needed? ENV['BITCOMPILE'] = '64' - buildname = "x86_64-apple-darwin" + buildname = "#{Hardware::CPU.arch_64_bit}-apple-darwin" else buildname = nil # let autoconf guess end diff --git a/Library/Formula/ejabberd.rb b/Library/Formula/ejabberd.rb index 3f1f74937..b6a4e772f 100644 --- a/Library/Formula/ejabberd.rb +++ b/Library/Formula/ejabberd.rb @@ -18,8 +18,8 @@ class Ejabberd < Formula if build.build_32_bit? %w{ CFLAGS LDFLAGS }.each do |compiler_flag| - ENV.remove compiler_flag, "-arch x86_64" - ENV.append compiler_flag, "-arch i386" + ENV.remove compiler_flag, "-arch #{Hardware::CPU.arch_64_bit}" + ENV.append compiler_flag, "-arch #{Hardware::CPU.arch_32_bit}" end end diff --git a/Library/Formula/flac.rb b/Library/Formula/flac.rb index b12686b59..c0f3ca392 100644 --- a/Library/Formula/flac.rb +++ b/Library/Formula/flac.rb @@ -31,7 +31,7 @@ class Flac < Formula # adds universal flags to the generated libtool script inreplace "libtool" do |s| - s.gsub! ":$verstring\"", ":$verstring -arch i386 -arch x86_64\"" + s.gsub! ":$verstring\"", ":$verstring -arch #{Hardware::CPU.arch_32_bit} -arch #{Hardware::CPU.arch_64_bit}\"" end system "make install" diff --git a/Library/Formula/gdal.rb b/Library/Formula/gdal.rb index de91b83a0..dd65fa473 100644 --- a/Library/Formula/gdal.rb +++ b/Library/Formula/gdal.rb @@ -208,9 +208,9 @@ class Gdal < Formula # `python-config` may try to talk us into building bindings for more # architectures than we really should. if MacOS.prefer_64_bit? - ENV.append_to_cflags '-arch x86_64' + ENV.append_to_cflags "-arch #{Hardware::CPU.arch_64_bit}" else - ENV.append_to_cflags '-arch i386' + ENV.append_to_cflags "-arch #{Hardware::CPU.arch_32_bit}" end cd 'swig/python' do diff --git a/Library/Formula/madplay.rb b/Library/Formula/madplay.rb index 3365f0dae..2b0a31c88 100644 --- a/Library/Formula/madplay.rb +++ b/Library/Formula/madplay.rb @@ -17,7 +17,7 @@ class Madplay < Formula "--prefix=#{prefix}", "--mandir=#{man}"] # Avoid "error: CPU you selected does not support x86-64 instruction set" - args << "--build=x86_64" if MacOS.prefer_64_bit? + args << "--build=#{Hardware::CPU.arch_64_bit}" if MacOS.prefer_64_bit? system "./configure", *args system "make install" end diff --git a/Library/Formula/monotone.rb b/Library/Formula/monotone.rb index 61a865410..b848a3201 100644 --- a/Library/Formula/monotone.rb +++ b/Library/Formula/monotone.rb @@ -27,7 +27,7 @@ class Monotone < Formula Botan18.new.brew do args = ["--prefix=#{botan18_prefix}"] - args << "--cpu=x86_64" if MacOS.prefer_64_bit? + args << "--cpu=#{Hardware::CPU.arch_64_bit}" if MacOS.prefer_64_bit? system "./configure.py", *args system "make", "CXX=#{ENV.cxx}", "install" end diff --git a/Library/Formula/open-scene-graph.rb b/Library/Formula/open-scene-graph.rb index 91c953a2b..98f6ccdb6 100644 --- a/Library/Formula/open-scene-graph.rb +++ b/Library/Formula/open-scene-graph.rb @@ -38,7 +38,7 @@ class OpenSceneGraph < Formula args << '-DBUILD_DOCUMENTATION=' + ((build.include? 'docs') ? 'ON' : 'OFF') if MacOS.prefer_64_bit? - args << "-DCMAKE_OSX_ARCHITECTURES=x86_64" + args << "-DCMAKE_OSX_ARCHITECTURES=#{Hardware::CPU.arch_64_bit}" args << "-DOSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX=imageio" args << "-DOSG_WINDOWING_SYSTEM=Cocoa" else diff --git a/Library/Formula/subversion.rb b/Library/Formula/subversion.rb index 0ac11ea38..5ad07ed81 100644 --- a/Library/Formula/subversion.rb +++ b/Library/Formula/subversion.rb @@ -124,9 +124,9 @@ class Subversion < Formula if build.universal? arches = "-arch x86_64 -arch i386" elsif MacOS.version <= :leopard - arches = "-arch i386" + arches = "-arch #{Hardware::CPU.arch_32_bit}" else - arches = "-arch x86_64" + arches = "-arch #{Hardware::CPU.arch_64_bit}" end perl_core = Pathname.new(`perl -MConfig -e 'print $Config{archlib}'`)+'CORE' diff --git a/Library/Formula/wkhtmltopdf.rb b/Library/Formula/wkhtmltopdf.rb index 7d446da54..f677137a1 100644 --- a/Library/Formula/wkhtmltopdf.rb +++ b/Library/Formula/wkhtmltopdf.rb @@ -20,8 +20,8 @@ class Wkhtmltopdf < Formula # issue with our Qt4, not upstream, because wkhtmltopdf bundles a patched # Qt4 that Homebrew doesn't use. if MacOS.prefer_64_bit? - inreplace 'src/pdf/pdf.pro', 'x86', 'x86_64' - inreplace 'src/image/image.pro', 'x86', 'x86_64' + inreplace 'src/pdf/pdf.pro', 'x86', Hardware::CPU.arch_64_bit + inreplace 'src/image/image.pro', 'x86', Hardware::CPU.arch_64_bit end system 'qmake', '-spec', 'macx-g++' diff --git a/Library/Formula/yaws.rb b/Library/Formula/yaws.rb index 72e4e502c..8a74de40a 100644 --- a/Library/Formula/yaws.rb +++ b/Library/Formula/yaws.rb @@ -18,8 +18,8 @@ class Yaws < Formula def install if build.build_32_bit? %w{ CFLAGS LDFLAGS }.each do |compiler_flag| - ENV.remove compiler_flag, "-arch x86_64" - ENV.append compiler_flag, "-arch i386" + ENV.remove compiler_flag, "-arch #{Hardware::CPU.arch_64_bit}" + ENV.append compiler_flag, "-arch #{Hardware::CPU.arch_32_bit}" end end diff --git a/Library/Formula/zookeeper.rb b/Library/Formula/zookeeper.rb index b35509a80..cfb048d00 100644 --- a/Library/Formula/zookeeper.rb +++ b/Library/Formula/zookeeper.rb @@ -46,7 +46,7 @@ class Zookeeper < Formula def install # Don't try to build extensions for PPC if Hardware.is_32_bit? - ENV['ARCHFLAGS'] = "-arch i386" + ENV['ARCHFLAGS'] = "-arch #{Hardware::CPU.arch_32_bit}" else ENV['ARCHFLAGS'] = "-arch i386 -arch x86_64" end |
