2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-13 04:28:04 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Nmap < Formula
|
2010-07-04 05:37:48 +00:00
|
|
|
homepage 'http://nmap.org/5/'
|
2012-05-10 14:10:12 +00:00
|
|
|
url 'http://nmap.org/dist/nmap-5.51.tar.bz2'
|
2011-02-12 11:46:21 +00:00
|
|
|
md5 '0b80d2cb92ace5ebba8095a4c2850275'
|
2012-05-10 14:10:12 +00:00
|
|
|
|
2012-01-05 11:50:43 +00:00
|
|
|
head 'https://guest:@svn.nmap.org/nmap/', :using => :svn
|
2009-09-13 04:28:04 +00:00
|
|
|
|
2011-06-19 16:49:15 +00:00
|
|
|
# Leopard's version of OpenSSL isn't new enough
|
2011-04-08 18:16:37 +00:00
|
|
|
depends_on "openssl" if MacOS.leopard?
|
2011-02-06 18:26:23 +00:00
|
|
|
|
2012-03-18 20:33:24 +00:00
|
|
|
fails_with :llvm do
|
|
|
|
build 2334
|
|
|
|
end
|
2011-03-21 21:24:22 +00:00
|
|
|
|
2012-02-21 03:11:44 +00:00
|
|
|
# The configure script has a C file to test for some functionality that uses
|
|
|
|
# void main(void). This does not compile with clang but does compile with
|
|
|
|
# GCC/gcc-llvm. This small patch fixes the issues so that the project will
|
|
|
|
# compile without issues with clang as well. See:
|
|
|
|
# https://github.com/mxcl/homebrew/issues/10300
|
|
|
|
def patches
|
|
|
|
DATA
|
|
|
|
end
|
|
|
|
|
2009-09-13 04:28:04 +00:00
|
|
|
def install
|
2009-12-28 19:12:45 +00:00
|
|
|
ENV.deparallelize
|
2010-07-04 05:37:48 +00:00
|
|
|
|
2011-02-06 18:26:23 +00:00
|
|
|
args = ["--prefix=#{prefix}", "--without-zenmap"]
|
|
|
|
|
2011-04-08 18:16:37 +00:00
|
|
|
if MacOS.leopard?
|
2011-02-06 18:26:23 +00:00
|
|
|
openssl = Formula.factory('openssl')
|
|
|
|
args << "--with-openssl=#{openssl.prefix}"
|
|
|
|
end
|
|
|
|
|
|
|
|
system "./configure", *args
|
2012-01-04 06:05:05 +00:00
|
|
|
system "make" # separate steps required otherwise the build fails
|
2010-04-07 05:58:35 +00:00
|
|
|
system "make install"
|
2009-09-13 04:28:04 +00:00
|
|
|
end
|
|
|
|
end
|
2012-02-18 10:09:02 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
--- nmap-5.51/nbase/configure 2012-02-18 02:40:16.000000000 -0700
|
|
|
|
+++ nmap-5.51/nbase/configure.old 2012-02-18 02:40:01.000000000 -0700
|
|
|
|
@@ -4509,7 +4509,7 @@
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
-void main(void) {
|
|
|
|
+int main(void) {
|
|
|
|
struct addrinfo hints, *ai;
|
|
|
|
int error;
|
|
|
|
|
|
|
|
@@ -4641,7 +4641,7 @@
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
-void main(void) {
|
|
|
|
+int main(void) {
|
|
|
|
struct sockaddr_in sa;
|
|
|
|
char hbuf[256];
|
|
|
|
int error;
|