homebrew-core/Formula/nmap.rb
Jack Nagel 53473b6bf5 Clean up MacOS version method usage
The MacOS.version? family of methods (other than "leopard?") are poorly
defined and lead to confusing code. Replace them in formulae with more
explicit comparisons.

"MacOS.version" is a special version object that can be compared to
numerics, symbols, and strings using the standard Ruby comparison
methods.

The old methods were moved to compat when the version comparison code
was merged, and they must remain there "forever", but they should not be
used in new code.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-10 16:16:54 -05:00

35 lines
861 B
Ruby

require 'formula'
class Nmap < Formula
homepage 'http://nmap.org/6/'
url 'http://nmap.org/dist/nmap-6.01.tar.bz2'
sha1 'e397e453893930d14e9bb33a847d15b94b7ee83a'
head 'https://guest:@svn.nmap.org/nmap/', :using => :svn
# Leopard's version of OpenSSL isn't new enough
depends_on "openssl" if MacOS.version == :leopard
fails_with :llvm do
build 2334
end
def install
ENV.deparallelize
args = %W[--prefix=#{prefix}
--with-libpcre=included
--with-liblua=included
--without-zenmap
--disable-universal]
if MacOS.version == :leopard
openssl = Formula.factory('openssl')
args << "--with-openssl=#{openssl.prefix}"
end
system "./configure", *args
system "make" # separate steps required otherwise the build fails
system "make install"
end
end