gnu: Add kafs-client
[jackhill/guix/guix.git] / gnu / packages / patches / gtk3-respect-GUIX_GTK3_PATH.patch
1 This patch makes GTK+ look for additional modules in a list of directories
2 specified by the environment variable "GUIX_GTK3_PATH". This can be used
3 instead of "GTK_PATH" to make GTK+ find modules that are incompatible with
4 other major versions of GTK+.
5
6 --- a/gtk/gtkmodules.c 2015-09-20 20:09:05.060590217 +0200
7 +++ b/gtk/gtkmodules.c 2015-09-20 20:10:33.423124833 +0200
8 @@ -52,6 +52,7 @@
9 get_module_path (void)
10 {
11 const gchar *module_path_env;
12 + const gchar *module_guix_gtk3_path_env;
13 const gchar *exe_prefix;
14 gchar *module_path;
15 gchar *default_dir;
16 @@ -61,6 +62,7 @@
17 return result;
18
19 module_path_env = g_getenv ("GTK_PATH");
20 + module_guix_gtk3_path_env = g_getenv ("GUIX_GTK3_PATH");
21 exe_prefix = g_getenv ("GTK_EXE_PREFIX");
22
23 if (exe_prefix)
24 @@ -68,7 +70,13 @@
25 else
26 default_dir = g_build_filename (_gtk_get_libdir (), "gtk-3.0", NULL);
27
28 - if (module_path_env)
29 + if (module_guix_gtk3_path_env && module_path_env)
30 + module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S,
31 + module_guix_gtk3_path_env, module_path_env, default_dir, NULL);
32 + else if (module_guix_gtk3_path_env)
33 + module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S,
34 + module_guix_gtk3_path_env, default_dir, NULL);
35 + else if (module_path_env)
36 module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S,
37 module_path_env, default_dir, NULL);
38 else