pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/xosview - Make myself the MAINTAINER
details: https://anonhg.NetBSD.org/pkgsrc/rev/1354d7d9c502
branches: trunk
changeset: 527514:1354d7d9c502
user: veego <veego%pkgsrc.org@localhost>
date: Mon Apr 09 21:22:11 2007 +0000
description:
- Make myself the MAINTAINER
- Fix the manpage path in the Makefile
- Adapt the memmeter.cc changes to pagemeter so it doesn't use kmem
to get uvmexp.
- struct schedstate_percpu is no longer a public interface outside
the kernel
- Add netIface support for NetBSD. Now you can monitor only one network
interface. See the manpage for more details. This change is allready
present in the sourceforge tree.
- PKGREVISION++
diffstat:
sysutils/xosview/Makefile | 11 ++++-
sysutils/xosview/distinfo | 8 ++-
sysutils/xosview/patches/patch-aa | 87 ++++++++++++++++++++++++++++++++++++--
sysutils/xosview/patches/patch-ac | 16 +++++++
sysutils/xosview/patches/patch-ad | 20 ++++++++
sysutils/xosview/patches/patch-ae | 16 +++++++
sysutils/xosview/patches/patch-af | 45 ++++++++++++++++++++
7 files changed, 193 insertions(+), 10 deletions(-)
diffs (268 lines):
diff -r f323b64e464e -r 1354d7d9c502 sysutils/xosview/Makefile
--- a/sysutils/xosview/Makefile Mon Apr 09 19:33:53 2007 +0000
+++ b/sysutils/xosview/Makefile Mon Apr 09 21:22:11 2007 +0000
@@ -1,10 +1,11 @@
-# $NetBSD: Makefile,v 1.62 2007/01/07 09:14:13 rillig Exp $
+# $NetBSD: Makefile,v 1.63 2007/04/09 21:22:11 veego Exp $
DISTNAME= xosview-1.8.3
+PKGREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=xosview/}
-MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+MAINTAINER= veego%NetBSD.org@localhost
HOMEPAGE= http://xosview.sourceforge.net/
COMMENT= X11 graphical display of OS statistics
@@ -35,5 +36,11 @@
LIBS+= -lsocket -lnsl
.endif
+SUBST_CLASSES+= paths
+SUBST_STAGE.paths= post-configure
+SUBST_MESSAGE.paths= Fixing manpage path.
+SUBST_FILES.paths= Makefile
+SUBST_SED.paths= -e s,share/man/man1,${PKGMANDIR}/man1,
+
.include "../../x11/libXpm/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff -r f323b64e464e -r 1354d7d9c502 sysutils/xosview/distinfo
--- a/sysutils/xosview/distinfo Mon Apr 09 19:33:53 2007 +0000
+++ b/sysutils/xosview/distinfo Mon Apr 09 21:22:11 2007 +0000
@@ -1,7 +1,11 @@
-$NetBSD: distinfo,v 1.19 2006/10/28 02:15:12 christos Exp $
+$NetBSD: distinfo,v 1.20 2007/04/09 21:22:11 veego Exp $
SHA1 (xosview-1.8.3.tar.gz) = 420fd0620ff9fb9ba83fc833eeb8b872414e377e
RMD160 (xosview-1.8.3.tar.gz) = 595e812dee686ccaa5d95eb537782679d752271b
Size (xosview-1.8.3.tar.gz) = 259793 bytes
-SHA1 (patch-aa) = c51d8b0b033943911869aa2d262804eeeec9c109
+SHA1 (patch-aa) = 82749a793e2a57a04dec4917bce3d3d3c9f8a25d
SHA1 (patch-ab) = 274b83fd3488af8e0c4ce0184b8c78f4f6ef87df
+SHA1 (patch-ac) = 3e9073c4ccd7e08d29a76b08f2ed0c7f9f9d9ede
+SHA1 (patch-ad) = 02ae8395e200e5cbf8d6339eced33fe5aa421d38
+SHA1 (patch-ae) = c007cdf2910fbcd8cbf232f1fa3ad31ffec88612
+SHA1 (patch-af) = 97078fbe39fcded6ab50b276f6cedb9b33a62e4b
diff -r f323b64e464e -r 1354d7d9c502 sysutils/xosview/patches/patch-aa
--- a/sysutils/xosview/patches/patch-aa Mon Apr 09 19:33:53 2007 +0000
+++ b/sysutils/xosview/patches/patch-aa Mon Apr 09 21:22:11 2007 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-aa,v 1.15 2006/10/28 02:15:12 christos Exp $
+$NetBSD: patch-aa,v 1.16 2007/04/09 21:22:11 veego Exp $
---- bsd/kernel.cc.orig 2006-02-18 02:36:06.000000000 -0500
-+++ bsd/kernel.cc 2006-10-27 22:12:37.000000000 -0400
-@@ -115,6 +115,13 @@
+--- bsd/kernel.cc.orig 2006-02-18 08:36:06.000000000 +0100
++++ bsd/kernel.cc 2007-04-09 15:27:42.000000000 +0200
+@@ -115,10 +115,18 @@
// in __NetBSD_Version__ for us if needed.
#if defined(XOSVIEW_NETBSD) && defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 106010000)
#define NETBSD_1_6A
@@ -16,7 +16,82 @@
#endif
#include "general.h"
-@@ -773,13 +780,12 @@
+ #include "kernel.h" /* To grab CVSID stuff. */
++#include "netmeter.h" /* For netIface_ */
+
+ CVSID("$Id: patch-aa,v 1.16 2007/04/09 21:22:11 veego Exp $");
+ CVSID_DOT_H(KERNEL_H_CVSID);
+@@ -400,6 +408,8 @@
+ static int mib[] = { CTL_KERN, KERN_CPUSTATS };
+ #endif
+ #if defined(XOSVIEW_NETBSD) && (__NetBSD_Version__ >= 104260000)
++ uint64_t cp_time[CPUSTATES];
++ size_t size = sizeof(cp_time[0]) * CPUSTATES;
+ static int mib[] = { CTL_KERN, KERN_CP_TIME };
+ #endif
+
+@@ -407,14 +417,11 @@
+ if (CPUSTATES != 5)
+ errx (-1, "Error: xosview for *BSD expects 5 cpu states!\n");
+ #if defined(__NetBSD_Version__) && __NetBSD_Version__ > 104260000 /* > 1.4Z */
+- struct schedstate_percpu ssp;
+- size_t size = sizeof(ssp.spc_cp_time);
+- if (sysctl(mib, 2, ssp.spc_cp_time, &size, NULL, 0) < 0) {
+- fprintf(stderr, "can't get schedstate_percpu: %s\n", strerror(errno));
+- memset(&ssp, 0, sizeof(ssp));
++ if (sysctl(mib, 2, cp_time, &size, NULL, 0) < 0) {
++ fprintf(stderr, "xosview: sysctl kern.cp_time failed: %s\n", strerror(errno));
++ bzero(&cp_time, size);
+ }
+- for (size = 0; size < CPUSTATES; size++)
+- timeArray[size] = (long) ssp.spc_cp_time[size];
++ bcopy (cp_time, timeArray, size);
+ #else
+ #ifdef XOSVIEW_BSDI
+ if (sysctl(mib, 2, &cpu, &size, NULL, 0) < 0) {
+@@ -441,7 +448,7 @@
+ }
+
+ void
+-BSDGetNetInOut (long long * inbytes, long long * outbytes) {
++NetMeter::BSDGetNetInOut (long long * inbytes, long long * outbytes) {
+
+
+ struct ifnet * ifnetp;
+@@ -466,7 +473,8 @@
+ while (ifnetp) {
+ // Now, dereference the pointer to get the ifnet struct.
+ safe_kvm_read ((u_long) ifnetp, &ifnet, sizeof(ifnet));
+-#ifdef NET_DEBUG
++#ifdef XOSVIEW_NETBSD
++ if (netIface_ != "False" ) {
+ char ifname[256];
+ #ifdef NETBSD_OLD_IFACE
+ // In pre-1.2A, getting the interface name was more complicated.
+@@ -476,15 +484,21 @@
+ safe_kvm_read ((u_long) (((char*)ifnetp) + (&ifnet.if_xname[0] - (char*)&ifnet)), ifname, 256);
+ snprintf (ifname, 256, "%s", ifname);
+ #endif
++#ifdef NET_DEBUG
+ printf ("Interface name is %s\n", ifname);
+ printf ("Ibytes: %8llu Obytes %8llu\n",
+ (unsigned long long) ifnet.if_ibytes,
+ (unsigned long long) ifnet.if_obytes);
+ printf ("Ipackets: %8llu\n", (unsigned long long) ifnet.if_ipackets);
+-#endif
++#endif /* NET_DEBUG */
++ if (ifname != netIface_)
++ goto skipif;
++ }
++#endif /* XOSVIEW_NETBSD */
+ *inbytes += ifnet.if_ibytes;
+ *outbytes += ifnet.if_obytes;
+
++ skipif:
+ // Linked-list step taken from if.c in netstat source, line 120.
+ #ifdef XOSVIEW_FREEBSD
+ #if (__FreeBSD_version >= 300000)
+@@ -773,13 +787,12 @@
#ifdef NETBSD_1_6A
// Do a sysctl with a NULL data pointer to get the size that would
// have been returned, and use that to figure out # drives.
@@ -32,7 +107,7 @@
return 1;
#endif
return ValidSymbol(DISKLIST_SYM_INDEX);
-@@ -816,19 +822,29 @@
+@@ -816,19 +829,29 @@
#else
#if defined(NETBSD_1_6A)
// Use the new sysctl to do this for us.
diff -r f323b64e464e -r 1354d7d9c502 sysutils/xosview/patches/patch-ac
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xosview/patches/patch-ac Mon Apr 09 21:22:11 2007 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-ac,v 1.8 2007/04/09 21:22:11 veego Exp $
+
+--- bsd/netmeter.h.orig 2003-10-09 06:23:10.000000000 +0200
++++ bsd/netmeter.h
+@@ -33,8 +33,11 @@ public:
+ void checkevent( void );
+
+ void checkResources( void );
++
++ void BSDGetNetInOut (long long * inbytes, long long * outbytes);
+ protected:
+ float netBandwidth_;
++ std::string netIface_;
+
+ private:
+ // NetBSD: Use long long, so we won't run into problems after 4 GB
diff -r f323b64e464e -r 1354d7d9c502 sysutils/xosview/patches/patch-ad
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xosview/patches/patch-ad Mon Apr 09 21:22:11 2007 +0000
@@ -0,0 +1,20 @@
+$NetBSD: patch-ad,v 1.8 2007/04/09 21:22:11 veego Exp $
+
+--- bsd/netmeter.cc.orig 2003-10-10 06:55:37.000000000 +0200
++++ bsd/netmeter.cc
+@@ -38,6 +38,7 @@ NetMeter::NetMeter( XOSView *parent, flo
+ netBandwidth_ = max;
+ total_ = netBandwidth_;
+ _lastBytesIn = _lastBytesOut = 0;
++ netIface_ = "False";
+ BSDGetNetInOut (&_lastBytesIn, &_lastBytesOut);
+ }
+ }
+@@ -56,6 +57,7 @@ void NetMeter::checkResources( void ){
+ dodecay_ = parent_->isResourceTrue("netDecay");
+ useGraph_ = parent_->isResourceTrue("netGraph");
+ SetUsedFormat (parent_->getResource("netUsedFormat"));
++ netIface_ = parent_->getResource( "netIface" );
+ }
+ }
+
diff -r f323b64e464e -r 1354d7d9c502 sysutils/xosview/patches/patch-ae
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xosview/patches/patch-ae Mon Apr 09 21:22:11 2007 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-ae,v 1.11 2007/04/09 21:22:11 veego Exp $
+
+--- bsd/pagemeter.h.orig 2003-10-09 06:22:32.000000000 +0200
++++ bsd/pagemeter.h 2007-04-09 16:26:34.000000000 +0200
+@@ -48,7 +48,11 @@
+ void getpageinfo( void );
+ private:
+ #if defined(UVM)
++# ifdef VM_UVMEXP2
++ struct uvmexp_sysctl prev_;
++# else
+ struct uvmexp prev_;
++# endif
+ #else
+ struct vmmeter prev_;
+ #endif
diff -r f323b64e464e -r 1354d7d9c502 sysutils/xosview/patches/patch-af
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xosview/patches/patch-af Mon Apr 09 21:22:11 2007 +0000
@@ -0,0 +1,45 @@
+$NetBSD: patch-af,v 1.3 2007/04/09 21:22:11 veego Exp $
+
+--- bsd/pagemeter.cc.orig 2002-03-22 04:23:41.000000000 +0100
++++ bsd/pagemeter.cc 2007-04-09 16:30:04.000000000 +0200
+@@ -20,6 +20,10 @@
+ #include "pagemeter.h"
+ #include "kernel.h" // For NetBSD Page functions.
+
++#if defined(UVM) && defined (VM_UVMEXP2)
++#include <sys/sysctl.h> /* Needed for uvmexp_sysctl. */
++#endif
++
+ CVSID("$Id: patch-af,v 1.3 2007/04/09 21:22:11 veego Exp $");
+ CVSID_DOT_H(PAGEMETER_H_CVSID);
+
+@@ -28,7 +32,13 @@
+ total_ = total;
+ BSDPageInit();
+ #ifdef UVM
++# ifdef VM_UVMEXP2
++ int params[] = {CTL_VM, VM_UVMEXP2};
++ size_t prev_size = sizeof (prev_);
++ sysctl (params, 2, &prev_, &prev_size, NULL, 0);
++# else
+ BSDGetUVMPageStats(&prev_);
++# endif
+ #else
+ BSDGetPageStats(&prev_);
+ #endif
+@@ -57,8 +67,15 @@
+ void PageMeter::getpageinfo (void) {
+ // Begin NetBSD-specific code...
+ #if defined(UVM)
++# ifdef VM_UVMEXP2
++ int params[] = {CTL_VM, VM_UVMEXP2};
++ struct uvmexp_sysctl uvm;
++ size_t uvm_size = sizeof (uvm);
++ sysctl (params, 2, &uvm, &uvm_size, NULL, 0);
++# else
+ struct uvmexp uvm;
+ BSDGetUVMPageStats(&uvm);
++# endif
+ #else
+ struct vmmeter vm;
+ BSDGetPageStats(&vm);
Home |
Main Index |
Thread Index |
Old Index