homebrew-core/Formula/libvpx.rb
Nibbles 2bits 2a838feba9 libvpx 0.9.7-p1
This updates libvpx to 0.9.7-p1, which is their patched release.
The formula now sets --enable-pic, which seems justified.
The formula now sets --enable-vp8 to include all their vp8 code.
The formula now exposes four options to the user for setting
code coverage, memory tracking, post processing and visiualization.
Their software creates a native static library.  Their shared lib
will only build on elf32 atm.  This compiles and tests with all
three clang, llvm, and gcc from XCode-4.0.2 on x86_64.  This is a
library for handling video in the VPX codec format, related to
webm and Google.

Closes Homebrew/homebrew#8110.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2011-10-14 18:58:32 -07:00

37 lines
1.1 KiB
Ruby

require 'formula'
class Libvpx < Formula
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
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