bento4: install missing programs

require Xcode at build time
depend on python@2

Fixes #28389.

Closes #28699.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
master
ilovezfs 2018-06-05 17:38:11 -07:00
parent 0c1a8d9cab
commit 32015e5bd0
1 changed files with 18 additions and 3 deletions

View File

@ -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