diff options
author | Cheng-Lung Sung <clsung@FreeBSD.org> | 2005-07-13 03:48:32 +0000 |
---|---|---|
committer | Cheng-Lung Sung <clsung@FreeBSD.org> | 2005-07-13 03:48:32 +0000 |
commit | a8238d9d4d8618a2cbb712e22332f91d6deb06b4 (patch) | |
tree | fae5313eeedc50cc332422f61de06a7349273d8d /sysutils/xosview | |
parent | 34586a076e0e9fa102b29ac6042dd7d01041bea1 (diff) | |
download | ports-a8238d9d4d8618a2cbb712e22332f91d6deb06b4.tar.gz ports-a8238d9d4d8618a2cbb712e22332f91d6deb06b4.zip |
Notes
Diffstat (limited to 'sysutils/xosview')
-rw-r--r-- | sysutils/xosview/Makefile | 8 | ||||
-rw-r--r-- | sysutils/xosview/distinfo | 4 | ||||
-rw-r--r-- | sysutils/xosview/files/patch-Host.h | 10 | ||||
-rw-r--r-- | sysutils/xosview/files/patch-Xrm.h | 11 | ||||
-rw-r--r-- | sysutils/xosview/files/patch-bsd::cpumeter.cc | 21 | ||||
-rw-r--r-- | sysutils/xosview/files/patch-configure | 6 | ||||
-rw-r--r-- | sysutils/xosview/files/patch-general.h | 29 | ||||
-rw-r--r-- | sysutils/xosview/files/patch-kernel.cc | 123 | ||||
-rw-r--r-- | sysutils/xosview/files/patch-kernel.h | 9 | ||||
-rw-r--r-- | sysutils/xosview/files/patch-swapinternal.cc | 2 | ||||
-rw-r--r-- | sysutils/xosview/files/patch-swapinternal.h | 1 | ||||
-rw-r--r-- | sysutils/xosview/files/patch-swapmeter.cc | 2 | ||||
-rw-r--r-- | sysutils/xosview/files/patch-xwin.h | 10 |
13 files changed, 98 insertions, 138 deletions
diff --git a/sysutils/xosview/Makefile b/sysutils/xosview/Makefile index 1c7f327e1da7..6240e6feb879 100644 --- a/sysutils/xosview/Makefile +++ b/sysutils/xosview/Makefile @@ -7,7 +7,7 @@ # PORTNAME= xosview -PORTVERSION= 1.8.0 +PORTVERSION= 1.8.2 CATEGORIES= sysutils MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} @@ -22,10 +22,6 @@ MAN1= xosview.1 .include <bsd.port.pre.mk> -.if ${OSVERSION} >= 600000 -BROKEN= "Configure fails on FreeBSD >= 6.x" -.endif - post-patch: @${REINPLACE_CMD} -e 's,iostream.h,iostream,' \ ${WRKSRC}/xwin.h \ @@ -46,7 +42,7 @@ post-patch: ${WRKSRC}/fieldmeter.cc \ ${WRKSRC}/fieldmeterdecay.cc \ ${WRKSRC}/fieldmetergraph.cc - @${REINPLACE_CMD} -e 's,-O4 -pipe,,' \ + @${REINPLACE_CMD} -e 's,-O4,,' \ ${WRKSRC}/configure .include <bsd.port.post.mk> diff --git a/sysutils/xosview/distinfo b/sysutils/xosview/distinfo index 8eb8839d033a..874b8fb6184c 100644 --- a/sysutils/xosview/distinfo +++ b/sysutils/xosview/distinfo @@ -1,2 +1,2 @@ -MD5 (xosview-1.8.0.tar.gz) = bcbc0f02ac8944222ec677d504024c40 -SIZE (xosview-1.8.0.tar.gz) = 170323 +MD5 (xosview-1.8.2.tar.gz) = cc8b261b1f8d82da29239f1cc2ee55e9 +SIZE (xosview-1.8.2.tar.gz) = 248859 diff --git a/sysutils/xosview/files/patch-Host.h b/sysutils/xosview/files/patch-Host.h deleted file mode 100644 index e7430d0e7229..000000000000 --- a/sysutils/xosview/files/patch-Host.h +++ /dev/null @@ -1,10 +0,0 @@ ---- Host.h.orig Sun Jan 24 06:20:39 1999 -+++ Host.h Mon Oct 27 21:31:31 2003 -@@ -19,6 +19,7 @@ - #include <arpa/inet.h> - #include <iostream.h> - #include "bool.h" -+using namespace std; - - class Host { - public: diff --git a/sysutils/xosview/files/patch-Xrm.h b/sysutils/xosview/files/patch-Xrm.h deleted file mode 100644 index 06f2f8178760..000000000000 --- a/sysutils/xosview/files/patch-Xrm.h +++ /dev/null @@ -1,11 +0,0 @@ ---- Xrm.h.orig Sun Jan 24 06:20:39 1999 -+++ Xrm.h Mon Oct 27 21:26:37 2003 -@@ -16,7 +16,7 @@ - #include <X11/Xlib.h> - #include <X11/Xresource.h> - --class ostream; -+using namespace std; - - class Xrm { - public: diff --git a/sysutils/xosview/files/patch-bsd::cpumeter.cc b/sysutils/xosview/files/patch-bsd::cpumeter.cc deleted file mode 100644 index f96f23314c7e..000000000000 --- a/sysutils/xosview/files/patch-bsd::cpumeter.cc +++ /dev/null @@ -1,21 +0,0 @@ ---- bsd/cpumeter.cc.orig Tue Oct 28 17:42:56 2003 -+++ bsd/cpumeter.cc Tue Oct 28 17:43:20 2003 -@@ -123,12 +123,12 @@ - static int firstTime = 1; - if (firstTime) { - fprintf(stderr, --" Warning: the CPU tick counters are not changing. This could --be due to running a kernel besides /netbsd (or the equivalent for FreeBSD). -- If this is the case, re-run xosview with the -N kernel-name option. -- If not, then this is a bug. Please send a message to --bgrayson@ece.utexas.edu, in addition to any send-pr bug reports --(or in lieu of -- it ought to get fixed faster if you contact me -+" Warning: the CPU tick counters are not changing. This could \ -+be due to running a kernel besides /netbsd (or the equivalent for FreeBSD). \ -+ If this is the case, re-run xosview with the -N kernel-name option. \ -+ If not, then this is a bug. Please send a message to \ -+bgrayson@ece.utexas.edu, in addition to any send-pr bug reports \ -+(or in lieu of -- it ought to get fixed faster if you contact me \ - directly). Thanks!\n"); - firstTime = 0; - } diff --git a/sysutils/xosview/files/patch-configure b/sysutils/xosview/files/patch-configure index 86de049d5beb..108dca0e1e55 100644 --- a/sysutils/xosview/files/patch-configure +++ b/sysutils/xosview/files/patch-configure @@ -1,11 +1,11 @@ --- configure.orig Sat Jun 1 23:56:10 2002 +++ configure Sat Jun 1 23:56:23 2002 -@@ -1851,7 +1851,7 @@ +@@ -4852,7 +4852,7 @@ host_dir=bsd host_os=freebsd ;; --freebsd[4]*) -+freebsd[45]*) +-freebsd[4]*) ++freebsd[456]*) EXTRALIBS="-lkvm $XPMLIB $DEVSTATLIB" INSTALL_ARGS='-s -g kmem -m 02555' NetMeter_Default_Setting=True diff --git a/sysutils/xosview/files/patch-general.h b/sysutils/xosview/files/patch-general.h deleted file mode 100644 index adb4948d7096..000000000000 --- a/sysutils/xosview/files/patch-general.h +++ /dev/null @@ -1,29 +0,0 @@ ---- general.h.orig Fri Feb 14 01:22:03 1997 -+++ general.h Sun Dec 1 19:54:02 2002 -@@ -17,11 +17,14 @@ - includes but before any local includes. It should NOT be included - by any .h files unless there is a REALLY good reason. */ - -+#include "osreldate.h" - - #ifdef __GNUC__ -+#if defined(__FreeBSD__) && (__FreeBSD_version < 500035) - /* Grab _G_HAVE_BOOL, if possible. */ - #include <_G_config.h> - #endif -+#endif - - #ifndef _G_HAVE_BOOL - /* Every GNU system has _G_config.h, I believe, which tells us -@@ -29,11 +32,6 @@ - let's just redefine them all. The following lines are directly - from g++-include's bool.h file. bgrayson */ - --#undef FALSE --#undef false --#undef TRUE --#undef true --enum bool { FALSE = 0, false = 0, TRUE = 1, true = 1 }; - #endif - - diff --git a/sysutils/xosview/files/patch-kernel.cc b/sysutils/xosview/files/patch-kernel.cc index 43121c712a1c..30ce4ca01d81 100644 --- a/sysutils/xosview/files/patch-kernel.cc +++ b/sysutils/xosview/files/patch-kernel.cc @@ -1,6 +1,6 @@ ---- bsd/kernel.cc.orig Tue Oct 9 10:40:51 2001 -+++ bsd/kernel.cc Mon Oct 27 20:03:03 2003 -@@ -46,6 +46,7 @@ +--- bsd/kernel.cc.orig Tue Oct 14 03:53:17 2003 ++++ bsd/kernel.cc Thu Mar 17 23:26:49 2005 +@@ -54,6 +54,7 @@ #endif #ifdef HAVE_DEVSTAT @@ -8,8 +8,41 @@ #include <devstat.h> #include <stdlib.h> /* For malloc(). */ void DevStat_Init(); -@@ -297,7 +298,12 @@ - while (nlp && nlp->n_name) { +@@ -211,19 +212,28 @@ + + { "_bufspace" }, + #define BUFSPACE_SYM_INDEX 3 ++#if __FreeBSD_version < 500000 + { "_intr_countp" }, + #define INTRCOUNTP_SYM_INDEX 4 ++{ DUMMY_SYM }, ++#define DUMMY_5 5 ++#else ++{ "_intrnames" }, ++#define INTRNAMES_SYM_INDEX 4 ++{ "_eintrnames" }, ++#define EINTRNAMES_SYM_INDEX 5 ++#endif /* FreeBSD < 5.x */ + { "_intrcnt" }, +-#define INTRCNT_SYM_INDEX 5 ++#define INTRCNT_SYM_INDEX 6 + { "_eintrcnt" }, +-#define EINTRCNT_SYM_INDEX 6 ++#define EINTRCNT_SYM_INDEX 7 + + #ifndef HAVE_DEVSTAT + + { "_dk_ndrive" }, +-#define DK_NDRIVE_SYM_INDEX 7 ++#define DK_NDRIVE_SYM_INDEX 8 + { "_dk_wds" }, +-#define DK_WDS_SYM_INDEX 8 ++#define DK_WDS_SYM_INDEX 9 + + #endif /*HAVE_DEVSTAT */ + +@@ -329,7 +339,12 @@ + while (nlp && nlp->n_name && strncmp(nlp->n_name, DUMMY_SYM, strlen(DUMMY_SYM))) { if ((nlp->n_type == 0) || (nlp->n_value == 0)) /*errx (-1, "kvm_nlist() lookup failed for symbol '%s'.", nlp->n_name);*/ +#if defined(XOSVIEW_FREEBSD) && defined(__alpha__) @@ -21,16 +54,7 @@ nlp++; } #ifdef HAVE_DEVSTAT -@@ -493,7 +499,7 @@ - // - - void --BSDGetSwapCtlInfo(int *totalp, int *freep) { -+BSDGetSwapCtlInfo(int64_t *totalp, int64_t *freep) { - int totalinuse, totalsize; - int rnswap, nswap = swapctl(SWAP_NSWAP, 0, 0); - struct swapent *swapiter; -@@ -557,13 +563,21 @@ +@@ -597,13 +612,21 @@ * Make sure that the userland devstat version matches the kernel * devstat version. */ @@ -52,7 +76,7 @@ nodisk++; return; } -@@ -578,7 +592,11 @@ +@@ -618,7 +641,11 @@ * changed here, since it almost certainly has. We only look for * errors. */ @@ -64,7 +88,7 @@ nodisk++; return; } -@@ -590,7 +608,11 @@ +@@ -630,7 +657,11 @@ /* only interested in disks */ matches = NULL; @@ -76,7 +100,7 @@ nodisk++; return; } -@@ -605,7 +627,11 @@ +@@ -645,7 +676,11 @@ * device list has changed, so we don't look for return values of 0 * or 1. If we get back -1, though, there is an error. */ @@ -88,7 +112,7 @@ &num_selections, &select_generation, generation, cur.dinfo->devices, num_devices, matches, num_matches, -@@ -632,7 +658,11 @@ +@@ -672,7 +707,11 @@ * the selection process again, in case a device that we * were previously displaying has gone away. */ @@ -100,7 +124,7 @@ case -1: return (0); case 1: { -@@ -640,7 +670,11 @@ +@@ -680,7 +719,11 @@ num_devices = cur.dinfo->numdevs; generation = cur.dinfo->generation; @@ -112,7 +136,7 @@ &num_selections, &select_generation, generation, cur.dinfo->devices, num_devices, matches, num_matches, -@@ -664,14 +698,22 @@ +@@ -704,14 +747,22 @@ * Calculate elapsed time up front, since it's the same for all * devices. */ @@ -135,7 +159,7 @@ return (0); } -@@ -685,7 +727,11 @@ +@@ -725,7 +776,11 @@ di = dev_select[dn].position; @@ -147,7 +171,7 @@ &last.dinfo->devices[di], busy_seconds, &total_bytes, &total_transfers, NULL, NULL, -@@ -700,7 +746,11 @@ +@@ -740,7 +795,11 @@ last.dinfo = cur.dinfo; cur.dinfo = tmp_dinfo; @@ -159,7 +183,7 @@ } else { /* no disks found ? */ -@@ -828,25 +878,25 @@ +@@ -912,25 +971,26 @@ OpenKDIfNeeded(); nintr = (nlst[EINTRCNT_SYM_INDEX].n_value - nlst[INTRCNT_SYM_INDEX].n_value) / sizeof(int); @@ -189,17 +213,46 @@ BSDGetIntrStats (unsigned long intrCount[NUM_INTR]) { -#ifdef XOSVIEW_FREEBSD +#if defined(XOSVIEW_FREEBSD) && defined(__i386__) ++#if __FreeBSD_version < 500000 /* FreeBSD has an array of interrupt counts, indexed by device number. These are also indirected by IRQ num with intr_countp: */ safe_kvm_read (nlst[INTRCOUNTP_SYM_INDEX].n_value, -@@ -875,8 +925,8 @@ - intrCount[i] = kvm_intrptrs[i]; - #endif /* _BSDI_VERSION */ - --#else /* XOSVIEW_FREEBSD */ -- // NetBSD/OpenBSD version, based on vmstat.c. Note that the pc532 -+#else /* XOSVIEW_FREEBSD & i386 */ -+ // NetBSD/OpenBSD & FreeBSD/Alpha version, based on vmstat.c. Note that the pc532 - // platform does support intrcnt and eintrcnt, but vmstat uses - // the more advanced event counters to provide software - // counts. We'll just use the intrcnt array here. If anyone +@@ -944,6 +1004,38 @@ + sizeof(unsigned long); + intrCount[i] = kvm_intrcnt[idx]; + } ++#else /* FreeBSD 5.x and 6.x */ ++ /* This code is stolen from vmstat */ ++ unsigned long *kvm_intrcnt; ++ char *kvm_intrname; ++ size_t inamlen, intrcntlen; ++ unsigned int i, nintr; ++ int d; ++ ++ intrcntlen = (nlst[EINTRCNT_SYM_INDEX].n_value - nlst[INTRCNT_SYM_INDEX].n_value); ++ inamlen = nlst[EINTRNAMES_SYM_INDEX].n_value - nlst[INTRNAMES_SYM_INDEX].n_value; ++ nintr = intrcntlen / sizeof(unsigned long); ++ ++ if (((kvm_intrcnt = (unsigned long *)malloc(intrcntlen)) == NULL) || ++ ((kvm_intrname = (char *)malloc(inamlen)) == NULL)) ++ err(1, "malloc()"); ++ ++ safe_kvm_read (nlst[INTRCNT_SYM_INDEX].n_value, kvm_intrcnt, intrcntlen); ++ safe_kvm_read (nlst[INTRNAMES_SYM_INDEX].n_value, kvm_intrname, inamlen); ++ ++ /* kvm_intrname has the ASCII names of the IRQs, every null-terminated ++ * string corresponds to a value in the kvm_intrcnt array */ ++ for (i=0; i < nintr; i++) { ++ if (kvm_intrname[0] != '\0' && (*kvm_intrcnt != 0)) { ++ /* Figure out which irq we have here */ ++ if (1 == sscanf(kvm_intrname, "irq%d:", &d)) ++ if (d < NUM_INTR) ++ intrCount[d] = *kvm_intrcnt; ++ } ++ kvm_intrcnt++; ++ kvm_intrname += strlen(kvm_intrname) + 1; ++ } ++#endif + #elif defined (XOSVIEW_BSDI) + int nintr = 16; + #if _BSDI_VERSION >= 199802 /* BSD/OS 4.x */ diff --git a/sysutils/xosview/files/patch-kernel.h b/sysutils/xosview/files/patch-kernel.h index ce5e565099b6..89b5a8dbe3cc 100644 --- a/sysutils/xosview/files/patch-kernel.h +++ b/sysutils/xosview/files/patch-kernel.h @@ -1,14 +1,5 @@ --- bsd/kernel.h.orig Fri May 29 14:21:36 1998 +++ bsd/kernel.h Tue Aug 21 10:50:17 2001 -@@ -52,7 +52,7 @@ - - #ifdef HAVE_SWAPCTL - void --BSDGetSwapCtlInfo(int* total, int* free); -+BSDGetSwapCtlInfo(int64_t* total, int64_t* free); - #endif - - int @@ -67,7 +67,11 @@ #endif diff --git a/sysutils/xosview/files/patch-swapinternal.cc b/sysutils/xosview/files/patch-swapinternal.cc index 374581f309b4..cf89ccac3689 100644 --- a/sysutils/xosview/files/patch-swapinternal.cc +++ b/sysutils/xosview/files/patch-swapinternal.cc @@ -1,6 +1,6 @@ --- bsd/swapinternal.cc.orig Tue Nov 16 23:16:20 1999 +++ bsd/swapinternal.cc Tue Aug 21 11:27:26 2001 -@@ -437,16 +437,17 @@ +@@ -459,16 +459,17 @@ #endif /* XOSVIEW_FREEBSD */ void diff --git a/sysutils/xosview/files/patch-swapinternal.h b/sysutils/xosview/files/patch-swapinternal.h index 18334202b0cd..03be8258598d 100644 --- a/sysutils/xosview/files/patch-swapinternal.h +++ b/sysutils/xosview/files/patch-swapinternal.h @@ -6,6 +6,7 @@ void -BSDGetSwapInfo(int* total, int* free); +BSDGetSwapInfo(int64_t* total, int64_t* free); + #endif void -BSDGetSwapCtlInfo(int* total, int* free); diff --git a/sysutils/xosview/files/patch-swapmeter.cc b/sysutils/xosview/files/patch-swapmeter.cc index bb07b5b60253..d028cf2187d9 100644 --- a/sysutils/xosview/files/patch-swapmeter.cc +++ b/sysutils/xosview/files/patch-swapmeter.cc @@ -2,6 +2,6 @@ +++ bsd/swapmeter.cc Tue Aug 21 10:53:02 2001 @@ -76,3 +76,3 @@ void SwapMeter::getswapinfo( void ){ -- int total_int, free_int; +- unsigned long long total_int, free_int; + int64_t total_int, free_int; diff --git a/sysutils/xosview/files/patch-xwin.h b/sysutils/xosview/files/patch-xwin.h deleted file mode 100644 index bcec4c6f874f..000000000000 --- a/sysutils/xosview/files/patch-xwin.h +++ /dev/null @@ -1,10 +0,0 @@ ---- xwin.h.orig Mon Feb 25 03:52:00 2002 -+++ xwin.h Mon Oct 27 21:13:29 2003 -@@ -11,6 +11,7 @@ - #endif - #include <iostream.h> - #include <string.h> -+using namespace std; - - #define XWIN_H_CVSID "$Id$" - |