Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/sngrep/, net-analyzer/sngrep/files/
Date: Tue, 05 Jul 2022 03:15:44
Message-Id: 1656990905.196a34a7a190fb4d21b82e1bce71a819580030e4.sam@gentoo
1 commit: 196a34a7a190fb4d21b82e1bce71a819580030e4
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jul 5 03:11:02 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue Jul 5 03:15:05 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=196a34a7
7
8 net-analyzer/sngrep: add 1.5.0
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 net-analyzer/sngrep/Manifest | 1 +
13 .../sngrep/files/sngrep-1.5.0-bashisms.patch | 79 ++++++++++++++++++++++
14 net-analyzer/sngrep/sngrep-1.5.0.ebuild | 50 ++++++++++++++
15 3 files changed, 130 insertions(+)
16
17 diff --git a/net-analyzer/sngrep/Manifest b/net-analyzer/sngrep/Manifest
18 index b9cdc0865f89..664514feffc7 100644
19 --- a/net-analyzer/sngrep/Manifest
20 +++ b/net-analyzer/sngrep/Manifest
21 @@ -1 +1,2 @@
22 DIST sngrep-1.4.7.tar.gz 237978 BLAKE2B 30172748aeab2910e7fa13f35b447d7bd1688bb206576af6233c8c47405eb3fe93316cc72255169f19f3752e7fe3ada63c5c0bba0d9ab75706c1b0d3ac296474 SHA512 f414f9cc49b0c34cbbf5a77d285f12eb4091af3395953ed93dbe2f57d4ba3731d16c4b56c37e90744cf3784572975f485aed48cdd100898ffaee18e9a18943b1
23 +DIST sngrep-1.5.0.tar.gz 244965 BLAKE2B 85c8ddbbb5c81dfa886086543df9ccb6f4a297c95a23afddfcf1a359e4af19a1f37cd75136881aba07fd70c177737fa93440f04f97ed9ffd01afef3055971472 SHA512 20be55f80d029739b1db4c0ccbc028604019acd8ca45181eb9952759ced4f20549d991c2916c9d1c84c989ccb123cad44f545a9146471a79273c0a6053615fbe
24
25 diff --git a/net-analyzer/sngrep/files/sngrep-1.5.0-bashisms.patch b/net-analyzer/sngrep/files/sngrep-1.5.0-bashisms.patch
26 new file mode 100644
27 index 000000000000..ffcd38d2f7f3
28 --- /dev/null
29 +++ b/net-analyzer/sngrep/files/sngrep-1.5.0-bashisms.patch
30 @@ -0,0 +1,79 @@
31 +https://github.com/irontec/sngrep/pull/404
32 +--- a/configure.ac
33 ++++ b/configure.ac
34 +@@ -51,7 +51,7 @@ AC_ARG_ENABLE([unicode],
35 + [AC_SUBST(UNICODE, no)]
36 + )
37 +
38 +-AS_IF([test "x$enable_unicode" == "xyes"], [
39 ++AS_IF([test "x$enable_unicode" = "xyes"], [
40 + # Ncurses with wide-character support
41 + AC_DEFINE([WITH_UNICODE], [], [Compile With Unicode compatibility])
42 +
43 +@@ -123,7 +123,7 @@ AC_ARG_WITH([gnutls],
44 + [AC_SUBST(WITH_GNUTLS, no)]
45 + )
46 +
47 +-AS_IF([test "x$WITH_GNUTLS" == "xyes"], [
48 ++AS_IF([test "x$WITH_GNUTLS" = "xyes"], [
49 +
50 + m4_ifdef([PKG_CHECK_MODULES], [
51 + PKG_CHECK_MODULES([LIBGNUTLS], [gnutls])
52 +@@ -160,8 +160,8 @@ AC_ARG_WITH([openssl],
53 + [AC_SUBST(WITH_OPENSSL, no)]
54 + )
55 +
56 +-AS_IF([test "x$WITH_OPENSSL" == "xyes"], [
57 +- AS_IF([test "x$WITH_GNUTLS" == "xyes"], [
58 ++AS_IF([test "x$WITH_OPENSSL" = "xyes"], [
59 ++ AS_IF([test "x$WITH_GNUTLS" = "xyes"], [
60 + AC_MSG_ERROR([ GnuTLS and OpenSSL can not be enabled at the same time ])
61 + ], [])
62 + m4_ifdef([PKG_CHECK_MODULES], [
63 +@@ -187,7 +187,7 @@ AC_ARG_WITH([pcre],
64 + [AC_SUBST(WITH_PCRE, no)]
65 + )
66 +
67 +-AS_IF([test "x$WITH_PCRE" == "xyes"], [
68 ++AS_IF([test "x$WITH_PCRE" = "xyes"], [
69 + AC_CHECK_HEADER([pcre.h], [], [
70 + AC_MSG_ERROR([ You need libpcre development files installed to compile with pcre support.])
71 + ])
72 +@@ -206,7 +206,7 @@ AC_ARG_ENABLE([ipv6],
73 + [AC_SUBST(USE_IPV6, no)]
74 + )
75 +
76 +-AS_IF([test "x$USE_IPV6" == "xyes"], [
77 ++AS_IF([test "x$USE_IPV6" = "xyes"], [
78 + AC_CHECK_HEADERS([netinet/in.h netinet/ip6.h], [], [
79 + AC_MSG_ERROR([ You dont seem to have ipv6 support (no ip6.h found).])
80 + ], [
81 +@@ -231,15 +231,15 @@ AC_ARG_ENABLE([eep],
82 + [AC_SUBST(USE_EEP, no)]
83 + )
84 +
85 +-AS_IF([test "x$USE_EEP" == "xyes"], [
86 ++AS_IF([test "x$USE_EEP" = "xyes"], [
87 + AC_DEFINE([USE_EEP],[],[Compile With EEP support])
88 + ], [])
89 +
90 +
91 + # Conditional Source inclusion
92 +-AM_CONDITIONAL([WITH_GNUTLS], [test "x$WITH_GNUTLS" == "xyes"])
93 +-AM_CONDITIONAL([WITH_OPENSSL], [test "x$WITH_OPENSSL" == "xyes"])
94 +-AM_CONDITIONAL([USE_EEP], [test "x$USE_EEP" == "xyes"])
95 ++AM_CONDITIONAL([WITH_GNUTLS], [test "x$WITH_GNUTLS" = "xyes"])
96 ++AM_CONDITIONAL([WITH_OPENSSL], [test "x$WITH_OPENSSL" = "xyes"])
97 ++AM_CONDITIONAL([USE_EEP], [test "x$USE_EEP" = "xyes"])
98 +
99 +
100 + ######################################################################
101 +@@ -249,7 +249,7 @@ AC_ARG_ENABLE(logo,
102 + [ enable_logo=$enableval],
103 + [ enable_logo=yes])
104 +
105 +-AS_IF([test "x$enable_logo" == "xyes"], [
106 ++AS_IF([test "x$enable_logo" = "xyes"], [
107 + echo ''
108 + echo ' ██╗██████╗ ██████╗ ███╗ ██╗████████╗███████╗ ██████╗'
109 + echo ' ██║██╔══██╗██╔═══██╗████╗ ██║╚══██╔══╝██╔════╝██╔════╝'
110
111 diff --git a/net-analyzer/sngrep/sngrep-1.5.0.ebuild b/net-analyzer/sngrep/sngrep-1.5.0.ebuild
112 new file mode 100644
113 index 000000000000..af7e30fcebf6
114 --- /dev/null
115 +++ b/net-analyzer/sngrep/sngrep-1.5.0.ebuild
116 @@ -0,0 +1,50 @@
117 +# Copyright 1999-2022 Gentoo Authors
118 +# Distributed under the terms of the GNU General Public License v2
119 +
120 +EAPI=8
121 +
122 +inherit autotools
123 +
124 +DESCRIPTION="Ncurses SIP Messages flow viewer"
125 +HOMEPAGE="https://github.com/irontec/sngrep"
126 +SRC_URI="https://github.com/irontec/sngrep/releases/download/v${PV}/${P}.tar.gz"
127 +
128 +LICENSE="GPL-3"
129 +SLOT="0"
130 +KEYWORDS="~amd64 ~x86"
131 +IUSE="eep gnutls pcre ssl unicode"
132 +
133 +# In next release, libpcre -> libpcre2
134 +DEPEND="
135 + net-libs/libpcap
136 + sys-libs/ncurses:=[unicode(+)?]
137 + ssl? (
138 + !gnutls? ( dev-libs/openssl:= )
139 + gnutls? ( net-libs/gnutls:= )
140 + )
141 + pcre? ( dev-libs/libpcre )
142 +"
143 +RDEPEND="${DEPEND}"
144 +
145 +PATCHES=(
146 + "${FILESDIR}"/${PN}-1.5.0-bashisms.patch
147 +)
148 +
149 +src_prepare() {
150 + default
151 +
152 + eautoreconf
153 +}
154 +
155 +src_configure() {
156 + local myeconfargs=(
157 + --enable-ipv6
158 +
159 + $(use_enable eep)
160 + $(use_enable unicode)
161 + $(use_with pcre)
162 + $(use_with ssl $(usex gnutls gnutls openssl))
163 + )
164 +
165 + econf "${myeconfargs[@]}"
166 +}