diff options
| author | dinkypumpkin | 2011-04-10 14:55:37 +0100 |
|---|---|---|
| committer | Adam Vandenberg | 2011-04-11 07:53:14 -0700 |
| commit | bdd1ac7af77220c060af5348258cab0ed264759e (patch) | |
| tree | b0d86f47e882996c6c4bb3dc4f1602da61cd2199 /Library/Formula | |
| parent | 49e31b5bb8cf413200ee632bcc9f28fe9ae19d66 (diff) | |
| download | homebrew-bdd1ac7af77220c060af5348258cab0ed264759e.tar.bz2 | |
ffmpeg: restored ffmpeg.org links, fixed inreplace edit
1. Original ffmpeg developers have regained ffmpeg.org from
libav fork, so url and head links have been reset accordingly.
2. Fixed config.mak inreplace munging for 64-bit builds
(was breaking HEAD builds)
3. Changed version string generation to first try version.sh
script in git repo before falling back to 'git describe'
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/ffmpeg.rb | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/Library/Formula/ffmpeg.rb b/Library/Formula/ffmpeg.rb index 3a90a914b..0631d845f 100644 --- a/Library/Formula/ffmpeg.rb +++ b/Library/Formula/ffmpeg.rb @@ -1,11 +1,11 @@ require 'formula' class Ffmpeg < Formula - url 'http://libav.org/releases/libav-0.6.2.tar.bz2' - homepage 'http://libav.org/' - sha1 'b79dc56a08f4ef07b41d1a78b2251f21fde8b81d' + url 'http://ffmpeg.org/releases/ffmpeg-0.6.2.tar.bz2' + homepage 'http://ffmpeg.org/' + sha1 'd4e464d4111971b9cef10be7a1efa3677a899338' - head 'git://git.libav.org/libav.git' + head 'git://git.videolan.org/ffmpeg.git' depends_on 'x264' => :optional depends_on 'faac' => :optional @@ -49,7 +49,9 @@ class Ffmpeg < Formula if MacOS.prefer_64_bit? inreplace 'config.mak' do |s| shflags = s.get_make_var 'SHFLAGS' - s.change_make_var! 'SHFLAGS', shflags.gsub!(' -Wl,-read_only_relocs,suppress', '') + if shflags.gsub!(' -Wl,-read_only_relocs,suppress', '') + s.change_make_var! 'SHFLAGS', shflags + end end end @@ -59,7 +61,7 @@ class Ffmpeg < Formula end # Makefile expects to run in git repo and generate a version number - # with 'git describe --always' (see version.sh) but Homebrew build + # with 'git describe' command (see version.sh) but Homebrew build # runs in temp copy created via git checkout-index, so 'git describe' # does not work. Work around by writing VERSION file in build directory # to be picked up by version.sh. Note that VERSION file will already @@ -68,14 +70,20 @@ class Ffmpeg < Formula return if File.exists?("VERSION") git_tag = "UNKNOWN" Dir.chdir(cached_download) do - ret = `git describe --always` - if not $?.success? - opoo "Could not determine build version from git repository - set to #{git_tag}" + ver = `./version.sh`.chomp + if not $?.success? or ver == "UNKNOWN" + # fall back to git + ver = `git describe --tags --match N --always`.chomp + if not $?.success? + opoo "Could not determine build version from git repository - set to #{git_tag}" + else + git_tag = "git-#{ver}" + end else - git_tag = ret + git_tag = ver end end - File.open("VERSION","w") {|f| f.puts "git-#{git_tag}"} + File.open("VERSION","w") {|f| f.puts git_tag} end end |
