Package: gtk+2.0 / 2.24.32-3

098_multiarch_module_path.patch Patch series | download
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
From: Steve Langasek <steve.langasek@linaro.org>
Date: Fri, 22 Jul 2011 18:43:29 +0000
Subject: 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.

As of April 2018 this is still required by:
- gtk2-engines-cleanice
- gtk2-engines-magicchicken
- gtk2-engines-moblin
- gtk2-engines-nodoka
- gtk2-engines-wonderland
- sugar-artwork-0.88 (no longer in unstable)
- tamil-gtk2im

The equivalent patch in GTK+ 3 was removed in 3.18.0-1.

Forwarded: not-needed, Debian-specific
---
 gtk/gtkmodules.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c
index 50729b6..7877557 100644
--- a/gtk/gtkmodules.c
+++ b/gtk/gtkmodules.c
@@ -60,6 +60,7 @@ get_module_path (void)
   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 @@ get_module_path (void)
 
   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);