aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorJack Nagel2012-05-20 16:17:58 -0500
committerJack Nagel2012-05-20 16:18:59 -0500
commit173f3f4cbae3355b2ae8307041e772a078eff98b (patch)
treec2ff722d9dcb80e6faa34f436c74f25f471c2551 /Library/Formula
parent3443d13a267b05aa7c4ed9dd4cceed6068359c5f (diff)
downloadhomebrew-173f3f4cbae3355b2ae8307041e772a078eff98b.tar.bz2
libvpx: restore platform detection
Configure is still misdetecting 32-bit 10.6 as 64-bit. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/libvpx.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/Library/Formula/libvpx.rb b/Library/Formula/libvpx.rb
index 6ce62855f..cd949aa91 100644
--- a/Library/Formula/libvpx.rb
+++ b/Library/Formula/libvpx.rb
@@ -26,6 +26,16 @@ class Libvpx < Formula
args << "--enable-mem-tracker" if ARGV.include? "--mem-tracker"
args << "--enable-postproc-visualizer" if ARGV.include? "--visualizer"
+ # see http://code.google.com/p/webm/issues/detail?id=401
+ # Configure misdetects 32-bit 10.6.
+ # 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
system "make install"