diff options
author | rillig <rillig@pkgsrc.org> | 2006-05-31 12:03:53 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2006-05-31 12:03:53 +0000 |
commit | 2b531794a23acb0c1149480ce79b4db499acbc29 (patch) | |
tree | fd4befa68aad61a9727ac6d384a68c77563af7fc /x11/hot-babe | |
parent | 61669f2dc35cb4d06111cf973210b92fa6cdaa53 (diff) | |
download | pkgsrc-2b531794a23acb0c1149480ce79b4db499acbc29.tar.gz |
Made hot-babe work on Solaris.
Diffstat (limited to 'x11/hot-babe')
-rw-r--r-- | x11/hot-babe/distinfo | 4 | ||||
-rw-r--r-- | x11/hot-babe/patches/patch-aa | 27 |
2 files changed, 23 insertions, 8 deletions
diff --git a/x11/hot-babe/distinfo b/x11/hot-babe/distinfo index 58d2aac97fe..de8d8297148 100644 --- a/x11/hot-babe/distinfo +++ b/x11/hot-babe/distinfo @@ -1,7 +1,7 @@ -$NetBSD: distinfo,v 1.5 2006/05/31 11:42:45 rillig Exp $ +$NetBSD: distinfo,v 1.6 2006/05/31 12:03:53 rillig Exp $ SHA1 (hot-babe-0.2.2.tar.gz) = 403a8f14322c5ca5187daed5050392468c114ec5 RMD160 (hot-babe-0.2.2.tar.gz) = 4981fdf346937d0a89f249dd967f7e33a32e05e0 Size (hot-babe-0.2.2.tar.gz) = 408991 bytes -SHA1 (patch-aa) = ecb2b043d7eb78ee532005d57010a1d372a62378 +SHA1 (patch-aa) = 109e842c1e32515eeb89158eec397ec7bf4ded2f SHA1 (patch-ab) = fc67f595280a8fdeb302ed91829c8973459cb6ad diff --git a/x11/hot-babe/patches/patch-aa b/x11/hot-babe/patches/patch-aa index bd2f8701890..62cf4ce0d40 100644 --- a/x11/hot-babe/patches/patch-aa +++ b/x11/hot-babe/patches/patch-aa @@ -1,13 +1,26 @@ -$NetBSD: patch-aa,v 1.4 2006/05/31 11:42:45 rillig Exp $ +$NetBSD: patch-aa,v 1.5 2006/05/31 12:03:53 rillig Exp $ --- hot-babe.c.orig 2004-12-05 23:59:38.000000000 +0100 -+++ hot-babe.c 2006-05-31 13:36:52.000000000 +0200 -@@ -68,20 +68,15 @@ typedef struct ++++ hot-babe.c 2006-05-31 13:55:39.481545673 +0200 +@@ -29,6 +29,12 @@ + #endif + #endif + ++#if defined(__sun) ++# include <inttypes.h> ++# include <sys/loadavg.h> ++# define u_int64_t uint64_t ++#endif ++ + /* x11 includes */ + #include <gdk/gdk.h> + #include <gdk/gdkx.h> +@@ -68,20 +74,15 @@ typedef struct HotBabeData bm; -#if 0 -+#if defined(__NetBSD__) ++#if defined(__NetBSD__) || defined(__sun) /* FIXME New BSD and Solaris code.. to check. * doesn't work with Linux (getloadavg return 1.000) */ static int system_cpu(void) @@ -23,14 +36,16 @@ $NetBSD: patch-aa,v 1.4 2006/05/31 11:42:45 rillig Exp $ + return ((getloadavg(&loadavg, 1) == -1) ? 0 : (100 * loadavg)); } -#endif -+#else ++#elif defined(__linux__) || defined(__FreeBSD__) /* returns current CPU load in percent, 0 to 256 */ static int system_cpu(void) -@@ -144,6 +139,7 @@ static int system_cpu(void) +@@ -144,6 +145,9 @@ static int system_cpu(void) return cpuload; } ++#else ++# error Unknown operating system. +#endif GdkPixmap *pixmap; |