homebrew-core/Formula/libvpx.rb

38 lines
1.1 KiB
Ruby
Raw Normal View History

2010-08-26 18:07:32 +00:00
require 'formula'
2011-03-10 05:11:03 +00:00
class Libvpx < Formula
url 'http://webm.googlecode.com/files/libvpx-v0.9.7-p1.tar.bz2'
sha1 'dacfefaf3363f781de43858f09cdd0b0d469e6fc'
2010-08-26 18:07:32 +00:00
homepage 'http://www.webmproject.org/code/'
version '0.9.7-p1'
2010-08-26 18:07:32 +00:00
2011-03-26 20:23:22 +00:00
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
2010-08-26 18:07:32 +00:00
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"
2011-04-13 19:30:02 +00:00
# Configure detects 32-bit CPUs incorrectly.
args << "--target=generic-gnu" unless MacOS.prefer_64_bit?
system "../configure", *args
system "make"
system "make install"
2010-08-26 18:07:32 +00:00
end
end