net-analyzer/driftnet: add 1.6.0

Signed-off-by: Vladislav Mikhailikov <vmikhailikov@gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/42728
Closes: https://github.com/gentoo/gentoo/pull/42728
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Vladislav Mikhailikov 2025-10-30 08:46:01 +03:00 committed by Sam James
parent c605f914c0
commit 771d240024
No known key found for this signature in database
GPG Key ID: 738409F520DF9190
3 changed files with 94 additions and 0 deletions

View File

@ -1,2 +1,3 @@
DIST driftnet-1.3.0.tar.gz 4971618 BLAKE2B 1cf0a46caac2267c093bf21a0d8e150518dbfe0e76acbe21ef87cd760ccbe964313116ee24d25ad7759b3eeba19ef7925200caee4fd06bb28f9836217d889256 SHA512 45f1016a850cf9e5e294756e47e40eccb13f57a316ae7fa885eac2d5e53f68b9d9ef86868415eca76b108f7aa1f4080c550a91f789265edb0f6e3a55e05f5f0c
DIST driftnet-1.5.0.tar.gz 5691414 BLAKE2B 6bab227ff730d760a2b4c31cd7b6bf41d61bcb7529c844ba1aee071aeaaa0de43d25f32b73c1423bd13d7d87db69ea0d4a5640fdeb507c7cfa6e7380061147fc SHA512 453329abb6f1a2d9538fa3bea788cc7bec142563e66f832aa11b3a935ac4f092779af6fce64e93959f6c5520d817cff74d80e449275fcbb02ac45d247743df73
DIST driftnet-1.6.0.tar.gz 5772879 BLAKE2B 9d70917a29a830fc8e3afdec0032cbe39bb8cfa1d101bd41473a77e4b63ee2263a4c40db92d9cc8c314ecd117f9fc514c1f55f8750bfbfdd88e31613232f66b7 SHA512 4a381079dbbc3c343fbdf4421ed3ed257e7f4acf1e79be6eeafa702ccf61423404645745f4cc6f6e25b230d0bd0e587b4be64d7066cf827a17225a75a44cb187

View File

@ -0,0 +1,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=(
# Respect user flags
"${FILESDIR}"/${PN}-1.6.0-CFLAGS.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)
--htmldir="${EPREFIX}"/usr/share/driftnet/static-html
)
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
}

View File

@ -0,0 +1,15 @@
do not erase userflags
--- a/configure.ac
+++ b/configure.ac
@@ -80,9 +80,9 @@
[enable_debug=yes])
if test "x$enable_debug" = xyes; then
- CFLAGS="-g -DDEBUG"
+ CFLAGS="-g -DDEBUG $CFLAGS"
else
- CFLAGS="-O2 -DNDEBUG"
+ CFLAGS="-DNDEBUG $CFLAGS"
fi
#AM_CONDITIONAL(ENABLE_DEBUG, test "$enable_debug" = "yes")