2009-12-17 19:55:27 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Curl < Formula
|
2009-12-17 19:55:27 +00:00
|
|
|
homepage 'http://curl.haxx.se/'
|
2013-10-19 23:29:13 +00:00
|
|
|
url 'http://curl.haxx.se/download/curl-7.33.0.tar.gz'
|
|
|
|
mirror 'ftp://ftp.sunet.se/pub/www/utilities/curl/curl-7.33.0.tar.gz'
|
|
|
|
sha256 '7450a9c72bd27dd89dc6996aeadaf354fa49bc3c05998d8507e4ab29d4a95172'
|
2009-12-17 19:55:27 +00:00
|
|
|
|
2011-03-16 05:01:31 +00:00
|
|
|
keg_only :provided_by_osx,
|
|
|
|
"The libcurl provided by Leopard is too old for CouchDB to use."
|
2010-11-09 21:20:56 +00:00
|
|
|
|
2012-08-28 00:31:15 +00:00
|
|
|
option 'with-ssh', 'Build with scp and sftp support'
|
2012-09-20 16:50:15 +00:00
|
|
|
option 'with-ares', 'Build with C-Ares async DNS support'
|
|
|
|
option 'with-ssl', 'Build with Homebrew OpenSSL instead of the system version'
|
2013-04-13 07:32:16 +00:00
|
|
|
option 'with-darwinssl', 'Build with Secure Transport for SSL support'
|
2013-10-23 16:46:43 +00:00
|
|
|
option 'with-gssapi', 'Build with GSSAPI/Kerberos authentication support.'
|
2012-08-28 00:31:15 +00:00
|
|
|
|
2012-04-04 06:28:44 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2013-07-17 01:38:50 +00:00
|
|
|
depends_on 'libmetalink' => :optional
|
2013-04-13 01:01:22 +00:00
|
|
|
depends_on 'libssh2' if build.with? 'ssh'
|
|
|
|
depends_on 'c-ares' if build.with? 'ares'
|
|
|
|
depends_on 'openssl' if build.with? 'ssl'
|
2012-04-04 06:28:44 +00:00
|
|
|
|
2009-12-17 19:55:27 +00:00
|
|
|
def install
|
2012-04-04 06:28:44 +00:00
|
|
|
args = %W[
|
2012-08-28 00:31:15 +00:00
|
|
|
--disable-debug
|
|
|
|
--disable-dependency-tracking
|
|
|
|
--prefix=#{prefix}
|
|
|
|
]
|
2012-04-04 06:28:44 +00:00
|
|
|
|
2013-04-13 01:01:22 +00:00
|
|
|
args << "--with-libssh2" if build.with? 'ssh'
|
|
|
|
args << "--with-libmetalink" if build.with? 'libmetalink'
|
|
|
|
args << "--enable-ares=#{Formula.factory("c-ares").opt_prefix}" if build.with? 'ares'
|
|
|
|
args << "--with-ssl=#{Formula.factory("openssl").opt_prefix}" if build.with? 'ssl'
|
|
|
|
args << "--with-darwinssl" if build.with? 'darwinssl'
|
2013-10-23 16:46:43 +00:00
|
|
|
args << "--with-gssapi" if build.with? 'gssapi'
|
2012-04-04 06:28:44 +00:00
|
|
|
|
|
|
|
system "./configure", *args
|
2009-12-17 19:55:27 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|