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

class Libevent < Formula
  homepage 'http://www.monkey.org/~provos/libevent/'
  url 'https://github.com/downloads/libevent/libevent/libevent-2.0.18-stable.tar.gz'
  sha1 '2a2cc87ce1945f43dfa5a5f9575fef3d14a8f57a'

  head 'git://levent.git.sourceforge.net/gitroot/levent/levent'

  fails_with :llvm do
    build 2326
    cause "Undefined symbol '_current_base' reported during linking."
  end

  if ARGV.build_head? and MacOS.xcode_version >= "4.3"
    depends_on "automake" => :build
    depends_on "libtool" => :build
  end

  def install
    ENV.j1
    system "./autogen.sh" if ARGV.build_head?
    system "./configure", "--prefix=#{prefix}"
    system "make"
    system "make install"
  end
end