summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Walker <ka0ttic@gentoo.org>2005-03-18 14:19:35 +0000
committerAaron Walker <ka0ttic@gentoo.org>2005-03-18 14:19:35 +0000
commitffc316e2d175d1b0cf92d1430dbe4d610d0dfb6b (patch)
treeea5159dd64d0a551c0e635e7d5c153ac1b99f16d /net-analyzer/driftnet
parentGaleon is now in www-client from net-www (diff)
downloadhistorical-ffc316e2d175d1b0cf92d1430dbe4d610d0dfb6b.tar.gz
historical-ffc316e2d175d1b0cf92d1430dbe4d610d0dfb6b.tar.bz2
historical-ffc316e2d175d1b0cf92d1430dbe4d610d0dfb6b.zip
Use giflib rather than libungif for bug 85720. Also removed unnecessary nogtk patch since it can easily be done with a sed. Added a patch to fix a few warnings, most importantly the use of tmpnam().
Package-Manager: portage-2.0.51.19
Diffstat (limited to 'net-analyzer/driftnet')
-rw-r--r--net-analyzer/driftnet/ChangeLog9
-rw-r--r--net-analyzer/driftnet/Manifest16
-rw-r--r--net-analyzer/driftnet/driftnet-0.1.6.ebuild34
-rw-r--r--net-analyzer/driftnet/files/driftnet-0.1.6-nogtk.patch21
-rw-r--r--net-analyzer/driftnet/files/driftnet-0.1.6-tmpnam-is-bad.diff69
5 files changed, 116 insertions, 33 deletions
diff --git a/net-analyzer/driftnet/ChangeLog b/net-analyzer/driftnet/ChangeLog
index acf0b4ebf83d..6c8cf226f013 100644
--- a/net-analyzer/driftnet/ChangeLog
+++ b/net-analyzer/driftnet/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-analyzer/driftnet
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/driftnet/ChangeLog,v 1.15 2005/03/06 03:37:18 josejx Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/driftnet/ChangeLog,v 1.16 2005/03/18 14:19:35 ka0ttic Exp $
+
+ 18 Mar 2005; Aaron Walker <ka0ttic@gentoo.org>
+ -files/driftnet-0.1.6-nogtk.patch,
+ +files/driftnet-0.1.6-tmpnam-is-bad.diff, driftnet-0.1.6.ebuild:
+ Use giflib rather than libungif for bug 85720. Also removed unnecessary
+ nogtk patch since it can easily be done with a sed. Added a patch to fix a
+ few warnings, most importantly the use of tmpnam().
06 Mar 2005; Joseph Jezak <josejx@gentoo.org> driftnet-0.1.6.ebuild:
Marked ppc stable for bug #84140.
diff --git a/net-analyzer/driftnet/Manifest b/net-analyzer/driftnet/Manifest
index 9f4c8b697ded..9b12ac9eb91f 100644
--- a/net-analyzer/driftnet/Manifest
+++ b/net-analyzer/driftnet/Manifest
@@ -1,5 +1,15 @@
-MD5 1f161b6fa915e71b8a2b9813351de2ea ChangeLog 1320
-MD5 bd41da31ff6d51b9666712471f76fe8c driftnet-0.1.6.ebuild 1243
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+MD5 bbe7c920381f40ef16f8c75af699754c driftnet-0.1.6.ebuild 1656
+MD5 7325b51b4ded1481eb8115fac4051470 ChangeLog 1680
MD5 fe5d2611299b3a390d7681e92ff4d5c5 metadata.xml 287
+MD5 197d8c21e7593ec2c40a08c80e5b9808 files/driftnet-0.1.6-tmpnam-is-bad.diff 2096
MD5 c0c08c9836402b53a0eb51c3b6c6201a files/digest-driftnet-0.1.6 65
-MD5 8768d05471c8332731ad3d51f7f18ff6 files/driftnet-0.1.6-nogtk.patch 996
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.1 (GNU/Linux)
+
+iD8DBQFCOuOCEZCkKN40op4RAmE6AJ9KO6o0mSpnG2FTeT+ge6GNkIVItwCbBSQA
+ZyVp5M2REL26TC51d7j6M2I=
+=3RpE
+-----END PGP SIGNATURE-----
diff --git a/net-analyzer/driftnet/driftnet-0.1.6.ebuild b/net-analyzer/driftnet/driftnet-0.1.6.ebuild
index 1e66f6abbcf7..d04f94d7de74 100644
--- a/net-analyzer/driftnet/driftnet-0.1.6.ebuild
+++ b/net-analyzer/driftnet/driftnet-0.1.6.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/driftnet/driftnet-0.1.6.ebuild,v 1.16 2005/03/06 03:37:18 josejx Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/driftnet/driftnet-0.1.6.ebuild,v 1.17 2005/03/18 14:19:35 ka0ttic Exp $
-inherit eutils
+inherit eutils flag-o-matic
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/"
@@ -14,27 +14,45 @@ SLOT="0"
IUSE="gtk"
DEPEND="media-libs/jpeg
- media-libs/libungif
+ media-libs/giflib
virtual/libpcap
gtk? ( <x11-libs/gtk+-1.3.0 )"
-RDEPEND="virtual/mpg123"
+RDEPEND="${DEPEND}
+ virtual/mpg123"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ # use giflib - bug 85720
+ sed -i 's/-lungif/-lgif/' Makefile || die "sed giflib failed"
+ # don't use gtk+ by default
+ sed -i 's:^\(.*gtk-config.*\)$:#\1:g' Makefile || die "sed disable gtk failed"
+
+ epatch ${FILESDIR}/${P}-tmpnam-is-bad.diff
+}
src_compile() {
+ append-ldflags -Wl,-z,now
+
if use gtk; then
+ sed -i 's:^#\(.*gtk-config.*\)$:\1:g' Makefile || die "sed enable gtk failed"
emake || die "gtk+ build failed"
mv driftnet driftnet-gtk
make clean || die
+ else
+ append-flags -DNO_DISPLAY_WINDOW
fi
- epatch "${FILESDIR}/${P}-nogtk.patch"
+
emake || die "emake failed"
}
src_install () {
dobin driftnet || die "dobin failed"
doman driftnet.1 || die "doman failed"
- if use gtk ; then
- dobin driftnet-gtk || die "dobin failed (gtk)"
- fi
+
+ use gtk && { dobin driftnet-gtk || die "dobin failed (gtk)" ; }
+
dodoc CHANGES CREDITS README TODO || die "dodoc failed"
einfo "marking the no-display driftnet as setuid root."
diff --git a/net-analyzer/driftnet/files/driftnet-0.1.6-nogtk.patch b/net-analyzer/driftnet/files/driftnet-0.1.6-nogtk.patch
deleted file mode 100644
index 150122edf7a9..000000000000
--- a/net-analyzer/driftnet/files/driftnet-0.1.6-nogtk.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -ur driftnet-0.1.5/Makefile driftnet-0.1.5-new/Makefile
---- driftnet-0.1.5/Makefile Wed Jun 26 17:13:15 2002
-+++ driftnet-0.1.5-new/Makefile Mon Jul 8 22:52:07 2002
-@@ -32,14 +32,14 @@
-
- # Optional C compiler and linker flags. Typical driftnet builds have support
- # for displaying captured images in an X window, and need the following flags:
--CFLAGS += `gtk-config --cflags`
--LDLIBS += -ljpeg -lungif `gtk-config --libs`
-+# CFLAGS += `gtk-config --cflags`
-+# LDLIBS += -ljpeg -lungif `gtk-config --libs`
-
- # Alternatively, you can build a version of driftnet which can only be used
- # in `adjunct' mode as the back end for some other image-processing program. To
- # use this, comment out the two preceding CFLAGS and LDLIBS lines and uncomment
- # the following line:
--#CFLAGS += -DNO_DISPLAY_WINDOW
-+CFLAGS += -DNO_DISPLAY_WINDOW
-
- # On systems with a C99 compiler, driftnet will use <stdint.h> for the
- # definitions of types such as uint8_t. On other systems like Solaris, these
diff --git a/net-analyzer/driftnet/files/driftnet-0.1.6-tmpnam-is-bad.diff b/net-analyzer/driftnet/files/driftnet-0.1.6-tmpnam-is-bad.diff
new file mode 100644
index 000000000000..8bb9565e8a07
--- /dev/null
+++ b/net-analyzer/driftnet/files/driftnet-0.1.6-tmpnam-is-bad.diff
@@ -0,0 +1,69 @@
+diff --exclude='*~' -urN driftnet-0.1.6.orig/display.c driftnet-0.1.6/display.c
+--- driftnet-0.1.6.orig/display.c 2005-03-18 07:55:41.000000000 -0500
++++ driftnet-0.1.6/display.c 2005-03-18 09:03:59.000000000 -0500
+@@ -20,6 +20,7 @@
+ #include <fcntl.h>
+ #include <string.h>
+ #include <errno.h>
++#include <time.h>
+
+ #include <sys/stat.h>
+
+@@ -297,7 +298,7 @@
+ gboolean pipe_event(GIOChannel chan, GIOCondition cond, gpointer data) {
+ static char *path;
+ char name[TMPNAMELEN];
+- ssize_t rr;
++ ssize_t rr = 0;
+ int nimgs = 0;
+
+ if (!path)
+diff --exclude='*~' -urN driftnet-0.1.6.orig/driftnet.c driftnet-0.1.6/driftnet.c
+--- driftnet-0.1.6.orig/driftnet.c 2005-03-18 07:55:41.000000000 -0500
++++ driftnet-0.1.6/driftnet.c 2005-03-18 09:07:43.000000000 -0500
+@@ -50,6 +50,7 @@
+ int verbose, adjunct;
+ int tmpdir_specified;
+ char *tmpdir;
++char tmpdir_template[] = "driftnet-XXXXXX";
+ int max_tmpfiles;
+
+ enum mediatype extract_type = m_image;
+@@ -474,6 +475,8 @@
+ int mpeg_player_specified = 0;
+ pthread_t packetth;
+
++ tmpdir = NULL;
++
+ /* Handle command-line options. */
+ opterr = 0;
+ while ((c = getopt(argc, argv, optstring)) != -1) {
+@@ -584,12 +587,10 @@
+ }
+ } else {
+ /* need to make a temporary directory. */
+- for (;;) {
+- tmpdir = strdup(tmpnam(NULL));
+- if (mkdir(tmpdir, 0700) == 0)
+- break;
+- free(tmpdir);
+- }
++ if (!(tmpdir = mkdtemp(tmpdir_template))) {
++ fprintf(stderr, PROGNAME": mkdtemp: %s\n", strerror(errno));
++ return -1;
++ }
+ }
+
+ if (verbose)
+diff --exclude='*~' -urN driftnet-0.1.6.orig/playaudio.c driftnet-0.1.6/playaudio.c
+--- driftnet-0.1.6.orig/playaudio.c 2005-03-18 07:55:41.000000000 -0500
++++ driftnet-0.1.6/playaudio.c 2005-03-18 09:03:59.000000000 -0500
+@@ -167,7 +167,7 @@
+ static void mpeg_player_manager(void) {
+ extern sig_atomic_t foad; /* in driftnet.c */
+ struct sigaction sa = {0};
+- pid_t mpeg_pid;
++ pid_t mpeg_pid = -1;
+
+ sa.sa_handler = SIG_DFL;
+ sigaction(SIGCHLD, &sa, NULL);