pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/hot-babe Made hot-babe work on Solaris.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a8294e6e91c5
branches:  trunk
changeset: 513575:a8294e6e91c5
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Wed May 31 12:03:53 2006 +0000

description:
Made hot-babe work on Solaris.

diffstat:

 x11/hot-babe/distinfo         |   4 ++--
 x11/hot-babe/patches/patch-aa |  27 +++++++++++++++++++++------
 2 files changed, 23 insertions(+), 8 deletions(-)

diffs (66 lines):

diff -r ec7a9cefee4b -r a8294e6e91c5 x11/hot-babe/distinfo
--- a/x11/hot-babe/distinfo     Wed May 31 11:44:07 2006 +0000
+++ b/x11/hot-babe/distinfo     Wed May 31 12:03:53 2006 +0000
@@ -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 -r ec7a9cefee4b -r a8294e6e91c5 x11/hot-babe/patches/patch-aa
--- a/x11/hot-babe/patches/patch-aa     Wed May 31 11:44:07 2006 +0000
+++ b/x11/hot-babe/patches/patch-aa     Wed May 31 12:03:53 2006 +0000
@@ -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 @@
 +  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;



Home | Main Index | Thread Index | Old Index