ports/73621: [ new port ] deskutils/hot-babe: utility which displays the system activity in a special way
Roman Bogorodskiy
bogorodskiy at inbox.ru
Sat Nov 6 17:50:33 UTC 2004
>Number: 73621
>Category: ports
>Synopsis: [ new port ] deskutils/hot-babe: utility which displays the system activity in a special way
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sat Nov 06 17:50:22 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator: Roman Bogorodskiy
>Release: FreeBSD 5.3-BETA7 i386
>Organization:
>Environment:
System: FreeBSD lame.novel.ru 5.3-BETA7 FreeBSD 5.3-BETA7 #12: Sat Oct 16 20:09:15 MSD 2004 root at lame.novel.ru:/usr/obj/usr/home/novel/current/src/sys/NOVEL i386
>Description:
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!
WWW: http://dindinx.net/hotbabe/
>How-To-Repeat:
>Fix:
--- port.hot-babe.new begins here ---
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# hot-babe
# hot-babe/pkg-descr
# hot-babe/Makefile
# hot-babe/pkg-plist
# hot-babe/distinfo
# hot-babe/files
# hot-babe/files/patch-hot-babe.c
# hot-babe/files/patch-Makefile
#
echo c - hot-babe
mkdir -p hot-babe > /dev/null 2>&1
echo x - hot-babe/pkg-descr
sed 's/^X//' >hot-babe/pkg-descr << 'END-of-hot-babe/pkg-descr'
XHot-babe is a small graphical utility which displays the system activity in a
Xvery special way. When the CPU is idle, it displays a dressed girl, and when
Xthe activity goes up, as the temperature increases, the girl begins to
Xundress, to finish totally naked when the system activity reaches 100%. Of
Xcourse, if you can be shocked by nudity, don't use it!
X
XWWW: http://dindinx.net/hotbabe/
END-of-hot-babe/pkg-descr
echo x - hot-babe/Makefile
sed 's/^X//' >hot-babe/Makefile << 'END-of-hot-babe/Makefile'
X# New ports collection makefile for: hot-babe
X# Date created: 2004-11-06
X# Whom: Roman Bogorodskiy <bogorodskiy at inbox.ru>
X#
X# $FreeBSD$
X#
X
XPORTNAME= hot-babe
XPORTVERSION= 0.1.4
XCATEGORIES= deskutils
XMASTER_SITES= http://dindinx.net/hotbabe/downloads/
X
XMAINTAINER= bogorodskiy at inbox.ru
XCOMMENT= Small utility which displays the system activity in a very special way
X
XUSE_BZIP2= yes
XUSE_X_PREFIX= yes
XMAKE_ARGS+= PREFIX="${PREFIX}" CC="${CC}"
XUSE_GNOME= gtk12
X
Xpre-everything::
X @${ECHO_MSG}
X @${ECHO_MSG} "Warning! This port contains some adults only content."
X @${ECHO_MSG} "You might hit Ctrl-C to abort."
X @${ECHO_MSG}
X
X.include <bsd.port.mk>
END-of-hot-babe/Makefile
echo x - hot-babe/pkg-plist
sed 's/^X//' >hot-babe/pkg-plist << 'END-of-hot-babe/pkg-plist'
Xbin/hot-babe
X%%DATADIR%%/hb01/descr
X%%DATADIR%%/hb01/hb01_0.png
X%%DATADIR%%/hb01/hb01_1.png
X%%DATADIR%%/hb01/hb01_2.png
X%%DATADIR%%/hb01/hb01_3.png
X%%DATADIR%%/hb01/hb01_4.png
X at dirrm %%DATADIR%%/hb01
X at dirrm %%DATADIR%%
END-of-hot-babe/pkg-plist
echo x - hot-babe/distinfo
sed 's/^X//' >hot-babe/distinfo << 'END-of-hot-babe/distinfo'
XMD5 (hot-babe-0.1.4.tar.bz2) = 5565012a784802debe38972188506a85
XSIZE (hot-babe-0.1.4.tar.bz2) = 401456
END-of-hot-babe/distinfo
echo c - hot-babe/files
mkdir -p hot-babe/files > /dev/null 2>&1
echo x - hot-babe/files/patch-hot-babe.c
sed 's/^X//' >hot-babe/files/patch-hot-babe.c << 'END-of-hot-babe/files/patch-hot-babe.c'
X--- hot-babe.c.orig Wed Aug 25 18:20:50 2004
X+++ hot-babe.c Thu Sep 23 15:03:16 2004
X@@ -26,6 +26,11 @@
X #include <unistd.h>
X #include <stdlib.h>
X #include <string.h>
X+#ifdef __FreeBSD__
X+#include <sys/resource.h>
X+#include <sys/types.h>
X+#include <sys/sysctl.h>
X+#endif
X
X /* x11 includes */
X #include <gdk/gdk.h>
X@@ -69,14 +74,34 @@
X static int system_cpu(void)
X {
X unsigned int cpuload;
X+ int i;
X+#ifdef __linux__
X u_int64_t load, total, oload, ototal;
X u_int64_t ab, ac, ad, ae;
X- int i;
X FILE *stat;
X+#endif
X+#ifdef __FreeBSD__
X+ long load, total, oload, ototal;
X+ long ab, ac, ad, ae;
X+ long cp_time[CPUSTATES];
X+ size_t len = sizeof(cp_time);
X+#endif
X
X+#ifdef __linux__
X stat = fopen("/proc/stat", "r");
X fscanf(stat, "%*s %Ld %Ld %Ld %Ld", &ab, &ac, &ad, &ae);
X fclose(stat);
X+#endif
X+#ifdef __FreeBSD__
X+ if (sysctlbyname("kern.cp_time", &cp_time, &len, NULL, 0) < 0)
X+ (void)fprintf(stderr, "Cannot get kern.cp_time");
X+
X+ ab = cp_time[CP_USER];
X+ ac = cp_time[CP_NICE];
X+ ad = cp_time[CP_SYS];
X+ ae = cp_time[CP_IDLE];
X+#endif
X+
X
X /* Find out the CPU load */
X /* user + sys = load
X@@ -103,7 +128,7 @@
X cpuload = 0;
X else
X cpuload = (256 * (load - oload)) / (total - ototal);
X-
X+
X return cpuload;
X }
X
END-of-hot-babe/files/patch-hot-babe.c
echo x - hot-babe/files/patch-Makefile
sed 's/^X//' >hot-babe/files/patch-Makefile << 'END-of-hot-babe/files/patch-Makefile'
X--- Makefile.orig Wed Aug 25 17:55:52 2004
X+++ Makefile Sat Nov 6 20:24:29 2004
X@@ -3,11 +3,11 @@
X DESTDIR = ${PREFIX}
X
X # optimization cflags
X-CFLAGS = -O2 -Wall -g `gtk-config --cflags` `gdk-pixbuf-config --cflags` -DDESTDIR=\"$(DESTDIR)\"
X+CFLAGS += `gtk-config --cflags` `gdk-pixbuf-config --cflags` -DDESTDIR=\"$(DESTDIR)\"
X
X OBJS = hot-babe.o loader.o
X CC = gcc
X-LIBS = `gtk-config --libs | sed "s/-lgtk//g"` `gdk-pixbuf-config --libs`
X+LIBS = `gtk-config --libs` `gdk-pixbuf-config --libs`
X INSTALL = -m 755
X
X all: hot-babe
END-of-hot-babe/files/patch-Makefile
exit
--- port.hot-babe.new ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list