diff options
author | Olli Hauer <ohauer@FreeBSD.org> | 2013-11-25 20:49:58 +0000 |
---|---|---|
committer | Olli Hauer <ohauer@FreeBSD.org> | 2013-11-25 20:49:58 +0000 |
commit | 29dc00688402ee9874f42171cd1d2c5660b0c849 (patch) | |
tree | 62756818402b729b300360133f4c455bcf6b31b0 /security/nmap | |
parent | - Fix the usage of 'python' to get rid of the implicit lang/python (diff) |
- fix security/nmap runtime on current (FreeBSD 11)
- adopt ${opt}_USE style
- remove ${opt} PKGNAMEPREFIX
- bump PORTREVISION
PR: ports/184288
Submitted by: Ruslan Makhmatkhanov <rm@FreeBSD.org>
Notes
Notes:
svn path=/head/; revision=334897
Diffstat (limited to 'security/nmap')
-rw-r--r-- | security/nmap/Makefile | 19 | ||||
-rw-r--r-- | security/nmap/files/patch-libnetutil__netutil.cc | 31 |
2 files changed, 38 insertions, 12 deletions
diff --git a/security/nmap/Makefile b/security/nmap/Makefile index 9192233ecdaf..e6b6308b7cd6 100644 --- a/security/nmap/Makefile +++ b/security/nmap/Makefile @@ -3,6 +3,7 @@ PORTNAME= nmap DISTVERSION= 6.40 +PORTREVISION= 1 CATEGORIES= security ipv6 MASTER_SITES= http://nmap.org/dist/ \ LOCAL/ohauer @@ -28,16 +29,18 @@ OPTIONS_SUB= yes OPTIONS_DEFINE= DOCS IPV6 SSL OPTIONS_DEFAULT=IPV6 SSL +SSL_USE= OPENSSL=yes SSL_CONFIGURE_ON= --with-openssl=${OPENSSLBASE} SSL_CONFIGURE_OFF= --without-openssl SSL_CFLAGS= -I${OPENSSLINC} +IPV6_CONFIGURE_OFF= --with-libpcap=${LOCALBASE}/IPv6 + .include <bsd.port.options.mk> -.if ${PORT_OPTIONS:MSSL} -USE_OPENSSL= yes -.else -PKGNAMESUFFIX= -nossl +# PR: ports/159376 Workaround if OS is build with WITHOUT_INET6 +.if ! ${PORT_OPTIONS:MIPV6} +LIB_DEPENDS+= libpcap.so:${PORTSDIR}/net/libpcap .endif CONFIGURE_ARGS+=--without-localdirs \ @@ -58,12 +61,6 @@ NDCC= true PORTDOCS= CHANGELOG HACKING -# PR: ports/159376 Workaround if OS is build with WITHOUT_INET6 -.if ! ${PORT_OPTIONS:MIPV6} -LIB_DEPENDS+= libpcap.so:${PORTSDIR}/net/libpcap -CONFIGURE_ARGS+= --with-libpcap=${LOCALBASE} -.endif - # XXX limit results if we do a grep in the sources! post-extract: @${RM} -rf ${WRKSRC}/mswin32 @@ -78,10 +75,8 @@ post-configure: @${REINPLACE_CMD} -e "s|^DESTDIR *=|& ${DESTDIR}|" ${WRKSRC}/Makefile post-install: -.if ${PORT_OPTIONS:MDOCS} @${MKDIR} ${STAGEDIR}${DOCSDIR} @${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} -.endif # gcc from ports is in use .if defined(NDCC) diff --git a/security/nmap/files/patch-libnetutil__netutil.cc b/security/nmap/files/patch-libnetutil__netutil.cc new file mode 100644 index 000000000000..4b2f91784e2f --- /dev/null +++ b/security/nmap/files/patch-libnetutil__netutil.cc @@ -0,0 +1,31 @@ +PR: ports/184288 +Fix security/nmap runtime on current (FreeBSD 11) +========================================================================== +--- ./libnetutil/netutil.cc.orig 2013-07-29 00:08:48.000000000 +0200 ++++ ./libnetutil/netutil.cc 2013-11-25 21:26:22.000000000 +0100 +@@ -1319,7 +1319,11 @@ + /* The first time through the loop we add the primary interface record. + After that we add the aliases one at a time. */ + if (!primary_done) { +- if (addr_ntos(&entry->intf_addr, (struct sockaddr *) &tmpss) == -1) { ++ if ( (addr_ntos(&entry->intf_addr, (struct sockaddr *) &tmpss) == -1) ++#ifdef AF_LINK ++ || (tmpss.ss_family == AF_LINK) ++#endif ++ ) { + dcrn->ifaces[dcrn->numifaces].addr.ss_family = 0; + } else { + rc = canonicalize_address(&tmpss, &dcrn->ifaces[dcrn->numifaces].addr); +@@ -1328,7 +1332,11 @@ + dcrn->ifaces[dcrn->numifaces].netmask_bits = entry->intf_addr.addr_bits; + primary_done = true; + } else if (num_aliases_done < entry->intf_alias_num) { +- if (addr_ntos(&entry->intf_alias_addrs[num_aliases_done], (struct sockaddr *) &tmpss) == -1) { ++ if ( (addr_ntos(&entry->intf_alias_addrs[num_aliases_done], (struct sockaddr *) &tmpss) == -1) ++#ifdef AF_LINK ++ || (tmpss.ss_family == AF_LINK) ++#endif ++ ) { + dcrn->ifaces[dcrn->numifaces].addr.ss_family = 0; + } else { + rc = canonicalize_address(&tmpss, &dcrn->ifaces[dcrn->numifaces].addr); |