File scrotwm-scriptdir.patch of Package scrotwm

--- ./linux/Makefile.orig	2010-10-21 10:19:50.000000000 +0200
+++ ./linux/Makefile	2010-10-21 10:20:32.000000000 +0200
@@ -8,6 +8,8 @@
 BINDIR?= $(PREFIX)/bin
 LIBDIR?= $(PREFIX)/lib
 MANDIR?= $(PREFIX)/share/man
+SCRIPTDIR?= $(PREFIX)/lib
+CFLAGS+= -DSCRIPTDIR=\"$(SCRIPTDIR)\"
 
 CC= gcc
 
--- ./scrotwm.c.orig	2010-10-21 10:08:19.000000000 +0200
+++ ./scrotwm.c	2010-10-21 10:19:31.000000000 +0200
@@ -5322,6 +5322,8 @@
 	int			xfd, i;
 	fd_set			rd;
 	struct sigaction	sact;
+	char path[PATH_MAX];
+	char *ppath;
 
 	start_argv = argv;
 	fprintf(stderr, "Welcome to scrotwm V%s cvs tag: %s\n",
@@ -5387,6 +5389,15 @@
 	/* grab existing windows (before we build the bars) */
 	grab_windows();
 
+	/* expand PATH with SCRIPTDIR */
+   ppath = getenv("PATH");
+	if (ppath != NULL) {
+		strncpy(path, SCRIPTSDIR, PATH_MAX);
+		strncat(path, ":", PATH_MAX - strlen(path) - 1);
+		strncpy(path, ppath, PATH_MAX - strlen(path) - 1);
+		setenv("PATH", path, 1);
+	}
+
 	/* setup all bars */
 	for (i = 0; i < ScreenCount(display); i++)
 		TAILQ_FOREACH(r, &screens[i].rl, entry) {
openSUSE Build Service is sponsored by