diff options
Diffstat (limited to 'sysutils/gkfreq/files')
| -rw-r--r-- | sysutils/gkfreq/files/Makefile | 24 | ||||
| -rw-r--r-- | sysutils/gkfreq/files/patch-Makefile | 30 | ||||
| -rw-r--r-- | sysutils/gkfreq/files/patch-gkfreq.c | 16 |
3 files changed, 37 insertions, 33 deletions
diff --git a/sysutils/gkfreq/files/Makefile b/sysutils/gkfreq/files/Makefile deleted file mode 100644 index 016e93de9014..000000000000 --- a/sysutils/gkfreq/files/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -# $FreeBSD$ - -PREFIX?= /usr/X11R6 -PLUGIN_DIR?= ${PREFIX}/libexec/gkrellm2/plugins - -GKRELLM_INCLUDE=-I${PREFIX}/include - -GTK_CONFIG= pkg-config gtk+-2.0 -GTK_CFLAGS= `${GTK_CONFIG} --cflags` - -CFLAGS+= -Wall -fPIC ${GTK_CFLAGS} ${GKRELLM_INCLUDE} - -INSTALL_PROGRAM?=${INSTALL} -s - -all: gkfreq.so - -gkfreq.so: gkfreq.o - ${CC} -Wall -shared -o gkfreq.so gkfreq.o - -install: gkfreq.so - ${INSTALL_PROGRAM} gkfreq.so ${PLUGIN_DIR} - -clean: - rm -f *.o core *.so* *.bak *~ diff --git a/sysutils/gkfreq/files/patch-Makefile b/sysutils/gkfreq/files/patch-Makefile new file mode 100644 index 000000000000..3f55669f91c1 --- /dev/null +++ b/sysutils/gkfreq/files/patch-Makefile @@ -0,0 +1,30 @@ +Index: Makefile +diff -u Makefile.orig Makefile +--- Makefile.orig Thu Aug 11 05:58:26 2005 ++++ Makefile Wed Nov 9 02:42:46 2005 +@@ -1,13 +1,20 @@ +-all: gkfreq.so ++PREFIX?= /usr/X11R6 ++PLUGIN_DIR?= ${PREFIX}/libexec/gkrellm2/plugins ++ ++GKRELLM_INCLUDE=-I${PREFIX}/include ++ ++GTK_CONFIG= pkg-config gtk+-2.0 ++GTK_CFLAGS= `${GTK_CONFIG} --cflags` + +-gkfreq.o: gkfreq.c +- gcc -fPIC -O2 -Wall `pkg-config gtk+-2.0 --cflags` -c gkfreq.c ++CFLAGS+= -Wall -fPIC ${GTK_CFLAGS} ${GKRELLM_INCLUDE} ++ ++all: gkfreq.so + + gkfreq.so: gkfreq.o +- gcc -shared -Wall -o gkfreq.so gkfreq.o ++ ${CC} -shared -Wall -o gkfreq.so gkfreq.o + + clean: + rm -rf *.o *.so + + install: +- cp gkfreq.so ~/.gkrellm2/plugins/ ++ ${INSTALL} -s gkfreq.so ${PLUGIN_DIR} diff --git a/sysutils/gkfreq/files/patch-gkfreq.c b/sysutils/gkfreq/files/patch-gkfreq.c index 4a926ea3191c..9bfb1502e538 100644 --- a/sysutils/gkfreq/files/patch-gkfreq.c +++ b/sysutils/gkfreq/files/patch-gkfreq.c @@ -1,8 +1,8 @@ Index: gkfreq.c diff -u -p gkfreq.c.orig gkfreq.c ---- gkfreq.c.orig Wed Jun 8 01:42:00 2005 -+++ gkfreq.c Tue Jul 5 16:12:29 2005 -@@ -9,6 +9,9 @@ +--- gkfreq.c.orig Fri Aug 12 01:53:22 2005 ++++ gkfreq.c Wed Nov 9 02:28:35 2005 +@@ -10,6 +10,9 @@ #include <sys/time.h> #include <string.h> #include <unistd.h> @@ -12,7 +12,7 @@ diff -u -p gkfreq.c.orig gkfreq.c #define CONFIG_NAME "gkfreq" #define STYLE_NAME "gkfreq" -@@ -17,20 +20,36 @@ static GkrellmMonitor *monitor; +@@ -18,18 +21,34 @@ static GkrellmMonitor *monitor; static GkrellmPanel *panel; static GkrellmDecal *decal_text1; static gint style_id; @@ -31,8 +31,6 @@ diff -u -p gkfreq.c.orig gkfreq.c } +#endif - /* FIXED : whatdoineed2do@yahoo.co.uk - */ static void read_MHz(char* buffer_, size_t bufsz_) { @@ -48,8 +46,8 @@ diff -u -p gkfreq.c.orig gkfreq.c +#else FILE *f; if ( (f = fopen("/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq", "r")) == NULL) { - /* this can happen if the the scaling is built as a module but it aint -@@ -44,6 +63,7 @@ void read_MHz(char* buffer_, size_t bufs + +@@ -41,6 +60,7 @@ void read_MHz(char* buffer_, size_t bufs snprintf(buffer_, bufsz_, "%d MHz", i/1000 ); fclose(f); } @@ -57,7 +55,7 @@ diff -u -p gkfreq.c.orig gkfreq.c } static gint -@@ -106,6 +126,12 @@ create_plugin(GtkWidget *vbox, gint firs +@@ -103,6 +123,12 @@ create_plugin(GtkWidget *vbox, gint firs if (first_create) g_signal_connect(G_OBJECT (panel->drawing_area), "expose_event", G_CALLBACK (panel_expose_event), NULL); |
