2010-05-06 03:07:06 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Libdnet < Formula
|
2010-05-06 03:07:06 +00:00
|
|
|
url 'http://libdnet.googlecode.com/files/libdnet-1.12.tgz'
|
|
|
|
homepage 'http://code.google.com/p/libdnet/'
|
|
|
|
md5 '9253ef6de1b5e28e9c9a62b882e44cc9'
|
|
|
|
|
2012-05-16 20:28:22 +00:00
|
|
|
if MacOS.xcode_version >= '4.3'
|
2012-02-28 17:31:20 +00:00
|
|
|
depends_on "automake" => :build
|
|
|
|
depends_on "libtool" => :build
|
2012-02-27 03:44:55 +00:00
|
|
|
end
|
|
|
|
|
2012-03-13 03:55:07 +00:00
|
|
|
def options
|
|
|
|
[['--with-python', 'Build Python module too.']]
|
|
|
|
end
|
|
|
|
|
2010-05-06 03:07:06 +00:00
|
|
|
def install
|
2012-05-10 07:34:31 +00:00
|
|
|
# autoreconf to get '.dylib' extension on shared lib
|
|
|
|
ENV['ACLOCAL'] = 'aclocal -I config'
|
|
|
|
system 'autoreconf', '-ivf'
|
2011-10-17 23:37:02 +00:00
|
|
|
|
2012-05-10 07:34:31 +00:00
|
|
|
args = %W[
|
|
|
|
--disable-dependency-tracking
|
|
|
|
--prefix=#{prefix}
|
|
|
|
--mandir=#{man}
|
|
|
|
]
|
2012-03-13 03:55:07 +00:00
|
|
|
args << "--with-python" if ARGV.include? "--with-python"
|
|
|
|
system "./configure", *args
|
2010-05-06 03:07:06 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|