2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-07 12:21:11 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Aria2 < Formula
|
2010-02-11 22:50:16 +00:00
|
|
|
homepage 'http://aria2.sourceforge.net/'
|
2013-04-24 01:37:34 +00:00
|
|
|
url 'http://downloads.sourceforge.net/project/aria2/stable/aria2-1.17.1/aria2-1.17.1.tar.bz2'
|
|
|
|
sha1 'a40730013501554cdb0ce2b56a919f3ee971c06e'
|
|
|
|
|
|
|
|
option 'with-appletls', 'Build with Secure Transport for SSL support'
|
2012-03-06 05:47:22 +00:00
|
|
|
|
|
|
|
depends_on 'pkg-config' => :build
|
2012-12-15 05:00:03 +00:00
|
|
|
depends_on 'gnutls'
|
2013-07-14 18:01:30 +00:00
|
|
|
depends_on 'sqlite'
|
2013-02-21 05:38:03 +00:00
|
|
|
depends_on 'curl-ca-bundle' => :recommended
|
2009-09-07 12:21:11 +00:00
|
|
|
|
2012-03-14 14:54:19 +00:00
|
|
|
# Leopard's libxml2 is too old.
|
2013-07-10 02:30:15 +00:00
|
|
|
depends_on 'libxml2' if MacOS.version <= :leopard
|
2012-03-14 14:54:19 +00:00
|
|
|
|
2009-09-07 12:21:11 +00:00
|
|
|
def install
|
2013-02-21 05:38:03 +00:00
|
|
|
args = %W[--disable-dependency-tracking --prefix=#{prefix}]
|
|
|
|
args << "--with-ca-bundle=#{HOMEBREW_PREFIX}/share/ca-bundle.crt" if build.with? 'curl-ca-bundle'
|
2013-04-24 01:37:34 +00:00
|
|
|
if build.with? 'appletls'
|
|
|
|
args << "--with-appletls"
|
|
|
|
else
|
|
|
|
args << "--without-appletls"
|
|
|
|
end
|
2013-02-21 05:38:03 +00:00
|
|
|
|
|
|
|
system "./configure", *args
|
2009-09-07 12:21:11 +00:00
|
|
|
system "make install"
|
2013-07-14 18:01:30 +00:00
|
|
|
|
|
|
|
bash_completion.install "doc/bash_completion/aria2c"
|
2009-09-07 12:21:11 +00:00
|
|
|
end
|
|
|
|
end
|