aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/libdnet.rb
blob: 7d46d114a6244119d5a49b31def9590068b0a162 (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 Libdnet < Formula
  homepage 'http://code.google.com/p/libdnet/'
  url 'http://libdnet.googlecode.com/files/libdnet-1.12.tgz'
  sha1 '71302be302e84fc19b559e811951b5d600d976f8'

  depends_on :automake
  depends_on :libtool

  option 'with-python', 'Build Python module'

  def install
    # autoreconf to get '.dylib' extension on shared lib
    ENV['ACLOCAL'] = 'aclocal -I config'
    system 'autoreconf', '-ivf'

    args = %W[
      --disable-dependency-tracking
      --prefix=#{prefix}
      --mandir=#{man}
    ]
    args << "--with-python" if build.include? "with-python"
    system "./configure", *args
    system "make install"
  end
end