class Mediaconch < Formula desc "Conformance checker and technical metadata reporter" homepage "https://mediaarea.net/MediaConch" url "https://mediaarea.net/download/binary/mediaconch/17.01.1/MediaConch_CLI_17.01.1_GNU_FromSource.tar.bz2" version "17.01.1" sha256 "a935084cd3fcd066de23e33a88a33cf36f447c88335f7518854495f5b8651f75" bottle do cellar :any sha256 "acd3a31aff1c8059e20517f4eb5e55b4be7fabba8b4bc9843405aea06369cec9" => :sierra sha256 "1389e6a7f3ae2419034e3c2c2a6d052353944ae8a7d40c722793e435f92cfcd0" => :el_capitan sha256 "ff1cf0d9c216c5326d55296a26d307364a56b7e81760abbe5d14a5f4d9b3b471" => :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