View | Details | Raw Unified | Return to bug 187320
Collapse All | Expand All

(-)./Makefile (-19 / +5 lines)
Lines 19-49 Link Here
19
CONFIGURE_ENV=	PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" PTHREAD_LIBS="${PTHREAD_LIBS}"
19
CONFIGURE_ENV=	PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" PTHREAD_LIBS="${PTHREAD_LIBS}"
20
ALL_TARGET=	trafshow
20
ALL_TARGET=	trafshow
21
21
22
MAN1=		trafshow.1
22
OPTIONS_DEFINE=	IPV6
23
23
IPV6_CFLAGS=	-DINET6
24
OPTIONS_DEFINE=		IPV6
25
26
NO_STAGE=	yes
27
.include <bsd.port.options.mk>
28
24
29
post-patch:
25
post-patch:
30
	@${REINPLACE_CMD} -e 's|-D_THREAD_SAFE||' ${WRKSRC}/configure
26
	@${REINPLACE_CMD} -e 's|-D_THREAD_SAFE||' ${WRKSRC}/configure
31
	@${REINPLACE_CMD} -e 's|/etc|${PREFIX}/etc|' \
27
	@${REINPLACE_CMD} -e 's|/etc|${PREFIX}/etc|' \
32
		${WRKSRC}/colormask.c ${WRKSRC}/trafshow.1 ${WRKSRC}/trafshow.c
28
		${WRKSRC}/colormask.c ${WRKSRC}/trafshow.1 ${WRKSRC}/trafshow.c
33
.if ${OSVERSION} >= 800074
34
	@${PATCH} -d ${WRKSRC} < ${FILESDIR}/extra-patch-800074+
35
.endif
36
37
.if ${PORT_OPTIONS:MIPV6}
38
CFLAGS+=	-DINET6
39
.endif
40
29
41
do-install:
30
do-install:
42
	${INSTALL_PROGRAM} ${WRKSRC}/trafshow ${PREFIX}/bin
31
	${INSTALL_PROGRAM} ${WRKSRC}/trafshow ${STAGEDIR}${PREFIX}/bin
43
	${INSTALL_MAN} ${WRKSRC}/trafshow.1 ${PREFIX}/man/man1
32
	${INSTALL_MAN} ${WRKSRC}/trafshow.1 ${STAGEDIR}${PREFIX}/man/man1
44
	${INSTALL_DATA} ${WRKSRC}/.trafshow ${PREFIX}/etc/trafshow.dist
33
	${INSTALL_DATA} ${WRKSRC}/.trafshow ${STAGEDIR}${PREFIX}/etc/trafshow.dist
45
	if [ ! -e ${PREFIX}/etc/trafshow ]; then \
46
		${CP} -p ${PREFIX}/etc/trafshow.dist ${PREFIX}/etc/trafshow; \
47
	fi
48
34
49
.include <bsd.port.mk>
35
.include <bsd.port.mk>
(-)./files/extra-patch-800074+ (-23 lines)
Lines 1-23 Link Here
1
#
2
# http://lists.freebsd.org/pipermail/freebsd-ports/2009-March/053823.html
3
#
4
--- show_dump.c.orig	2009-03-29 23:18:16.000000000 +0400
5
+++ show_dump.c	2009-03-29 23:18:24.000000000 +0400
6
@@ -30,6 +30,7 @@
7
 #include <string.h>
8
 #include <unistd.h>
9
 #include <errno.h>
10
+#include <net/bpf.h>
11
 #include <pcap.h>
12
 #include <pthread.h>
13
 #include <time.h>
14
--- trafshow.c.orig	2009-03-29 23:18:49.000000000 +0400
15
+++ trafshow.c	2009-03-29 23:18:58.000000000 +0400
16
@@ -30,6 +30,7 @@
17
 #include <string.h>
18
 #include <unistd.h>
19
 #include <time.h>
20
+#include <net/bpf.h>
21
 #include <pcap.h>
22
 #include <pthread.h>
23
 #include <errno.h>
(-)./files/patch-800074+ (+23 lines)
Line 0 Link Here
1
#
2
# http://lists.freebsd.org/pipermail/freebsd-ports/2009-March/053823.html
3
#
4
--- show_dump.c.orig	2009-03-29 23:18:16.000000000 +0400
5
+++ show_dump.c	2009-03-29 23:18:24.000000000 +0400
6
@@ -30,6 +30,7 @@
7
 #include <string.h>
8
 #include <unistd.h>
9
 #include <errno.h>
10
+#include <net/bpf.h>
11
 #include <pcap.h>
12
 #include <pthread.h>
13
 #include <time.h>
14
--- trafshow.c.orig	2009-03-29 23:18:49.000000000 +0400
15
+++ trafshow.c	2009-03-29 23:18:58.000000000 +0400
16
@@ -30,6 +30,7 @@
17
 #include <string.h>
18
 #include <unistd.h>
19
 #include <time.h>
20
+#include <net/bpf.h>
21
 #include <pcap.h>
22
 #include <pthread.h>
23
 #include <errno.h>
(-)./pkg-plist (+1 lines)
Lines 2-4 Link Here
2
@unexec if cmp -s %D/etc/trafshow %D/etc/trafshow.dist; then rm -f %D/etc/trafshow; fi
2
@unexec if cmp -s %D/etc/trafshow %D/etc/trafshow.dist; then rm -f %D/etc/trafshow; fi
3
etc/trafshow.dist
3
etc/trafshow.dist
4
@exec if [ ! -e %D/etc/trafshow ]; then cp -p %D/%F %B/trafshow; fi
4
@exec if [ ! -e %D/etc/trafshow ]; then cp -p %D/%F %B/trafshow; fi
5
man/man1/trafshow.1.gz

Return to bug 187320