diff options
author | Tilman Keskinoz <arved@FreeBSD.org> | 2003-01-28 20:49:36 +0000 |
---|---|---|
committer | Tilman Keskinoz <arved@FreeBSD.org> | 2003-01-28 20:49:36 +0000 |
commit | 1709e30d1f3b92fa95fbc3026102fff47385d847 (patch) | |
tree | 5b56a436ba99711dfcb02f3638c3e2a9cd2f6e9d /net/pppload | |
parent | Aaaaarrgggg, I have destroyed the Makefile just between testing and the commit. (diff) |
Fix traffic calculation [1]
Use qt3 instead of qt1
PR: 35667
Submitted by: Hendrik Scholz <hendrik@scholz.net>
Notes
Notes:
svn path=/head/; revision=74166
Diffstat (limited to 'net/pppload')
-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 ); |