diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2004-11-06 18:49:39 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2004-11-06 18:49:39 +0000 |
commit | 494c10fac92c006b832cf1ff536ede86a4cbca19 (patch) | |
tree | e924b77683c0a90e02bf42ebcece946cc08f31e5 /deskutils/hot-babe | |
parent | df605da1e9e66113b9436235e2ee4b13c602b875 (diff) | |
download | ports-494c10fac92c006b832cf1ff536ede86a4cbca19.tar.gz ports-494c10fac92c006b832cf1ff536ede86a4cbca19.zip |
Notes
Diffstat (limited to 'deskutils/hot-babe')
-rw-r--r-- | deskutils/hot-babe/Makefile | 27 | ||||
-rw-r--r-- | deskutils/hot-babe/distinfo | 2 | ||||
-rw-r--r-- | deskutils/hot-babe/files/patch-Makefile | 16 | ||||
-rw-r--r-- | deskutils/hot-babe/files/patch-hot-babe.c | 61 | ||||
-rw-r--r-- | deskutils/hot-babe/pkg-descr | 7 | ||||
-rw-r--r-- | deskutils/hot-babe/pkg-plist | 9 |
6 files changed, 122 insertions, 0 deletions
diff --git a/deskutils/hot-babe/Makefile b/deskutils/hot-babe/Makefile new file mode 100644 index 000000000000..e4dc679a3fd3 --- /dev/null +++ b/deskutils/hot-babe/Makefile @@ -0,0 +1,27 @@ +# New ports collection makefile for: hot-babe +# Date created: 2004-11-06 +# Whom: Roman Bogorodskiy <bogorodskiy@inbox.ru> +# +# $FreeBSD$ +# + +PORTNAME= hot-babe +PORTVERSION= 0.1.4 +CATEGORIES= deskutils +MASTER_SITES= http://dindinx.net/hotbabe/downloads/ + +MAINTAINER= bogorodskiy@inbox.ru +COMMENT= Small utility which displays the system activity in a very special way + +USE_BZIP2= yes +USE_X_PREFIX= yes +MAKE_ARGS+= PREFIX="${PREFIX}" CC="${CC}" +USE_GNOME= gdkpixbuf + +pre-everything:: + @${ECHO_MSG} + @${ECHO_MSG} "Warning! This port contains some adults only content." + @${ECHO_MSG} "You might hit Ctrl-C to abort." + @${ECHO_MSG} + +.include <bsd.port.mk> diff --git a/deskutils/hot-babe/distinfo b/deskutils/hot-babe/distinfo new file mode 100644 index 000000000000..31ab12036796 --- /dev/null +++ b/deskutils/hot-babe/distinfo @@ -0,0 +1,2 @@ +MD5 (hot-babe-0.1.4.tar.bz2) = 5565012a784802debe38972188506a85 +SIZE (hot-babe-0.1.4.tar.bz2) = 401456 diff --git a/deskutils/hot-babe/files/patch-Makefile b/deskutils/hot-babe/files/patch-Makefile new file mode 100644 index 000000000000..556c17b7da74 --- /dev/null +++ b/deskutils/hot-babe/files/patch-Makefile @@ -0,0 +1,16 @@ +--- Makefile.orig Wed Aug 25 17:55:52 2004 ++++ Makefile Sat Nov 6 20:24:29 2004 +@@ -3,11 +3,11 @@ + DESTDIR = ${PREFIX} + + # optimization cflags +-CFLAGS = -O2 -Wall -g `gtk-config --cflags` `gdk-pixbuf-config --cflags` -DDESTDIR=\"$(DESTDIR)\" ++CFLAGS += `gtk-config --cflags` `gdk-pixbuf-config --cflags` -DDESTDIR=\"$(DESTDIR)\" + + OBJS = hot-babe.o loader.o + CC = gcc +-LIBS = `gtk-config --libs | sed "s/-lgtk//g"` `gdk-pixbuf-config --libs` ++LIBS = `gtk-config --libs` `gdk-pixbuf-config --libs` + INSTALL = -m 755 + + all: hot-babe diff --git a/deskutils/hot-babe/files/patch-hot-babe.c b/deskutils/hot-babe/files/patch-hot-babe.c new file mode 100644 index 000000000000..3f3966486566 --- /dev/null +++ b/deskutils/hot-babe/files/patch-hot-babe.c @@ -0,0 +1,61 @@ +--- hot-babe.c.orig Wed Aug 25 16:20:50 2004 ++++ hot-babe.c Sat Nov 6 19:41:41 2004 +@@ -26,6 +26,13 @@ + #include <unistd.h> + #include <stdlib.h> + #include <string.h> ++#ifdef __FreeBSD__ ++#include <sys/time.h> ++#include <sys/resource.h> ++#include <sys/types.h> ++#include <sys/sysctl.h> ++#include <sys/dkstat.h> ++#endif + + /* x11 includes */ + #include <gdk/gdk.h> +@@ -69,14 +76,34 @@ + static int system_cpu(void) + { + unsigned int cpuload; ++ int i; ++#ifdef __linux__ + u_int64_t load, total, oload, ototal; + u_int64_t ab, ac, ad, ae; +- int i; + FILE *stat; ++#endif ++#ifdef __FreeBSD__ ++ long load, total, oload, ototal; ++ long ab, ac, ad, ae; ++ long cp_time[CPUSTATES]; ++ size_t len = sizeof(cp_time); ++#endif + ++#ifdef __linux__ + stat = fopen("/proc/stat", "r"); + fscanf(stat, "%*s %Ld %Ld %Ld %Ld", &ab, &ac, &ad, &ae); + fclose(stat); ++#endif ++#ifdef __FreeBSD__ ++ if (sysctlbyname("kern.cp_time", &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]; ++#endif ++ + + /* Find out the CPU load */ + /* user + sys = load +@@ -103,7 +130,7 @@ + cpuload = 0; + else + cpuload = (256 * (load - oload)) / (total - ototal); +- ++ + return cpuload; + } + diff --git a/deskutils/hot-babe/pkg-descr b/deskutils/hot-babe/pkg-descr new file mode 100644 index 000000000000..d03711a17547 --- /dev/null +++ b/deskutils/hot-babe/pkg-descr @@ -0,0 +1,7 @@ +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/ diff --git a/deskutils/hot-babe/pkg-plist b/deskutils/hot-babe/pkg-plist new file mode 100644 index 000000000000..7cec858670af --- /dev/null +++ b/deskutils/hot-babe/pkg-plist @@ -0,0 +1,9 @@ +bin/hot-babe +%%DATADIR%%/hb01/descr +%%DATADIR%%/hb01/hb01_0.png +%%DATADIR%%/hb01/hb01_1.png +%%DATADIR%%/hb01/hb01_2.png +%%DATADIR%%/hb01/hb01_3.png +%%DATADIR%%/hb01/hb01_4.png +@dirrm %%DATADIR%%/hb01 +@dirrm %%DATADIR%% |