View | Details | Raw Unified | Return to bug 79338
Collapse All | Expand All

(-)Makefile (-6 / +2 lines)
Lines 7-13 Link Here
7
#
7
#
8
8
9
PORTNAME=	xosview
9
PORTNAME=	xosview
10
PORTVERSION=	1.8.0
10
PORTVERSION=	1.8.2
11
CATEGORIES=	sysutils
11
CATEGORIES=	sysutils
12
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
12
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
13
MASTER_SITE_SUBDIR=	${PORTNAME}
13
MASTER_SITE_SUBDIR=	${PORTNAME}
Lines 22-31 Link Here
22
22
23
.include <bsd.port.pre.mk>
23
.include <bsd.port.pre.mk>
24
24
25
.if ${OSVERSION} >= 600000
26
BROKEN=		"Configure fails on FreeBSD >= 6.x"
27
.endif
28
29
post-patch:
25
post-patch:
30
	@${REINPLACE_CMD} -e 's,iostream.h,iostream,' \
26
	@${REINPLACE_CMD} -e 's,iostream.h,iostream,' \
31
		${WRKSRC}/xwin.h \
27
		${WRKSRC}/xwin.h \
Lines 46-52 Link Here
46
		${WRKSRC}/fieldmeter.cc \
42
		${WRKSRC}/fieldmeter.cc \
47
		${WRKSRC}/fieldmeterdecay.cc \
43
		${WRKSRC}/fieldmeterdecay.cc \
48
		${WRKSRC}/fieldmetergraph.cc
44
		${WRKSRC}/fieldmetergraph.cc
49
	@${REINPLACE_CMD} -e 's,-O4 -pipe,,' \
45
	@${REINPLACE_CMD} -e 's,-O4,,' \
50
		${WRKSRC}/configure
46
		${WRKSRC}/configure
51
47
52
.include <bsd.port.post.mk>
48
.include <bsd.port.post.mk>
(-)distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
MD5 (xosview-1.8.0.tar.gz) = bcbc0f02ac8944222ec677d504024c40
1
MD5 (xosview-1.8.2.tar.gz) = cc8b261b1f8d82da29239f1cc2ee55e9
2
SIZE (xosview-1.8.0.tar.gz) = 170323
2
SIZE (xosview-1.8.2.tar.gz) = 248859
(-)files/patch-Host.h (-10 lines)
Removed Link Here
1
--- Host.h.orig	Sun Jan 24 06:20:39 1999
2
+++ Host.h	Mon Oct 27 21:31:31 2003
3
@@ -19,6 +19,7 @@
4
 #include <arpa/inet.h>
5
 #include <iostream.h>
6
 #include "bool.h"
7
+using namespace std;
8
 
9
 class Host {
10
 public:
(-)files/patch-Xrm.h (-11 lines)
Removed Link Here
1
--- Xrm.h.orig	Sun Jan 24 06:20:39 1999
2
+++ Xrm.h	Mon Oct 27 21:26:37 2003
3
@@ -16,7 +16,7 @@
4
 #include <X11/Xlib.h>
5
 #include <X11/Xresource.h>
6
 
7
-class ostream;
8
+using namespace std;
9
 
10
 class Xrm {
11
 public:
(-)files/patch-bsd::cpumeter.cc (-21 lines)
Removed Link Here
1
--- bsd/cpumeter.cc.orig	Tue Oct 28 17:42:56 2003
2
+++ bsd/cpumeter.cc	Tue Oct 28 17:43:20 2003
3
@@ -123,12 +123,12 @@
4
     static int firstTime = 1;
5
     if (firstTime) {
6
       fprintf(stderr,
7
-"  Warning:  the CPU tick counters are not changing.  This could
8
-be due to running a kernel besides /netbsd (or the equivalent for FreeBSD).
9
-  If this is the case, re-run xosview with the -N kernel-name option.
10
-  If not, then this is a bug.  Please send a message to
11
-bgrayson@ece.utexas.edu, in addition to any send-pr bug reports
12
-(or in lieu of -- it ought to get fixed faster if you contact me
13
+"  Warning:  the CPU tick counters are not changing.  This could \
14
+be due to running a kernel besides /netbsd (or the equivalent for FreeBSD). \
15
+  If this is the case, re-run xosview with the -N kernel-name option. \
16
+  If not, then this is a bug.  Please send a message to \
17
+bgrayson@ece.utexas.edu, in addition to any send-pr bug reports \
18
+(or in lieu of -- it ought to get fixed faster if you contact me \
19
 directly).  Thanks!\n");
20
       firstTime = 0;
21
     }
(-)files/patch-configure (-3 / +3 lines)
Lines 1-11 Link Here
1
--- configure.orig	Sat Jun  1 23:56:10 2002
1
--- configure.orig	Sat Jun  1 23:56:10 2002
2
+++ configure	Sat Jun  1 23:56:23 2002
2
+++ configure	Sat Jun  1 23:56:23 2002
3
@@ -1851,7 +1851,7 @@
3
@@ -4852,7 +4852,7 @@
4
 
4
 
5
 			host_dir=bsd
5
 			host_dir=bsd
6
 	host_os=freebsd ;;
6
 	host_os=freebsd ;;
7
-freebsd[4]*) 
7
-freebsd[4]*)
8
+freebsd[45]*) 
8
+freebsd[456]*)
9
         EXTRALIBS="-lkvm $XPMLIB $DEVSTATLIB"
9
         EXTRALIBS="-lkvm $XPMLIB $DEVSTATLIB"
10
         INSTALL_ARGS='-s -g kmem -m 02555'
10
         INSTALL_ARGS='-s -g kmem -m 02555'
11
 	NetMeter_Default_Setting=True
11
 	NetMeter_Default_Setting=True
(-)files/patch-general.h (-29 lines)
Removed Link Here
1
--- general.h.orig	Fri Feb 14 01:22:03 1997
2
+++ general.h	Sun Dec  1 19:54:02 2002
3
@@ -17,11 +17,14 @@
4
       includes but before any local includes.  It should NOT be included
5
       by any .h files unless there is a REALLY good reason.  */
6
 
7
+#include "osreldate.h"
8
 
9
 #ifdef __GNUC__
10
+#if defined(__FreeBSD__) && (__FreeBSD_version < 500035)
11
   /*  Grab _G_HAVE_BOOL, if possible.  */
12
 #include <_G_config.h>
13
 #endif
14
+#endif
15
 
16
 #ifndef _G_HAVE_BOOL
17
   /*  Every GNU system has _G_config.h, I believe, which tells us
18
@@ -29,11 +32,6 @@
19
       let's just redefine them all.  The following lines are directly
20
       from g++-include's bool.h file.  bgrayson */
21
 
22
-#undef FALSE
23
-#undef false
24
-#undef TRUE
25
-#undef true
26
-enum bool { FALSE = 0, false = 0, TRUE = 1, true = 1 };
27
 #endif
28
 
29
 
(-)files/patch-kernel.cc (-35 / +88 lines)
Lines 1-6 Link Here
1
--- bsd/kernel.cc.orig	Tue Oct  9 10:40:51 2001
1
--- bsd/kernel.cc.orig	Tue Oct 14 03:53:17 2003
2
+++ bsd/kernel.cc	Mon Oct 27 20:03:03 2003
2
+++ bsd/kernel.cc	Thu Mar 17 23:26:49 2005
3
@@ -46,6 +46,7 @@
3
@@ -54,6 +54,7 @@
4
 #endif
4
 #endif
5
 
5
 
6
 #ifdef HAVE_DEVSTAT
6
 #ifdef HAVE_DEVSTAT
Lines 8-15 Link Here
8
 #include <devstat.h>
8
 #include <devstat.h>
9
 #include <stdlib.h>	/*  For malloc().  */
9
 #include <stdlib.h>	/*  For malloc().  */
10
 void DevStat_Init();
10
 void DevStat_Init();
11
@@ -297,7 +298,12 @@
11
@@ -211,19 +212,28 @@
12
   while (nlp && nlp->n_name) {
12
 
13
 { "_bufspace" },
14
 #define BUFSPACE_SYM_INDEX      3
15
+#if __FreeBSD_version < 500000
16
 { "_intr_countp" },
17
 #define INTRCOUNTP_SYM_INDEX 	4
18
+{ DUMMY_SYM },
19
+#define DUMMY_5			5
20
+#else
21
+{ "_intrnames" },
22
+#define INTRNAMES_SYM_INDEX 	4
23
+{ "_eintrnames" },
24
+#define EINTRNAMES_SYM_INDEX 	5
25
+#endif /* FreeBSD < 5.x */
26
 { "_intrcnt" },
27
-#define INTRCNT_SYM_INDEX 	5
28
+#define INTRCNT_SYM_INDEX 	6
29
 { "_eintrcnt" },
30
-#define EINTRCNT_SYM_INDEX 	6
31
+#define EINTRCNT_SYM_INDEX 	7
32
 
33
 #ifndef HAVE_DEVSTAT
34
 
35
 { "_dk_ndrive" },
36
-#define DK_NDRIVE_SYM_INDEX     7
37
+#define DK_NDRIVE_SYM_INDEX     8
38
 { "_dk_wds" },
39
-#define DK_WDS_SYM_INDEX        8
40
+#define DK_WDS_SYM_INDEX        9
41
 
42
 #endif /*HAVE_DEVSTAT */
43
 
44
@@ -329,7 +339,12 @@
45
   while (nlp && nlp->n_name && strncmp(nlp->n_name, DUMMY_SYM, strlen(DUMMY_SYM))) {
13
     if ((nlp->n_type == 0) || (nlp->n_value == 0))
46
     if ((nlp->n_type == 0) || (nlp->n_value == 0))
14
       /*errx (-1, "kvm_nlist() lookup failed for symbol '%s'.", nlp->n_name);*/
47
       /*errx (-1, "kvm_nlist() lookup failed for symbol '%s'.", nlp->n_name);*/
15
+#if defined(XOSVIEW_FREEBSD) && defined(__alpha__)
48
+#if defined(XOSVIEW_FREEBSD) && defined(__alpha__)
Lines 21-36 Link Here
21
     nlp++;
54
     nlp++;
22
   }
55
   }
23
 #ifdef HAVE_DEVSTAT
56
 #ifdef HAVE_DEVSTAT
24
@@ -493,7 +499,7 @@
57
@@ -597,13 +612,21 @@
25
 //
26
 
27
 void
28
-BSDGetSwapCtlInfo(int *totalp, int *freep) {
29
+BSDGetSwapCtlInfo(int64_t *totalp, int64_t *freep) {
30
   int	totalinuse, totalsize;
31
   int rnswap, nswap = swapctl(SWAP_NSWAP, 0, 0);
32
   struct swapent *swapiter;
33
@@ -557,13 +563,21 @@
34
 	 * Make sure that the userland devstat version matches the kernel
58
 	 * Make sure that the userland devstat version matches the kernel
35
 	 * devstat version.
59
 	 * devstat version.
36
 	 */
60
 	 */
Lines 52-58 Link Here
52
 		nodisk++;
76
 		nodisk++;
53
 		return;
77
 		return;
54
 	}
78
 	}
55
@@ -578,7 +592,11 @@
79
@@ -618,7 +641,11 @@
56
 	 * changed here, since it almost certainly has.  We only look for
80
 	 * changed here, since it almost certainly has.  We only look for
57
 	 * errors.
81
 	 * errors.
58
 	 */
82
 	 */
Lines 64-70 Link Here
64
 		nodisk++;
88
 		nodisk++;
65
 		return;
89
 		return;
66
 	}
90
 	}
67
@@ -590,7 +608,11 @@
91
@@ -630,7 +657,11 @@
68
 
92
 
69
 	/* only interested in disks */
93
 	/* only interested in disks */
70
 	matches = NULL;
94
 	matches = NULL;
Lines 76-82 Link Here
76
 		nodisk++;
100
 		nodisk++;
77
 		return;
101
 		return;
78
 	}
102
 	}
79
@@ -605,7 +627,11 @@
103
@@ -645,7 +676,11 @@
80
 	 * device list has changed, so we don't look for return values of 0
104
 	 * device list has changed, so we don't look for return values of 0
81
 	 * or 1.  If we get back -1, though, there is an error.
105
 	 * or 1.  If we get back -1, though, there is an error.
82
 	 */
106
 	 */
Lines 88-94 Link Here
88
 		       &num_selections, &select_generation,
112
 		       &num_selections, &select_generation,
89
 		       generation, cur.dinfo->devices, num_devices,
113
 		       generation, cur.dinfo->devices, num_devices,
90
 		       matches, num_matches,
114
 		       matches, num_matches,
91
@@ -632,7 +658,11 @@
115
@@ -672,7 +707,11 @@
92
 		 * the selection process again, in case a device that we
116
 		 * the selection process again, in case a device that we
93
 		 * were previously displaying has gone away.
117
 		 * were previously displaying has gone away.
94
 		 */
118
 		 */
Lines 100-106 Link Here
100
 		case -1:
124
 		case -1:
101
 			return (0);
125
 			return (0);
102
 		case 1: {
126
 		case 1: {
103
@@ -640,7 +670,11 @@
127
@@ -680,7 +719,11 @@
104
 
128
 
105
 			num_devices = cur.dinfo->numdevs;
129
 			num_devices = cur.dinfo->numdevs;
106
 			generation = cur.dinfo->generation;
130
 			generation = cur.dinfo->generation;
Lines 112-118 Link Here
112
 					    &num_selections, &select_generation,
136
 					    &num_selections, &select_generation,
113
 					    generation, cur.dinfo->devices,
137
 					    generation, cur.dinfo->devices,
114
 					    num_devices, matches, num_matches,
138
 					    num_devices, matches, num_matches,
115
@@ -664,14 +698,22 @@
139
@@ -704,14 +747,22 @@
116
 		 * Calculate elapsed time up front, since it's the same for all
140
 		 * Calculate elapsed time up front, since it's the same for all
117
 		 * devices.
141
 		 * devices.
118
 		 */
142
 		 */
Lines 135-141 Link Here
135
 			return (0);
159
 			return (0);
136
 		}
160
 		}
137
 
161
 
138
@@ -685,7 +727,11 @@
162
@@ -725,7 +776,11 @@
139
 
163
 
140
 			di = dev_select[dn].position;
164
 			di = dev_select[dn].position;
141
 
165
 
Lines 147-153 Link Here
147
 				  &last.dinfo->devices[di], busy_seconds,
171
 				  &last.dinfo->devices[di], busy_seconds,
148
 				  &total_bytes, &total_transfers,
172
 				  &total_bytes, &total_transfers,
149
 				  NULL, NULL,
173
 				  NULL, NULL,
150
@@ -700,7 +746,11 @@
174
@@ -740,7 +795,11 @@
151
 		last.dinfo = cur.dinfo;
175
 		last.dinfo = cur.dinfo;
152
 		cur.dinfo = tmp_dinfo;
176
 		cur.dinfo = tmp_dinfo;
153
 
177
 
Lines 159-165 Link Here
159
 
183
 
160
 	} else {
184
 	} else {
161
 		/* no disks found ? */
185
 		/* no disks found ? */
162
@@ -828,25 +878,25 @@
186
@@ -912,25 +971,26 @@
163
   OpenKDIfNeeded(); 
187
   OpenKDIfNeeded(); 
164
   nintr = (nlst[EINTRCNT_SYM_INDEX].n_value -
188
   nintr = (nlst[EINTRCNT_SYM_INDEX].n_value -
165
 	   nlst[INTRCNT_SYM_INDEX].n_value)   / sizeof(int);
189
 	   nlst[INTRCNT_SYM_INDEX].n_value)   / sizeof(int);
Lines 189-205 Link Here
189
 BSDGetIntrStats (unsigned long intrCount[NUM_INTR]) {
213
 BSDGetIntrStats (unsigned long intrCount[NUM_INTR]) {
190
-#ifdef XOSVIEW_FREEBSD
214
-#ifdef XOSVIEW_FREEBSD
191
+#if defined(XOSVIEW_FREEBSD) && defined(__i386__)
215
+#if defined(XOSVIEW_FREEBSD) && defined(__i386__)
216
+#if __FreeBSD_version < 500000
192
     /* FreeBSD has an array of interrupt counts, indexed by device number.
217
     /* FreeBSD has an array of interrupt counts, indexed by device number.
193
        These are also indirected by IRQ num with intr_countp: */
218
        These are also indirected by IRQ num with intr_countp: */
194
     safe_kvm_read (nlst[INTRCOUNTP_SYM_INDEX].n_value,
219
     safe_kvm_read (nlst[INTRCOUNTP_SYM_INDEX].n_value,
195
@@ -875,8 +925,8 @@
220
@@ -944,6 +1004,38 @@
196
       intrCount[i] = kvm_intrptrs[i];
221
 	    sizeof(unsigned long);
197
 #endif /* _BSDI_VERSION */
222
 	intrCount[i] = kvm_intrcnt[idx];
198
 
223
     }
199
-#else /* XOSVIEW_FREEBSD */
224
+#else /* FreeBSD 5.x and 6.x */
200
-  //  NetBSD/OpenBSD version, based on vmstat.c.  Note that the pc532
225
+    /* This code is stolen from vmstat */
201
+#else /* XOSVIEW_FREEBSD & i386 */
226
+    unsigned long *kvm_intrcnt;
202
+  //  NetBSD/OpenBSD & FreeBSD/Alpha version, based on vmstat.c.  Note that the pc532 
227
+    char *kvm_intrname;
203
   //  platform does support intrcnt and eintrcnt, but vmstat uses
228
+    size_t inamlen, intrcntlen;
204
   //  the more advanced event counters to provide software
229
+    unsigned int i, nintr;
205
   //  counts.  We'll just use the intrcnt array here.  If anyone
230
+    int d;
231
+
232
+    intrcntlen = (nlst[EINTRCNT_SYM_INDEX].n_value - nlst[INTRCNT_SYM_INDEX].n_value);
233
+    inamlen = nlst[EINTRNAMES_SYM_INDEX].n_value - nlst[INTRNAMES_SYM_INDEX].n_value;
234
+    nintr = intrcntlen / sizeof(unsigned long);
235
+
236
+    if (((kvm_intrcnt = (unsigned long *)malloc(intrcntlen)) == NULL) || 
237
+	((kvm_intrname = (char *)malloc(inamlen)) == NULL))
238
+      err(1, "malloc()");
239
+
240
+    safe_kvm_read (nlst[INTRCNT_SYM_INDEX].n_value, kvm_intrcnt, intrcntlen);
241
+    safe_kvm_read (nlst[INTRNAMES_SYM_INDEX].n_value, kvm_intrname, inamlen);
242
+
243
+    /* kvm_intrname has the ASCII names of the IRQs, every null-terminated
244
+     * string corresponds to a value in the kvm_intrcnt array */
245
+    for (i=0; i < nintr; i++) {
246
+	if (kvm_intrname[0] != '\0' && (*kvm_intrcnt != 0)) {
247
+	  /* Figure out which irq we have here */
248
+	    if (1 == sscanf(kvm_intrname, "irq%d:", &d))
249
+	      if (d < NUM_INTR)
250
+		intrCount[d] = *kvm_intrcnt;
251
+	}
252
+	kvm_intrcnt++;
253
+	kvm_intrname += strlen(kvm_intrname) + 1;
254
+    }
255
+#endif
256
 #elif defined (XOSVIEW_BSDI)
257
     int nintr = 16;
258
 #if _BSDI_VERSION >= 199802 /* BSD/OS 4.x */
(-)files/patch-kernel.h (-9 lines)
Lines 1-14 Link Here
1
--- bsd/kernel.h.orig	Fri May 29 14:21:36 1998
1
--- bsd/kernel.h.orig	Fri May 29 14:21:36 1998
2
+++ bsd/kernel.h	Tue Aug 21 10:50:17 2001
2
+++ bsd/kernel.h	Tue Aug 21 10:50:17 2001
3
@@ -52,7 +52,7 @@
4
 
5
 #ifdef HAVE_SWAPCTL
6
 void
7
-BSDGetSwapCtlInfo(int* total, int* free);
8
+BSDGetSwapCtlInfo(int64_t* total, int64_t* free);
9
 #endif
10
 
11
 int
12
@@ -67,7 +67,11 @@
3
@@ -67,7 +67,11 @@
13
 #endif
4
 #endif
14
 
5
 
(-)files/patch-swapinternal.cc (-1 / +1 lines)
Lines 1-6 Link Here
1
--- bsd/swapinternal.cc.orig	Tue Nov 16 23:16:20 1999
1
--- bsd/swapinternal.cc.orig	Tue Nov 16 23:16:20 1999
2
+++ bsd/swapinternal.cc	Tue Aug 21 11:27:26 2001
2
+++ bsd/swapinternal.cc	Tue Aug 21 11:27:26 2001
3
@@ -437,16 +437,17 @@
3
@@ -459,16 +459,17 @@
4
 #endif /* XOSVIEW_FREEBSD */
4
 #endif /* XOSVIEW_FREEBSD */
5
 
5
 
6
 void
6
 void
(-)files/patch-swapinternal.h (+1 lines)
Lines 6-11 Link Here
6
 void
6
 void
7
-BSDGetSwapInfo(int* total, int* free);
7
-BSDGetSwapInfo(int* total, int* free);
8
+BSDGetSwapInfo(int64_t* total, int64_t* free);
8
+BSDGetSwapInfo(int64_t* total, int64_t* free);
9
 #endif
9
 
10
 
10
 void
11
 void
11
-BSDGetSwapCtlInfo(int* total, int* free);
12
-BSDGetSwapCtlInfo(int* total, int* free);
(-)files/patch-swapmeter.cc (-1 / +1 lines)
Lines 2-7 Link Here
2
+++ bsd/swapmeter.cc	Tue Aug 21 10:53:02 2001
2
+++ bsd/swapmeter.cc	Tue Aug 21 10:53:02 2001
3
@@ -76,3 +76,3 @@
3
@@ -76,3 +76,3 @@
4
 void SwapMeter::getswapinfo( void ){
4
 void SwapMeter::getswapinfo( void ){
5
-  int total_int, free_int;
5
-  unsigned long long total_int, free_int;
6
+  int64_t total_int, free_int;
6
+  int64_t total_int, free_int;
7
 
7
 
(-)files/patch-xwin.h (-10 lines)
Removed Link Here
1
--- xwin.h.orig	Mon Feb 25 03:52:00 2002
2
+++ xwin.h	Mon Oct 27 21:13:29 2003
3
@@ -11,6 +11,7 @@
4
 #endif
5
 #include <iostream.h>
6
 #include <string.h>
7
+using namespace std;
8
 
9
 #define XWIN_H_CVSID "$Id$"
10
 

Return to bug 79338