ports/59967: [maintainer update] net/bandwidthd: update to 1.1.7
Clement Laforet
sheepkiller at cultdeadsheep.org
Fri Dec 5 02:50:17 UTC 2003
>Number: 59967
>Category: ports
>Synopsis: [maintainer update] net/bandwidthd: update to 1.1.7
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Thu Dec 04 18:50:13 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Clement Laforet
>Release: FreeBSD 5.2-BETA i386
>Organization:
cotds.org
>Environment:
System: FreeBSD lucifer.cultdeadsheep.org 5.2-BETA FreeBSD 5.2-BETA #0: Fri Nov 28 21:23:08 CET 2003 clement at lucifer.cultdeadsheep.org:/usr/obj/usr/src/sys/LUCIFER i386
>Description:
update bandwidthd to 1.1.7
Changelog:
"This version now compiles and works under BSD without problems."
My patches have been merged into official distribution.
Removed files:
files/patch-bandwidthd.c
files/patch-conf.tab.c
files/patch-conf.y
files/patch-graph.c
>How-To-Repeat:
N/A.
>Fix:
--- bandwidthd.diff begins here ---
Index: bandwidthd/Makefile
===================================================================
RCS file: /SERVICES/cvs/FreeBSD/ports/net/bandwidthd/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- bandwidthd/Makefile 11 Nov 2003 20:59:54 -0000 1.2
+++ bandwidthd/Makefile 5 Dec 2003 02:35:37 -0000
@@ -6,25 +6,23 @@
#
PORTNAME= bandwidthd
-PORTVERSION= 1.1.6
+PORTVERSION= 1.1.7
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
+DISTNAME= ${PORTNAME}-1.1.7b
EXTRACT_SUFX= .tgz
MAINTAINER= sheepkiller at cultdeadsheep.org
COMMENT= Tracks bandwidth usage by IP address
-LIB_DEPENDS+= gd.4:${PORTSDIR}/graphics/gd
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+
+LIB_DEPENDS+= gd.4:${PORTSDIR}/graphics/gd\
+ iconv.3:${PORTSDIR}/converters/libiconv
USE_GMAKE= YES
USE_REINPLACE= YES
-CFLAGS+= -DFREEBSD -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib
-MAKE_ENV+= LDFLAGS="${LDFLAGS}"
-
-post-patch:
- @${REINPLACE_CMD} -e 's!localtime(!localtime((time_t *)!' ${WRKSRC}/graph.c
post-install:
@${INSTALL_SCRIPT} ${FILESDIR}/bandwidthd.sh \
Index: bandwidthd/distinfo
===================================================================
RCS file: /SERVICES/cvs/FreeBSD/ports/net/bandwidthd/distinfo,v
retrieving revision 1.2
diff -u -r1.2 distinfo
--- bandwidthd/distinfo 11 Nov 2003 20:59:54 -0000 1.2
+++ bandwidthd/distinfo 5 Dec 2003 02:35:37 -0000
@@ -1 +1 @@
-MD5 (bandwidthd-1.1.6.tgz) = 0255e5c61cacf0e283da620c2e8ec712
+MD5 (bandwidthd-1.1.7b.tgz) = c58100aefc62e0d2b20024838ba527bf
Index: bandwidthd/files/patch-Makefile
===================================================================
RCS file: /SERVICES/cvs/FreeBSD/ports/net/bandwidthd/files/patch-Makefile,v
retrieving revision 1.1
diff -u -r1.1 patch-Makefile
--- bandwidthd/files/patch-Makefile 6 Nov 2003 09:15:28 -0000 1.1
+++ bandwidthd/files/patch-Makefile 5 Dec 2003 02:35:37 -0000
@@ -1,40 +1,35 @@
---- Makefile.orig Mon Sep 22 20:48:07 2003
-+++ Makefile Sun Nov 2 12:28:29 2003
-@@ -1,7 +1,7 @@
+--- Makefile.orig Tue Dec 2 21:39:05 2003
++++ Makefile Fri Dec 5 02:30:31 2003
+@@ -1,8 +1,8 @@
#Possible optimizations -fomit-frame-pointer -ffast-math
OBS= bandwidthd.o graph.o conf.tab.o conf.l.o
--LIBS= -lgd -lpng -lpcap
--CFLAGS= -O3 -Wall
-+LIBS+= -lgd -lpng -lpcap ${LDFLAGS}
-+CFLAGS+=
- NONWALLCFLAGS= -O3 #-g -DDEBUG
+-LIBS= -L/usr/local/lib -lgd -lpng -lpcap
+-CFLAGS= -I/usr/local/include -O3 -Wall
+-NONWALLCFLAGS= -O3 #-g -DDEBUG
++LIBS= -L${LOCALBASE}/lib -lgd -lpng -lpcap
++CFLAGS+= -I${LOCALBASE}/include
++#NONWALLCFLAGS= -O3 #-g -DDEBUG
# Debugging stuff
-@@ -20,7 +20,7 @@
- $(CC) $(CFLAGS) $(OBS) -o bandwidthd $(LIBS)
-
- conf.tab.c: conf.y
-- bison -d conf.y
-+ yacc -d conf.y
-
- conf.l.c: conf.l
- lex -s -i -t -I conf.l > conf.l.c
-@@ -34,12 +34,12 @@
+ #CFLAGS= -O3 -Wall -pg -DPROFILE
+@@ -44,13 +44,13 @@
rm -f *.o bandwidthd *~ conf.tab.c conf.tab.h conf.l.c DEADJOE
install: all
-- mkdir -p /usr/local/bandwidthd/etc
-- mkdir -p /usr/local/bandwidthd/htdocs
-- cp bandwidthd /usr/local/bandwidthd
-- cp etc/bandwidthd.conf /usr/local/bandwidthd/etc/
-- cp htdocs/legend.gif /usr/local/bandwidthd/htdocs/
-- cp htdocs/logo.gif /usr/local/bandwidthd/htdocs/
-+ mkdir -p ${PREFIX}/bandwidthd/etc
-+ mkdir -p ${PREFIX}/bandwidthd/htdocs
-+ cp bandwidthd ${PREFIX}/bandwidthd
-+ cp etc/bandwidthd.conf ${PREFIX}/bandwidthd/etc/bandwidthd.conf-dist
-+ cp htdocs/legend.gif ${PREFIX}/bandwidthd/htdocs/
-+ cp htdocs/logo.gif ${PREFIX}/bandwidthd/htdocs/
+- mkdir -p $(DESTDIR)/usr/local/bandwidthd/etc
+- mkdir -p $(DESTDIR)/usr/local/bandwidthd/htdocs
+- cp bandwidthd $(DESTDIR)/usr/local/bandwidthd
+- cp etc/bandwidthd.conf $(DESTDIR)/usr/local/bandwidthd/etc/
+- cp htdocs/legend.gif $(DESTDIR)/usr/local/bandwidthd/htdocs/
+- cp htdocs/logo.gif $(DESTDIR)/usr/local/bandwidthd/htdocs/
++ mkdir -p $(DESTDIR)${PREFIX}/bandwidthd/etc
++ mkdir -p $(DESTDIR)${PREFIX}/bandwidthd/htdocs
++ ${BSD_INSTALL_PROGRAM} bandwidthd $(DESTDIR)${PREFIX}/bandwidthd
++ ${BSD_INSTALL_DATA} etc/bandwidthd.conf $(DESTDIR)${PREFIX}/bandwidthd/etc/bandwidthd.conf-dist
++ ${BSD_INSTALL_DATA} htdocs/legend.gif $(DESTDIR)${PREFIX}/bandwidthd/htdocs/
++ ${BSD_INSTALL_DATA} htdocs/logo.gif $(DESTDIR)${PREFIX}/bandwidthd/htdocs/
#**** Stuff where -WALL is turned off to reduce the noise in a compile so I can see my own errors *******************
conf.l.o: conf.l.c
+- $(CC) $(NONWALLCFLAGS) -c -o conf.l.o conf.l.c
++ $(CC) -c -o conf.l.o conf.l.c
Index: bandwidthd/files/patch-bandwidthd.c
===================================================================
RCS file: bandwidthd/files/patch-bandwidthd.c
diff -N bandwidthd/files/patch-bandwidthd.c
--- bandwidthd/files/patch-bandwidthd.c 11 Nov 2003 20:59:54 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
---- bandwidthd.c.orig Mon Nov 10 17:16:04 2003
-+++ bandwidthd.c Tue Nov 11 13:52:27 2003
-@@ -129,7 +129,11 @@
- }
- else
- {
-+#ifndef FREEBSD
- printf("My shared memory segment %d is already in use (%ld locks), perhaps bandwidthd is already running in this directory?\n", shmid, shmstatus.shm_nattch);
-+#else
-+ printf("My shared memory segment %d is already in use (%hd locks), perhaps bandwidthd is already running in this directory?\n", shmid, shmstatus.shm_nattch);
-+#endif
- exit(1);
- }
- }
-@@ -264,7 +268,7 @@
- tcp = (struct tcphdr *)(ip+1);
- tcp = (struct tcphdr *) ( ((char *)tcp) + ((ip->ip_hl-5)*4) ); // Compensate for IP Options
- Stats->tcp += size;
--#if defined(SOLARIS)
-+#if defined(SOLARIS) || defined (FREEBSD)
- sport = ntohs(tcp->th_sport);
- dport = ntohs(tcp->th_dport);
- #else
Index: bandwidthd/files/patch-conf.tab.c
===================================================================
RCS file: bandwidthd/files/patch-conf.tab.c
diff -N bandwidthd/files/patch-conf.tab.c
--- bandwidthd/files/patch-conf.tab.c 6 Nov 2003 09:15:28 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,19 +0,0 @@
---- conf.tab.c.orig Sun Sep 14 10:34:01 2003
-+++ conf.tab.c Sun Nov 2 12:21:17 2003
-@@ -23,11 +23,15 @@
- #include <stdio.h>
- #include <string.h>
- #include <unistd.h>
-+#ifdef FREEBSD
-+#include <stdlib.h>
-+#else
- #include <malloc.h>
-+#endif
- #include <unistd.h>
- #include <sys/types.h>
- #include <signal.h>
--#include <wait.h>
-+#include <sys/wait.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <arpa/inet.h>
Index: bandwidthd/files/patch-conf.y
===================================================================
RCS file: bandwidthd/files/patch-conf.y
diff -N bandwidthd/files/patch-conf.y
--- bandwidthd/files/patch-conf.y 6 Nov 2003 09:15:28 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
---- conf.y.orig Sun Sep 14 10:33:53 2003
-+++ conf.y Sun Nov 2 12:21:18 2003
-@@ -2,7 +2,11 @@
- #include <stdio.h>
- #include <string.h>
- #include <unistd.h>
-+#ifdef FREEBSD
-+#include <stdlib.h>
-+#else
- #include <malloc.h>
-+#endif
- #include <unistd.h>
- #include <sys/types.h>
- #include <signal.h>
Index: bandwidthd/files/patch-graph.c
===================================================================
RCS file: bandwidthd/files/patch-graph.c
diff -N bandwidthd/files/patch-graph.c
--- bandwidthd/files/patch-graph.c 6 Nov 2003 09:15:28 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,50 +0,0 @@
---- graph.c.orig Fri Oct 10 21:01:31 2003
-+++ graph.c Sun Nov 2 12:21:18 2003
-@@ -3,6 +3,11 @@
- #include <signal.h>
- #include <string.h>
- #include <netdb.h>
-+#ifdef FREEBSD
-+#include <netinet/in.h>
-+#include <arpa/nameser.h>
-+#include <sys/types.h>
-+#endif
- #include <sys/socket.h>
- #include <resolv.h>
- #include <time.h>
-@@ -753,7 +758,7 @@
- // **** Write the red day seperator bars
- // ********************************************************************
-
-- timestruct = localtime(&sample_begin);
-+ timestruct = localtime((time_t *)(time_t *)&sample_begin);
- timestruct->tm_sec = 0;
- timestruct->tm_min = 0;
- timestruct->tm_hour = 0;
-@@ -772,7 +777,7 @@
- gdImageLine(im, x, 0, x, YHEIGHT-YOFFSET, red);
- gdImageLine(im, x+1, 0, x+1, YHEIGHT-YOFFSET, red);
-
-- timestruct = localtime(&MarkTime);
-+ timestruct = localtime((time_t *)(time_t *)&MarkTime);
- strftime(buffer, 100, "%a, %b %d", timestruct);
- gdImageString(im, gdFontSmall, x-30, YHEIGHT-YOFFSET+10, buffer, black);
-
-@@ -786,7 +791,7 @@
- // **** Write the tic marks
- // ********************************************************************
-
-- timestruct = localtime(&sample_begin);
-+ timestruct = localtime((time_t *)(time_t *)&sample_begin);
- timestruct->tm_sec = 0;
- timestruct->tm_min = 0;
- timestruct->tm_hour = 0;
-@@ -803,7 +808,7 @@
- x = (MarkTime-sample_begin)*((XWIDTH-XOFFSET)/RANGE1) + XOFFSET;
- }
-
-- timestruct = localtime(&sample_begin);
-+ timestruct = localtime((time_t *)(time_t *)&sample_begin);
- timestruct->tm_sec = 0;
- timestruct->tm_min = 0;
- timestruct->tm_hour = 0;
--- bandwidthd.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list