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/files | |
parent | 8af92e9868b66bd285201fbdaac296ac6b022fcc (diff) | |
download | ports-a16d36a28b8e0b4d620cbf5b22a45bc4aa9738a0.tar.gz ports-a16d36a28b8e0b4d620cbf5b22a45bc4aa9738a0.zip |
Update to 0.2.0
PR: ports/74194
Submitted by: maintainer
Notes
Notes:
svn path=/head/; revision=122313
Diffstat (limited to 'deskutils/hot-babe/files')
-rw-r--r-- | deskutils/hot-babe/files/patch-Makefile | 22 | ||||
-rw-r--r-- | deskutils/hot-babe/files/patch-hot-babe.c | 63 |
2 files changed, 23 insertions, 62 deletions
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; - } - |