diff --git a/Formula/libvpx.rb b/Formula/libvpx.rb index 28f054ee3e3..08c0ff323d9 100644 --- a/Formula/libvpx.rb +++ b/Formula/libvpx.rb @@ -1,18 +1,37 @@ require 'formula' class Libvpx < Formula - url 'http://webm.googlecode.com/files/libvpx-v0.9.7.tar.bz2' - sha1 '639596df7182a93db83f61af8f5bb5b6a13dcf63' + url 'http://webm.googlecode.com/files/libvpx-v0.9.7-p1.tar.bz2' + sha1 'dacfefaf3363f781de43858f09cdd0b0d469e6fc' homepage 'http://www.webmproject.org/code/' + version '0.9.7-p1' depends_on 'yasm' => :build + def options + [ + ['--gcov', 'Enable code coverage'], + ['--mem-tracker', 'Enable tracking memory usage'], + ['--postproc','Enable post processing'], + ['--visualizer', 'Enable post processing visualizer'] + ] + end + def install - args = ["--prefix=#{prefix}"] + macbuild = Pathname.pwd+'macbuild' + mkdir macbuild + Dir.chdir macbuild + args = ["--prefix=#{prefix}", + "--enable-pic", + "--enable-vp8"] + args << "--enable-gcov" if ARGV.include? "--gcov" + args << "--enable-mem-tracker" if ARGV.include? "--mem-tracker" + args << "--enable-postproc" if ARGV.include? "--postproc" + args << "--enable-postproc-visualizer" if ARGV.include? "--visualizer" # Configure detects 32-bit CPUs incorrectly. args << "--target=generic-gnu" unless MacOS.prefer_64_bit? - - system "./configure", *args + system "../configure", *args + system "make" system "make install" end end