45 lines
1.6 KiB
Ruby
45 lines
1.6 KiB
Ruby
class Bento4 < Formula
|
|
desc "Full-featured MP4 format and MPEG DASH library and tools"
|
|
homepage "https://www.bento4.com/"
|
|
url "https://github.com/axiomatic-systems/Bento4/archive/v1.5.1-624.tar.gz"
|
|
version "1.5.1-624"
|
|
sha256 "eda725298e77df83e51793508a3a2640eabdfda1abc8aa841eca69983de83a4c"
|
|
revision 2
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "c9300512cdb5392d0f714a4c5bb35842e7a560ad8772c75dbc4c31d60160ced4" => :mojave
|
|
sha256 "2936c7c89761533861eb2ce35d9745f4ff2b762a670430f6c6b9e8a5cb8f44c8" => :high_sierra
|
|
sha256 "698127156bc77e4e5efcea4a1693939aed88f507344a4b580a2ca13c930df8e3" => :sierra
|
|
end
|
|
|
|
depends_on :xcode => :build
|
|
depends_on "python"
|
|
|
|
conflicts_with "gpac", :because => "both install `mp42ts` binaries"
|
|
conflicts_with "mp4v2",
|
|
:because => "both install `mp4extract` and `mp4info` binaries"
|
|
|
|
def install
|
|
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
|
|
system "#{bin}/mp4mux", "--track", test_fixtures("test.m4a"), "out.mp4"
|
|
assert_predicate testpath/"out.mp4", :exist?, "Failed to create out.mp4!"
|
|
end
|
|
end
|