aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/aria2.rb
blob: d75633d248aaf2237b48962445654e94305c1dd9 (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
30
31
32
33
34
35
36
37
38
39
class Aria2 < Formula
  homepage "http://aria2.sourceforge.net/"
  url "https://downloads.sourceforge.net/project/aria2/stable/aria2-1.18.9/aria2-1.18.9.tar.bz2"
  sha1 "31ac90d9ffcdba4cdf936ddfbc3d8f08416360e6"

  bottle do
    cellar :any
    sha1 "a82e7baf0bf64cd3beb6ee2c5d16c10534138852" => :yosemite
    sha1 "f0ab29fdeebb96b6f9594a7119b9210b820b28f4" => :mavericks
    sha1 "b931e5c286c97a5cc5d5ef2e21336dfc9fe62ea6" => :mountain_lion
  end

  depends_on "pkg-config" => :build

  needs :cxx11

  def install
    args = %W[
      --disable-dependency-tracking
      --prefix=#{prefix}
      --with-appletls
      --without-openssl
      --without-gnutls
      --without-libgmp
      --without-libnettle
      --without-libgcrypt
    ]

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

    bash_completion.install "doc/bash_completion/aria2c"
  end

  test do
    system "#{bin}/aria2c", "http://brew.sh"
    assert File.exist? "index.html"
  end
end