Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

2
sysutils/bubblemon/DESCR Normal file
View File

@@ -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.

View File

@@ -0,0 +1,20 @@
# $NetBSD: Makefile,v 1.22 2013/06/06 12:55:02 wiz Exp $
#
DISTNAME= bubblemon-dockapp-1.46
PKGNAME= ${DISTNAME:S/-dockapp//}
PKGREVISION= 19
CATEGORIES= sysutils
MASTER_SITES= http://www.ne.jp/asahi/linux/timecop/software/
MAINTAINER= pkgsrc-users@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"

2
sysutils/bubblemon/PLIST Normal file
View File

@@ -0,0 +1,2 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2009/07/20 14:06:02 ahoka Exp $
bin/bubblemon

View File

@@ -0,0 +1,9 @@
$NetBSD: distinfo,v 1.4 2013/01/15 15:30:56 joerg 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-gtk2-api-change) = 03cefe092460f6be846fce91c9281895d2b43ad3
SHA1 (patch-make) = 1e1c7036cc897849f596ed3db66fd74ee502dffc
SHA1 (patch-uvm) = 90335207909cb0f35ea08ef7c8cf64704e282b03

View File

@@ -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");
}
}
}

View File

@@ -0,0 +1,24 @@
$NetBSD: patch-gtk2-api-change,v 1.1 2010/06/14 19:21:06 gdt Exp $
--- bubblemon.c.orig 2010-05-30 08:26:17.000000000 +0000
+++ bubblemon.c
@@ -275,6 +275,8 @@ static void print_usage(void)
int main(int argc, char **argv)
{
+ /* hack borrowed from gentoo, to make info windows also work */
+ setenv("GDK_NATIVE_WINDOWS", "1", 0);
char execute[256];
int proximity = 0;
int ch;
@@ -605,10 +607,7 @@ static void make_new_bubblemon_dockapp(v
gdk_window_set_back_pixmap(bm.iconwin, bm.pixmap, False);
gdk_window_show(bm.win);
-#ifdef KDE_DOCKAPP
- /* makes the dockapp visible inside KDE wm */
gdk_window_show(bm.iconwin);
-#endif
XSetWMHints(GDK_WINDOW_XDISPLAY(bm.win), win, &wmhints);

View File

@@ -0,0 +1,76 @@
$NetBSD: patch-make,v 1.2 2012/03/07 20:38:54 hans 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)
@@ -62,9 +68,9 @@ ifeq ($(OS), SunOS)
ifeq ($(COMPILER), gcc)
CFLAGS=-O3 -Wall
endif
- CFLAGS +=`gtk-config --cflags` ${EXTRA}
+ CFLAGS +=`pkg-config --cflags gtk+-2.0` ${EXTRA}
OBJS += sys_sunos.o
- LIBS = `gtk-config --libs` -lkstat -lm
+ LIBS = `pkg-config --libs gtk+-2.0` -lkstat -lm -lX11
INSTALL = -m 755
endif
@@ -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

View File

@@ -0,0 +1,42 @@
$NetBSD: patch-uvm,v 1.2 2013/01/15 15:30:56 joerg Exp $
--- sys_netbsd.c.orig 2003-10-11 19:06:09.000000000 +0000
+++ sys_netbsd.c
@@ -25,7 +25,6 @@
#include <sys/resource.h>
#include <sys/sched.h>
-#include <uvm/uvm_object.h>
#include <uvm/uvm_extern.h>
#include <sys/swap.h>
@@ -78,9 +77,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 +90,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);
}
}
}