diff --git a/Formula/bento4.rb b/Formula/bento4.rb index 6a0925f559e..f7f3dbb77c1 100644 --- a/Formula/bento4.rb +++ b/Formula/bento4.rb @@ -4,6 +4,7 @@ class Bento4 < Formula url "https://github.com/axiomatic-systems/Bento4/archive/v1.5.1-624.tar.gz" version "1.5.1-624" sha256 "eda725298e77df83e51793508a3a2640eabdfda1abc8aa841eca69983de83a4c" + revision 1 bottle do cellar :any_skip_relocation @@ -12,13 +13,27 @@ class Bento4 < Formula sha256 "4950c6055e84b7e09524c954cfb2a55f0c493d82dca6994fb3f0bdfb21fab1d0" => :el_capitan end + depends_on :xcode => :build + depends_on "python@2" + conflicts_with "gpac", :because => "both install `mp42ts` binaries" def install - cd "Build/Targets/any-gnu-gcc" do - system "make", "AP4_BUILD_CONFIG=Release" - bin.install Dir["Release/*"].select { |f| File.executable?(f) } + cd "Build/Targets/universal-apple-macosx" do + xcodebuild "-target", "All", "-configuration", "Release", "SYMROOT=build" + programs = Dir["build/Release/*"].select do |f| + next if f.end_with? ".dylib" + next if f.end_with? "Test" + File.file?(f) && File.executable?(f) + end + bin.install programs end + + rm Dir["Source/Python/wrappers/*.bat"] + inreplace Dir["Source/Python/wrappers/*"], + "BASEDIR=$(dirname $0)", "BASEDIR=#{libexec}/Python/wrappers" + libexec.install "Source/Python" + bin.install_symlink Dir[libexec/"Python/wrappers/*"] end test do