aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/aria2.rb
blob: b99c5d8205cf992a707c4f5f414a2ad7ea785184 (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
require 'formula'

class Aria2 < Formula
  homepage 'http://aria2.sourceforge.net/'
  url 'https://downloads.sourceforge.net/project/aria2/stable/aria2-1.18.3/aria2-1.18.3.tar.bz2'
  sha1 '1a0b42e69b49fa9efb624ba2ba86118f0fb77aef'

  depends_on 'pkg-config' => :build
  depends_on :macos => :lion # Needs a c++11 compiler

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

    # system zlib and sqlite don't include .pc files
    ENV['ZLIB_CFLAGS'] = '-I/usr/include'
    ENV['ZLIB_LIBS'] = '-L/usr/lib -lz'
    ENV['SQLITE3_CFLAGS'] = '-I/usr/include'
    ENV['SQLITE3_LIBS'] = '-L/usr/lib -lsqlite3'

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

    bash_completion.install "doc/bash_completion/aria2c"
  end
end