1 |
commit: 75dee2285b1309f42d7490673d94a682fe30b1fa |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Mar 29 12:19:34 2020 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Mar 29 12:24:04 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75dee228 |
7 |
|
8 |
net-analyzer/sngrep: Fix building against sys-libs/musl |
9 |
|
10 |
See also: |
11 |
https://github.com/irontec/sngrep/commit/604f6d0ce2ec42ac494d76c95e68850ea6e7da8f |
12 |
|
13 |
Package-Manager: Portage-2.3.96, Repoman-2.3.22 |
14 |
Closes: https://bugs.gentoo.org/715256 |
15 |
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org> |
16 |
|
17 |
net-analyzer/sngrep/files/sngrep-1.4.6-stdin.patch | 11 ++++++ |
18 |
net-analyzer/sngrep/sngrep-1.4.6-r2.ebuild | 44 ++++++++++++++++++++++ |
19 |
2 files changed, 55 insertions(+) |
20 |
|
21 |
diff --git a/net-analyzer/sngrep/files/sngrep-1.4.6-stdin.patch b/net-analyzer/sngrep/files/sngrep-1.4.6-stdin.patch |
22 |
new file mode 100644 |
23 |
index 00000000000..b61025d25b6 |
24 |
--- /dev/null |
25 |
+++ b/net-analyzer/sngrep/files/sngrep-1.4.6-stdin.patch |
26 |
@@ -0,0 +1,11 @@ |
27 |
+--- a/src/capture.c |
28 |
++++ b/src/capture.c |
29 |
+@@ -191,7 +191,7 @@ |
30 |
+ |
31 |
+ // Reopen tty for ncurses after pcap have used stdin |
32 |
+ if (!strncmp(infile, "/dev/stdin", 10)) { |
33 |
+- if (!(stdin = freopen("/dev/tty", "r", stdin))) { |
34 |
++ if (!(fstdin = freopen("/dev/tty", "r", stdin))) { |
35 |
+ fprintf(stderr, "Failed to reopen tty while using stdin for capture."); |
36 |
+ return 1; |
37 |
+ } |
38 |
|
39 |
diff --git a/net-analyzer/sngrep/sngrep-1.4.6-r2.ebuild b/net-analyzer/sngrep/sngrep-1.4.6-r2.ebuild |
40 |
new file mode 100644 |
41 |
index 00000000000..011fb09336b |
42 |
--- /dev/null |
43 |
+++ b/net-analyzer/sngrep/sngrep-1.4.6-r2.ebuild |
44 |
@@ -0,0 +1,44 @@ |
45 |
+# Copyright 1999-2020 Gentoo Authors |
46 |
+# Distributed under the terms of the GNU General Public License v2 |
47 |
+ |
48 |
+EAPI=6 |
49 |
+inherit autotools |
50 |
+ |
51 |
+DESCRIPTION="Ncurses SIP Messages flow viewer" |
52 |
+HOMEPAGE="https://github.com/irontec/sngrep" |
53 |
+SRC_URI="https://github.com/irontec/sngrep/releases/download/v${PV}/${P}.tar.gz" |
54 |
+ |
55 |
+LICENSE="GPL-3" |
56 |
+SLOT="0" |
57 |
+KEYWORDS="~amd64 ~x86" |
58 |
+IUSE="eep gnutls ipv6 openssl pcre unicode" |
59 |
+REQUIRED_USE=" |
60 |
+ gnutls? ( !openssl ) |
61 |
+" |
62 |
+ |
63 |
+DEPEND=" |
64 |
+ net-libs/libpcap |
65 |
+ sys-libs/ncurses:0=[unicode?] |
66 |
+ openssl? ( dev-libs/openssl:0= ) |
67 |
+ gnutls? ( net-libs/gnutls ) |
68 |
+" |
69 |
+RDEPEND="${DEPEND}" |
70 |
+PATCHES=( |
71 |
+ "${FILESDIR}"/${PN}-1.4.5-tinfo.patch |
72 |
+ "${FILESDIR}"/${PN}-1.4.6-stdin.patch |
73 |
+) |
74 |
+ |
75 |
+src_prepare() { |
76 |
+ default |
77 |
+ eautoreconf |
78 |
+} |
79 |
+ |
80 |
+src_configure() { |
81 |
+ econf \ |
82 |
+ $(use_enable eep) \ |
83 |
+ $(use_enable ipv6) \ |
84 |
+ $(use_enable unicode) \ |
85 |
+ $(use_with gnutls) \ |
86 |
+ $(use_with openssl) \ |
87 |
+ $(use_with pcre) |
88 |
+} |