From 7b0cd7877310e2e7fda2bdfdfb8ac8db42151578 Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Thu, 27 Mar 2014 08:46:06 -0700 Subject: curl: explicitly disable unwanted libraries curl will opportunistically pick up unrequested librares, despite superenv filtering. This adds a few extra options for things curl can find on its own, and explicitly disables anything that's unrequested. --- Library/Formula/curl.rb | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'Library') diff --git a/Library/Formula/curl.rb b/Library/Formula/curl.rb index 2e6661cec..b3cf1b0b7 100644 --- a/Library/Formula/curl.rb +++ b/Library/Formula/curl.rb @@ -8,6 +8,8 @@ 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-gssapi', 'Build with GSSAPI/Kerberos authentication support.' @@ -20,9 +22,11 @@ class Curl < Formula end depends_on 'pkg-config' => :build + depends_on 'libidn' if build.with? 'idn' 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' def install args = %W[ @@ -37,10 +41,18 @@ class Curl < Formula args << "--with-darwinssl" end - args << "--with-libssh2" if build.with? 'ssh' - args << "--with-libmetalink" if build.with? 'libmetalink' - args << "--enable-ares=#{Formula["c-ares"].opt_prefix}" if build.with? 'ares' - args << "--with-gssapi" if build.with? 'gssapi' + args << (build.with?("ssh") ? "--with-libssh2" : "--without-libssh2") + args << (build.with?("idn") ? "--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?("gssapi") ? "--with-gssapi" : "--without-gssapi") + + if build.with? "ares" + args << "--enable-ares=#{Formula["c-ares"].opt_prefix}" + else + args << "--disable-ares" + end system "./configure", *args system "make install" -- cgit v1.2.3