diff options
author | ahoka <ahoka@pkgsrc.org> | 2009-07-20 14:06:02 +0000 |
---|---|---|
committer | ahoka <ahoka@pkgsrc.org> | 2009-07-20 14:06:02 +0000 |
commit | 58f9b268f26a98954a6ec546e0145e63f2e75fa9 (patch) | |
tree | 5aad243d7ed31e7b679460c6559e3b1a76f9cc2f /sysutils | |
parent | e31ebe88be2d637b598dce78ad4acf85aeca55d2 (diff) | |
download | pkgsrc-58f9b268f26a98954a6ec546e0145e63f2e75fa9.tar.gz |
Import bubblemon-1.46 as sysutils/bubblemon.
A system monitoring dockapp, visually based on the GNOME "BubbleMon"
applet. Features a duck and bubbles, water level depending on memory use.
Contributed by Gabor Gergely in private mail.
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/bubblemon/DESCR | 2 | ||||
-rw-r--r-- | sysutils/bubblemon/Makefile | 21 | ||||
-rw-r--r-- | sysutils/bubblemon/PLIST | 2 | ||||
-rw-r--r-- | sysutils/bubblemon/distinfo | 8 | ||||
-rw-r--r-- | sysutils/bubblemon/patches/patch-gtk2 | 87 | ||||
-rw-r--r-- | sysutils/bubblemon/patches/patch-make | 64 | ||||
-rw-r--r-- | sysutils/bubblemon/patches/patch-uvm | 34 |
7 files changed, 218 insertions, 0 deletions
diff --git a/sysutils/bubblemon/DESCR b/sysutils/bubblemon/DESCR new file mode 100644 index 00000000000..f26829d9173 --- /dev/null +++ b/sysutils/bubblemon/DESCR @@ -0,0 +1,2 @@ +A system monitoring dockapp, visually based on the GNOME "BubbleMon" +applet. Features a duck and bubbles, water level depending on memory use. diff --git a/sysutils/bubblemon/Makefile b/sysutils/bubblemon/Makefile new file mode 100644 index 00000000000..39008288b1a --- /dev/null +++ b/sysutils/bubblemon/Makefile @@ -0,0 +1,21 @@ +# $NetBSD: Makefile,v 1.1.1.1 2009/07/20 14:06:02 ahoka Exp $ +# + +DISTNAME= bubblemon-dockapp-1.46 +PKGNAME= ${DISTNAME:S/-dockapp//} +CATEGORIES= sysutils +MASTER_SITES= http://www.ne.jp/asahi/linux/timecop/software/ + +PKG_DESTDIR_SUPPORT= user-destdir + +MAINTAINER= ahoka@NetBSD.org +HOMEPAGE= http://www.ne.jp/asahi/linux/timecop/ +COMMENT= Small windowmaker dockapp with bubbles and a duck +LICENSE= gnu-gpl-v2 + +USE_TOOLS+= gmake pkg-config + +INSTALLATION_DIRS+= bin + +.include "../../x11/gtk2/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/sysutils/bubblemon/PLIST b/sysutils/bubblemon/PLIST new file mode 100644 index 00000000000..2032ef5c5e2 --- /dev/null +++ b/sysutils/bubblemon/PLIST @@ -0,0 +1,2 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2009/07/20 14:06:02 ahoka Exp $ +bin/bubblemon diff --git a/sysutils/bubblemon/distinfo b/sysutils/bubblemon/distinfo new file mode 100644 index 00000000000..27f6372b609 --- /dev/null +++ b/sysutils/bubblemon/distinfo @@ -0,0 +1,8 @@ +$NetBSD: distinfo,v 1.1.1.1 2009/07/20 14:06:02 ahoka Exp $ + +SHA1 (bubblemon-dockapp-1.46.tar.gz) = 172de9ea7d78e4578143469187a72da8f836647a +RMD160 (bubblemon-dockapp-1.46.tar.gz) = 79e8be36cd11a2c6f4998cd747b6125696603a81 +Size (bubblemon-dockapp-1.46.tar.gz) = 40001 bytes +SHA1 (patch-gtk2) = 70d4875dcf82dd50362275ddb2902a9d31444d03 +SHA1 (patch-make) = df95f404612a88ff6b3449ad5476a5e188786435 +SHA1 (patch-uvm) = 580451d5c75dc8d164a65652f0b4e5ae09689160 diff --git a/sysutils/bubblemon/patches/patch-gtk2 b/sysutils/bubblemon/patches/patch-gtk2 new file mode 100644 index 00000000000..e70db5eeae8 --- /dev/null +++ b/sysutils/bubblemon/patches/patch-gtk2 @@ -0,0 +1,87 @@ +$NetBSD: patch-gtk2,v 1.1.1.1 2009/07/20 14:06:02 ahoka Exp $ + +--- bubblemon.c.orig 2003-10-01 02:37:32.000000000 +0200 ++++ bubblemon.c +@@ -44,7 +44,7 @@ + */ + #define _GNU_SOURCE + +-#define VERSION "1.41" ++#define VERSION "1.42" + + /* general includes */ + #include <stdio.h> +@@ -575,7 +575,7 @@ static void make_new_bubblemon_dockapp(v + attri.colormap = gdk_colormap_get_system(); + attri.wmclass_name = "bubblemon"; + attri.wmclass_class = "bubblemon"; +- attri.window_type = GDK_WINDOW_TOPLEVEL; ++ attri.window_type = GDK_WINDOW_CHILD; + + bm.iconwin = gdk_window_new(bm.win, &attri, + GDK_WA_TITLE | GDK_WA_WMCLASS); +@@ -593,7 +593,6 @@ static void make_new_bubblemon_dockapp(v + wmhints.window_group = win; + wmhints.flags = + StateHint | IconWindowHint | IconPositionHint | WindowGroupHint; +- XSetWMHints(GDK_WINDOW_XDISPLAY(bm.win), win, &wmhints); + + bm.gc = gdk_gc_new(bm.win); + +@@ -611,6 +610,8 @@ static void make_new_bubblemon_dockapp(v + gdk_window_show(bm.iconwin); + #endif + ++ XSetWMHints(GDK_WINDOW_XDISPLAY(bm.win), win, &wmhints); ++ + /* We begin with zero bubbles */ + bm.n_bubbles = 0; + +@@ -664,7 +665,7 @@ static void bubblemon_update(int proximi + /* y coordinates are counted from here multiplied by 256 */ + /* to get actual screen coordinate, divide by 256 */ + buf = bm.bubblebuf; +- col = bm.colors; ++ col = (unsigned int *)bm.colors; + + waterlevel_max = 0; + waterlevel_min = MAKEY(56); +@@ -957,7 +958,7 @@ static void bubblemon_update(int proximi + static void draw_digit(int srcx, int srcy, int destx, int desty) + { + int i, j; +- char *from, *to; ++ unsigned char *from, *to; + + for (j = 0; j < 8; j++) { + from = mem_screen + 56 * 3 * (srcy + j) + srcx * 3; +@@ -1005,7 +1006,7 @@ static void draw_history(int num, int si + { + int pixels_per_byte; + int j, k; +- int *p; ++ unsigned int *p; + int d; + + pixels_per_byte = 100; +@@ -1024,9 +1025,9 @@ static void draw_history(int num, int si + + for (j = 0; j < size; j++) { + if (j < d - 2) +- draw_pixel(k, size - j - 1, buf, "\x00\x7d\x71"); ++ draw_pixel(k, size - j - 1, buf, (unsigned char *) "\x00\x7d\x71"); + else if (j < d) +- draw_pixel(k, size - j - 1, buf, "\x20\xb6\xae"); ++ draw_pixel(k, size - j - 1, buf, (unsigned char *) "\x20\xb6\xae"); + } + p++; + } +@@ -1034,7 +1035,7 @@ static void draw_history(int num, int si + for (j = pixels_per_byte - 100; j > 0; j -= 100) { + for (k = 0; k < num; k++) { + d = ((float) size / pixels_per_byte) * j; +- draw_pixel(k, size - d - 1, buf, "\x71\xe3\x71"); ++ draw_pixel(k, size - d - 1, buf, (unsigned char *) "\x71\xe3\x71"); + } + } + } diff --git a/sysutils/bubblemon/patches/patch-make b/sysutils/bubblemon/patches/patch-make new file mode 100644 index 00000000000..3ba7beb9b64 --- /dev/null +++ b/sysutils/bubblemon/patches/patch-make @@ -0,0 +1,64 @@ +$NetBSD: patch-make,v 1.1.1.1 2009/07/20 14:06:02 ahoka Exp $ + +--- Makefile.orig 2003-10-04 02:22:07.000000000 +0200 ++++ Makefile +@@ -7,12 +7,12 @@ EXTRA += -DKERNEL_26 + # EXTRA += -DUPSIDE_DOWN_DUCK + + # where to install this program +-PREFIX = /usr/local ++PREFIX ?= /usr/local + + # no user serviceable parts below + EXTRA += $(WMAN) + # optimization cflags +-CFLAGS = -O3 -ansi -Wall `gtk-config --cflags` ${EXTRA} ++CFLAGS = -O2 -ansi -Wall $(shell pkg-config --cflags gtk+-2.0) $(EXTRA) + # profiling cflags + # CFLAGS = -ansi -Wall -pg -O3 `gtk-config --cflags` ${EXTRA} -DPRO + # test coverage cflags +@@ -22,28 +22,34 @@ CFLAGS = -O3 -ansi -Wall `gtk-config --c + SHELL=sh + OS = $(shell uname -s) + OBJS = bubblemon.o +-CC = gcc ++CC ?= gcc ++ ++LIBS = $(shell pkg-config --libs gtk+-2.0) + + # special things for Linux + ifeq ($(OS), Linux) + OBJS += sys_linux.o +- LIBS = `gtk-config --libs | sed "s/-lgtk//g"` + INSTALL = -m 755 + endif + + # special things for FreeBSD + ifeq ($(OS), FreeBSD) + OBJS += sys_freebsd.o +- LIBS = `gtk-config --libs | sed "s/-lgtk//g"` -lkvm ++ LIBS += -lkvm + INSTALL = -c -g kmem -m 2755 -o root + endif + + # special things for OpenBSD + ifeq ($(OS), OpenBSD) + OBJS += sys_openbsd.o +- LIBS = `gtk-config --libs | sed "s/-lgtk//g"` + endif + ++# special things for NetBSD ++ifeq ($(OS), NetBSD) ++ OBJS += sys_netbsd.o ++endif ++ ++ + #special things for SunOS + ifeq ($(OS), SunOS) + +@@ -78,4 +84,4 @@ clean: + rm -f bubblemon *.o *.bb* *.gcov gmon.* *.da *~ + + install: +- install $(INSTALL) bubblemon $(PREFIX)/bin ++ install $(INSTALL) bubblemon $(DESTDIR)$(PREFIX)/bin diff --git a/sysutils/bubblemon/patches/patch-uvm b/sysutils/bubblemon/patches/patch-uvm new file mode 100644 index 00000000000..36eed754b58 --- /dev/null +++ b/sysutils/bubblemon/patches/patch-uvm @@ -0,0 +1,34 @@ +$NetBSD: patch-uvm,v 1.1.1.1 2009/07/20 14:06:02 ahoka Exp $ + +--- sys_netbsd.c.orig 2003-10-11 21:06:09.000000000 +0200 ++++ sys_netbsd.c +@@ -78,9 +78,9 @@ int system_cpu(void) + int system_memory(void) + { + #define pagetob(size) ((size) << (uvmexp.pageshift)) +- struct uvmexp uvmexp; ++ struct uvmexp_sysctl uvmexp; + int nswap, rnswap, i; +- int mib[] = { CTL_VM, VM_UVMEXP }; ++ int mib[] = { CTL_VM, VM_UVMEXP2 }; + size_t size = sizeof (uvmexp); + + if (sysctl(mib, 2, &uvmexp, &size, NULL, 0) < 0) +@@ -91,12 +91,13 @@ int system_memory(void) + bm.swap_used = 0; + bm.swap_max = 0; + if ((nswap = swapctl(SWAP_NSWAP, 0, 0)) != 0) { +- struct swapent *swdev = malloc(nswap * sizeof(*swdev)); +- if((rnswap = swapctl(SWAP_STATS, swdev, nswap)) != nswap) { ++ struct swapent *swdev = malloc(nswap * sizeof(swdev)); ++ if((rnswap = swapctl(SWAP_STATS, swdev, nswap)) == nswap) { + for (i = 0; i < nswap; i++) { + if (swdev[i].se_flags & SWF_ENABLE) { +- bm.swap_used += (swdev[i].se_inuse / (1024 / DEV_BSIZE)); +- bm.swap_max += (swdev[i].se_nblks / (1024 / DEV_BSIZE)); ++ /* actually, these are expected in bytes */ ++ bm.swap_used += (swdev[i].se_inuse * DEV_BSIZE); ++ bm.swap_max += (swdev[i].se_nblks * DEV_BSIZE); + } + } + } |