555e078450
* Specify the stable branch for the head url. * Use http rather than git for the head url. * Correct the version number, is 2189 for stable (2197 was master) * Note in comments how to use version.sh to get the version number. * Remove the -O1 for clang. Issue is fixed in this version. The previous commit added -O1 to fix a segfault when x264 was compiled with clang. The author was testing this against the previous tarball, not 2189. The devs emailed back explaining that this was fixed since then, and this is confirmed to work using their -O3 or Homebrew's -Os. Users should remove x264 and ffmpeg and `brew install x264 ffmpeg` to get a working pair. Apologies for all this, but it's better to get it right. Closes Homebrew/homebrew#11908. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
32 lines
928 B
Ruby
32 lines
928 B
Ruby
require 'formula'
|
|
|
|
class X264 < Formula
|
|
homepage 'http://www.videolan.org/developers/x264.html'
|
|
url 'http://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20120425-2245-stable.tar.bz2'
|
|
sha1 '969e015e5df24091b5e62873808e6529a7f2fb7f'
|
|
version 'r2189' # use version.sh to find this with brew install -i --HEAD x264
|
|
|
|
head 'http://git.videolan.org/git/x264.git', :branch => 'stable'
|
|
|
|
depends_on 'yasm' => :build
|
|
|
|
def options
|
|
[["--10-bit", "Make a 10-bit x264. (default: 8-bit)"]]
|
|
end
|
|
|
|
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
|
|
|
|
system "make install"
|
|
end
|
|
end
|