aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/curl.rb
blob: 4046c8029943da57c8597790a307768b666e0e4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
require 'formula'

class Curl < Formula
  homepage 'http://curl.haxx.se/'
  url 'http://curl.haxx.se/download/curl-7.27.0.tar.gz'
  sha256 '8cbad34e58608f0e959fe16c7c987e57f5f3dec2c92d1cebb0678f9d668a6867'

  keg_only :provided_by_osx,
            "The libcurl provided by Leopard is too old for CouchDB to use."

  depends_on 'pkg-config' => :build
  depends_on 'libssh2' if ARGV.include? "--with-ssh"

  def options
    [["--with-ssh", "Build with scp and sftp support."]]
  end

  def install
    args = %W[
        --disable-debug
        --disable-dependency-tracking
        --prefix=#{prefix}]

    args << "--with-libssh2" if ARGV.include? "--with-ssh"

    system "./configure", *args
    system "make install"
  end
end