aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/libdnet.rb
blob: c220a18fb8ab4d33e16c9ddbc292d9c9c8479ad0 (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
40
41
42
43
44
45
46
47
48
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 => :build
  depends_on :libtool => :build
  depends_on :python => :optional

  # Fix use of deprecated macros
  # http://code.google.com/p/libdnet/issues/detail?id=27
  def patches
    DATA
  end

  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.with? "python"
    system "./configure", *args
    system "make install"
  end
end


__END__
diff --git a/configure.in b/configure.in
index 72ac63c..109dc63 100644
--- a/configure.in
+++ b/configure.in
@@ -10,7 +10,7 @@ AC_CONFIG_AUX_DIR(config)
 AC_SUBST(ac_aux_dir)
 
 AM_INIT_AUTOMAKE(libdnet, 1.12)
-AM_CONFIG_HEADER(include/config.h)
+AC_CONFIG_HEADERS(include/config.h)
 
 dnl XXX - stop the insanity!@#$
 AM_MAINTAINER_MODE