curl: update options

This commit is contained in:
Jack Nagel 2014-11-14 14:35:07 -06:00
parent 845a65029e
commit a245077e64

View file

@ -15,13 +15,18 @@ class Curl < Formula
keg_only :provided_by_osx
option 'with-idn', 'Build with support for Internationalized Domain Names'
option 'with-rtmp', 'Build with RTMP support'
option 'with-ssh', 'Build with scp and sftp support'
option 'with-ares', 'Build with C-Ares async DNS support'
option 'with-libidn', 'Build with support for Internationalized Domain Names'
option 'with-rtmpdump', 'Build with RTMP support'
option 'with-libssh2', 'Build with scp and sftp support'
option 'with-c-ares', 'Build with C-Ares async DNS support'
option 'with-gssapi', 'Build with GSSAPI/Kerberos authentication support.'
option 'with-libmetalink', 'Build with libmetalink support.'
deprecated_option "with-idn" => "with-libidn"
deprecated_option "with-rtmp" => "with-rtmpdump"
deprecated_option "with-ssh" => "with-libssh2"
deprecated_option "with-ares" => "with-c-ares"
if MacOS.version >= :mountain_lion
option 'with-openssl', 'Build with OpenSSL instead of Secure Transport'
depends_on 'openssl' => :optional
@ -30,11 +35,11 @@ class Curl < Formula
end
depends_on 'pkg-config' => :build
depends_on 'libidn' if build.with? 'idn'
depends_on 'libidn' => :optional
depends_on 'libmetalink' => :optional
depends_on 'libssh2' if build.with? 'ssh'
depends_on 'c-ares' if build.with? 'ares'
depends_on 'rtmpdump' if build.with? 'rtmp'
depends_on 'libssh2' => :optional
depends_on 'c-ares' => :optional
depends_on 'rtmpdump' => :optional
def install
args = %W[
@ -50,13 +55,13 @@ class Curl < Formula
args << "--with-darwinssl"
end
args << (build.with?("ssh") ? "--with-libssh2" : "--without-libssh2")
args << (build.with?("idn") ? "--with-libidn" : "--without-libidn")
args << (build.with?("libssh2") ? "--with-libssh2" : "--without-libssh2")
args << (build.with?("libidn") ? "--with-libidn" : "--without-libidn")
args << (build.with?("libmetalink") ? "--with-libmetalink" : "--without-libmetalink")
args << (build.with?("gssapi") ? "--with-gssapi" : "--without-gssapi")
args << (build.with?("rtmp") ? "--with-librtmp" : "--without-librtmp")
args << (build.with?("rtmpdump") ? "--with-librtmp" : "--without-librtmp")
if build.with? "ares"
if build.with? "c-ares"
args << "--enable-ares=#{Formula["c-ares"].opt_prefix}"
else
args << "--disable-ares"