2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-27 23:48:11 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class X264 < Formula
|
2010-09-08 16:39:33 +00:00
|
|
|
url "http://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20100903-2245.tar.bz2"
|
2010-04-04 00:53:53 +00:00
|
|
|
homepage 'http://www.videolan.org/developers/x264.html'
|
2010-09-08 16:39:33 +00:00
|
|
|
md5 '79d13e0fd56a73c65f75940d70e9c450'
|
|
|
|
version 'r1713M-c276662'
|
|
|
|
|
|
|
|
head 'git://git.videolan.org/x264.git'
|
2010-04-04 00:53:53 +00:00
|
|
|
|
2011-03-26 19:33:49 +00:00
|
|
|
depends_on 'yasm' => :build
|
2009-09-27 23:48:11 +00:00
|
|
|
|
|
|
|
def install
|
2011-03-13 17:28:30 +00:00
|
|
|
# Having this set can fail the endian test!
|
|
|
|
ENV['GREP_OPTIONS'] = ''
|
2010-07-11 20:43:58 +00:00
|
|
|
system "./version.sh"
|
2010-04-04 00:53:53 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}",
|
|
|
|
"--enable-shared"
|
|
|
|
|
|
|
|
inreplace 'config.mak' do |s|
|
|
|
|
ldflags = s.get_make_var 'LDFLAGS'
|
|
|
|
s.change_make_var! 'LDFLAGS', ldflags.gsub!(' -s', '')
|
|
|
|
|
2011-03-18 17:30:47 +00:00
|
|
|
if MacOS.prefer_64_bit?
|
2010-04-04 00:53:53 +00:00
|
|
|
soflags = s.get_make_var 'SOFLAGS'
|
|
|
|
s.change_make_var! 'SOFLAGS', soflags.gsub!(' -Wl,-read_only_relocs,suppress', '')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2009-09-27 23:48:11 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|