summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2020-07-07 10:20:34 +0200
committerJeroen Roovers <jer@gentoo.org>2020-07-07 10:21:35 +0200
commitce597f4ec51eca5cf22fb914e45c770cf2f57f8c (patch)
treecbabd95d9412fe5d9cf9f970d78ad8c6f521f9fb /net-analyzer/scanssh
parentnet-analyzer/lft: Remove strip call Makefile.in (diff)
downloadgentoo-ce597f4ec51eca5cf22fb914e45c770cf2f57f8c.tar.gz
gentoo-ce597f4ec51eca5cf22fb914e45c770cf2f57f8c.tar.bz2
gentoo-ce597f4ec51eca5cf22fb914e45c770cf2f57f8c.zip
net-analyzer/scanssh: Fix libdir checks
Package-Manager: Portage-2.3.103, Repoman-2.3.23 Closes: https://bugs.gentoo.org/731178 Signed-off-by: Jeroen Roovers <jer@gentoo.org>
Diffstat (limited to 'net-analyzer/scanssh')
-rw-r--r--net-analyzer/scanssh/files/scanssh-2.0-libdir.diff177
-rw-r--r--net-analyzer/scanssh/scanssh-2.1-r2.ebuild (renamed from net-analyzer/scanssh/scanssh-2.1-r1.ebuild)16
2 files changed, 191 insertions, 2 deletions
diff --git a/net-analyzer/scanssh/files/scanssh-2.0-libdir.diff b/net-analyzer/scanssh/files/scanssh-2.0-libdir.diff
new file mode 100644
index 000000000000..23cb3c722717
--- /dev/null
+++ b/net-analyzer/scanssh/files/scanssh-2.0-libdir.diff
@@ -0,0 +1,177 @@
+--- a/configure.in
++++ b/configure.in
+@@ -20,8 +20,8 @@
+ AC_PROG_INSTALL
+
+ dnl XXX - Solaris sux.
+-AC_CHECK_LIB(socket, socket)
+-AC_CHECK_LIB(nsl, gethostbyname)
++AC_SEARCH_LIBS(socket, socket)
++AC_SEARCH_LIBS(gethostbyname, nsl)
+
+ dnl XXX - we need WinPcap developer's pack under Cygwin for win32
+ AC_CYGWIN
+@@ -77,92 +77,9 @@
+ AC_LIBOBJ(err)
+ fi
+
+-dnl Checks for libpcap
+-AC_MSG_CHECKING(for libpcap)
+-AC_ARG_WITH(libpcap,
+-[ --with-libpcap=DIR use libpcap build directory],
+-[ case "$withval" in
+- yes|no)
+- AC_MSG_RESULT(no)
+- ;;
+- *)
+- AC_MSG_RESULT($withval)
+- if test -f $withval/pcap.h -a -f $withval/libpcap.a; then
+- owd=`pwd`
+- if cd $withval; then withval=`pwd`; cd $owd; fi
+- PCAPINC="-I$withval -I$withval/bpf"
+- PCAPLIB="-L$withval -lpcap"
+- else
+- AC_ERROR(pcap.h or libpcap.a not found in $withval)
+- fi
+- ;;
+- esac ],
+-[ if test -f ${prefix}/include/pcap.h; then
+- PCAPINC="-I${prefix}/include"
+- PCAPLIB="-L${prefix}/lib -lpcap"
+- elif test -f /usr/include/pcap/pcap.h; then
+- PCAPINC="-I/usr/include/pcap"
+- PCAPLIB="-lpcap"
+- elif test -f /usr/include/pcap.h; then
+- PCAPLIB="-lpcap"
+- else
+- AC_MSG_RESULT(no)
+- AC_ERROR(libpcap not found)
+- fi
+- AC_MSG_RESULT(yes) ]
+-)
+ AC_SUBST(PCAPINC)
+ AC_SUBST(PCAPLIB)
+
+-dnl Checks for (installed) libdnet
+-AC_ARG_WITH(libdnet,
+-[ --with-libdnet=DIR use libdnet in DIR],
+-[ case "$withval" in
+- yes|no)
+- AC_ERROR([Please specify directory containing dnet-config when using --with-libdnet])
+- ;;
+- *)
+- AC_MSG_CHECKING(for libdnet)
+- AC_MSG_RESULT($withval)
+- if test -f $withval/src/libdnet.a; then
+- DNETINC="-I$withval/include"
+- DNETLIB="-L$withval/src -ldnet `$withval/dnet-config --libs`"
+- elif test -x $withval/bin/dnet-config; then
+- DNETINC="`$withval/bin/dnet-config --cflags`"
+- DNETLIB="`$withval/bin/dnet-config --libs`"
+- else
+- AC_MSG_RESULT(no)
+- AC_ERROR(dnet-config not found in $withval/bin)
+- fi
+- ;;
+- esac
+- AC_MSG_RESULT(yes) ],
+-[ dnl This is the default case so let's just use AC_PATH_PROG! --CPK.
+- AC_PATH_PROG(dnetconfig, dnet-config, "no")
+- if test "$dnetconfig" = "no"; then
+- AC_ERROR(dnet-config not found)
+- else
+- DNETINC="`$dnetconfig --cflags`"
+- DNETLIB="`$dnetconfig --libs`"
+- fi]
+-)
+-
+-dnl We still need to check whether it's dnet or dumbnet as
+-dnl for example on Debian. We test by looking at the content
+-dnl of DNETLIB and derive from the library name what version
+-dnl we're dealing with. If we find a libdumbnet, we prefix
+-dnl compat/libdnet to our inclusion path. It provides a dnet.h
+-dnl that transparently includes dumbnet.h for those systems. --CPK.
+-AC_MSG_CHECKING([whether libdnet is a libdumbnet])
+-if test `echo $DNETLIB | sed -e '/dumb/=;d'`; then
+- AC_MSG_RESULT(yes)
+- AC_DEFINE(HAVE_DUMBNET, 1,
+- [Define if our libdnet is a libdumbnet])
+- DNETCOMPAT="compat/libdnet"
+-else
+- AC_MSG_RESULT(no)
+-fi
+-
+ AC_SUBST(DNETCOMPAT)
+ AC_SUBST(DNETINC)
+ AC_SUBST(DNETLIB)
+@@ -173,6 +90,7 @@
+ else
+ CFLAGS="-I$DNETCOMPAT $DNETINC"
+ fi
++save_LIBS=$LIBS
+ LIBS=$DNETLIB
+
+ AC_MSG_CHECKING(for working addr_pton in libdnet)
+@@ -190,61 +108,10 @@
+ exit(a1.addr_bits != 0);
+ }, AC_MSG_RESULT(yes), AC_WARNING(your version of libdnet is buggy - working around it), AC_MSG_RESULT(yes))
+
+-dnl Checks for libevent
+-AC_MSG_CHECKING(for libevent)
+-AC_ARG_WITH(libevent,
+-[ --with-libevent=DIR use libevent build directory],
+-[ case "$withval" in
+- yes|no)
+- AC_MSG_RESULT(no)
+- ;;
+- *)
+- AC_MSG_RESULT($withval)
+- if test -f $withval/event.h -a -f $withval/libevent.a; then
+- owd=`pwd`
+- if cd $withval; then withval=`pwd`; cd $owd; fi
+- EVENTINC="-I$withval"
+- EVENTLIB="-L$withval -levent"
+- else
+- AC_ERROR(event.h or libevent.a not found in $withval)
+- fi
+- ;;
+- esac ],
+-[ if test -f ${prefix}/include/event.h; then
+- EVENTINC="-I${prefix}/include"
+- EVENTLIB="-L${prefix}/lib -levent"
+- elif test -f /usr/include/event/event.h; then
+- EVENTINC="-I/usr/include/event"
+- EVENTLIB="-levent"
+- elif test -f /usr/include/event.h; then
+- EVENTLIB="-levent"
+- else
+- AC_MSG_RESULT(no)
+- AC_ERROR(libevent not found)
+- fi
+- AC_MSG_RESULT(yes) ]
+-)
+ AC_SUBST(EVENTINC)
+ AC_SUBST(EVENTLIB)
+
+-CFLAGS=$EVENTINC
+-LIBS=$EVENTLIB
+-
+- AC_MSG_CHECKING(for bufferevent in libevent)
+- AC_TRY_LINK([
+-#include <sys/types.h>
+-#include <sys/time.h>
+-#include <stdlib.h>
+-#include <event.h>],[
+- struct bufferevent bev;
+- bufferevent_settimeout(&bev, 1, 1);
+-], AC_MSG_RESULT(yes), [
+- AC_ERROR([you need to install a more recent version of libevent,
+- check http://www.monkey.org/~provos/libevent/])
+-], AC_MSG_RESULT(yes))
+-
+-CFLAGS=""
+-LIBS=""
++LIBS=$save_LIBS
+
+ dnl Checks for header files.
+ AC_HEADER_STDC
diff --git a/net-analyzer/scanssh/scanssh-2.1-r1.ebuild b/net-analyzer/scanssh/scanssh-2.1-r2.ebuild
index 0aa7c1f944ad..954e6059dec1 100644
--- a/net-analyzer/scanssh/scanssh-2.1-r1.ebuild
+++ b/net-analyzer/scanssh/scanssh-2.1-r2.ebuild
@@ -1,7 +1,8 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
+inherit autotools
DESCRIPTION="network scanner that gathers info on SSH protocols and versions"
HOMEPAGE="https://monkey.org/~provos/scanssh/"
@@ -21,11 +22,22 @@ RDEPEND="
"
PATCHES=(
"${FILESDIR}"/${PN}-2.0-fix-warnings.diff
+ "${FILESDIR}"/${PN}-2.0-libdir.diff
)
src_prepare() {
default
- touch configure
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ DNETINC='' \
+ DNETLIB=-ldnet \
+ EVENTINC='' \
+ EVENTLIB=-levent \
+ PCAPINC='' \
+ PCAPLIB=-lpcap
}
src_compile() {