aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/libvpx.rb
diff options
context:
space:
mode:
authorNibbles 2bits2012-02-16 20:17:31 -0800
committerJack Nagel2012-02-27 13:48:15 -0600
commitebf1682c3e63d0187fe090cbc3652fc5cceec9da (patch)
treeff820ac6b9130257d075790b25a7d9f2a16dde27 /Library/Formula/libvpx.rb
parent7ec5e5b5b15c0df38459fef0d3a56ad712ebf176 (diff)
downloadhomebrew-ebf1682c3e63d0187fe090cbc3652fc5cceec9da.tar.bz2
libvpx: determine correct build target
Adjust the formula for libvpx to determine the correct target. This was tested on 32bit and 64bit Snow Leopard 10.6.8 using all three compilers from XCode-4.0.2, and it was tested on Lion using both compilers from XCode-4.2.1 and 4.3. Closes #10249.
Diffstat (limited to 'Library/Formula/libvpx.rb')
-rw-r--r--Library/Formula/libvpx.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/Library/Formula/libvpx.rb b/Library/Formula/libvpx.rb
index 3f4254880..8f81d5430 100644
--- a/Library/Formula/libvpx.rb
+++ b/Library/Formula/libvpx.rb
@@ -39,7 +39,13 @@ class Libvpx < Formula
args << "--enable-postproc-visualizer" if ARGV.include? "--visualizer"
# see http://code.google.com/p/webm/issues/detail?id=401
- args << '--target=generic-gnu'
+ # Determine if the computer runs Darwin 9, 10, or 11 using uname -r.
+ osver = %x[uname -r | cut -d. -f1].chomp
+ if MacOS.prefer_64_bit? then
+ args << "--target=x86_64-darwin#{osver}-gcc"
+ else
+ args << "--target=x86-darwin#{osver}-gcc"
+ end
mkdir 'macbuild' do
system "../configure", *args