aboutsummaryrefslogtreecommitdiff
path: root/sysutils/pfstat
diff options
context:
space:
mode:
authorShaun Amott <shaun@FreeBSD.org>2006-07-24 14:51:48 +0000
committerShaun Amott <shaun@FreeBSD.org>2006-07-24 14:51:48 +0000
commit5584b29a087c1eccc4cb75c060a848f059a1fab7 (patch)
tree1fd4d1eb1055369ca114cbe03695b5f89a3e86c9 /sysutils/pfstat
parent79f0a00c426f33c19c628f35deb4dd9b65981916 (diff)
downloadports-5584b29a087c1eccc4cb75c060a848f059a1fab7.tar.gz
ports-5584b29a087c1eccc4cb75c060a848f059a1fab7.zip
Notes
Diffstat (limited to 'sysutils/pfstat')
-rw-r--r--sysutils/pfstat/Makefile21
-rw-r--r--sysutils/pfstat/distinfo6
-rw-r--r--sysutils/pfstat/files/patch-pf.c31
3 files changed, 45 insertions, 13 deletions
diff --git a/sysutils/pfstat/Makefile b/sysutils/pfstat/Makefile
index 897cb9d5ce4f..9c21b48b52cb 100644
--- a/sysutils/pfstat/Makefile
+++ b/sysutils/pfstat/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= pfstat
-PORTVERSION= 1.7
+PORTVERSION= 2.2
CATEGORIES= sysutils net
MASTER_SITES= http://www.benzedrine.cx/
DISTNAME= ${PORTNAME}-${PORTVERSION}
@@ -14,32 +14,33 @@ DISTNAME= ${PORTNAME}-${PORTVERSION}
MAINTAINER= mlaier@freebsd.org
COMMENT= Utility to render grafical statistics for pf
-.if defined(WITH_GD1)
-LIB_DEPENDS= gd1.2:${PORTSDIR}/graphics/gd1
-CFLAGS+= -I${LOCALBASE}/include/gd
-MAKE_ARGS= "LD_GD=gd1"
-.else
LIB_DEPENDS= gd.4:${PORTSDIR}/graphics/gd
+
MAKE_ARGS= "LD_GD=gd"
-.endif
-MAN8= pfstat.8
+MAN8= pfstat.8 \
+ pfstatd.8
MANCOMPRESSED= no
-PLIST_FILES= bin/pfstat
+PLIST_FILES= bin/pfstat \
+ bin/pfstatd
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 502106
-IGNORE= "Only for 5.3 and above"
+IGNORE= is only for 5.3 and above
.endif
post-patch:
@${REINPLACE_CMD} -e 's|-lgd|-l$${LD_GD}|; s| -lttf||' \
${WRKSRC}/Makefile
+ @${REINPLACE_CMD} -e "s|/etc/|${PREFIX}/etc/|" \
+ ${WRKSRC}/pfstat.[c8]
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/pfstat ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/pfstatd/pfstatd ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/pfstat.8 ${PREFIX}/man/man8
+ ${INSTALL_MAN} ${WRKSRC}/pfstatd/pfstatd.8 ${PREFIX}/man/man8
.include <bsd.port.post.mk>
diff --git a/sysutils/pfstat/distinfo b/sysutils/pfstat/distinfo
index 05044af20055..5db9b60a1f43 100644
--- a/sysutils/pfstat/distinfo
+++ b/sysutils/pfstat/distinfo
@@ -1,3 +1,3 @@
-MD5 (pfstat-1.7.tar.gz) = bd58864b56774aa10aa763258de8b625
-SHA256 (pfstat-1.7.tar.gz) = ac34445eda6d85558e92f5e80bad249cca0f0f9c5b52c488df648873ca33239e
-SIZE (pfstat-1.7.tar.gz) = 9610
+MD5 (pfstat-2.2.tar.gz) = c3e0c37ec9017c2544c102c5dba6d7aa
+SHA256 (pfstat-2.2.tar.gz) = 2215e1a09f97e6b001f89b9a543511aecfc0274cfb30fb9c53b5d58811334d57
+SIZE (pfstat-2.2.tar.gz) = 18784
diff --git a/sysutils/pfstat/files/patch-pf.c b/sysutils/pfstat/files/patch-pf.c
new file mode 100644
index 000000000000..71e897e8d49a
--- /dev/null
+++ b/sysutils/pfstat/files/patch-pf.c
@@ -0,0 +1,31 @@
+--- pf.c.orig Thu May 11 23:41:07 2006
++++ pf.c Fri Jul 7 21:49:20 2006
+@@ -144,23 +144,24 @@
+ query_ifaces(int fd, void (*cb)(int, const char *, int, double))
+ {
+ struct pfioc_iface io;
+- struct pfi_kif ifs[256];
++ struct pfi_if ifs[256];
+ int i, j;
+
+ memset(&io, 0, sizeof(io));
+ io.pfiio_buffer = ifs;
+ io.pfiio_esize = sizeof(ifs[0]);
+ io.pfiio_size = sizeof(ifs) / sizeof(ifs[0]);
++ io.pfiio_flags = PFI_FLAG_ALLMASK;
+ if (ioctl(fd, DIOCIGETIFACES, &io)) {
+ fprintf(stderr, "ioctl: DIOCIGETIFACES: %s\n", strerror(errno));
+ return (1);
+ }
+ for (i = 0; i < io.pfiio_size; ++i)
+ for (j = 0; j < 16; ++j)
+- (*cb)(COL_TYPE_IFACE, ifs[i].pfik_name,
++ (*cb)(COL_TYPE_IFACE, ifs[i].pfif_name,
+ j, j & 4 ?
+- ifs[i].pfik_packets[j&1?0:1][j&2?0:1][j&8?0:1] :
+- ifs[i].pfik_bytes[j&1?0:1][j&2?0:1][j&8?0:1]);
++ ifs[i].pfif_packets[j&1?0:1][j&2?0:1][j&8?0:1] :
++ ifs[i].pfif_bytes[j&1?0:1][j&2?0:1][j&8?0:1]);
+ /* bytes/packets[af][dir][op] */
+ return (0);
+ }