homebrew-core/Formula/x264.rb

33 lines
823 B
Ruby
Raw Normal View History

require 'formula'
2009-09-27 23:48:11 +00:00
2011-03-10 05:11:03 +00:00
class X264 < Formula
2012-01-12 20:04:10 +00:00
url 'http://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20120111-2245.tar.bz2'
homepage 'http://www.videolan.org/developers/x264.html'
2012-01-12 20:04:10 +00:00
md5 'a4a18f7172e50b6cecc1c65324a03c9e'
version 'r2245'
head 'git://git.videolan.org/x264.git'
2011-03-26 19:33:49 +00:00
depends_on 'yasm' => :build
2009-09-27 23:48:11 +00:00
def options
[["--10-bit", "Make a 10-bit x264. (default: 8-bit)"]]
end
2009-09-27 23:48:11 +00:00
def install
args = ["--prefix=#{prefix}", "--enable-shared"]
args << "--bit-depth=10" if ARGV.include?('--10-bit')
system "./configure", *args
if MacOS.prefer_64_bit?
inreplace 'config.mak' do |s|
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