mediainfo: add option for --with-libcurl

Enables mediainfo to analyze files online with url input

Closes Homebrew/homebrew#9307.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
This commit is contained in:
Dave Rice 2011-12-28 01:10:45 -05:00 committed by Misty De Meo
parent 1ee4d197c6
commit 040e5d1e57

View file

@ -1,10 +1,18 @@
require 'formula'
def libcurl?
ARGV.include? '--with-libcurl'
end
class MediaInfo < Formula
url 'http://downloads.sourceforge.net/mediainfo/MediaInfo_CLI_0.7.52_GNU_FromSource.tar.bz2'
homepage 'http://mediainfo.sourceforge.net'
md5 '088e62c8f2992c776a881fd6813f150f'
def options
[["--with-libcurl", "Build with libcurl support."]]
end
depends_on 'pkg-config' => :build
def install
@ -15,7 +23,11 @@ class MediaInfo < Formula
system "make"
Dir.chdir root_dir + "/MediaInfoLib/Project/GNU/Library"
system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}"
args = ["--disable-debug",
"--disable-dependency-tracking",
"--prefix=#{prefix}"]
args << "--with-libcurl" if libcurl?
system "./configure", *args
system "make install"
Dir.chdir root_dir + "/MediaInfo/Project/GNU/CLI"