Index: pango1.0-1.28.1/pango/modules.c
===================================================================
--- pango1.0-1.28.1.orig/pango/modules.c 2010-06-15 18:09:36.626808929 +0200
+++ pango1.0-1.28.1/pango/modules.c 2010-06-15 18:09:38.606801290 +0200
@@ -24,6 +24,7 @@
#include <string.h>
#include <limits.h>
#include <errno.h>
+#include <unistd.h>
#include <gmodule.h>
#include <glib/gstdio.h>
@@ -529,6 +530,18 @@
MODULE_VERSION,
"module-files.d",
NULL);
+
+#if defined(__linux__) && defined (__i386__)
+ char *compat_module_files_d_str = g_build_filename ("/usr/lib32/pango",
+ MODULE_VERSION,
+ "module-files.d",
+ NULL);
+#elif defined(__linux__) && ( defined (__x86_64__) || defined(__ia64__) )
+ char *compat_module_files_d_str = g_build_filename ("/usr/lib64/pango",
+ MODULE_VERSION,
+ "module-files.d",
+ NULL);
+#endif
char *list_str;
char **files;
int n;
@@ -540,6 +553,17 @@
"pango.modules",
NULL);
+#if defined(__linux__) && ( defined(__i386__) || defined (__x86_64__) || defined(__ia64__) )
+ /* prefer compat_module_files_d_str over module_files_d_str on the above
+ * arches if it's usable */
+ if (! g_access(compat_module_files_d_str, R_OK|X_OK))
+ list_str = g_strjoin (G_SEARCHPATH_SEPARATOR_S,
+ file_str,
+ compat_module_files_d_str,
+ NULL);
+ else /* continued below */
+#endif
+
list_str = g_strjoin (G_SEARCHPATH_SEPARATOR_S,
file_str,
module_files_d_str,
@@ -589,6 +613,9 @@
g_strfreev (files);
g_free (list_str);
g_free (module_files_d_str);
+#if defined(__linux__) && ( defined(__i386__) || defined (__x86_64__) || defined(__ia64__) )
+ g_free (compat_module_files_d_str);
+#endif
g_free (file_str);
dlloaded_engines = g_slist_reverse (dlloaded_engines);