homebrew-core/Formula/arping.rb
Jack Nagel e242232117 arping: remove no-op inreplace
Settings LIBS to -lnet in the top level Makefile does not affect
src/Makefile, which is what really counts, and in fact when the
inreplace is done correctly it causes the build to fail.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-12 21:56:27 -06:00

44 lines
907 B
Ruby

require 'formula'
class Arping < Formula
homepage 'https://github.com/ThomasHabets/arping'
url 'https://github.com/ThomasHabets/arping/tarball/arping-2.09'
md5 '8a10b23655ffbe93667691fb881afbf4'
depends_on 'libnet'
def patches
# Patch removes header conflict with libpcap; arping 2.x uses libnet
DATA
end
def install
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make install"
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