homebrew-core/Formula/libvpx.rb
Justin Clift aeac817eb5 libvpx 1.0.0
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-01-28 11:06:59 -08:00

36 lines
1.1 KiB
Ruby

require 'formula'
class Libvpx < Formula
url 'http://webm.googlecode.com/files/libvpx-v1.0.0.tar.bz2'
sha256 '07cedb0a19a44e6d81d75f52eea864f59ef10c6c725cb860431bec6641eafe21'
homepage 'http://www.webmproject.org/code/'
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
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 "make"
system "make install"
end
end