Update to 1.2.0

This commit is contained in:
Emanuel Haupt 2018-09-16 14:12:48 +00:00
parent 3f18b63168
commit 2407ce31e1
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=479895
7 changed files with 24 additions and 92 deletions

View file

@ -2,8 +2,8 @@
# $FreeBSD$
PORTNAME= driftnet
PORTVERSION= 1.1.5
DISTVERSIONPREFIX= upstream/
PORTVERSION= 1.2.0
DISTVERSIONPREFIX= v
CATEGORIES= net-mgmt
MAINTAINER= ehaupt@FreeBSD.org
@ -17,13 +17,16 @@ LIB_DEPENDS= libgif.so:graphics/giflib \
BUILD_DEPENDS= makedepend:devel/makedepend
GNU_CONFIGURE= yes
USES= autoreconf gettext-runtime gmake jpeg localbase:ldflags pkgconfig
USES= autoreconf gettext-runtime gmake gnome jpeg localbase:ldflags \
pkgconfig
USE_GITHUB= yes
USE_GNOME= gtk20
USE_XORG= x11 xext xi
GH_ACCOUNT= deiv
CONFIGURE_ARGS+= --disable-http-display
PLIST_FILES= bin/driftnet man/man1/driftnet.1.gz
PORTDOCS= *

View file

@ -1,3 +1,3 @@
TIMESTAMP = 1502890972
SHA256 (deiv-driftnet-upstream-1.1.5_GH0.tar.gz) = 270fc081965fb9fb2163a0cb511cce45398585a481a85c8a34e71f32fefcb86d
SIZE (deiv-driftnet-upstream-1.1.5_GH0.tar.gz) = 166481
TIMESTAMP = 1537093222
SHA256 (deiv-driftnet-v1.2.0_GH0.tar.gz) = 4d7b888dab73741f98a414433036b661d886f6e4486664fe8cf491344665a1bf
SIZE (deiv-driftnet-v1.2.0_GH0.tar.gz) = 144356

View file

@ -0,0 +1,11 @@
--- configure.ac.orig 2018-09-15 19:08:05 UTC
+++ configure.ac
@@ -22,7 +22,7 @@ build_linux=no
build_mac=no
case "${host_os}" in
- linux*)
+ linux*|freebsd*)
build_linux=yes
;;
cygwin*|mingw*)

View file

@ -1,33 +0,0 @@
--- src/display/gif.c.orig 2014-09-14 19:16:31 UTC
+++ src/display/gif.c
@@ -25,12 +25,7 @@
int gif_load_hdr(img I) {
GifFileType *g;
-/* GIFLIB_MAJOR is not defined until version 5 of libgif */
-#if defined GIFLIB_MAJOR && 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;
@@ -47,7 +42,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;
}
@@ -125,7 +120,7 @@ int gif_load_img(img I) {
ret = 1;
fail:
- DGifCloseFile(g);
+ DGifCloseFile(g, NULL);
return ret;
}

View file

@ -1,36 +0,0 @@
--- src/layer2.c.orig 2014-09-14 19:16:31 UTC
+++ src/layer2.c
@@ -9,7 +9,14 @@
#include <string.h>
+#ifdef __FreeBSD__
+#include <sys/types.h>
+#include <netinet/in_systm.h>
+#include <netinet/in.h>
+#else
#include <netinet/ether.h>
+#endif
+
#include <netinet/ip.h>
#include <netinet/ip6.h>
@@ -19,6 +26,18 @@
#include "packetcapture.h" /* for datalink_info_t */
#include "layer2.h"
+#ifdef __FreeBSD__
+#define ETH_P_IP 0x0800
+#define ETH_P_IPV6 0x86DD
+#define ETH_ALEN 6
+#define ETH_P_ARP 0x0806
+struct ethhdr {
+ unsigned char h_dest[ETH_ALEN];
+ unsigned char h_source[ETH_ALEN];
+ u_int16_t h_proto;
+} __attribute__((packed));
+#endif
+
/* ETH_P_PAE is named ETHERTYPE_PAE in freebsd, define it */
#ifndef ETH_P_PAE
#define ETH_P_PAE 0x888E

View file

@ -1,8 +1,8 @@
--- src/layer3.c.orig 2014-09-14 19:16:31 UTC
--- src/layer3.c.orig 2018-09-15 19:08:05 UTC
+++ src/layer3.c
@@ -10,6 +10,13 @@
#include <string.h>
#include <assert.h>
@@ -16,6 +16,13 @@
#include <sys/socket.h>
#endif
+#ifdef __FreeBSD__
+#include <sys/types.h>

View file

@ -1,13 +0,0 @@
--- src/pid.c.orig 2014-09-14 19:16:31 UTC
+++ src/pid.c
@@ -14,7 +14,9 @@
#include "compat.h"
-//#include <sys/stat.h>
+#ifdef __FreeBSD__
+#include <sys/stat.h>
+#endif
#include <fcntl.h>
#include <errno.h>
#include <stdio.h>