2009-12-20 00:19:58 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Libnet < Formula
|
2010-11-10 18:16:28 +00:00
|
|
|
homepage 'https://github.com/sam-github/libnet'
|
2014-02-27 14:19:55 +00:00
|
|
|
url 'https://downloads.sourceforge.net/project/libnet-dev/libnet-1.1.6.tar.gz'
|
2012-04-21 03:02:41 +00:00
|
|
|
sha1 'dffff71c325584fdcf99b80567b60f8ad985e34c'
|
2012-02-28 15:39:22 +00:00
|
|
|
|
2014-02-24 15:11:23 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2014-10-19 19:03:30 +00:00
|
|
|
revision 1
|
|
|
|
sha1 "4fde2d99706c15ca126f6f5ac83226288d0de5d0" => :yosemite
|
|
|
|
sha1 "8bcb8736a1264d1ec6c44312e36f81ec7a7720c6" => :mavericks
|
|
|
|
sha1 "14f7d1d0c595c08c0bbcc4182ff6eabca6df5c8a" => :mountain_lion
|
2014-02-24 15:11:23 +00:00
|
|
|
end
|
|
|
|
|
2012-08-10 16:28:22 +00:00
|
|
|
# MacPorts does an autoreconf to get raw sockets working
|
2014-06-01 01:39:27 +00:00
|
|
|
depends_on "automake" => :build
|
|
|
|
depends_on "autoconf" => :build
|
|
|
|
depends_on "libtool" => :build
|
2012-08-10 16:28:22 +00:00
|
|
|
|
|
|
|
# Fix raw sockets support
|
2014-03-14 15:03:24 +00:00
|
|
|
patch :p0 do
|
|
|
|
url "https://trac.macports.org/export/95336/trunk/dports/net/libnet11/files/patch-configure.in.diff"
|
|
|
|
sha1 "f315227dbb205098c6aab92ee9ea17ce87e91384"
|
2012-08-10 16:28:22 +00:00
|
|
|
end
|
|
|
|
|
2009-12-20 00:19:58 +00:00
|
|
|
def install
|
2014-05-17 04:34:38 +00:00
|
|
|
system "autoreconf", "-fvi"
|
2012-08-10 16:28:22 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}"
|
|
|
|
inreplace "src/libnet_link_bpf.c", "#include <net/bpf.h>", "" # Per MacPorts
|
2009-12-20 00:19:58 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|