homebrew-core/Formula/mediaconch.rb
2017-01-04 15:18:22 +01: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/16.12/MediaConch_CLI_16.12_GNU_FromSource.tar.bz2"
version "16.12"
sha256 "4da0bf62e0cfc0ac33d8172595af40c4dc53256ac37a291c3910ad3b80503210"
bottle do
cellar :any
sha256 "5c162ea8f1620238e57b9de70b1d2182255c97afb42400402a07cd715d97ce58" => :sierra
sha256 "c2e0a91badd1107cd3315553a020a017f2e365a0afa3dd46706f6a8b60c2d615" => :el_capitan
sha256 "c26d9c20b2c255112144595bdd7c92b44a1607f8c89bf17ae66a97f7b6b2714e" => :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