public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/scanssh/, net-analyzer/scanssh/files/
@ 2024-06-21 18:53 Arthur Zamarin
  0 siblings, 0 replies; only message in thread
From: Arthur Zamarin @ 2024-06-21 18:53 UTC (permalink / raw
  To: gentoo-commits

commit:     7baeb1155a0e822fc67d778e15f2064a67cfb8dc
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 21 18:52:40 2024 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Fri Jun 21 18:52:58 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7baeb115

net-analyzer/scanssh: add 2.1.3.1

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 net-analyzer/scanssh/Manifest                      |   1 +
 .../scanssh/files/scanssh-2.1.3-libdir.diff        | 191 +++++++++++++++++++++
 net-analyzer/scanssh/scanssh-2.1.3.1.ebuild        |  50 ++++++
 3 files changed, 242 insertions(+)

diff --git a/net-analyzer/scanssh/Manifest b/net-analyzer/scanssh/Manifest
index 7ff0d095f83b..fce19ea97a2f 100644
--- a/net-analyzer/scanssh/Manifest
+++ b/net-analyzer/scanssh/Manifest
@@ -1 +1,2 @@
 DIST scanssh-2.1.2.tar.gz 147470 BLAKE2B 4cb31a27dd925f071bcb958fc72bef7b7f0455b7d718a15536dae40cee969739628da64a3972e2c5cc9813ef24c5634ca019571783ea20df87c7df80f32da876 SHA512 af4e705c43156b907d6864b12f5832bb4e43d0ff284e34e96b32bbe7986299954d1175880ffe7588f91a939d140b45592fc72dc2bf397f140aed929dbe44a453
+DIST scanssh-2.1.3.1.tar.gz 147954 BLAKE2B a263eda2d49159e715bb8d2190fc78f8e41d5f3a56e0bf67b70ed716eb787c09cff0ea9e759b5aa62096f75de01d2d5b5980aa66a7c5b14635d835fd3b7c6f07 SHA512 970cbb03aa44fcef62aa03132335e6ecedb083cee98a360b3d781efc8c2d3c169f70c17837b1faaf9ceaa2691a7c619174a9bb185146af50188eaceda5d14adb

diff --git a/net-analyzer/scanssh/files/scanssh-2.1.3-libdir.diff b/net-analyzer/scanssh/files/scanssh-2.1.3-libdir.diff
new file mode 100644
index 000000000000..c34159b3fca7
--- /dev/null
+++ b/net-analyzer/scanssh/files/scanssh-2.1.3-libdir.diff
@@ -0,0 +1,191 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -20,8 +20,8 @@ AC_PROG_CC
+ 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
+ 
+@@ -33,11 +33,11 @@ case $host_os in
+ 	if test -d /usr/include/mingw ; then
+ 		CPPFLAGS="$CPPFLAGS -mno-cygwin"
+ 		CFLAGS="$CFLAGS -mno-cygwin"
+-		AC_DEFINE(WIN32_LEAN_AND_MEAN, 1, 
++		AC_DEFINE(WIN32_LEAN_AND_MEAN, 1,
+ 		    [Define for faster code generation.])
+ 		AC_CHECK_LIB(ws2_32, main)
+ 		AC_CHECK_LIB(iphlpapi, main)
+-		AC_DEFINE(snprintf, _snprintf, 
++		AC_DEFINE(snprintf, _snprintf,
+ 		    [Use MingW32's internal snprintf])
+ 	else
+ 		AC_MSG_ERROR([need MingW32 package to build under Cygwin])
+@@ -84,92 +84,9 @@ if test $neederr = yes; then
+    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_MSG_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_MSG_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_MSG_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_MSG_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_MSG_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)
+@@ -180,50 +97,16 @@ then
+ else
+ 	CFLAGS="-I$DNETCOMPAT $DNETINC"
+ fi
++save_LIBS=$LIBS
+ LIBS=$DNETLIB
+ 
+-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_MSG_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_MSG_ERROR(libevent not found)
+-  fi
+-  AC_MSG_RESULT(yes) ]
+-)
+ AC_SUBST(EVENTINC)
+ AC_SUBST(EVENTLIB)
+ 
+ CFLAGS=$EVENTINC
+ LIBS=$EVENTLIB
+ 
+-CFLAGS=""
+-LIBS=""
++LIBS=$save_LIBS
+ 
+ AC_HEADER_SYS_WAIT
+ AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h unistd.h)
+@@ -271,7 +154,7 @@ AC_EGREP_CPP(yes,
+ #ifdef BSD4_4
+   yes
+ #endif
+-], 
++],
+ 	AC_EGREP_CPP(yes,
+ 	[#include <sys/param.h>
+ 	 #ifdef OpenBSD
+@@ -285,7 +168,7 @@ AC_EGREP_CPP(yes,
+           ),
+ 	  AC_MSG_RESULT([good byte order])
+ )
+-	
++
+ AC_MSG_CHECKING([for sin_len in struct sockaddr_in])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+  #include <sys/types.h>

diff --git a/net-analyzer/scanssh/scanssh-2.1.3.1.ebuild b/net-analyzer/scanssh/scanssh-2.1.3.1.ebuild
new file mode 100644
index 000000000000..f19ad9605894
--- /dev/null
+++ b/net-analyzer/scanssh/scanssh-2.1.3.1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="network scanner that gathers info on SSH protocols and versions"
+HOMEPAGE="https://github.com/ofalk/scanssh/"
+SRC_URI="https://github.com/ofalk/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86"
+
+DEPEND="
+	dev-libs/libdnet
+	dev-libs/libevent:=
+	net-libs/libpcap
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-2.0-fix-warnings.diff
+	"${FILESDIR}"/${PN}-2.1.3-libdir.diff
+)
+
+src_prepare() {
+	default
+	eautoreconf
+}
+
+src_configure() {
+	econf \
+		DNETINC='' \
+		DNETLIB=-ldnet \
+		EVENTINC='' \
+		EVENTLIB=-levent \
+		PCAPINC='' \
+		PCAPLIB=-lpcap
+}
+
+src_compile() {
+	emake CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+	dobin scanssh
+	doman scanssh.1
+}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-06-21 18:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-21 18:53 [gentoo-commits] repo/gentoo:master commit in: net-analyzer/scanssh/, net-analyzer/scanssh/files/ Arthur Zamarin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox