diff --git a/Library/Formula/hping.rb b/Library/Formula/hping.rb index afc7a6debb..e8314df6c4 100644 --- a/Library/Formula/hping.rb +++ b/Library/Formula/hping.rb @@ -1,27 +1,34 @@ require 'formula' class Hping [ + # MacPorts patches: http://trac.macports.org/browser/trunk/dports/net/hping3 + "http://trac.macports.org/export/70033/trunk/dports/net/hping3/files/patch-libpcap_stuff.c.diff", + "http://trac.macports.org/export/70033/trunk/dports/net/hping3/files/patch-ars.c.diff", + "http://trac.macports.org/export/70033/trunk/dports/net/hping3/files/patch-sendip.c.diff", + "http://trac.macports.org/export/70033/trunk/dports/net/hping3/files/patch-Makefile.in.diff", + "http://trac.macports.org/export/70033/trunk/dports/net/hping3/files/patch-bytesex.h.diff" + ]} end + def install + # Compile fails with tcl support; TCL on OS X is 32-bit only + system "./configure", "--no-tcl" + + inreplace 'Makefile' do |s| + s.change_make_var! "INSTALL_PATH", prefix + s.change_make_var! "INSTALL_MANPATH", man + end + + # Target folders need to exist before installing + sbin.mkpath + (man+"man8").mkpath + system "make install" + end end