blob: 3d673bf6ed90eb9acc809abfe5bf85759b3260cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools fcaps
DESCRIPTION="Watches network traffic and displays media from TCP streams observed"
HOMEPAGE="https://chris.ex-parrot.com/driftnet/"
SRC_URI="https://github.com/deiv/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~arm64 ppc -sparc x86"
IUSE="debug gtk httpd suid test"
RESTRICT="!test? ( test )"
RDEPEND="
net-libs/libpcap
media-libs/libwebp:=
gtk? (
dev-libs/glib:2
media-libs/giflib:=
media-libs/libjpeg-turbo:=
media-libs/libpng:=
x11-libs/cairo
x11-libs/gtk+:3[X]
)
httpd? ( net-libs/libwebsockets:=[client,http-proxy,socks5] )
"
DEPEND="
${RDEPEND}
test? ( dev-util/cmocka )
"
BDEPEND="virtual/pkgconfig"
PATCHES=(
"${FILESDIR}"/${PN}-1.5.0-CFLAGS.patch
# merged in 1.6.0
"${FILESDIR}"/${PN}-1.5.0-missing_else.patch
# https://github.com/deiv/driftnet/pull/56.patch
"${FILESDIR}"/${PN}-1.5.0-fix_test.patch
"${FILESDIR}"/${PN}-1.5.0-use_uint.patch
# https://github.com/deiv/driftnet/pull/57.patch
"${FILESDIR}"/${PN}-1.5.0-libwebsocket_compat.patch
)
FILECAPS=( cap_dac_read_search,cap_net_raw,cap_net_admin usr/bin/driftnet )
# EXTRA_DIST
DOCS=( Changelog CREDITS )
src_prepare() {
default
eautoreconf
}
src_configure() {
local myeconfargs=(
$(use_enable debug)
$(use_enable gtk display)
$(use_enable httpd http-display)
)
econf "${myeconfargs[@]}"
}
src_install() {
default
gzip -d "${ED}"/usr/share/man/man1/${PN}.1.gz || die
if use suid ; then
elog "marking driftnet as setuid root."
fowners root:wheel "/usr/bin/driftnet"
fperms 710 "/usr/bin/driftnet"
fperms u+s "/usr/bin/driftnet"
fi
}
|