* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/driftnet/files/, net-analyzer/driftnet/
@ 2020-09-26 10:26 Sergei Trofimovich
0 siblings, 0 replies; 2+ messages in thread
From: Sergei Trofimovich @ 2020-09-26 10:26 UTC (permalink / raw
To: gentoo-commits
commit: 829665513dc699948aac45dd46237067d05bca4f
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 26 10:23:42 2020 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Sep 26 10:26:19 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82966551
net-analyzer/driftnet: revert "[QA] Revert "Version 1.3.0" & followup"
This reverts commit 634a58c17ef7d17ad11ced70a9830d136fc8e960.
Bug: https://bugs.gentoo.org/744664
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
net-analyzer/driftnet/Manifest | 1 +
net-analyzer/driftnet/driftnet-1.3.0.ebuild | 67 ++++++++++++++++++++++
.../driftnet/files/driftnet-1.3.0-CFLAGS.patch | 21 +++++++
.../driftnet/files/driftnet-1.3.0-gtk.patch | 13 +++++
4 files changed, 102 insertions(+)
diff --git a/net-analyzer/driftnet/Manifest b/net-analyzer/driftnet/Manifest
index bfbea558151..64dfbfd5032 100644
--- a/net-analyzer/driftnet/Manifest
+++ b/net-analyzer/driftnet/Manifest
@@ -1 +1,2 @@
DIST driftnet-0.1.6_p20090401.tar.gz 43683 BLAKE2B a3f5c57c5f57247feca37815b84630422f9fdb9ec978791eadaaf0f0b51d1f744674931ea9bb1b9291fc9e556ec9758ff44210a442d219ceeabf71e0ea3a193f SHA512 93b2f7b644603bf2fea09163c3c8cc6eed7ed61f3ad7f6770a754e1a31afde5a75e27464c399261bfdafbe37729f201e6bbcb06bb6c59bf52ac0ede4393a15fa
+DIST driftnet-1.3.0.tar.gz 4971618 BLAKE2B 1cf0a46caac2267c093bf21a0d8e150518dbfe0e76acbe21ef87cd760ccbe964313116ee24d25ad7759b3eeba19ef7925200caee4fd06bb28f9836217d889256 SHA512 45f1016a850cf9e5e294756e47e40eccb13f57a316ae7fa885eac2d5e53f68b9d9ef86868415eca76b108f7aa1f4080c550a91f789265edb0f6e3a55e05f5f0c
diff --git a/net-analyzer/driftnet/driftnet-1.3.0.ebuild b/net-analyzer/driftnet/driftnet-1.3.0.ebuild
new file mode 100644
index 00000000000..a53b4a5dedf
--- /dev/null
+++ b/net-analyzer/driftnet/driftnet-1.3.0.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools fcaps toolchain-funcs
+
+DESCRIPTION="Watches network traffic and displays media from TCP streams observed"
+HOMEPAGE="http://www.ex-parrot.com/~chris/driftnet/"
+SRC_URI="https://github.com/deiv/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm64 -sparc ~x86"
+SLOT="0"
+IUSE="debug gtk suid test"
+
+RDEPEND="
+ net-libs/libpcap
+ net-libs/libwebsockets:=[client,http-proxy,socks5]
+ gtk? (
+ media-libs/giflib:=
+ media-libs/libpng:=
+ virtual/jpeg:0
+ x11-libs/gtk+:2
+ )
+"
+BDEPEND="
+ virtual/pkgconfig
+"
+DEPEND="
+ ${RDEPEND}
+ test? ( dev-util/cmocka )
+"
+DOCS="
+ Changelog CREDITS README.md TODO
+"
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.3.0-CFLAGS.patch
+ "${FILESDIR}"/${PN}-1.3.0-gtk.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable gtk display)
+}
+
+src_install() {
+ default
+
+ gzip -d "${ED}"/usr/share/man/man1/${PN}.1.gz || die
+
+ if use suid ; then
+ elog "marking the no-display driftnet as setuid root."
+ fowners root:wheel "/usr/bin/driftnet"
+ fperms 710 "/usr/bin/driftnet"
+ fperms u+s "/usr/bin/driftnet"
+ fi
+}
+
+pkg_postinst() {
+ fcaps \
+ cap_dac_read_search,cap_net_raw,cap_net_admin \
+ "${EROOT}"/usr/bin/driftnet
+}
diff --git a/net-analyzer/driftnet/files/driftnet-1.3.0-CFLAGS.patch b/net-analyzer/driftnet/files/driftnet-1.3.0-CFLAGS.patch
new file mode 100644
index 00000000000..2b25ed45833
--- /dev/null
+++ b/net-analyzer/driftnet/files/driftnet-1.3.0-CFLAGS.patch
@@ -0,0 +1,21 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -68,12 +68,12 @@
+ ,
+ [enable_debug=yes])
+
+-if test "x$enable_debug" = xyes; then
+- CFLAGS="-O2 -g -DDEBUG"
+-else
+- CFLAGS="-O2 -DNDEBUG"
+-fi
+-#AM_CONDITIONAL(ENABLE_DEBUG, test "$enable_debug" = "yes")
++#if test "x$enable_debug" = xyes; then
++# CFLAGS="-O2 -g -DDEBUG"
++#else
++# CFLAGS="-O2 -DNDEBUG"
++#fi
++AM_CONDITIONAL(ENABLE_DEBUG, test "$enable_debug" = "yes")
+
+ #
+ # Checks for programs.
diff --git a/net-analyzer/driftnet/files/driftnet-1.3.0-gtk.patch b/net-analyzer/driftnet/files/driftnet-1.3.0-gtk.patch
new file mode 100644
index 00000000000..2a8a294e8db
--- /dev/null
+++ b/net-analyzer/driftnet/files/driftnet-1.3.0-gtk.patch
@@ -0,0 +1,13 @@
+--- a/src/options.h
++++ b/src/options.h
+@@ -32,10 +32,8 @@
+ char *audio_mpeg_player;
+ int mpeg_player_specified;
+ int newpfx;
+-#ifndef NO_DISPLAY_WINDOW
+ char *savedimgpfx;
+ int enable_gtk_display;
+-#endif
+ char *drop_username;
+ int list_interfaces;
+ int monitor_mode;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/driftnet/files/, net-analyzer/driftnet/
@ 2016-01-16 7:47 Jeroen Roovers
0 siblings, 0 replies; 2+ messages in thread
From: Jeroen Roovers @ 2016-01-16 7:47 UTC (permalink / raw
To: gentoo-commits
commit: 3c2db784f3db102aa799656951d2979aac4471ad
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 16 07:47:30 2016 +0000
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sat Jan 16 07:47:55 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c2db784
net-analyzer/driftnet: Fix building against media-libs/giflib-5 (bug #572036). Add USE=filecaps.
Package-Manager: portage-2.2.26
.../driftnet/driftnet-0.1.6_p20090401-r1.ebuild | 86 ++++++++++++++++++++++
.../driftnet/files/driftnet-0.1.6-giflib-5.patch | 50 +++++++++++++
2 files changed, 136 insertions(+)
diff --git a/net-analyzer/driftnet/driftnet-0.1.6_p20090401-r1.ebuild b/net-analyzer/driftnet/driftnet-0.1.6_p20090401-r1.ebuild
new file mode 100644
index 0000000..860dee9
--- /dev/null
+++ b/net-analyzer/driftnet/driftnet-0.1.6_p20090401-r1.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils fcaps flag-o-matic toolchain-funcs
+
+DESCRIPTION="A program which listens to network traffic and picks out images from TCP streams it observes"
+HOMEPAGE="http://www.ex-parrot.com/~chris/driftnet/"
+SRC_URI="mirror://github/rbu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc -sparc ~x86"
+SLOT="0"
+IUSE="gtk mp3 suid"
+
+CDEPEND="
+ net-libs/libpcap
+ gtk? (
+ x11-libs/gtk+:2
+ virtual/jpeg:0
+ media-libs/giflib:=
+ media-libs/libpng:=
+ )
+"
+
+DEPEND="
+ ${CDEPEND}
+ virtual/pkgconfig
+"
+RDEPEND="
+ ${CDEPEND}
+ mp3? ( media-sound/mpg123 )
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.1.6-giflib-5.patch
+
+ sed -i \
+ -e 's:png_set_gray_1_2_4_to_8:png_set_expand_gray_1_2_4_to_8:' \
+ png.c || die
+
+ # With newer libpng, --cflags causes build failures.
+ sed -i \
+ -e 's:pkg-config --cflags libpng:$(PKG_CONFIG) --libs libpng:' \
+ -e 's:_BSD_SOURCE:_DEFAULT_SOURCE:g' \
+ Makefile || die
+}
+
+src_compile() {
+ tc-export CC PKG_CONFIG
+
+ if use gtk; then
+ emake
+ mv driftnet driftnet-gtk || die
+ emake clean
+ fi
+
+ # build a non-gtk version for all users
+ sed -i 's:^\(.*gtk.*\)$:#\1:g' Makefile || die "sed disable gtk failed"
+ append-flags -DNO_DISPLAY_WINDOW
+ emake
+}
+
+src_install() {
+ dosbin driftnet
+ doman driftnet.1
+
+ use gtk && dosbin driftnet-gtk
+
+ dodoc CHANGES CREDITS README TODO
+
+ if use suid ; then
+ elog "marking the no-display driftnet as setuid root."
+ fowners root:wheel "/usr/sbin/driftnet"
+ fperms 710 "/usr/sbin/driftnet"
+ fperms u+s "/usr/sbin/driftnet"
+ fi
+}
+
+pkg_postinst() {
+ fcaps cap_dac_read_search,cap_net_raw,cap_net_admin \
+ "${EROOT}"/usr/sbin/driftnet
+ use gtk && fcaps cap_dac_read_search,cap_net_raw,cap_net_admin \
+ "${EROOT}"/usr/sbin/driftnet-gtk
+}
diff --git a/net-analyzer/driftnet/files/driftnet-0.1.6-giflib-5.patch b/net-analyzer/driftnet/files/driftnet-0.1.6-giflib-5.patch
new file mode 100644
index 0000000..30ad62c
--- /dev/null
+++ b/net-analyzer/driftnet/files/driftnet-0.1.6-giflib-5.patch
@@ -0,0 +1,50 @@
+--- a/gif.c
++++ b/gif.c
+@@ -20,7 +20,12 @@
+ */
+ int gif_load_hdr(img I) {
+ GifFileType *g;
++#if GIFLIB_MAJOR > 4
++ int *GifError = NULL;
++ g = I->us = DGifOpenFileHandle(fileno(I->fp), GifError);
++#else
+ g = I->us = DGifOpenFileHandle(fileno(I->fp));
++#endif /* GIFLIB_MAJOR */
+ if (!I->us) {
+ I->err = IE_HDRFORMAT;
+ return 0;
+@@ -36,7 +41,12 @@
+ * Abort loading a GIF file after the header is done.
+ */
+ int gif_abort_load(img I) {
++#if GIFLIB_MAJOR > 4
++ int *GifError = NULL;
++ DGifCloseFile((GifFileType*)I->us, GifError);
++#else
+ DGifCloseFile((GifFileType*)I->us);
++#endif /* GIFLIB_MAJOR */
+ return 1;
+ }
+
+@@ -44,6 +54,9 @@
+ * Load GIF image.
+ */
+ int gif_load_img(img I) {
++#if GIFLIB_MAJOR > 4
++ int *GifError = NULL;
++#endif /* GIFLIB_MAJOR */
+ GifFileType *g = I->us;
+ struct SavedImage *si;
+ int ret = 0;
+@@ -114,7 +127,11 @@
+ ret = 1;
+ fail:
+
++#if GIFLIB_MAJOR > 4
++ DGifCloseFile(g, GifError);
++#else
+ DGifCloseFile(g);
++#endif /* GIFLIB_MAJOR */
+
+ return ret;
+ }
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-26 10:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-26 10:26 [gentoo-commits] repo/gentoo:master commit in: net-analyzer/driftnet/files/, net-analyzer/driftnet/ Sergei Trofimovich
-- strict thread matches above, loose matches on Subject: below --
2016-01-16 7:47 Jeroen Roovers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox