libvpx: fix build on 64-bit

Fixes Homebrew/homebrew#8163.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
Jack Nagel 2012-02-15 09:59:23 -06:00
parent 8214e7b9e7
commit c77e256fea

View file

@ -17,9 +17,6 @@ class Libvpx < Formula
end end
def install def install
macbuild = Pathname.pwd+'macbuild'
mkdir macbuild
Dir.chdir macbuild
args = ["--prefix=#{prefix}", args = ["--prefix=#{prefix}",
"--enable-pic", "--enable-pic",
"--enable-vp8"] "--enable-vp8"]
@ -27,10 +24,16 @@ class Libvpx < Formula
args << "--enable-mem-tracker" if ARGV.include? "--mem-tracker" args << "--enable-mem-tracker" if ARGV.include? "--mem-tracker"
args << "--enable-postproc" if ARGV.include? "--postproc" args << "--enable-postproc" if ARGV.include? "--postproc"
args << "--enable-postproc-visualizer" if ARGV.include? "--visualizer" args << "--enable-postproc-visualizer" if ARGV.include? "--visualizer"
# Configure detects 32-bit CPUs incorrectly.
args << "--target=generic-gnu" unless MacOS.prefer_64_bit? # Unless the arch is specified, configure tries to build universal.
# Patches welcome to detect and apply the real arch strings on each platform.
args << "--target=generic-gnu"
mkdir 'macbuild'
cd 'macbuild' do
system "../configure", *args system "../configure", *args
system "make" system "make"
system "make install" system "make install"
end end
end end
end