diff options
author | rillig <rillig> | 2006-05-31 11:42:45 +0000 |
---|---|---|
committer | rillig <rillig> | 2006-05-31 11:42:45 +0000 |
commit | 7d8ca40dd3e9e3e29069fd793b36a7f2ee551b65 (patch) | |
tree | c24c55f387198d60f18319f6015e3f7dcab470b6 /x11/hot-babe/patches | |
parent | c59e00399ffd05aa19999eec3201b4376035aa59 (diff) | |
download | pkgsrc-7d8ca40dd3e9e3e29069fd793b36a7f2ee551b65.tar.gz |
Updated hot-babe to 0.2.2.
Changes since 0.1.2:
- Switched to gtk2
Diffstat (limited to 'x11/hot-babe/patches')
-rw-r--r-- | x11/hot-babe/patches/patch-aa | 52 | ||||
-rw-r--r-- | x11/hot-babe/patches/patch-ab | 60 |
2 files changed, 79 insertions, 33 deletions
diff --git a/x11/hot-babe/patches/patch-aa b/x11/hot-babe/patches/patch-aa index 821f37549cc..bd2f8701890 100644 --- a/x11/hot-babe/patches/patch-aa +++ b/x11/hot-babe/patches/patch-aa @@ -1,31 +1,37 @@ -$NetBSD: patch-aa,v 1.3 2004/03/29 22:44:29 snj Exp $ +$NetBSD: patch-aa,v 1.4 2006/05/31 11:42:45 rillig Exp $ ---- hot-babe.c.orig Sat Sep 21 16:53:24 2002 -+++ hot-babe.c -@@ -74,6 +74,18 @@ - /* returns current CPU load in percent, 0 to 256 */ +--- 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 + + HotBabeData bm; + +-#if 0 ++#if defined(__NetBSD__) + /* FIXME New BSD and Solaris code.. to check. + * doesn't work with Linux (getloadavg return 1.000) */ static int system_cpu(void) { -+#ifdef __NetBSD__ -+ double l; -+ int i; -+ if (getloadavg(&l, 1) < 0) -+ return 0; -+ i = (l - 0.5) * (256/4); -+ if (i < 0) -+ i = 0; -+ if (i > 256) -+ i = 256; -+ return i; +- int rc; +- double loadavg[15]; +- rc=getloadavg(loadavg, 1); +- while( rc-- ) +- printf( "load = %f\n", loadavg[rc] ); +- rc=100*loadavg[0]; +- return rc; ++ double loadavg; ++ return ((getloadavg(&loadavg, 1) == -1) ? 0 : (100 * loadavg)); + } +-#endif +#else - unsigned int cpuload; - u_int64_t load, total, oload, ototal; - u_int64_t ab, ac, ad, ae; -@@ -111,6 +123,7 @@ - cpuload = (256 * (load - oload)) / (total - ototal); + + /* returns current CPU load in percent, 0 to 256 */ + static int system_cpu(void) +@@ -144,6 +139,7 @@ static int system_cpu(void) return cpuload; -+#endif } ++#endif - + GdkPixmap *pixmap; + GdkGC *gc; diff --git a/x11/hot-babe/patches/patch-ab b/x11/hot-babe/patches/patch-ab index 7117fd52806..7b7e0382133 100644 --- a/x11/hot-babe/patches/patch-ab +++ b/x11/hot-babe/patches/patch-ab @@ -1,15 +1,55 @@ -$NetBSD: patch-ab,v 1.1.1.1 2002/10/24 18:57:05 hubertf Exp $ +$NetBSD: patch-ab,v 1.2 2006/05/31 11:42:45 rillig Exp $ ---- Makefile.orig Sat Sep 21 17:28:43 2002 -+++ Makefile -@@ -1,5 +1,4 @@ +--- Makefile.orig 2004-12-05 00:49:30.000000000 +0100 ++++ Makefile 2006-05-31 12:49:08.000000000 +0200 +@@ -1,13 +1,16 @@ # where to install this program --PREFIX = /usr/local - DESTDIR = ${PREFIX} +-PREFIX := /usr/local ++mandir= man ++sharedir= share/hot-babe ++docdir= share/doc/hot-babe ++pixmapdir= share/pixmaps ++ + VERSION := 0.2.2 # optimization cflags -@@ -21,3 +20,4 @@ + CFLAGS += -O2 -Wall -g `pkg-config gdk-2.0 gdk-pixbuf-2.0 --cflags` -DPREFIX=\"$(PREFIX)\" -DVERSION=\"$(VERSION)\" + + OBJS = hot-babe.o loader.o +-CC = gcc +-LIBS = `pkg-config gdk-2.0 gdk-pixbuf-2.0 --libs` ++LIBS += `pkg-config gdk-2.0 gdk-pixbuf-2.0 --libs` + + DOC = ChangeLog NEWS TODO LICENSE CONTRIBUTORS copyright config.example + +@@ -22,18 +25,18 @@ clean: install: - install -d $(DESTDIR)/bin - install $(INSTALL) hot-babe $(DESTDIR)/bin -+ install $(INSTALL) hot-babe.1 $(DESTDIR)/man/man1 + install -d $(DESTDIR)$(PREFIX)/bin + install -m 0755 hot-babe $(DESTDIR)$(PREFIX)/bin +- install -d $(DESTDIR)$(PREFIX)/share/hot-babe/hb01 +- install -m 0644 hb01/* $(DESTDIR)$(PREFIX)/share/hot-babe/hb01 +- install -d $(DESTDIR)$(PREFIX)/share/doc/hot-babe +- install -m 0644 $(DOC) $(DESTDIR)$(PREFIX)/share/doc/hot-babe +- install -d $(DESTDIR)$(PREFIX)/share/man/man1 +- install -m 0644 hot-babe.1 $(DESTDIR)$(PREFIX)/share/man/man1 +- install -d $(DESTDIR)$(PREFIX)/share/pixmaps +- install -m 0644 hot-babe.xpm $(DESTDIR)$(PREFIX)/share/pixmaps ++ install -d $(DESTDIR)$(PREFIX)/${sharedir}/hb01 ++ install -m 0644 hb01/* $(DESTDIR)$(PREFIX)/${sharedir}/hb01 ++ install -d $(DESTDIR)$(PREFIX)/${docdir} ++ install -m 0644 $(DOC) $(DESTDIR)$(PREFIX)/${docdir} ++ install -d $(DESTDIR)$(PREFIX)/${mandir}/man1 ++ install -m 0644 hot-babe.1 $(DESTDIR)$(PREFIX)/${mandir}/man1 ++ install -d $(DESTDIR)$(PREFIX)/${pixmapdir} ++ install -m 0644 hot-babe.xpm $(DESTDIR)$(PREFIX)/${pixmapdir} + + uninstall: + rm -f $(DESTDIR)$(PREFIX)/bin/hot-babe +- rm -rf $(DESTDIR)$(PREFIX)/share/hot-babe +- rm -rf $(DESTDIR)$(PREFIX)/share/doc/hot-babe +- rm -f $(DESTDIR)$(PREFIX)/share/man/man1/hot-babe.1 +- rm -f $(DESTDIR)$(PREFIX)/share/pixmaps/hot-babe.xpm ++ rm -rf $(DESTDIR)$(PREFIX)/${sharedir} ++ rm -rf $(DESTDIR)$(PREFIX)/${docdir} ++ rm -f $(DESTDIR)$(PREFIX)/${mandir}/man1/hot-babe.1 ++ rm -f $(DESTDIR)$(PREFIX)/${pixmapdir}/hot-babe.xpm |