diff options
author | Volker Stolz <vs@FreeBSD.org> | 2004-11-24 17:11:28 +0000 |
---|---|---|
committer | Volker Stolz <vs@FreeBSD.org> | 2004-11-24 17:11:28 +0000 |
commit | a16d36a28b8e0b4d620cbf5b22a45bc4aa9738a0 (patch) | |
tree | 545a2faaa2a19c0774298ba88913a124e7e3ed5c /deskutils/hot-babe | |
parent | 8af92e9868b66bd285201fbdaac296ac6b022fcc (diff) | |
download | ports-a16d36a28b8e0b4d620cbf5b22a45bc4aa9738a0.tar.gz ports-a16d36a28b8e0b4d620cbf5b22a45bc4aa9738a0.zip |
Notes
Diffstat (limited to 'deskutils/hot-babe')
-rw-r--r-- | deskutils/hot-babe/Makefile | 13 | ||||
-rw-r--r-- | deskutils/hot-babe/distinfo | 4 | ||||
-rw-r--r-- | deskutils/hot-babe/files/patch-Makefile | 22 | ||||
-rw-r--r-- | deskutils/hot-babe/files/patch-hot-babe.c | 63 |
4 files changed, 35 insertions, 67 deletions
diff --git a/deskutils/hot-babe/Makefile b/deskutils/hot-babe/Makefile index 7d2426fe6abe..c9e4fd1c17f4 100644 --- a/deskutils/hot-babe/Makefile +++ b/deskutils/hot-babe/Makefile @@ -6,8 +6,7 @@ # PORTNAME= hot-babe -PORTVERSION= 0.1.4 -PORTREVISION= 1 +PORTVERSION= 0.2.0 CATEGORIES= deskutils MASTER_SITES= http://dindinx.net/hotbabe/downloads/ @@ -17,11 +16,13 @@ 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 +USE_GNOME= gtk20 USE_REINPLACE= yes MAN1= hot-babe.1 +PORTDOCS= ChangeLog NEWS TODO LICENSE CONTRIBUTORS copyright + pre-everything:: @${ECHO_MSG} @${ECHO_MSG} "Warning! This port contains some adults only content." @@ -34,5 +35,11 @@ post-patch: post-install: ${INSTALL_MAN} ${WRKSRC}/hot-babe.1 ${PREFIX}/man/man1 +.ifndef (NOPORTDOCS) + @${MKDIR} ${DOCSDIR} +.for i in ${PORTDOCS} + @${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR} +.endfor +.endif .include <bsd.port.mk> diff --git a/deskutils/hot-babe/distinfo b/deskutils/hot-babe/distinfo index 31ab12036796..e5d8ec6bd171 100644 --- a/deskutils/hot-babe/distinfo +++ b/deskutils/hot-babe/distinfo @@ -1,2 +1,2 @@ -MD5 (hot-babe-0.1.4.tar.bz2) = 5565012a784802debe38972188506a85 -SIZE (hot-babe-0.1.4.tar.bz2) = 401456 +MD5 (hot-babe-0.2.0.tar.bz2) = e0de887b9ea75dad221830ccfcc3a6da +SIZE (hot-babe-0.2.0.tar.bz2) = 397541 diff --git a/deskutils/hot-babe/files/patch-Makefile b/deskutils/hot-babe/files/patch-Makefile index 556c17b7da74..d2c2bb867805 100644 --- a/deskutils/hot-babe/files/patch-Makefile +++ b/deskutils/hot-babe/files/patch-Makefile @@ -1,16 +1,24 @@ ---- Makefile.orig Wed Aug 25 17:55:52 2004 -+++ Makefile Sat Nov 6 20:24:29 2004 +--- Makefile.orig Sun Nov 14 16:12:47 2004 ++++ Makefile Sun Nov 21 13:39:35 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)\" +-CFLAGS = -O2 -Wall -g `pkg-config gdk-2.0 gdk-pixbuf-2.0 --cflags` -DDESTDIR=\"$(DESTDIR)\" ++CFLAGS += `pkg-config --cflags gtk+-2.0` -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` +-LIBS = `pkg-config gdk-2.0 gdk-pixbuf-2.0 --libs` ++LIBS = `pkg-config --libs gtk+-2.0` INSTALL = -m 755 - all: hot-babe + DOC = ChangeLog NEWS TODO LICENSE CONTRIBUTORS copyright +@@ -26,7 +26,6 @@ + install -d $(DESTDIR)/share/hot-babe/hb01 + install $(INSTALL) hb01/* $(DESTDIR)/share/hot-babe/hb01 + install -d $(DESTDIR)/share/doc/hot-babe +- install $(INSTALL) $(DOC) $(DESTDIR)/share/doc/hot-babe + + uninstall: + rm -f $(DESTDIR)/bin/hot-babe diff --git a/deskutils/hot-babe/files/patch-hot-babe.c b/deskutils/hot-babe/files/patch-hot-babe.c index 3f3966486566..4169150b1cd9 100644 --- a/deskutils/hot-babe/files/patch-hot-babe.c +++ b/deskutils/hot-babe/files/patch-hot-babe.c @@ -1,61 +1,14 @@ ---- 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> +--- hot-babe.c.orig Tue Nov 16 22:52:44 2004 ++++ hot-babe.c Wed Nov 24 12:15:34 2004 +@@ -20,9 +20,11 @@ #include <stdlib.h> #include <string.h> -+#ifdef __FreeBSD__ + #ifdef __FreeBSD__ +#include <sys/time.h> -+#include <sys/resource.h> -+#include <sys/types.h> -+#include <sys/sysctl.h> + #include <sys/resource.h> + #include <sys/types.h> + #include <sys/sysctl.h> +#include <sys/dkstat.h> -+#endif + #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; - } - |