summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorjoerg <joerg>2007-01-20 12:18:31 +0000
committerjoerg <joerg>2007-01-20 12:18:31 +0000
commitdd710cd51a5d38ef8a3b6808e1f9b4434f28871c (patch)
tree547d6cf173cf4364d25383b6e164db0a016aab30 /sysutils
parent0dde253973d24fc4b9b986e86514e06c376ad647 (diff)
downloadpkgsrc-dd710cd51a5d38ef8a3b6808e1f9b4434f28871c.tar.gz
Add DragonFly support.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/xfce4-cpugraph-plugin/Makefile8
-rw-r--r--sysutils/xfce4-cpugraph-plugin/distinfo5
-rw-r--r--sysutils/xfce4-cpugraph-plugin/patches/patch-ab31
-rw-r--r--sysutils/xfce4-cpugraph-plugin/patches/patch-ac16
-rw-r--r--sysutils/xfce4-cpugraph-plugin/patches/patch-ad15
5 files changed, 73 insertions, 2 deletions
diff --git a/sysutils/xfce4-cpugraph-plugin/Makefile b/sysutils/xfce4-cpugraph-plugin/Makefile
index dcc1bca3bc6..36a690f0058 100644
--- a/sysutils/xfce4-cpugraph-plugin/Makefile
+++ b/sysutils/xfce4-cpugraph-plugin/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2006/04/17 13:46:14 wiz Exp $
+# $NetBSD: Makefile,v 1.8 2007/01/20 12:18:31 joerg Exp $
.include "../../meta-pkgs/xfce4/Makefile.common"
@@ -12,5 +12,11 @@ COMMENT= Xfce CPU load plugin
WRKSRC= ${WRKDIR}/xfce4-cpugraph-plugin
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "DragonFly"
+MAKE_ENV+= OS_LIBS=-lkinfo
+.endif
+
.include "../../x11/xfce4-panel/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/xfce4-cpugraph-plugin/distinfo b/sysutils/xfce4-cpugraph-plugin/distinfo
index 9b1a73df14e..0c22b16895b 100644
--- a/sysutils/xfce4-cpugraph-plugin/distinfo
+++ b/sysutils/xfce4-cpugraph-plugin/distinfo
@@ -1,6 +1,9 @@
-$NetBSD: distinfo,v 1.5 2005/02/24 13:40:59 agc Exp $
+$NetBSD: distinfo,v 1.6 2007/01/20 12:18:31 joerg Exp $
SHA1 (xfce4-cpugraph-plugin-0.2.2.tar.gz) = 64914e2d766ba093b6158d45ab37c0021057121b
RMD160 (xfce4-cpugraph-plugin-0.2.2.tar.gz) = c1af61ae6961b4cbdd16dad925bf805440c24aa5
Size (xfce4-cpugraph-plugin-0.2.2.tar.gz) = 210953 bytes
SHA1 (patch-aa) = fe1b2d46334ba73a9a6c661c09b14bc1f2a342a9
+SHA1 (patch-ab) = 547a43d4df832c0f08cc7dd27856d0542de7aa8a
+SHA1 (patch-ac) = 47c0e53b7dddf0307cc949aa69c335c1492e8584
+SHA1 (patch-ad) = a989f0ed1b91d2e1fbc61fa623b989d371be80e0
diff --git a/sysutils/xfce4-cpugraph-plugin/patches/patch-ab b/sysutils/xfce4-cpugraph-plugin/patches/patch-ab
new file mode 100644
index 00000000000..8a65037f222
--- /dev/null
+++ b/sysutils/xfce4-cpugraph-plugin/patches/patch-ab
@@ -0,0 +1,31 @@
+$NetBSD: patch-ab,v 1.1 2007/01/20 12:18:31 joerg Exp $
+
+--- panel-plugin/os.c.orig 2004-06-07 01:16:30.000000000 +0000
++++ panel-plugin/os.c
+@@ -63,6 +63,26 @@ long GetCPUUsage (int *oldusage, int *ol
+
+ return usage;
+ }
++#elif defined(__DragonFly__)
++long GetCPUUsage (int *oldusage, int *oldtotal)
++{
++ long used, total, usage;
++ struct kinfo_cputime cp_time;
++
++ if (kinfo_get_sched_cputime(&cp_time) < 0) {
++ g_warning("kinfo_get_sched_cputime failed");
++ return 0;
++ }
++ used = cp_time.cp_user + cp_time.cp_nice + cp_time.cp_sys - *oldusage;
++ total = used + cp_time.cp_idle - *oldtotal;
++ if (total != 0)
++ usage = 100 * (used + used / 2) / total;
++ else
++ usage = 0;
++ *oldusage = used;
++ *oldtotal = total;
++ return usage;
++}
+ #elif defined (__NetBSD__)
+ long GetCPUUsage (int *oldusage, int *oldtotal)
+ {
diff --git a/sysutils/xfce4-cpugraph-plugin/patches/patch-ac b/sysutils/xfce4-cpugraph-plugin/patches/patch-ac
new file mode 100644
index 00000000000..ebedabea59f
--- /dev/null
+++ b/sysutils/xfce4-cpugraph-plugin/patches/patch-ac
@@ -0,0 +1,16 @@
+$NetBSD: patch-ac,v 1.1 2007/01/20 12:18:31 joerg Exp $
+
+OS_LIBS contains -lkinfo on DragonFly.
+
+--- panel-plugin/Makefile.in.orig 2007-01-20 12:00:36.000000000 +0000
++++ panel-plugin/Makefile.in
+@@ -150,7 +150,8 @@ libcpugraph_la_CFLAGS = \
+
+
+ libcpugraph_la_LIBADD = \
+- @XFCE4_PANEL_LIBS@
++ @XFCE4_PANEL_LIBS@ \
++ ${OS_LIBS}
+
+ subdir = panel-plugin
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
diff --git a/sysutils/xfce4-cpugraph-plugin/patches/patch-ad b/sysutils/xfce4-cpugraph-plugin/patches/patch-ad
new file mode 100644
index 00000000000..26b34fcc12f
--- /dev/null
+++ b/sysutils/xfce4-cpugraph-plugin/patches/patch-ad
@@ -0,0 +1,15 @@
+$NetBSD: patch-ad,v 1.1 2007/01/20 12:18:31 joerg Exp $
+
+--- panel-plugin/os.h.orig 2007-01-20 12:05:51.000000000 +0000
++++ panel-plugin/os.h
+@@ -17,6 +17,10 @@
+ #include <nlist.h>
+ #endif
+
++#if defined(__DragonFly__)
++#include <kinfo.h>
++#endif
++
+ #if defined (__NetBSD__)
+ #include <sys/param.h>
+ #include <sys/sched.h>