From 8b2e018f1e8b262ee718383a4b76508bddf91439 Mon Sep 17 00:00:00 2001 From: alek Date: Sat, 25 Dec 2004 10:34:14 +0000 Subject: [PATCH] Import hot-babe 0.2.2 Hot-babe is a small graphical utility which displays the system activity in a very special way. From Jan Lindblom help and ok xsa@, mbalmer@ --- sysutils/hot-babe/Makefile | 29 +++++++++++ sysutils/hot-babe/distinfo | 3 ++ sysutils/hot-babe/patches/patch-Makefile | 50 ++++++++++++++++++ sysutils/hot-babe/patches/patch-hot-babe_c | 60 ++++++++++++++++++++++ sysutils/hot-babe/pkg/DESCR | 5 ++ sysutils/hot-babe/pkg/PLIST | 18 +++++++ 6 files changed, 165 insertions(+) create mode 100644 sysutils/hot-babe/Makefile create mode 100644 sysutils/hot-babe/distinfo create mode 100644 sysutils/hot-babe/patches/patch-Makefile create mode 100644 sysutils/hot-babe/patches/patch-hot-babe_c create mode 100644 sysutils/hot-babe/pkg/DESCR create mode 100644 sysutils/hot-babe/pkg/PLIST diff --git a/sysutils/hot-babe/Makefile b/sysutils/hot-babe/Makefile new file mode 100644 index 00000000000..7b92f80482d --- /dev/null +++ b/sysutils/hot-babe/Makefile @@ -0,0 +1,29 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2004/12/25 10:34:14 alek Exp $ + +COMMENT= "small utility which displays system activity." + +DISTNAME= hot-babe-0.2.2 +CATEGORIES= sysutils + +HOMEPAGE= http://dindinx.net/hotbabe/ + +MAINTAINER= Jan Lindblom + +# Artistic License +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes +WANTLIB= X11 Xcursor Xext Xft Xinerama Xrender c fontconfig freetype \ + glib-2.0.0.0 gmodule-2.0.0.0 gobject-2.0.0.0 iconv intl m \ + pango-1.0.0.0 pangox-1.0.0.0 pangoxft-1.0.0.0 + +MASTER_SITES= ${HOMEPAGE}/downloads/ + + +LIB_DEPENDS= gdk-x11-2.0.0.0,gdk_pixbuf-2.0.0.0::x11/gtk+2 +BUILD_DEPENDS= :pkgconfig-*:devel/pkgconfig + +NO_REGRESS= Yes + +.include diff --git a/sysutils/hot-babe/distinfo b/sysutils/hot-babe/distinfo new file mode 100644 index 00000000000..0429d5792f1 --- /dev/null +++ b/sysutils/hot-babe/distinfo @@ -0,0 +1,3 @@ +MD5 (hot-babe-0.2.2.tar.gz) = 70d50f5d22e3637a2f623d37e9a473ab +RMD160 (hot-babe-0.2.2.tar.gz) = 4981fdf346937d0a89f249dd967f7e33a32e05e0 +SHA1 (hot-babe-0.2.2.tar.gz) = 403a8f14322c5ca5187daed5050392468c114ec5 diff --git a/sysutils/hot-babe/patches/patch-Makefile b/sysutils/hot-babe/patches/patch-Makefile new file mode 100644 index 00000000000..91f3acb011f --- /dev/null +++ b/sysutils/hot-babe/patches/patch-Makefile @@ -0,0 +1,50 @@ +$OpenBSD: patch-Makefile,v 1.1.1.1 2004/12/25 10:34:14 alek Exp $ +--- Makefile.orig Sun Dec 5 00:49:30 2004 ++++ Makefile Fri Dec 24 20:03:09 2004 +@@ -1,15 +1,13 @@ + # where to install this program +-PREFIX := /usr/local + VERSION := 0.2.2 + + # optimization cflags +-CFLAGS += -O2 -Wall -g `pkg-config gdk-2.0 gdk-pixbuf-2.0 --cflags` -DPREFIX=\"$(PREFIX)\" -DVERSION=\"$(VERSION)\" ++CFLAGS += -O2 -Wall `pkg-config gdk-2.0 gdk-pixbuf-2.0 --cflags` -DPREFIX=\"$(LOCALBASE)\" -DVERSION=\"$(VERSION)\" + + OBJS = hot-babe.o loader.o +-CC = gcc + LIBS = `pkg-config gdk-2.0 gdk-pixbuf-2.0 --libs` + +-DOC = ChangeLog NEWS TODO LICENSE CONTRIBUTORS copyright config.example ++DOC = LICENSE copyright + + all: hot-babe + +@@ -20,16 +18,18 @@ clean: + rm -f hot-babe *.o + + install: +- 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 ++ $(BSD_INSTALL_PROGRAM_DIR) $(PREFIX)/bin ++ $(BSD_INSTALL_PROGRAM) hot-babe $(PREFIX)/bin ++ $(BSD_INSTALL_DATA_DIR) $(PREFIX)/share/hot-babe/hb01 ++ $(BSD_INSTALL_DATA) hb01/* $(PREFIX)/share/hot-babe/hb01 ++ $(BSD_INSTALL_DATA_DIR) $(PREFIX)/share/doc/hot-babe ++ $(BSD_INSTALL_DATA) $(DOC) $(PREFIX)/share/doc/hot-babe ++ $(BSD_INSTALL_DATA_DIR) $(PREFIX)/share/examples/hot-babe ++ $(BSD_INSTALL_DATA) config.example $(PREFIX)/share/examples/hot-babe ++ $(BSD_INSTALL_MAN_DIR) $(PREFIX)/man/man1 ++ $(BSD_INSTALL_MAN) hot-babe.1 $(PREFIX)/man/man1 ++ $(BSD_INSTALL_DATA_DIR) $(PREFIX)/share/pixmaps ++ $(BSD_INSTALL_DATA) hot-babe.xpm $(PREFIX)/share/pixmaps + + uninstall: + rm -f $(DESTDIR)$(PREFIX)/bin/hot-babe diff --git a/sysutils/hot-babe/patches/patch-hot-babe_c b/sysutils/hot-babe/patches/patch-hot-babe_c new file mode 100644 index 00000000000..91ab330f030 --- /dev/null +++ b/sysutils/hot-babe/patches/patch-hot-babe_c @@ -0,0 +1,60 @@ +$OpenBSD: patch-hot-babe_c,v 1.1.1.1 2004/12/25 10:34:14 alek Exp $ +--- hot-babe.c.orig Thu Dec 16 18:38:18 2004 ++++ hot-babe.c Thu Dec 16 18:42:12 2004 +@@ -19,6 +19,14 @@ + #include + #include + #include ++#ifdef __OpenBSD__ ++#include ++#include ++#include ++#include ++#include ++#include ++#endif + #ifdef __FreeBSD__ + #include + #include +@@ -99,6 +107,13 @@ static int system_cpu(void) + long cp_time[CPUSTATES]; + size_t len = sizeof(cp_time); + #endif ++#ifdef __OpenBSD__ ++ long load, total, oload, ototal; ++ long ab, ac, ad, ae, af; ++ long cp_time[CPUSTATES]; ++ size_t len = sizeof(cp_time); ++ static int mib[] = { CTL_KERN, KERN_CPTIME }; ++#endif + + #ifdef __linux__ + stat = fopen("/proc/stat", "r"); +@@ -114,6 +129,16 @@ static int system_cpu(void) + ad = cp_time[CP_SYS]; + ae = cp_time[CP_IDLE]; + #endif ++#ifdef __OpenBSD__ ++ if (sysctl(mib, 2, &cp_time, &len, NULL, 0) < 0) { ++ (void)fprintf(stderr, "Cannot get kern.cp_time"); ++ } ++ ab = cp_time[CP_USER]; ++ ac = cp_time[CP_NICE]; ++ ad = cp_time[CP_SYS]; ++ ae = cp_time[CP_IDLE]; ++ af = cp_time[CP_INTR]; ++#endif + + + /* Find out the CPU load */ +@@ -122,6 +147,10 @@ static int system_cpu(void) + load = ab + ad; /* cpu.user + cpu.sys; */ + if(!bm.noNice) load += ac; + total = ab + ac + ad + ae; /* cpu.total; */ ++#ifdef __OpenBSD__ ++ load += af; ++ total += af; ++#endif + + i = bm.loadIndex; + oload = bm.load[i]; diff --git a/sysutils/hot-babe/pkg/DESCR b/sysutils/hot-babe/pkg/DESCR new file mode 100644 index 00000000000..8265342560b --- /dev/null +++ b/sysutils/hot-babe/pkg/DESCR @@ -0,0 +1,5 @@ +Hot-babe is a small graphical utility which displays the system activity +in a very special way. When the CPU is idle, it displays a dressed girl, +and when the activity goes up, as the temperature increases, the girl +begins to undress, to finish totally naked when the system activity +reaches 100%. Of course, if you can be shocked by nudity, don't use it! diff --git a/sysutils/hot-babe/pkg/PLIST b/sysutils/hot-babe/pkg/PLIST new file mode 100644 index 00000000000..39705f72ae6 --- /dev/null +++ b/sysutils/hot-babe/pkg/PLIST @@ -0,0 +1,18 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2004/12/25 10:34:14 alek Exp $ +bin/hot-babe +@man man/man1/hot-babe.1 +share/doc/hot-babe/ +share/doc/hot-babe/LICENSE +share/doc/hot-babe/copyright +share/examples/hot-babe/ +share/examples/hot-babe/config.example +share/hot-babe/ +share/hot-babe/hb01/ +share/hot-babe/hb01/descr +share/hot-babe/hb01/hb01_0.png +share/hot-babe/hb01/hb01_1.png +share/hot-babe/hb01/hb01_2.png +share/hot-babe/hb01/hb01_3.png +share/hot-babe/hb01/hb01_4.png +share/pixmaps/ +share/pixmaps/hot-babe.xpm