Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/driftnet/files/, net-analyzer/driftnet/
Date: Sat, 26 Sep 2020 10:26:31
Message-Id: 1601115979.829665513dc699948aac45dd46237067d05bca4f.slyfox@gentoo
1 commit: 829665513dc699948aac45dd46237067d05bca4f
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 26 10:23:42 2020 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 26 10:26:19 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82966551
7
8 net-analyzer/driftnet: revert "[QA] Revert "Version 1.3.0" & followup"
9
10 This reverts commit 634a58c17ef7d17ad11ced70a9830d136fc8e960.
11
12 Bug: https://bugs.gentoo.org/744664
13 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
14
15 net-analyzer/driftnet/Manifest | 1 +
16 net-analyzer/driftnet/driftnet-1.3.0.ebuild | 67 ++++++++++++++++++++++
17 .../driftnet/files/driftnet-1.3.0-CFLAGS.patch | 21 +++++++
18 .../driftnet/files/driftnet-1.3.0-gtk.patch | 13 +++++
19 4 files changed, 102 insertions(+)
20
21 diff --git a/net-analyzer/driftnet/Manifest b/net-analyzer/driftnet/Manifest
22 index bfbea558151..64dfbfd5032 100644
23 --- a/net-analyzer/driftnet/Manifest
24 +++ b/net-analyzer/driftnet/Manifest
25 @@ -1 +1,2 @@
26 DIST driftnet-0.1.6_p20090401.tar.gz 43683 BLAKE2B a3f5c57c5f57247feca37815b84630422f9fdb9ec978791eadaaf0f0b51d1f744674931ea9bb1b9291fc9e556ec9758ff44210a442d219ceeabf71e0ea3a193f SHA512 93b2f7b644603bf2fea09163c3c8cc6eed7ed61f3ad7f6770a754e1a31afde5a75e27464c399261bfdafbe37729f201e6bbcb06bb6c59bf52ac0ede4393a15fa
27 +DIST driftnet-1.3.0.tar.gz 4971618 BLAKE2B 1cf0a46caac2267c093bf21a0d8e150518dbfe0e76acbe21ef87cd760ccbe964313116ee24d25ad7759b3eeba19ef7925200caee4fd06bb28f9836217d889256 SHA512 45f1016a850cf9e5e294756e47e40eccb13f57a316ae7fa885eac2d5e53f68b9d9ef86868415eca76b108f7aa1f4080c550a91f789265edb0f6e3a55e05f5f0c
28
29 diff --git a/net-analyzer/driftnet/driftnet-1.3.0.ebuild b/net-analyzer/driftnet/driftnet-1.3.0.ebuild
30 new file mode 100644
31 index 00000000000..a53b4a5dedf
32 --- /dev/null
33 +++ b/net-analyzer/driftnet/driftnet-1.3.0.ebuild
34 @@ -0,0 +1,67 @@
35 +# Copyright 1999-2020 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=7
39 +inherit autotools fcaps toolchain-funcs
40 +
41 +DESCRIPTION="Watches network traffic and displays media from TCP streams observed"
42 +HOMEPAGE="http://www.ex-parrot.com/~chris/driftnet/"
43 +SRC_URI="https://github.com/deiv/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
44 +
45 +LICENSE="GPL-2"
46 +KEYWORDS="~amd64 ~arm64 -sparc ~x86"
47 +SLOT="0"
48 +IUSE="debug gtk suid test"
49 +
50 +RDEPEND="
51 + net-libs/libpcap
52 + net-libs/libwebsockets:=[client,http-proxy,socks5]
53 + gtk? (
54 + media-libs/giflib:=
55 + media-libs/libpng:=
56 + virtual/jpeg:0
57 + x11-libs/gtk+:2
58 + )
59 +"
60 +BDEPEND="
61 + virtual/pkgconfig
62 +"
63 +DEPEND="
64 + ${RDEPEND}
65 + test? ( dev-util/cmocka )
66 +"
67 +DOCS="
68 + Changelog CREDITS README.md TODO
69 +"
70 +PATCHES=(
71 + "${FILESDIR}"/${PN}-1.3.0-CFLAGS.patch
72 + "${FILESDIR}"/${PN}-1.3.0-gtk.patch
73 +)
74 +
75 +src_prepare() {
76 + default
77 + eautoreconf
78 +}
79 +
80 +src_configure() {
81 + econf $(use_enable gtk display)
82 +}
83 +
84 +src_install() {
85 + default
86 +
87 + gzip -d "${ED}"/usr/share/man/man1/${PN}.1.gz || die
88 +
89 + if use suid ; then
90 + elog "marking the no-display driftnet as setuid root."
91 + fowners root:wheel "/usr/bin/driftnet"
92 + fperms 710 "/usr/bin/driftnet"
93 + fperms u+s "/usr/bin/driftnet"
94 + fi
95 +}
96 +
97 +pkg_postinst() {
98 + fcaps \
99 + cap_dac_read_search,cap_net_raw,cap_net_admin \
100 + "${EROOT}"/usr/bin/driftnet
101 +}
102
103 diff --git a/net-analyzer/driftnet/files/driftnet-1.3.0-CFLAGS.patch b/net-analyzer/driftnet/files/driftnet-1.3.0-CFLAGS.patch
104 new file mode 100644
105 index 00000000000..2b25ed45833
106 --- /dev/null
107 +++ b/net-analyzer/driftnet/files/driftnet-1.3.0-CFLAGS.patch
108 @@ -0,0 +1,21 @@
109 +--- a/configure.ac
110 ++++ b/configure.ac
111 +@@ -68,12 +68,12 @@
112 + ,
113 + [enable_debug=yes])
114 +
115 +-if test "x$enable_debug" = xyes; then
116 +- CFLAGS="-O2 -g -DDEBUG"
117 +-else
118 +- CFLAGS="-O2 -DNDEBUG"
119 +-fi
120 +-#AM_CONDITIONAL(ENABLE_DEBUG, test "$enable_debug" = "yes")
121 ++#if test "x$enable_debug" = xyes; then
122 ++# CFLAGS="-O2 -g -DDEBUG"
123 ++#else
124 ++# CFLAGS="-O2 -DNDEBUG"
125 ++#fi
126 ++AM_CONDITIONAL(ENABLE_DEBUG, test "$enable_debug" = "yes")
127 +
128 + #
129 + # Checks for programs.
130
131 diff --git a/net-analyzer/driftnet/files/driftnet-1.3.0-gtk.patch b/net-analyzer/driftnet/files/driftnet-1.3.0-gtk.patch
132 new file mode 100644
133 index 00000000000..2a8a294e8db
134 --- /dev/null
135 +++ b/net-analyzer/driftnet/files/driftnet-1.3.0-gtk.patch
136 @@ -0,0 +1,13 @@
137 +--- a/src/options.h
138 ++++ b/src/options.h
139 +@@ -32,10 +32,8 @@
140 + char *audio_mpeg_player;
141 + int mpeg_player_specified;
142 + int newpfx;
143 +-#ifndef NO_DISPLAY_WINDOW
144 + char *savedimgpfx;
145 + int enable_gtk_display;
146 +-#endif
147 + char *drop_username;
148 + int list_interfaces;
149 + int monitor_mode;