about summary refs log tree commit diff
path: root/pkgs/applications/window-managers/compiz/plugindir-core.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/window-managers/compiz/plugindir-core.patch')
-rw-r--r--pkgs/applications/window-managers/compiz/plugindir-core.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/applications/window-managers/compiz/plugindir-core.patch b/pkgs/applications/window-managers/compiz/plugindir-core.patch
new file mode 100644
index 000000000000..5a242e66088f
--- /dev/null
+++ b/pkgs/applications/window-managers/compiz/plugindir-core.patch
@@ -0,0 +1,39 @@
+diff -ru -x '*~' compiz-0.8.6-orig/src/metadata.c compiz-0.8.6/src/metadata.c
+--- compiz-0.8.6-orig/src/metadata.c	2010-03-28 14:15:35.000000000 +0200
++++ compiz-0.8.6/src/metadata.c	2010-10-20 00:22:47.000000000 +0200
+@@ -146,7 +146,7 @@
+ compAddMetadataFromFile (CompMetadata *metadata,
+ 			 const char   *file)
+ {
+-    char *home;
++    char *home, *metadatadir;
+     Bool status = FALSE;
+ 
+     home = getenv ("HOME");
+@@ -163,7 +163,10 @@
+ 	}
+     }
+ 
+-    status |= addMetadataFromFilename (metadata, METADATADIR, file);
++    metadatadir = getenv("COMPIZ_METADATADIR");
++    if (!metadatadir) metadatadir = METADATADIR;
++
++    status |= addMetadataFromFilename (metadata, metadatadir, file);
+     if (!status)
+     {
+ 	compLogMessage ("core", CompLogLevelWarn,
+diff -ru -x '*~' compiz-0.8.6-orig/src/plugin.c compiz-0.8.6/src/plugin.c
+--- compiz-0.8.6-orig/src/plugin.c	2010-03-28 14:15:35.000000000 +0200
++++ compiz-0.8.6/src/plugin.c	2010-10-20 00:25:16.000000000 +0200
+@@ -579,7 +579,10 @@
+ 	}
+     }
+ 
+-    status = (*loaderLoadPlugin) (p, PLUGINDIR, name);
++    plugindir = getenv("COMPIZ_PLUGINDIR");
++    if (!plugindir) plugindir = PLUGINDIR;
++
++    status = (*loaderLoadPlugin) (p, plugindir, name);
+     if (status)
+ 	return p;
+