aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/arping.rb
diff options
context:
space:
mode:
authorJoshua Suggs2010-04-21 15:08:43 -0400
committerAdam Vandenberg2010-05-12 08:28:04 -0700
commit1ba6d60abcaa02c8b3dbfbfde39db74cc5ee6ec5 (patch)
tree0df46d1291cf1045f8a4f191962557f3c861c6f4 /Library/Formula/arping.rb
parent7abef33894da5772bb29b366e41cd4db3ee633e3 (diff)
downloadhomebrew-1ba6d60abcaa02c8b3dbfbfde39db74cc5ee6ec5.tar.bz2
New formula for arping 2.09
Signed-off-by: Adam Vandenberg <flangy@gmail.com> * Fix md5
Diffstat (limited to 'Library/Formula/arping.rb')
-rw-r--r--Library/Formula/arping.rb51
1 files changed, 51 insertions, 0 deletions
diff --git a/Library/Formula/arping.rb b/Library/Formula/arping.rb
new file mode 100644
index 000000000..e6a02df7a
--- /dev/null
+++ b/Library/Formula/arping.rb
@@ -0,0 +1,51 @@
+require 'formula'
+
+class Arping <Formula
+ url 'http://github.com/ThomasHabets/arping/tarball/arping-2.09'
+ version '2.09'
+ homepage 'http://github.com/ThomasHabets/arping'
+ md5 '8a10b23655ffbe93667691fb881afbf4'
+
+ depends_on 'libnet'
+
+ def install
+ system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}"
+
+ # See patches comment
+ inreplace 'Makefile' do |s|
+ s.change_make_var! "LIBS", " -lnet"
+ end
+
+ system "make"
+ system "make install"
+ end
+
+ def patches
+ # Patch removes header conflict with libpcap
+ # arping 2.x uses libnet
+ DATA
+ end
+end
+
+__END__
+diff --git a/src/arping.c b/src/arping.c
+index 7b5e43e..b80e4d8 100644
+--- a/src/arping.c
++++ b/src/arping.c
+@@ -78,12 +78,14 @@
+ #if HAVE_WIN32_LIBNET_H
+ #include <win32/libnet.h>
+ #endif
+-#include <pcap.h>
+
+ #if HAVE_NET_BPF_H
+ #include <net/bpf.h>
+ #endif
+
++#define PCAP_DONT_INCLUDE_PCAP_BPF_H
++#include <pcap.h>
++
+ #ifndef ETH_ALEN
+ #define ETH_ALEN 6
+ #endif
+