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/tcpreplay/
Date: Tue, 04 May 2021 21:25:40
Message-Id: 1620163525.57e374eeca287bc0071422169c85a252d44c5229.sam@gentoo
1 commit: 57e374eeca287bc0071422169c85a252d44c5229
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 4 21:22:36 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue May 4 21:25:25 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=57e374ee
7
8 net-analyzer/tcpreplay: add 4.3.4
9
10 Bug: https://bugs.gentoo.org/750344
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 net-analyzer/tcpreplay/Manifest | 1 +
14 net-analyzer/tcpreplay/tcpreplay-4.3.4.ebuild | 77 +++++++++++++++++++++++++++
15 2 files changed, 78 insertions(+)
16
17 diff --git a/net-analyzer/tcpreplay/Manifest b/net-analyzer/tcpreplay/Manifest
18 index 311b4ba4d1c..913acf2a40f 100644
19 --- a/net-analyzer/tcpreplay/Manifest
20 +++ b/net-analyzer/tcpreplay/Manifest
21 @@ -1 +1,2 @@
22 DIST tcpreplay-4.3.3.tar.xz 748220 BLAKE2B 2de09f75e6bb6035fc25f34f41d9ce2ccbb961d7464a9a6dae16ec417d629e4819593fd781d95075293ffa3a3db7c4a50ae8667c4e7d07c0b425361027c8df06 SHA512 110d7768a176d2126766829466a209cdd983afcf0c988f7e128baa5057b3ac1dc918fcaeb168a2e6654429100a146afcbdafcda8c3d67adf6b17892a48689a02
23 +DIST tcpreplay-4.3.4.tar.xz 739280 BLAKE2B 8b680363ee182fc7581f99cc4587d50e36285446d07a5be370e2439b31582ad88c786c11d662e28dadc5b69aee376889b1c0f6a86d61c106426ab6ab2c085012 SHA512 6d19cf492114c68a9fafcf7790c08f31607d2c0112e02fa41eed8747255bbbef85f281f74348e1d51f1d476b88f07d64715224618ec15268688baefaf7cc7124
24
25 diff --git a/net-analyzer/tcpreplay/tcpreplay-4.3.4.ebuild b/net-analyzer/tcpreplay/tcpreplay-4.3.4.ebuild
26 new file mode 100644
27 index 00000000000..d15c8f13c99
28 --- /dev/null
29 +++ b/net-analyzer/tcpreplay/tcpreplay-4.3.4.ebuild
30 @@ -0,0 +1,77 @@
31 +# Copyright 1999-2021 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=7
35 +
36 +inherit autotools
37 +
38 +DESCRIPTION="Utilities for editing and replaying previously captured network traffic"
39 +HOMEPAGE="http://tcpreplay.appneta.com/ https://github.com/appneta/tcpreplay"
40 +SRC_URI="https://github.com/appneta/${PN}/releases/download/v${PV}/${P}.tar.xz"
41 +S="${WORKDIR}"/${P/_/-}
42 +
43 +LICENSE="BSD GPL-3"
44 +SLOT="0"
45 +KEYWORDS="~amd64 ~arm ~sparc ~x86"
46 +IUSE="debug pcapnav +tcpdump"
47 +
48 +# libpcapnav for pcapnav-config
49 +BDEPEND="
50 + net-libs/libpcapnav
51 + >=sys-devel/autogen-5.18.4[libopts]
52 +"
53 +DEPEND="
54 + dev-libs/libdnet
55 + >=net-libs/libpcap-0.9
56 + pcapnav? ( net-libs/libpcapnav )
57 + tcpdump? ( net-analyzer/tcpdump )
58 +"
59 +RDEPEND="${DEPEND}"
60 +
61 +DOCS=( docs/{CHANGELOG,CREDIT,HACKING,TODO} )
62 +
63 +PATCHES=(
64 + "${FILESDIR}"/${PN}-4.3.0-enable-pcap_findalldevs.patch
65 +)
66 +
67 +src_prepare() {
68 + default
69 +
70 + sed -i \
71 + -e 's|#include <dnet.h>|#include <dnet/eth.h>|g' \
72 + src/common/sendpacket.c || die
73 + sed -i \
74 + -e 's|@\([A-Z_]*\)@|$(\1)|g' \
75 + -e '/tcpliveplay_CFLAGS/s|$| $(LDNETINC)|g' \
76 + -e '/tcpliveplay_LDADD/s|$| $(LDNETLIB)|g' \
77 + src/Makefile.am || die
78 +
79 + eautoreconf
80 +}
81 +
82 +src_configure() {
83 + # By default it uses static linking. Avoid that, bug #252940
84 + econf \
85 + $(use_enable debug) \
86 + $(use_with pcapnav pcapnav-config "${BROOT}"/usr/bin/pcapnav-config) \
87 + $(use_with tcpdump tcpdump "${ESYSROOT}"/usr/sbin/tcpdump) \
88 + --enable-dynamic-link \
89 + --enable-local-libopts \
90 + --enable-shared \
91 + --with-libdnet \
92 + --with-testnic2=lo \
93 + --with-testnic=lo
94 +}
95 +
96 +src_test() {
97 + if [[ ! ${EUID} -eq 0 ]]; then
98 + ewarn "Some tests were disabled due to FEATURES=userpriv"
99 + ewarn "To run all tests issue the following command as root:"
100 + ewarn " # make -C ${S}/test"
101 + emake -j1 -C test tcpprep
102 + else
103 + emake -j1 test || {
104 + ewarn "Note that some tests require eth0 iface to be up." ;
105 + die "self test failed - see ${S}/test/test.log" ; }
106 + fi
107 +}