File: 098_multiarch_module_path.patch

package info (click to toggle)
gtk%2B2.0 2.24.31-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 127,432 kB
  • ctags: 74,609
  • sloc: ansic: 573,219; makefile: 5,155; sh: 4,417; xml: 1,193; python: 891; perl: 749; awk: 72; cpp: 34
file content (48 lines) | stat: -rw-r--r-- 1,721 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Description: Fall back to the hard-coded pre-multiarch module directory
 Include /usr/lib/gtk-2.0 in the path as a fallback when building for
 multiarch, to maintain compatibility with packages installing modules to
 the old directories.
Author: Steve Langasek <steve.langasek@linaro.org>
Forwarded: not-needed

Index: gtk+2.0-2.24.3/gtk/gtkmodules.c
===================================================================
--- gtk+2.0-2.24.3.orig/gtk/gtkmodules.c
+++ gtk+2.0-2.24.3/gtk/gtkmodules.c
@@ -60,6 +60,7 @@
   gchar *home_gtk_dir = NULL;
   gchar *module_path;
   gchar *default_dir;
+  gchar *pre_multiarch_dir = NULL;
   static gchar **result = NULL;
 
   if (result)
@@ -74,21 +75,23 @@
 
   if (exe_prefix)
     default_dir = g_build_filename (exe_prefix, "lib", "gtk-2.0", NULL);
-  else
+  else {
     default_dir = g_build_filename (GTK_LIBDIR, "gtk-2.0", NULL);
+    pre_multiarch_dir = "/usr/lib/gtk-2.0";
+  }
 
   if (module_path_env && home_gtk_dir)
     module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S,
-				module_path_env, home_gtk_dir, default_dir, NULL);
+				module_path_env, home_gtk_dir, default_dir, pre_multiarch_dir, NULL);
   else if (module_path_env)
     module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S,
-				module_path_env, default_dir, NULL);
+				module_path_env, default_dir, pre_multiarch_dir, NULL);
   else if (home_gtk_dir)
     module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S,
-				home_gtk_dir, default_dir, NULL);
+				home_gtk_dir, default_dir, pre_multiarch_dir, NULL);
   else
     module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S,
-				default_dir, NULL);
+				default_dir, pre_multiarch_dir, NULL);
 
   g_free (home_gtk_dir);
   g_free (default_dir);