summaryrefslogtreecommitdiff
path: root/net-mgmt
diff options
context:
space:
mode:
authorEmanuel Haupt <ehaupt@FreeBSD.org>2017-01-17 13:12:41 +0000
committerEmanuel Haupt <ehaupt@FreeBSD.org>2017-01-17 13:12:41 +0000
commitfbfde359af6b2098ba8a4adb3a90736665cf1129 (patch)
tree17ade60a71a3396221012712d994534c18cfb3e0 /net-mgmt
parentwww/firefox: update to 51.0 (rc1) (diff)
Update to 1.0
Notes
Notes: svn path=/head/; revision=431738
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/driftnet/Makefile26
-rw-r--r--net-mgmt/driftnet/distinfo5
-rw-r--r--net-mgmt/driftnet/files/patch-Makefile50
-rw-r--r--net-mgmt/driftnet/files/patch-Makefile.in20
-rw-r--r--net-mgmt/driftnet/files/patch-configure.ac14
-rw-r--r--net-mgmt/driftnet/files/patch-driftnet.c22
-rw-r--r--net-mgmt/driftnet/files/patch-gif.c38
-rw-r--r--net-mgmt/driftnet/files/patch-src_display_gif.c29
-rw-r--r--net-mgmt/driftnet/files/patch-src_display_img.h26
-rw-r--r--net-mgmt/driftnet/files/patch-src_display_png.c14
-rw-r--r--net-mgmt/driftnet/files/patch-src_layer2.c30
-rw-r--r--net-mgmt/driftnet/files/patch-src_layer3.c15
-rw-r--r--net-mgmt/driftnet/files/patch-src_media_image.c10
13 files changed, 175 insertions, 124 deletions
diff --git a/net-mgmt/driftnet/Makefile b/net-mgmt/driftnet/Makefile
index 5d0aa77f8c24..90ecdca9aa32 100644
--- a/net-mgmt/driftnet/Makefile
+++ b/net-mgmt/driftnet/Makefile
@@ -2,30 +2,32 @@
# $FreeBSD$
PORTNAME= driftnet
-PORTVERSION= 0.1.6
-PORTREVISION= 12
+PORTVERSION= 1.0
CATEGORIES= net-mgmt
-MASTER_SITES= http://www.ex-parrot.com/~chris/driftnet/ \
- http://www.vanheusden.com/mirrors/
+MASTER_SITES= http://ftp.openbsd.org/pub/OpenBSD/distfiles/ \
+ LOCAL/ehaupt
+DISTNAME= ${PORTNAME}_${PORTVERSION}.orig
MAINTAINER= ehaupt@FreeBSD.org
COMMENT= Tool to grab images out of (your) TCP connections
-LICENSE= GPLv2
+LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/COPYING
-LIB_DEPENDS= libgif.so:graphics/giflib
+LIB_DEPENDS= libgif.so:graphics/giflib \
+ libpng16.so:graphics/png
BUILD_DEPENDS= makedepend:devel/makedepend
-USES= gettext-runtime gmake jpeg
-USE_GNOME= gtk12
+GNU_CONFIGURE= yes
+USES= compiler:gcc-c++11-lib gettext-runtime gmake jpeg localbase:ldflags pkgconfig
+USE_GNOME= gtk20
USE_XORG= x11 xext xi
-ALL_TARGET= default
PLIST_FILES= bin/driftnet man/man1/driftnet.1.gz
+PORTDOCS= *
-do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/driftnet ${STAGEDIR}${PREFIX}/bin
- ${INSTALL_MAN} ${WRKSRC}/driftnet.1 ${STAGEDIR}${MANPREFIX}/man/man1
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+
+INSTALL_TARGET= install-strip
.include <bsd.port.mk>
diff --git a/net-mgmt/driftnet/distinfo b/net-mgmt/driftnet/distinfo
index f4cccd69b951..9cb3af4af552 100644
--- a/net-mgmt/driftnet/distinfo
+++ b/net-mgmt/driftnet/distinfo
@@ -1,2 +1,3 @@
-SHA256 (driftnet-0.1.6.tar.gz) = dbdf7ead3ae14b109f88c86dedeb7524be8c257aa773a781891216f013373d6d
-SIZE (driftnet-0.1.6.tar.gz) = 36989
+TIMESTAMP = 1484644152
+SHA256 (driftnet_1.0.orig.tar.gz) = b2e675ec4c8eec126198d4010880b579d728cf17e52106d7f40f0a135000eaa7
+SIZE (driftnet_1.0.orig.tar.gz) = 151184
diff --git a/net-mgmt/driftnet/files/patch-Makefile b/net-mgmt/driftnet/files/patch-Makefile
deleted file mode 100644
index bdcae0ef83e4..000000000000
--- a/net-mgmt/driftnet/files/patch-Makefile
+++ /dev/null
@@ -1,50 +0,0 @@
---- Makefile.orig 2002-07-09 19:26:41 UTC
-+++ Makefile
-@@ -16,23 +16,23 @@
- #CC = gcc
-
- # Basic compiler, linker flags; should not need any changes.
--CFLAGS += -g -Wall
--LDFLAGS += -g
-+#CFLAGS += -g -Wall
-+#LDFLAGS += -g
-
- # You might need these if libpcap is installed somewhere random.
--CFLAGS += -I/usr/include/pcap
-+#CFLAGS += -I/usr/include/pcap
- #LDFLAGS += -L/path/to/libpcap.so
-
- # Required on Linux to get BSDish definitions of the TCP/IP structs.
--CFLAGS += -D_BSD_SOURCE
-+#CFLAGS += -D_BSD_SOURCE
-
- # We always need the pcap and pthread libraries.
- LDLIBS += -lpcap -lpthread
-
- # 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 -lgif `${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
-@@ -43,7 +43,7 @@ LDLIBS += -ljpeg -lungif `gtk-config --
- # 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
- # are in <sys/types.h>, and you should uncomment this line.
--#CFLAGS += -DUSE_SYS_TYPES_H
-+CFLAGS += -DUSE_SYS_TYPES_H
-
- # On Solaris, it is necessary to link against -lposix4 for the definition of
- # nanosleep; uncomment the below.
-@@ -51,7 +51,7 @@ LDLIBS += -ljpeg -lungif `gtk-config --
-
- # added 20020604 edobbs
- # On BSD systems, may need to use /usr/local/include
--#CFLAGS += -I/usr/local/include
-+CFLAGS += -I$(LOCALBASE)/include
-
-
- #
diff --git a/net-mgmt/driftnet/files/patch-Makefile.in b/net-mgmt/driftnet/files/patch-Makefile.in
new file mode 100644
index 000000000000..feb74aed11a1
--- /dev/null
+++ b/net-mgmt/driftnet/files/patch-Makefile.in
@@ -0,0 +1,20 @@
+--- Makefile.in.orig 2013-05-12 16:33:18 UTC
++++ Makefile.in
+@@ -258,7 +258,7 @@ top_srcdir = @top_srcdir@
+ SUBDIRS = src
+ dist_doc_DATA = README TODO
+ EXTRA_DIST = driftnet.1.in CHANGES CREDITS
+-MANPAGE = driftnet.1.gz
++MANPAGE = driftnet.1
+ MAN1DIR = $(DESTDIR)$(mandir)/man1/
+ all: all-recursive
+
+@@ -773,7 +773,7 @@ clean-local:
+ rm -f $(MANPAGE)
+
+ install-data-local: driftnet.1.in
+- cat $(srcdir)/driftnet.1.in | sed s/@*VERSION@*/$(VERSION)/ | GZIP=$(GZIP_ENV) gzip > $(MANPAGE)
++ cat $(srcdir)/driftnet.1.in | sed s/@*VERSION@*/$(VERSION)/ > $(MANPAGE)
+ $(MKDIR_P) $(MAN1DIR)
+ $(INSTALL_DATA) $(MANPAGE) $(MAN1DIR) || exit $$?
+
diff --git a/net-mgmt/driftnet/files/patch-configure.ac b/net-mgmt/driftnet/files/patch-configure.ac
new file mode 100644
index 000000000000..32db1d1143f1
--- /dev/null
+++ b/net-mgmt/driftnet/files/patch-configure.ac
@@ -0,0 +1,14 @@
+--- configure.ac.orig 2013-05-12 15:16:43 UTC
++++ configure.ac
+@@ -24,11 +24,6 @@ AC_ARG_ENABLE([debug],
+ ,
+ [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")
+
+ #
diff --git a/net-mgmt/driftnet/files/patch-driftnet.c b/net-mgmt/driftnet/files/patch-driftnet.c
deleted file mode 100644
index d2f8debbb731..000000000000
--- a/net-mgmt/driftnet/files/patch-driftnet.c
+++ /dev/null
@@ -1,22 +0,0 @@
---- driftnet.c.orig 2002-07-09 19:26:41 UTC
-+++ driftnet.c
-@@ -254,8 +254,8 @@ void usage(FILE *fp) {
- "\n"
- " -h Display this help message.\n"
- " -v Verbose operation.\n"
--" -i interface Select the interface on which to listen (default: all\n"
--" interfaces).\n"
-+" -i interface Select the interface on which to listen (default: first\n"
-+" available interface).\n"
- " -p Do not put the listening interface into promiscuous mode.\n"" -a Adjunct mode: do not display images on screen, but save\n"
- " them to a temporary directory and announce their names on\n"
- " standard output.\n"
-@@ -313,7 +313,7 @@ void terminate_on_signal(int s) {
- void setup_signals(void) {
- int *p;
- /* Signals to ignore. */
-- int ignore_signals[] = {SIGPIPE, 0};
-+ int ignore_signals[] = {SIGPIPE, SIGCONT, SIGHUP, 0};
- /* Signals which mean we should quit, killing the display child if
- * applicable. */
- int terminate_signals[] = {SIGTERM, SIGINT, /*SIGSEGV,*/ SIGBUS, SIGCHLD, 0};
diff --git a/net-mgmt/driftnet/files/patch-gif.c b/net-mgmt/driftnet/files/patch-gif.c
deleted file mode 100644
index 7a007d6eb44b..000000000000
--- a/net-mgmt/driftnet/files/patch-gif.c
+++ /dev/null
@@ -1,38 +0,0 @@
---- gif.c.orig 2002-07-09 19:26:41 UTC
-+++ gif.c
-@@ -20,7 +20,11 @@ static const char rcsid[] = "$Id: gif.c,
- */
- int gif_load_hdr(img I) {
- GifFileType *g;
-+#if GIFLIB_MAJOR >= 5
-+ g = I->us = DGifOpenFileHandle(fileno(I->fp), NULL);
-+#else
- g = I->us = DGifOpenFileHandle(fileno(I->fp));
-+#endif
- if (!I->us) {
- I->err = IE_HDRFORMAT;
- return 0;
-@@ -36,7 +40,11 @@ int gif_load_hdr(img I) {
- * Abort loading a GIF file after the header is done.
- */
- int gif_abort_load(img I) {
-+#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
-+ DGifCloseFile((GifFileType*)I->us, NULL);
-+#else
- DGifCloseFile((GifFileType*)I->us);
-+#endif
- return 1;
- }
-
-@@ -114,7 +122,11 @@ int gif_load_img(img I) {
- ret = 1;
- fail:
-
-+#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
-+ DGifCloseFile(g, NULL);
-+#else
- DGifCloseFile(g);
-+#endif
-
- return ret;
- }
diff --git a/net-mgmt/driftnet/files/patch-src_display_gif.c b/net-mgmt/driftnet/files/patch-src_display_gif.c
new file mode 100644
index 000000000000..d67b56298963
--- /dev/null
+++ b/net-mgmt/driftnet/files/patch-src_display_gif.c
@@ -0,0 +1,29 @@
+--- src/display/gif.c.orig 2013-05-12 15:16:43 UTC
++++ src/display/gif.c
+@@ -22,7 +22,7 @@
+ */
+ int gif_load_hdr(img I) {
+ GifFileType *g;
+- g = I->us = DGifOpenFileHandle(fileno(I->fp));
++ g = I->us = DGifOpenFileHandle(fileno(I->fp), NULL);
+ if (!I->us) {
+ I->err = IE_HDRFORMAT;
+ return 0;
+@@ -38,7 +38,7 @@ int gif_load_hdr(img I) {
+ * Abort loading a GIF file after the header is done.
+ */
+ int gif_abort_load(img I) {
+- DGifCloseFile((GifFileType*)I->us);
++ DGifCloseFile((GifFileType*)I->us, NULL);
+ return 1;
+ }
+
+@@ -116,7 +116,7 @@ int gif_load_img(img I) {
+ ret = 1;
+ fail:
+
+- DGifCloseFile(g);
++ DGifCloseFile(g, NULL);
+
+ return ret;
+ }
diff --git a/net-mgmt/driftnet/files/patch-src_display_img.h b/net-mgmt/driftnet/files/patch-src_display_img.h
new file mode 100644
index 000000000000..7cf9556c3b36
--- /dev/null
+++ b/net-mgmt/driftnet/files/patch-src_display_img.h
@@ -0,0 +1,26 @@
+--- src/display/img.h.orig 2013-05-12 15:22:44 UTC
++++ src/display/img.h
+@@ -19,11 +19,13 @@
+
+ #include <stdio.h>
+
++#include <sys/endian.h>
++
+ typedef uint8_t chan;
+ typedef uint32_t pel;
+
+ /* Yuk. GDKRGB expects data in a specific ordering. */
+-#if defined(DRIFTNET_LITTLE_ENDIAN)
++#if defined(LITTLE_ENDIAN)
+ # define PEL(r, g, b) ((pel)((chan)(r) | ((chan)(g) << 8) | ((chan)(b) << 16)))
+ # define PELA(r, g, b, a) ((pel)((chan)(r) | ((chan)(g) << 8) | ((chan)(b) << 16) | ((chan)(a) << 24)))
+
+@@ -31,7 +33,7 @@ typedef uint32_t pel;
+ # define GETG(p) ((chan)(((p) & (pel)0x0000ff00) >> 8))
+ # define GETB(p) ((chan)(((p) & (pel)0x00ff0000) >> 16))
+ # define GETA(p) ((chan)(((p) & (pel)0xff000000) >> 24))
+-#elif defined(DRIFTNET_BIG_ENDIAN)
++#elif defined(BIG_ENDIAN)
+ # define PEL(r, g, b) ((pel)(((chan)(r) << 24) | ((chan)(g) << 16) | ((chan)(b) << 8)))
+ # define PELA(r, g, b, a) ((pel)(((chan)(r) << 24) | ((chan)(g) << 16) | ((chan)(b) << 8) | ((chan)(a))))
+
diff --git a/net-mgmt/driftnet/files/patch-src_display_png.c b/net-mgmt/driftnet/files/patch-src_display_png.c
new file mode 100644
index 000000000000..600e3e0039dc
--- /dev/null
+++ b/net-mgmt/driftnet/files/patch-src_display_png.c
@@ -0,0 +1,14 @@
+--- src/display/png.c.orig 2013-05-12 15:16:43 UTC
++++ src/display/png.c
+@@ -132,9 +132,9 @@ int png_load_img(img I) {
+ /* Convert greyscale images to 8-bit RGB */
+ if (color_type == PNG_COLOR_TYPE_GRAY ||
+ color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
+- if (bit_depth < 8) {
++ /* if (bit_depth < 8) {
+ png_set_gray_1_2_4_to_8(png_ptr);
+- }
++ } */
+ png_set_gray_to_rgb(png_ptr);
+ }
+
diff --git a/net-mgmt/driftnet/files/patch-src_layer2.c b/net-mgmt/driftnet/files/patch-src_layer2.c
new file mode 100644
index 000000000000..a48b991e60a1
--- /dev/null
+++ b/net-mgmt/driftnet/files/patch-src_layer2.c
@@ -0,0 +1,30 @@
+--- src/layer2.c.orig 2013-05-12 15:16:43 UTC
++++ src/layer2.c
+@@ -3,7 +3,10 @@
+ #include <string.h>
+ #include <assert.h>
+
+-#include <netinet/ether.h>
++//#include <netinet/ether.h>
++#include <sys/types.h>
++#include <netinet/in_systm.h>
++#include <netinet/in.h>
+ #include <netinet/ip.h>
+ #include <netinet/ip6.h>
+
+@@ -12,6 +15,15 @@
+ #include "log.h"
+ #include "layer2.h"
+
++#define ETH_P_IP 0x0800
++#define ETH_P_IPV6 0x86DD
++#define ETH_ALEN 6
++struct ethhdr {
++ unsigned char h_dest[ETH_ALEN];
++ unsigned char h_source[ETH_ALEN];
++ u_int16_t h_proto;
++} __attribute__((packed));
++
+ int handle_link_layer(datalink_info_t *info, const u_char *pkt, uint8_t *nextproto,
+ int *offsetnext)
+ {
diff --git a/net-mgmt/driftnet/files/patch-src_layer3.c b/net-mgmt/driftnet/files/patch-src_layer3.c
new file mode 100644
index 000000000000..c0273fe5f874
--- /dev/null
+++ b/net-mgmt/driftnet/files/patch-src_layer3.c
@@ -0,0 +1,15 @@
+--- src/layer3.c.orig 2013-05-12 15:16:43 UTC
++++ src/layer3.c
+@@ -3,8 +3,12 @@
+ #include <string.h>
+ #include <assert.h>
+
++#include <sys/types.h>
++#include <netinet/in_systm.h>
++#include <netinet/in.h>
+ #include <netinet/ip.h>
+ #include <netinet/ip6.h>
++#include <sys/socket.h>
+
+ #include "log.h"
+ #include "layer3.h"
diff --git a/net-mgmt/driftnet/files/patch-src_media_image.c b/net-mgmt/driftnet/files/patch-src_media_image.c
new file mode 100644
index 000000000000..5ce9253c4109
--- /dev/null
+++ b/net-mgmt/driftnet/files/patch-src_media_image.c
@@ -0,0 +1,10 @@
+--- src/media/image.c.orig 2013-05-12 15:16:43 UTC
++++ src/media/image.c
+@@ -10,6 +10,7 @@
+ #include <stdio.h>
+ #include <stdlib.h> /* On many systems (Darwin...), stdio.h is a prerequisite. */
+ #include <string.h>
++#include <sys/types.h>
+
+ #include <netinet/in.h> /* ntohl */
+