Gentoo Archives: gentoo-commits

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