diff options
author | Jeroen Roovers <jer@gentoo.org> | 2020-03-29 14:19:34 +0200 |
---|---|---|
committer | Jeroen Roovers <jer@gentoo.org> | 2020-03-29 14:24:04 +0200 |
commit | 75dee2285b1309f42d7490673d94a682fe30b1fa (patch) | |
tree | 973b8523ddbec5187e233dc926babc8f7ac2c7af /net-analyzer/sngrep | |
parent | dev-python/zVMCloudConnector: Remove redundant versions (diff) | |
download | gentoo-75dee2285b1309f42d7490673d94a682fe30b1fa.tar.gz gentoo-75dee2285b1309f42d7490673d94a682fe30b1fa.tar.bz2 gentoo-75dee2285b1309f42d7490673d94a682fe30b1fa.zip |
net-analyzer/sngrep: Fix building against sys-libs/musl
See also:
https://github.com/irontec/sngrep/commit/604f6d0ce2ec42ac494d76c95e68850ea6e7da8f
Package-Manager: Portage-2.3.96, Repoman-2.3.22
Closes: https://bugs.gentoo.org/715256
Signed-off-by: Jeroen Roovers <jer@gentoo.org>
Diffstat (limited to 'net-analyzer/sngrep')
-rw-r--r-- | net-analyzer/sngrep/files/sngrep-1.4.6-stdin.patch | 11 | ||||
-rw-r--r-- | net-analyzer/sngrep/sngrep-1.4.6-r2.ebuild | 44 |
2 files changed, 55 insertions, 0 deletions
diff --git a/net-analyzer/sngrep/files/sngrep-1.4.6-stdin.patch b/net-analyzer/sngrep/files/sngrep-1.4.6-stdin.patch new file mode 100644 index 000000000000..b61025d25b6e --- /dev/null +++ b/net-analyzer/sngrep/files/sngrep-1.4.6-stdin.patch @@ -0,0 +1,11 @@ +--- a/src/capture.c ++++ b/src/capture.c +@@ -191,7 +191,7 @@ + + // Reopen tty for ncurses after pcap have used stdin + if (!strncmp(infile, "/dev/stdin", 10)) { +- if (!(stdin = freopen("/dev/tty", "r", stdin))) { ++ if (!(fstdin = freopen("/dev/tty", "r", stdin))) { + fprintf(stderr, "Failed to reopen tty while using stdin for capture."); + return 1; + } diff --git a/net-analyzer/sngrep/sngrep-1.4.6-r2.ebuild b/net-analyzer/sngrep/sngrep-1.4.6-r2.ebuild new file mode 100644 index 000000000000..011fb09336bd --- /dev/null +++ b/net-analyzer/sngrep/sngrep-1.4.6-r2.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +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 ipv6 openssl pcre unicode" +REQUIRED_USE=" + gnutls? ( !openssl ) +" + +DEPEND=" + net-libs/libpcap + sys-libs/ncurses:0=[unicode?] + openssl? ( dev-libs/openssl:0= ) + gnutls? ( net-libs/gnutls ) +" +RDEPEND="${DEPEND}" +PATCHES=( + "${FILESDIR}"/${PN}-1.4.5-tinfo.patch + "${FILESDIR}"/${PN}-1.4.6-stdin.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf \ + $(use_enable eep) \ + $(use_enable ipv6) \ + $(use_enable unicode) \ + $(use_with gnutls) \ + $(use_with openssl) \ + $(use_with pcre) +} |