Last active
December 18, 2015 19:09
-
-
Save jamiehodge/5830578 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Libvpx < Formula | |
homepage 'http://www.webmproject.org/code/' | |
url 'http://webm.googlecode.com/files/libvpx-v1.1.0.tar.bz2' | |
sha1 '356af5f770c50cd021c60863203d8f30164f6021' | |
head 'http://git.chromium.org/webm/libvpx.git' | |
depends_on 'yasm' => :build | |
option 'gcov', 'Enable code coverage' | |
option 'mem-tracker', 'Enable tracking memory usage' | |
option 'visualizer', 'Enable post processing visualizer' | |
def install | |
args = ["--prefix=#{prefix}", | |
"--enable-pic", | |
"--disable-examples", | |
"--disable-runtime-cpu-detect"] | |
args << "--enable-gcov" if build.include? "gcov" and not ENV.compiler == :clang | |
args << "--enable-mem-tracker" if build.include? "mem-tracker" | |
args << "--enable-postproc-visualizer" if build.include? "visualizer" | |
# see http://code.google.com/p/webm/issues/detail?id=401 | |
# Configure misdetects 32-bit 10.6. | |
# Determine if the computer runs Darwin 9, 10, or 11 using uname -r. | |
osver = %x[uname -r | cut -d. -f1].chomp | |
if MacOS.prefer_64_bit? then | |
args << "--target=x86_64-darwin#{osver}-gcc" | |
else | |
args << "--target=x86-darwin#{osver}-gcc" | |
end | |
mkdir 'macbuild' do | |
system "../configure", *args | |
system "make install" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment