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 <cl0wn@ludd.ltu.se> help and ok xsa@, mbalmer@
This commit is contained in:
parent
a2dd2daae1
commit
8b2e018f1e
29
sysutils/hot-babe/Makefile
Normal file
29
sysutils/hot-babe/Makefile
Normal file
@ -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 <cl0wn@ludd.ltu.se>
|
||||
|
||||
# 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 <bsd.port.mk>
|
3
sysutils/hot-babe/distinfo
Normal file
3
sysutils/hot-babe/distinfo
Normal file
@ -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
|
50
sysutils/hot-babe/patches/patch-Makefile
Normal file
50
sysutils/hot-babe/patches/patch-Makefile
Normal file
@ -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
|
60
sysutils/hot-babe/patches/patch-hot-babe_c
Normal file
60
sysutils/hot-babe/patches/patch-hot-babe_c
Normal file
@ -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 <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
+#ifdef __OpenBSD__
|
||||
+#include <sys/param.h>
|
||||
+#include <sys/sched.h>
|
||||
+#include <sys/sysctl.h>
|
||||
+#include <sys/dkstat.h>
|
||||
+#include <fcntl.h>
|
||||
+#include <nlist.h>
|
||||
+#endif
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
@@ -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];
|
5
sysutils/hot-babe/pkg/DESCR
Normal file
5
sysutils/hot-babe/pkg/DESCR
Normal file
@ -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!
|
18
sysutils/hot-babe/pkg/PLIST
Normal file
18
sysutils/hot-babe/pkg/PLIST
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user