MFH: r522159

security/nmap: Fix build on 11i386, 11arm, 11arm64

Fix patches to configure scripts to only add -libverbs if found in base

PR:		242987
Reported by:	Dries Michiels <driesm.michiels@gmail.com>
Reported by:	garga

Approved by:	ports-secteam (joneum)
This commit is contained in:
Ben Woods 2020-01-06 09:48:19 +00:00
parent b88854ab53
commit 8c74977f84
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/branches/2020Q1/; revision=522213
4 changed files with 9 additions and 31 deletions

View File

@ -56,6 +56,15 @@ CONFIGURE_ARGS+=--without-localdirs \
post-extract:
@${RM} -r ${WRKSRC}/mswin32
.if exists(/usr/lib/libibverbs.a)
# Link with libibverbs is needed by static libpcap
post-patch-PCAP-on:
@${REINPLACE_CMD} -E -e "s|(PCAP_LIBS=['\"].*)(['\"])$$|\1 -libverbs\2|" \
${WRKSRC}/configure \
${WRKSRC}/nping/configure \
${WRKSRC}/ncat/configure
.endif
post-configure:
@${REINPLACE_CMD} -e "s|^DESTDIR *=|& ${DESTDIR}|" ${WRKSRC}/Makefile

View File

@ -18,12 +18,3 @@
{ $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 :
@@ -6365,7 +6365,7 @@ if test $have_libpcap != yes; then
else
CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/$libpcapdir"
fi
- LIBPCAP_LIBS='$(LIBPCAPDIR)/libpcap.a'
+ LIBPCAP_LIBS='$(LIBPCAPDIR)/libpcap.a -libverbs'
PCAP_BUILD="build-pcap"
PCAP_CLEAN="clean-pcap"
PCAP_DIST_CLEAN="distclean-pcap"

View File

@ -1,11 +0,0 @@
--- ncat/configure.orig 2019-12-08 01:42:55 UTC
+++ ncat/configure
@@ -4934,7 +4934,7 @@ fi
LIBS="$LIBS_OLD"
fi
-PCAP_LIBS="-lpcap"
+PCAP_LIBS="-lpcap -libverbs"
if test $have_libpcap = yes; then
PCAP_DEPENDS=""
PCAP_BUILD=""

View File

@ -1,11 +0,0 @@
--- nping/configure.orig 2019-01-31 23:28:21 UTC
+++ nping/configure
@@ -5356,7 +5356,7 @@ if test $have_libpcap != yes; then
LDFLAGS="-L$libpcapdir $LDFLAGS"
CPPFLAGS="$CPPFLAGS -I$libpcapdir"
fi
- LIBPCAP_LIBS='$(LIBPCAPDIR)/libpcap.a'
+ LIBPCAP_LIBS='$(LIBPCAPDIR)/libpcap.a -libverbs'
PCAP_DEPENDS='$(LIBPCAPDIR)/libpcap.a'
PCAP_BUILD="build-pcap"
PCAP_CLEAN="clean-pcap"