diff options
author | arved <arved@FreeBSD.org> | 2003-01-29 04:49:36 +0800 |
---|---|---|
committer | arved <arved@FreeBSD.org> | 2003-01-29 04:49:36 +0800 |
commit | 0d2a143efd3f2a620f443b2df26ae5d2cd1e9604 (patch) | |
tree | c0ca40ef960927527ab338a0d90825edb89b89ea /net | |
parent | 167534ea639c07a6d618cfe783243dc762a10175 (diff) | |
download | freebsd-ports-gnome-0d2a143efd3f2a620f443b2df26ae5d2cd1e9604.tar.gz freebsd-ports-gnome-0d2a143efd3f2a620f443b2df26ae5d2cd1e9604.tar.zst freebsd-ports-gnome-0d2a143efd3f2a620f443b2df26ae5d2cd1e9604.zip |
Fix traffic calculation [1]
Use qt3 instead of qt1
PR: 35667
Submitted by: Hendrik Scholz <hendrik@scholz.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/pppload/Makefile | 7 | ||||
-rw-r--r-- | net/pppload/files/patch-aa | 76 | ||||
-rw-r--r-- | net/pppload/files/patch-ad | 13 |
3 files changed, 47 insertions, 49 deletions
diff --git a/net/pppload/Makefile b/net/pppload/Makefile index 0fca107fb16e..cd233c9542a9 100644 --- a/net/pppload/Makefile +++ b/net/pppload/Makefile @@ -13,9 +13,14 @@ MASTER_SITE_SUBDIR= system/network/serial/ppp MAINTAINER= ports@FreeBSD.org -USE_QT_VER= 1 +USE_QT_VER= 3 USE_GMAKE= yes +MAKE_ENV= QTDIR=${X11BASE} PTHREAD_LIBS=${PTHREAD_LIBS} MAN1= pppload.1 +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/pppload ${PREFIX}/bin + ${INSTALL_MAN} ${WRKSRC}/pppload.1 ${MAN1PREFIX}/man/man1 + .include <bsd.port.mk> diff --git a/net/pppload/files/patch-aa b/net/pppload/files/patch-aa index 10bb41251c8e..8a1e24acf68a 100644 --- a/net/pppload/files/patch-aa +++ b/net/pppload/files/patch-aa @@ -1,59 +1,46 @@ ---- Makefile.orig Wed Sep 11 19:49:33 1996 -+++ Makefile Fri May 24 04:04:33 2002 -@@ -1,24 +1,23 @@ - ####### Installation - RM=rm -f - LN=ln -sf --INSTALL=install --PREFIX=/usr -+INSTALL=install -c - BINDIR=$(PREFIX)/bin - MANDIR=$(PREFIX)/man/man1 +--- Makefile.orig Fri Jan 24 17:14:15 2003 ++++ Makefile Fri Jan 24 17:28:19 2003 +@@ -8,17 +8,14 @@ ####### Directories -QTDIR = /usr/lib/qt --BASEDIR = $(QTDIR) --INCDIR = $(BASEDIR)/include --LIBDIR = $(BASEDIR)/lib -+INCDIR = $(X11BASE)/include/X11/qt1 -+LIBDIR = $(X11BASE)/lib ++QTDIR = ${X11BASE} + BASEDIR = $(QTDIR) + INCDIR = $(BASEDIR)/include + LIBDIR = $(BASEDIR)/lib ####### Compiler -CFLAGS = -pipe -O2 -m486 -Wall -LFLAGS = -L$(LIBDIR) -lqt -+CFLAGS += -Wall -+LFLAGS = -L$(LIBDIR) -lqt1 - LEXTRA = +-LEXTRA = -CC = g++ -+CXX ?= c++ -+CC = ${CXX} -+MOC = ${X11BASE}/bin/moc1 ++LFLAGS = -L$(LIBDIR) -lqt-mt ${PTHREAD_LIBS} ####### Files -@@ -75,7 +74,7 @@ +@@ -51,14 +48,14 @@ + .SUFFIXES: .C $(SUFFIXES) - doc: - ../h2html-1.0/h2html $(HEADERS) -- -+ - srctar: - make veryclean - make doc -@@ -100,77 +99,7 @@ - ####### Meta objects + .C.o: +- $(CC) -c $(CFLAGS) -I$(INCDIR) $< ++ $(CXX) -c $(CFLAGS) -I$(INCDIR) $< + + ####### Build rules + + all: $(TARGET) + + $(TARGET): $(OBJECTS) $(OBJMETA) +- $(CC) $(OBJECTS) $(OBJMETA) -o $(TARGET) $(LFLAGS) $(LEXTRA) ++ $(CXX) $(OBJECTS) $(OBJMETA) -o $(TARGET) $(LFLAGS) $(LEXTRA) + + depend: $(SRCMETA) + makedepend -I$(INCDIR) $(SOURCES) 2> /dev/null +@@ -107,70 +104,9 @@ + + # DO NOT DELETE THIS LINE -- make depend depends on it. - mPPPStats.C: PPPStats.H -- moc -o mPPPStats.C PPPStats.H -+ ${MOC} -o mPPPStats.C PPPStats.H - - mMainWindow.C: MainWindow.H -- moc -o mMainWindow.C MainWindow.H -- --# DO NOT DELETE THIS LINE -- make depend depends on it. -- -pppload.o: /usr/lib/qt/include/qapp.h /usr/lib/qt/include/qwidget.h -pppload.o: /usr/lib/qt/include/qwindefs.h /usr/lib/qt/include/qobjdefs.h -pppload.o: /usr/lib/qt/include/qglobal.h /usr/lib/qt/include/qobject.h @@ -121,4 +108,9 @@ -Options.o: /usr/include/string.h /usr/include/features.h -Options.o: /usr/include/sys/cdefs.h -Options.o: /usr/lib/gcc-lib/i486-linux/2.7.2/include/stddef.h -+ ${MOC} -o mMainWindow.C MainWindow.H ++pppload.o: PPPStats.H MainWindow.H ++pppload.o: Options.H ++PPPStats.o: Options.H ++MainWindow.o: MainWindow.H ++MainWindow.o: Options.H ++Options.o: Options.H diff --git a/net/pppload/files/patch-ad b/net/pppload/files/patch-ad index 7e819476e22a..a047c4fe397e 100644 --- a/net/pppload/files/patch-ad +++ b/net/pppload/files/patch-ad @@ -1,6 +1,5 @@ -diff -u --new-file pppload-1.0/PPPStats.C ./PPPStats.C ---- pppload-1.0/PPPStats.C Wed Sep 11 19:50:13 1996 -+++ ./PPPStats.C Fri Jan 30 20:16:04 1998 +--- PPPStats.C.orig Fri Jan 24 17:33:43 2003 ++++ PPPStats.C Fri Jan 24 17:33:27 2003 @@ -19,16 +19,22 @@ extern "C" { @@ -27,7 +26,7 @@ diff -u --new-file pppload-1.0/PPPStats.C ./PPPStats.C typedef struct { -@@ -53,38 +59,42 @@ +@@ -53,38 +59,44 @@ system( (const char*)options->cmd() ); } @@ -47,6 +46,8 @@ diff -u --new-file pppload-1.0/PPPStats.C ./PPPStats.C + sprintf (ifreq.ifr_name, "%s%d",(const char*)options->device(),options->link()); + PPPStat = & PPPInfo->stats; ++ PPPStat->p.ppp_ibytes = 0; ++ PPPStat->p.ppp_obytes = 0; memset (LastPPPStat, 0, sizeof (LastPPPStat)); - if ( (ioctl (_s, SIOCDEVPRIVATE, (caddr_t) & ifreq) < 0) || @@ -81,7 +82,7 @@ diff -u --new-file pppload-1.0/PPPStats.C ./PPPStats.C + } + } + PPPStat->p.ppp_ibytes = 0; -+ PPPStat->p.ppp_obytes = 0; ++ PPPStat->p.ppp_obytes = 0; } else if ( !_isUp ) { - _isUp = true; - killTimer( _retryId ); @@ -95,7 +96,7 @@ diff -u --new-file pppload-1.0/PPPStats.C ./PPPStats.C unsigned int rxDelta = PPPStat->p.ppp_ibytes - _rxTotal; unsigned int txDelta = PPPStat->p.ppp_obytes - _txTotal; _rxTotal = PPPStat->p.ppp_ibytes; -@@ -92,4 +102,17 @@ +@@ -92,4 +104,17 @@ if ( rxDelta == _rxTotal ) rxDelta = 0; if ( txDelta == _txTotal ) txDelta = 0; emit changeStats( rxDelta, txDelta, _rxTotal, _txTotal ); |