Patch for gkrellm



Hye

I'd like to propose a patch for gkrellm allowing it to lookup the prefixed directory (ex. /opt/gnome or $HOME/garnome) for plugins and themes instead of the hardcoded /usr prefix. I let the LOCAL dirs lookup (/usr/local) untouched.

diff -urN tmp/gkrellm-2.1.4/src/Makefile work/gkrellm-2.1.4/src/Makefile
--- tmp/gkrellm-2.1.4/src/Makefile	Thu Nov 21 17:02:33 2002
+++ work/gkrellm-2.1.4/src/Makefile	Fri Dec 20 16:31:15 2002
@@ -1,3 +1,4 @@
+PREFIX ?= $(prefix)
 PACKAGE ?= gkrellm
 PKG_CONFIG ?= pkg-config
 EXTRAOBJS ?= md5c.o
@@ -21,7 +22,7 @@
 
 PKG_LIB = `$(PKG_CONFIG) --libs gtk+-2.0 gthread-2.0`
 
-FLAGS = -O2 -I.. $(PKG_INCLUDE) $(GTOP_INCLUDE)
+FLAGS = -O2 -I.. -DPREFIX=\"$(PREFIX)\" $(PKG_INCLUDE) $(GTOP_INCLUDE)
 FLAGS+= $(PTHREAD_INC)
 
 LIBS = $(PKG_LIB) $(GTOP_LIBS) $(SMC_LIBS) $(SYS_LIBS)
diff -urN tmp/gkrellm-2.1.4/src/gkrellm.h work/gkrellm-2.1.4/src/gkrellm.h 
--- tmp/gkrellm-2.1.4/src/gkrellm.h	Tue Dec 17 23:19:09 2002
+++ work/gkrellm-2.1.4/src/gkrellm.h	Fri Dec 20 16:30:02 2002
@@ -114,11 +114,11 @@
 
 #define	LOCAL_THEMES_DIR		"/usr/local/share/gkrellm2/themes"
 #if !defined(SYSTEM_THEMES_DIR)
-#define	SYSTEM_THEMES_DIR		"/usr/share/gkrellm2/themes"
+#define	SYSTEM_THEMES_DIR		PREFIX "/share/gkrellm2/themes"
 #endif
 #define	LOCAL_PLUGINS_DIR		"/usr/local/lib/gkrellm2/plugins"
 #if !defined(SYSTEM_PLUGINS_DIR)
-#define	SYSTEM_PLUGINS_DIR		"/usr/lib/gkrellm2/plugins"
+#define	SYSTEM_PLUGINS_DIR		PREFIX "/lib/gkrellm2/plugins"
 #endif
 
 #else


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]