commit:     196a34a7a190fb4d21b82e1bce71a819580030e4
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jul  5 03:11:02 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jul  5 03:15:05 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=196a34a7

net-analyzer/sngrep: add 1.5.0

Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-analyzer/sngrep/Manifest                       |  1 +
 .../sngrep/files/sngrep-1.5.0-bashisms.patch       | 79 ++++++++++++++++++++++
 net-analyzer/sngrep/sngrep-1.5.0.ebuild            | 50 ++++++++++++++
 3 files changed, 130 insertions(+)

diff --git a/net-analyzer/sngrep/Manifest b/net-analyzer/sngrep/Manifest
index b9cdc0865f89..664514feffc7 100644
--- a/net-analyzer/sngrep/Manifest
+++ b/net-analyzer/sngrep/Manifest
@@ -1 +1,2 @@
 DIST sngrep-1.4.7.tar.gz 237978 BLAKE2B 
30172748aeab2910e7fa13f35b447d7bd1688bb206576af6233c8c47405eb3fe93316cc72255169f19f3752e7fe3ada63c5c0bba0d9ab75706c1b0d3ac296474
 SHA512 
f414f9cc49b0c34cbbf5a77d285f12eb4091af3395953ed93dbe2f57d4ba3731d16c4b56c37e90744cf3784572975f485aed48cdd100898ffaee18e9a18943b1
+DIST sngrep-1.5.0.tar.gz 244965 BLAKE2B 
85c8ddbbb5c81dfa886086543df9ccb6f4a297c95a23afddfcf1a359e4af19a1f37cd75136881aba07fd70c177737fa93440f04f97ed9ffd01afef3055971472
 SHA512 
20be55f80d029739b1db4c0ccbc028604019acd8ca45181eb9952759ced4f20549d991c2916c9d1c84c989ccb123cad44f545a9146471a79273c0a6053615fbe

diff --git a/net-analyzer/sngrep/files/sngrep-1.5.0-bashisms.patch 
b/net-analyzer/sngrep/files/sngrep-1.5.0-bashisms.patch
new file mode 100644
index 000000000000..ffcd38d2f7f3
--- /dev/null
+++ b/net-analyzer/sngrep/files/sngrep-1.5.0-bashisms.patch
@@ -0,0 +1,79 @@
+https://github.com/irontec/sngrep/pull/404
+--- a/configure.ac
++++ b/configure.ac
+@@ -51,7 +51,7 @@ AC_ARG_ENABLE([unicode],
+       [AC_SUBST(UNICODE, no)]
+ )
+ 
+-AS_IF([test "x$enable_unicode" == "xyes"], [
++AS_IF([test "x$enable_unicode" = "xyes"], [
+       # Ncurses with wide-character support
+       AC_DEFINE([WITH_UNICODE], [], [Compile With Unicode compatibility])
+ 
+@@ -123,7 +123,7 @@ AC_ARG_WITH([gnutls],
+     [AC_SUBST(WITH_GNUTLS, no)]
+ )
+ 
+-AS_IF([test "x$WITH_GNUTLS" == "xyes"], [
++AS_IF([test "x$WITH_GNUTLS" = "xyes"], [
+ 
+     m4_ifdef([PKG_CHECK_MODULES], [
+         PKG_CHECK_MODULES([LIBGNUTLS], [gnutls])
+@@ -160,8 +160,8 @@ AC_ARG_WITH([openssl],
+     [AC_SUBST(WITH_OPENSSL, no)]
+ )
+ 
+-AS_IF([test "x$WITH_OPENSSL" == "xyes"], [
+-      AS_IF([test "x$WITH_GNUTLS" == "xyes"], [
++AS_IF([test "x$WITH_OPENSSL" = "xyes"], [
++      AS_IF([test "x$WITH_GNUTLS" = "xyes"], [
+           AC_MSG_ERROR([ GnuTLS and OpenSSL can not be enabled at the same 
time ])
+       ], [])
+     m4_ifdef([PKG_CHECK_MODULES], [
+@@ -187,7 +187,7 @@ AC_ARG_WITH([pcre],
+     [AC_SUBST(WITH_PCRE, no)]
+ )
+ 
+-AS_IF([test "x$WITH_PCRE" == "xyes"], [
++AS_IF([test "x$WITH_PCRE" = "xyes"], [
+       AC_CHECK_HEADER([pcre.h], [], [
+           AC_MSG_ERROR([ You need libpcre development files installed to 
compile with pcre support.])
+       ])
+@@ -206,7 +206,7 @@ AC_ARG_ENABLE([ipv6],
+     [AC_SUBST(USE_IPV6, no)]
+ )
+ 
+-AS_IF([test "x$USE_IPV6" == "xyes"], [
++AS_IF([test "x$USE_IPV6" = "xyes"], [
+       AC_CHECK_HEADERS([netinet/in.h netinet/ip6.h], [], [
+           AC_MSG_ERROR([ You dont seem to have ipv6 support (no ip6.h 
found).])
+       ], [
+@@ -231,15 +231,15 @@ AC_ARG_ENABLE([eep],
+     [AC_SUBST(USE_EEP, no)]
+ )
+ 
+-AS_IF([test "x$USE_EEP" == "xyes"], [
++AS_IF([test "x$USE_EEP" = "xyes"], [
+       AC_DEFINE([USE_EEP],[],[Compile With EEP support])
+ ], [])
+ 
+ 
+ # Conditional Source inclusion 
+-AM_CONDITIONAL([WITH_GNUTLS], [test "x$WITH_GNUTLS" == "xyes"])
+-AM_CONDITIONAL([WITH_OPENSSL], [test "x$WITH_OPENSSL" == "xyes"])
+-AM_CONDITIONAL([USE_EEP], [test "x$USE_EEP" == "xyes"])
++AM_CONDITIONAL([WITH_GNUTLS], [test "x$WITH_GNUTLS" = "xyes"])
++AM_CONDITIONAL([WITH_OPENSSL], [test "x$WITH_OPENSSL" = "xyes"])
++AM_CONDITIONAL([USE_EEP], [test "x$USE_EEP" = "xyes"])
+ 
+ 
+ ######################################################################
+@@ -249,7 +249,7 @@ AC_ARG_ENABLE(logo,
+     [ enable_logo=$enableval],
+     [ enable_logo=yes])
+ 
+-AS_IF([test "x$enable_logo" == "xyes"], [
++AS_IF([test "x$enable_logo" = "xyes"], [
+     echo ''
+     echo ' ██╗██████╗  ██████╗ ███╗   ██╗████████╗███████╗ ██████╗'
+     echo ' ██║██╔══██╗██╔═══██╗████╗  ██║╚══██╔══╝██╔════╝██╔════╝'

diff --git a/net-analyzer/sngrep/sngrep-1.5.0.ebuild 
b/net-analyzer/sngrep/sngrep-1.5.0.ebuild
new file mode 100644
index 000000000000..af7e30fcebf6
--- /dev/null
+++ b/net-analyzer/sngrep/sngrep-1.5.0.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="Ncurses SIP Messages flow viewer"
+HOMEPAGE="https://github.com/irontec/sngrep";
+SRC_URI="https://github.com/irontec/sngrep/releases/download/v${PV}/${P}.tar.gz";
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="eep gnutls pcre ssl unicode"
+
+# In next release, libpcre -> libpcre2
+DEPEND="
+       net-libs/libpcap
+       sys-libs/ncurses:=[unicode(+)?]
+       ssl? (
+               !gnutls? ( dev-libs/openssl:= )
+               gnutls? ( net-libs/gnutls:= )
+       )
+       pcre? ( dev-libs/libpcre )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.5.0-bashisms.patch
+)
+
+src_prepare() {
+       default
+
+       eautoreconf
+}
+
+src_configure() {
+       local myeconfargs=(
+               --enable-ipv6
+
+               $(use_enable eep)
+               $(use_enable unicode)
+               $(use_with pcre)
+               $(use_with ssl $(usex gnutls gnutls openssl))
+       )
+
+       econf "${myeconfargs[@]}"
+}

Reply via email to