Index: Makefile =================================================================== --- Makefile (revision 460450) +++ Makefile (working copy) @@ -3,9 +3,9 @@ PORTNAME= nmap DISTVERSION= 7.60 -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= security ipv6 -MASTER_SITES= http://nmap.org/dist/ \ +MASTER_SITES= https://nmap.org/dist/ \ LOCAL/ohauer MAINTAINER?= ohauer@FreeBSD.org @@ -20,15 +20,21 @@ .if !defined(MASTERDIR) -LIB_DEPENDS= libpcre.so:devel/pcre +LIB_DEPENDS= libpcre.so:devel/pcre \ + libpcap.so:net/libpcap USES= tar:bzip2 gmake cpe GNU_CONFIGURE= yes OPTIONS_SUB= yes -OPTIONS_DEFINE= DOCS SSL -OPTIONS_DEFAULT=SSL +OPTIONS_DEFINE= DOCS SSH2 SSL +OPTIONS_DEFAULT=SSH2 SSL +SSH2_DESC= SSH2 protocol support +SSH2_CONFIGURE_ON= --with-libssh2=${LOCALBASE} +SSH2_CONFIGURE_OFF= --without-libssh2 +SSH2_IMPLIES= SSL +SSH2_LIB_DEPENDS= libssh2.so:security/libssh2 SSL_USES= ssl SSL_CONFIGURE_ON= --with-openssl=${OPENSSLBASE} SSL_CONFIGURE_OFF= --without-openssl @@ -41,6 +47,8 @@ CONFIGURE_ARGS+=--without-localdirs \ --without-zenmap \ --without-ndiff \ + --with-libdnet=included \ + --with-libpcap=${LOCALBASE} \ --with-libpcre=${LOCALBASE} \ --with-liblua=included \ --without-nmap-update Index: files/patch-configure =================================================================== --- files/patch-configure (revision 460450) +++ files/patch-configure (working copy) @@ -1,3 +1,8 @@ +# Replace gcc with $CXX +# +# Fix libssh2 detection +# https://github.com/nmap/nmap/commit/53e4e92e32721b1fa4490fbcd7ea6bb62f283839 + --- configure.orig 2017-07-31 19:09:47 UTC +++ configure @@ -2583,7 +2583,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLA @@ -18,3 +23,22 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : +@@ -6801,8 +6801,7 @@ if test "${with_libssh2+set}" = set; the + CPPFLAGS="-I$with_libssh2/include $CPPFLAGS" + LDFLAGS="-L$with_libssh2/lib $LDFLAGS" + +- ac_fn_c_check_header_compile "$LINENO" "libssh2.h" "ac_cv_header_libssh2_h" "-lm +-" ++ ac_fn_c_check_header_compile "$LINENO" "libssh2.h" "ac_cv_header_libssh2_h" "$ac_includes_default" + if test "x$ac_cv_header_libssh2_h" = xyes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libssh2_version in -lssh2" >&5 +@@ -6811,7 +6810,7 @@ if ${ac_cv_lib_ssh2_libssh2_version+:} f + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lssh2 $LIBS" ++LIBS="-lssh2 -lm $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + Index: files/patch-nmap.cc =================================================================== --- files/patch-nmap.cc (revision 460450) +++ files/patch-nmap.cc (working copy) @@ -1,3 +1,8 @@ +# Include getopt.h +# +# Report appropriate zlib/libssh2 versions +# https://github.com/nmap/nmap/commit/fd0db097498d5ff29f647508a80915d4d0e8d84a + --- nmap.cc.orig 2017-07-31 16:56:48 UTC +++ nmap.cc @@ -130,6 +130,7 @@ @@ -8,3 +13,41 @@ #include "nmap.h" #include "osscan.h" #include "scan_engine.h" +@@ -182,11 +183,11 @@ + #endif + + #if HAVE_LIBSSH2 +-#include "libssh2/libssh2v.h" ++#include + #endif + + #if HAVE_LIBZ +-#include "libz/libzv.h" ++#include + #endif + + /* To get the version number only. */ +@@ -2844,9 +2845,9 @@ static void display_nmap_version() { + + #if HAVE_LIBSSH2 + #ifdef LIBSSH2_INCLUDED +- with.push_back(std::string("nmap-libssh2-") + get_word_or_quote(LIBSSH2_VERSION_TEXT, 1)); ++ with.push_back(std::string("nmap-libssh2-") + get_word_or_quote(LIBSSH2_VERSION, 0)); + #else +- with.push_back(std::string("libssh2-") + get_word_or_quote(LIBSSH2_VERSION_TEXT, 1)); ++ with.push_back(std::string("libssh2-") + get_word_or_quote(LIBSSH2_VERSION, 0)); + #endif + #else + without.push_back("libssh2"); +@@ -2854,9 +2855,9 @@ static void display_nmap_version() { + + #if HAVE_LIBZ + #ifdef ZLIB_INCLUDED +- with.push_back(std::string("nmap-libz-") + get_word_or_quote(LIBZ_VERSION_TEXT, 1)); ++ with.push_back(std::string("nmap-libz-") + get_word_or_quote(ZLIB_VERSION, 0)); + #else +- with.push_back(std::string("libz-") + get_word_or_quote(LIBZ_VERSION_TEXT, 1)); ++ with.push_back(std::string("libz-") + get_word_or_quote(ZLIB_VERSION, 0)); + #endif + #else + without.push_back("libz"); Index: pkg-descr =================================================================== --- pkg-descr (revision 460450) +++ pkg-descr (working copy) @@ -12,7 +12,7 @@ Nmap toolset which depend on python. The translated manual pages for Nmap are contained in security/nmap-i18n-man. -WWW: http://nmap.org/ +WWW: https://nmap.org/ See the web page and the Phrack Magazine article (Volume 7, Issue 51 September 01, 1997, article 11 of 17) http://nmap.org/p51-11.html