class Mediaconch < Formula desc "Conformance checker and technical metadata reporter" homepage "https://mediaarea.net/MediaConch" url "https://mediaarea.net/download/binary/mediaconch/17.02/MediaConch_CLI_17.02_GNU_FromSource.tar.bz2" version "17.02" sha256 "3b9cfb68f2e4901ed1aed8ed4a661d7a4783baf7d4e48492974d106296a0be75" bottle do cellar :any sha256 "5cad15c51aad947a4941d849379db93fa2bb465c96b7283e6966baf6389f0147" => :sierra sha256 "2f0d77b5d58c98ceee20b036bcb927d1dccc973a6e0bcf6a0ab8f431afbf7cb2" => :el_capitan sha256 "27aaa381aa935c605e080472f0f9f5f13d1e8af15f98c978b78a46d9031997bd" => :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