summaryrefslogtreecommitdiff
path: root/sysutils/torsmo
diff options
context:
space:
mode:
authorwiz <wiz>2010-10-31 23:38:32 +0000
committerwiz <wiz>2010-10-31 23:38:32 +0000
commit1932b086fd844ae4dff0a45d154ef33d179e6b5a (patch)
tree93835e0b1ed4a67fe2d5ecb5fd04d241079ea70a /sysutils/torsmo
parent2ab2a7c48b724034d3203e8fcd70f3404f3b2bf8 (diff)
downloadpkgsrc-1932b086fd844ae4dff0a45d154ef33d179e6b5a.tar.gz
Fix build on DragonFly. From Matthias Schmidt in PR 44020.
Diffstat (limited to 'sysutils/torsmo')
-rw-r--r--sysutils/torsmo/Makefile4
-rw-r--r--sysutils/torsmo/distinfo4
-rw-r--r--sysutils/torsmo/patches/patch-ae36
3 files changed, 30 insertions, 14 deletions
diff --git a/sysutils/torsmo/Makefile b/sysutils/torsmo/Makefile
index f128f92edae..37584c709cb 100644
--- a/sysutils/torsmo/Makefile
+++ b/sysutils/torsmo/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.7 2010/02/19 21:21:20 joerg Exp $
+# $NetBSD: Makefile,v 1.8 2010/10/31 23:38:32 wiz Exp $
DISTNAME= torsmo-0.18
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=torsmo/}
diff --git a/sysutils/torsmo/distinfo b/sysutils/torsmo/distinfo
index f53d8d557c3..71359f30f5f 100644
--- a/sysutils/torsmo/distinfo
+++ b/sysutils/torsmo/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.4 2007/12/02 12:55:11 wiz Exp $
+$NetBSD: distinfo,v 1.5 2010/10/31 23:38:32 wiz Exp $
SHA1 (torsmo-0.18.tar.gz) = 01e6737b3971daa3a7c9cb6dd1961f61bc39bdae
RMD160 (torsmo-0.18.tar.gz) = f1d8b3c4679155596569f9116970e7ba8a01eb6e
@@ -7,4 +7,4 @@ SHA1 (patch-aa) = 8c515d3b0925aeaaea928ad8abd89ab5ccbfceab
SHA1 (patch-ab) = 3bf66bd2b7645c204099a8c7b806098d028cc8bf
SHA1 (patch-ac) = 5b342d09ff0fcc3982aa855e2cc660823ed53e11
SHA1 (patch-ad) = 87fa39455dc2d5190c419142d5e4d0768914841e
-SHA1 (patch-ae) = c5785c503776fa75d99025815ec95a1817ca9075
+SHA1 (patch-ae) = 5888d6cf538a9d95006ab1d2cdd01eabfafa10ed
diff --git a/sysutils/torsmo/patches/patch-ae b/sysutils/torsmo/patches/patch-ae
index d7fb46472b5..43804d17229 100644
--- a/sysutils/torsmo/patches/patch-ae
+++ b/sysutils/torsmo/patches/patch-ae
@@ -1,7 +1,7 @@
-$NetBSD: patch-ae,v 1.1 2007/02/19 19:50:48 joerg Exp $
+$NetBSD: patch-ae,v 1.2 2010/10/31 23:38:32 wiz Exp $
---- freebsd.c.orig 2007-02-19 19:26:16.000000000 +0000
-+++ freebsd.c
+--- freebsd.c.orig 2004-08-25 18:24:24 +0200
++++ freebsd.c 2010-10-31 18:52:50 +0100
@@ -13,7 +13,11 @@
#include <sys/types.h>
#include <sys/time.h>
@@ -14,7 +14,23 @@ $NetBSD: patch-ae,v 1.1 2007/02/19 19:50:48 joerg Exp $
#include <unistd.h>
#include <sys/user.h>
#include <sys/socket.h>
-@@ -251,6 +255,19 @@ long cpu_used, oldtotal, oldused;
+@@ -229,11 +233,15 @@ void update_running_processes() {
+ if (kd != NULL) {
+ p = kvm_getprocs(kd, KERN_PROC_ALL, 0, &n_processes);
+ for (i = 0; i<n_processes; i++) {
++#ifdef __DragonFly__
++ if (p[i].kp_stat == LSRUN)
++#else
+ #if __FreeBSD__ < 5
+ if (p[i].kp_proc.p_stat == SRUN)
+ #else
+ if (p[i].ki_stat == SRUN)
+ #endif
++#endif /* __DragonFly__ */
+ cnt++;
+ }
+ } else
+@@ -251,6 +259,19 @@ long cpu_used, oldtotal, oldused;
void update_cpu_usage() {
long used, total;
@@ -26,15 +42,15 @@ $NetBSD: patch-ae,v 1.1 2007/02/19 19:50:48 joerg Exp $
+ return;
+ }
+ fresh.load[0] = cp_time.cp_user;
-+ fresh.load[0] = cp_time.cp_nice;
-+ fresh.load[0] = cp_time.cp_sys;
-+ fresh.load[0] = cp_time.cp_idle;
-+ fresh.load[0] = cp_time.cp_idle;
++ fresh.load[1] = cp_time.cp_nice;
++ fresh.load[2] = cp_time.cp_sys;
++ fresh.load[3] = cp_time.cp_idle;
++ fresh.load[4] = cp_time.cp_idle;
+#else
long cp_time[CPUSTATES];
size_t len = sizeof(cp_time);
-@@ -263,6 +280,7 @@ void update_cpu_usage() {
+@@ -263,6 +284,7 @@ void update_cpu_usage() {
fresh.load[2] = cp_time[CP_SYS];
fresh.load[3] = cp_time[CP_IDLE];
fresh.load[4] = cp_time[CP_IDLE];
@@ -42,7 +58,7 @@ $NetBSD: patch-ae,v 1.1 2007/02/19 19:50:48 joerg Exp $
used = fresh.load[0] + fresh.load[1] + fresh.load[2];
total = fresh.load[0] + fresh.load[1] + fresh.load[2] + fresh.load[3];
-@@ -345,3 +363,8 @@ char* get_acpi_ac_adapter(void)
+@@ -345,3 +367,8 @@ char* get_acpi_ac_adapter(void)
char* get_acpi_fan() {
return "";
}