2010-08-26 18:07:32 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Libvpx < Formula
|
2012-02-22 04:48:36 +00:00
|
|
|
homepage 'http://www.webmproject.org/code/'
|
2013-09-19 13:58:14 +00:00
|
|
|
url 'http://webm.googlecode.com/files/libvpx-v1.2.0.tar.bz2'
|
2013-10-15 23:58:38 +00:00
|
|
|
sha1 '214d9a215af1a3278d9fcba4cac89566e321e4cf'
|
2010-08-26 18:07:32 +00:00
|
|
|
|
2011-03-26 20:23:22 +00:00
|
|
|
depends_on 'yasm' => :build
|
|
|
|
|
2012-10-21 19:52:51 +00:00
|
|
|
option 'gcov', 'Enable code coverage'
|
|
|
|
option 'mem-tracker', 'Enable tracking memory usage'
|
|
|
|
option 'visualizer', 'Enable post processing visualizer'
|
2011-10-14 05:38:07 +00:00
|
|
|
|
2013-07-19 08:24:21 +00:00
|
|
|
# Add Mavericks as a comple target, upstream in:
|
|
|
|
# http://git.chromium.org/gitweb/?p=webm/libvpx.git;a=commitdiff;h=fe4a52077f076fff4f3024373af21600afbc6df7
|
2012-06-20 15:38:26 +00:00
|
|
|
def patches; DATA; end
|
|
|
|
|
2010-08-26 18:07:32 +00:00
|
|
|
def install
|
2011-10-14 05:38:07 +00:00
|
|
|
args = ["--prefix=#{prefix}",
|
|
|
|
"--enable-pic",
|
2012-02-17 04:17:31 +00:00
|
|
|
"--disable-examples",
|
|
|
|
"--disable-runtime-cpu-detect"]
|
2012-10-21 19:52:51 +00:00
|
|
|
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"
|
2013-11-09 17:42:19 +00:00
|
|
|
|
|
|
|
ENV.append "CXXFLAGS", "-DGTEST_USE_OWN_TR1_TUPLE=1" # Mavericks uses libc++ which doesn't supply <TR1/tuple>
|
2012-02-15 15:59:23 +00:00
|
|
|
|
2012-05-20 21:17:58 +00:00
|
|
|
# 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
|
|
|
|
|
2012-02-22 04:48:36 +00:00
|
|
|
mkdir 'macbuild' do
|
2012-02-15 15:59:23 +00:00
|
|
|
system "../configure", *args
|
|
|
|
system "make install"
|
|
|
|
end
|
2010-08-26 18:07:32 +00:00
|
|
|
end
|
|
|
|
end
|
2012-06-20 15:38:26 +00:00
|
|
|
|
|
|
|
__END__
|
2013-07-19 08:24:21 +00:00
|
|
|
--- a/configure 2012-05-09 01:14:00.000000000 +0200
|
|
|
|
+++ b/configure 2013-07-19 10:10:02.000000000 +0200
|
|
|
|
@@ -111,6 +111,7 @@
|
|
|
|
all_platforms="${all_platforms} x86-darwin10-gcc"
|
|
|
|
all_platforms="${all_platforms} x86-darwin11-gcc"
|
|
|
|
all_platforms="${all_platforms} x86-darwin12-gcc"
|
|
|
|
+all_platforms="${all_platforms} x86-darwin13-gcc"
|
|
|
|
all_platforms="${all_platforms} x86-linux-gcc"
|
|
|
|
all_platforms="${all_platforms} x86-linux-icc"
|
|
|
|
all_platforms="${all_platforms} x86-os2-gcc"
|
|
|
|
@@ -123,6 +124,7 @@
|
|
|
|
all_platforms="${all_platforms} x86_64-darwin10-gcc"
|
|
|
|
all_platforms="${all_platforms} x86_64-darwin11-gcc"
|
|
|
|
all_platforms="${all_platforms} x86_64-darwin12-gcc"
|
|
|
|
+all_platforms="${all_platforms} x86_64-darwin13-gcc"
|
|
|
|
all_platforms="${all_platforms} x86_64-linux-gcc"
|
|
|
|
all_platforms="${all_platforms} x86_64-linux-icc"
|
|
|
|
all_platforms="${all_platforms} x86_64-solaris-gcc"
|
|
|
|
@@ -134,6 +136,7 @@
|
|
|
|
all_platforms="${all_platforms} universal-darwin10-gcc"
|
|
|
|
all_platforms="${all_platforms} universal-darwin11-gcc"
|
|
|
|
all_platforms="${all_platforms} universal-darwin12-gcc"
|
|
|
|
+all_platforms="${all_platforms} universal-darwin13-gcc"
|
|
|
|
all_platforms="${all_platforms} generic-gnu"
|
|
|
|
|
|
|
|
# all_targets is a list of all targets that can be configured
|