2009-12-20 00:19:58 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Libnet < Formula
|
2010-11-10 18:16:28 +00:00
|
|
|
url "https://github.com/sam-github/libnet/tarball/libnet-1.1.4"
|
2010-07-02 15:40:04 +00:00
|
|
|
md5 "0cb6c04063c1db37c91af08c76d25134"
|
2011-05-27 05:02:55 +00:00
|
|
|
head 'https://github.com/sam-github/libnet.git'
|
2010-11-10 18:16:28 +00:00
|
|
|
homepage 'https://github.com/sam-github/libnet'
|
2009-12-20 00:19:58 +00:00
|
|
|
|
2012-02-28 15:39:22 +00:00
|
|
|
if MacOS.xcode_version >= "4.3"
|
|
|
|
# when and if the tarball provides configure, remove autogen.sh and these deps
|
|
|
|
depends_on "automake" => :build
|
|
|
|
depends_on "libtool" => :build
|
|
|
|
end
|
|
|
|
|
2009-12-20 00:19:58 +00:00
|
|
|
def install
|
|
|
|
cd 'libnet'
|
2010-07-02 15:40:04 +00:00
|
|
|
inreplace "autogen.sh", "libtoolize", "glibtoolize"
|
2009-12-20 00:19:58 +00:00
|
|
|
system "./autogen.sh"
|
2011-02-01 17:32:49 +00:00
|
|
|
|
2011-04-08 18:16:37 +00:00
|
|
|
unless MacOS.leopard?
|
2011-02-01 17:32:49 +00:00
|
|
|
cp "/usr/share/libtool/config/config.guess", "."
|
|
|
|
cp "/usr/share/libtool/config/config.sub", "."
|
|
|
|
end
|
|
|
|
|
2009-12-20 00:19:58 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"
|
|
|
|
touch 'doc/man/man3/libnet.3'
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|