homebrew-core/Formula/curl.rb

40 lines
1.4 KiB
Ruby
Raw Normal View History

require 'formula'
2011-03-10 05:11:03 +00:00
class Curl < Formula
homepage 'http://curl.haxx.se/'
2013-04-13 00:58:30 +00:00
url 'http://curl.haxx.se/download/curl-7.30.0.tar.gz'
sha256 '361669c3c4b9baa5343e7e83bce695e60683d0b97b402e664bbaed42c15e95a8'
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."
option 'with-ssh', 'Build with scp and sftp support'
option 'with-libmetalink', 'Build with Metalink support'
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'
depends_on 'pkg-config' => :build
2013-04-13 01:01:22 +00:00
depends_on 'libssh2' if build.with? 'ssh'
depends_on 'libmetalink' if build.with? 'libmetalink'
depends_on 'c-ares' if build.with? 'ares'
depends_on 'openssl' if build.with? 'ssl'
def install
args = %W[
--disable-debug
--disable-dependency-tracking
--prefix=#{prefix}
]
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'
system "./configure", *args
system "make install"
end
end