homebrew-core/Formula/mediaconch.rb
2017-03-30 16:54:09 +02:00

59 lines
2 KiB
Ruby

class Mediaconch < Formula
desc "Conformance checker and technical metadata reporter"
homepage "https://mediaarea.net/MediaConch"
url "https://mediaarea.net/download/binary/mediaconch/17.03/MediaConch_CLI_17.03_GNU_FromSource.tar.bz2"
version "17.03"
sha256 "1dc6521e8ac51d4da729b50721578484098564f5a4fd4eb5193d0fc88177bcdb"
bottle do
cellar :any
sha256 "7eb7b31f22fa4cfdbae9c2786fb8879d4543111476cd3faeb80985f3b0ae3fc7" => :sierra
sha256 "75afd33e92c992aee692f441ef28bf64174f82bf8047efb36255c1c438e64364" => :el_capitan
sha256 "554f350cbdbd7588de66b6e760686c55eca53b81f99128b3f36e3ea4f921e9f3" => :yosemite
end
depends_on "pkg-config" => :build
depends_on "jansson"
depends_on "libevent"
depends_on "sqlite"
# fails to build against Leopard's older libcurl
depends_on "curl" if MacOS.version < :snow_leopard
def install
cd "ZenLib/Project/GNU/Library" do
args = ["--disable-debug",
"--disable-dependency-tracking",
"--enable-shared",
"--enable-static",
"--prefix=#{prefix}",
# mediaconch installs libs/headers at the same paths as mediainfo
"--libdir=#{lib}/mediaconch",
"--includedir=#{include}/mediaconch"]
system "./configure", *args
system "make", "install"
end
cd "MediaInfoLib/Project/GNU/Library" do
args = ["--disable-debug",
"--disable-dependency-tracking",
"--enable-static",
"--enable-shared",
"--with-libcurl",
"--prefix=#{prefix}",
"--libdir=#{lib}/mediaconch",
"--includedir=#{include}/mediaconch"]
system "./configure", *args
system "make", "install"
end
cd "MediaConch/Project/GNU/CLI" do
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make", "install"
end
end
test do
pipe_output("#{bin}/mediaconch", test_fixtures("test.mp3"))
end
end