[gtk+/sdk/2965: 5/30] Fall back to the hard-coded pre-multiarch module directory



commit 33a32b162496b09983b203f49a583a54e9a900d0
Author: Steve Langasek <steve langasek linaro org>
Date:   Fri May 9 14:07:13 2014 -0700

    Fall back to the hard-coded pre-multiarch module directory
    
    Include /usr/lib/gtk-3.0 in the path as a fallback when building for
    multiarch, to maintain compatibility with packages installing modules to
    the old directories.

 gtk/gtkmodules.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c
index 640be7b..04df22d 100644
--- a/gtk/gtkmodules.c
+++ b/gtk/gtkmodules.c
@@ -55,6 +55,7 @@ get_module_path (void)
   const gchar *exe_prefix;
   gchar *module_path;
   gchar *default_dir;
+  gchar *pre_multiarch_dir = NULL;
   static gchar **result = NULL;
 
   if (result)
@@ -65,15 +66,17 @@ get_module_path (void)
 
   if (exe_prefix)
     default_dir = g_build_filename (exe_prefix, "lib", "gtk-3.0", NULL);
-  else
+  else {
     default_dir = g_build_filename (_gtk_get_libdir (), "gtk-3.0", NULL);
+    pre_multiarch_dir = "/usr/lib/gtk-3.0";
+  }
 
   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
     module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S,
-                               default_dir, NULL);
+                               default_dir, pre_multiarch_dir, NULL);
 
   g_free (default_dir);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]