Please unblock gtk+2.0/2.8.20-6 (has udeb)
Hi there,
Please unblock gtk+2.0/2.8.20-6 which has an udeb and was uploaded this
morning with urgency high. The changelog entry is as follows:
* New patch, 040_ia32-libs.patch, for ia32-libs support via ia32-libs-gtk;
based on a patch by Goswin von Brederlow with the following changes: a)
use .32 and .64 suffixes in all cases (compatible with Ubuntu), b) fix
typo, c) use g_file_test() instead of g_access(); does not cover module
loading via env vars; closes: #406453.
and the upload adds the attached patch which permits preferring
alternate Gtk runtime files when running Gtk 32-bits under a 64-bits
arch and vice-versa. This is targetted for use in ia32-libs
(ia32-libs-gtk) which provides 32-bits libs to users of the amd64
architecture which need to run 32-bits programs using these libs (e.g.
acroread, the flash plugin etc.).
This shouldn't affect the udeb, but obviously fjp has the final word.
[ I know it's terribly late, and I apologize for not uploading earlier,
but I kept postponing adding this patch because I wanted to handle more
cases (environment vars in particular). None of the other
distributions with the patch handle this though (with the exception of
OpenSuse with GTK_PATH64, but no other env vars), so I suppose it's
good enough for the kludge that ia32-libs is anyway. ]
Bye,
--
Loïc Minier <lool@dooz.org>
diff -urN gtk+-2.8.20.orig/gdk-pixbuf/gdk-pixbuf-io.c gtk+-2.8.20/gdk-pixbuf/gdk-pixbuf-io.c
--- gtk+-2.8.20.orig/gdk-pixbuf/gdk-pixbuf-io.c 2005-10-03 17:11:49.000000000 +0200
+++ gtk+-2.8.20/gdk-pixbuf/gdk-pixbuf-io.c 2007-03-04 11:52:11.000000000 +0100
@@ -276,8 +276,20 @@
gchar *result = g_strdup (g_getenv ("GDK_PIXBUF_MODULE_FILE"));
if (!result)
- result = g_build_filename (GTK_SYSCONFDIR, "gtk-2.0", "gdk-pixbuf.loaders", NULL);
-
+ {
+#if defined(__linux__) && ( defined(__i386__) || defined (__x86_64__) || defined(__ia64__) )
+# if defined (__i386__)
+ result = g_build_filename (GTK_SYSCONFDIR, "gtk-2.0", "gdk-pixbuf.loaders.32", NULL);
+# else
+ result = g_build_filename (GTK_SYSCONFDIR, "gtk-2.0", "gdk-pixbuf.loaders.64", NULL);
+#endif
+ /* Prefer compat gdk-pixbuf.loaders file if it's usable. */
+ if (g_file_test(result, G_FILE_TEST_EXISTS))
+ return result;
+ g_free (result);
+#endif
+ result = g_build_filename (GTK_SYSCONFDIR, "gtk-2.0", "gdk-pixbuf.loaders", NULL);
+ }
return result;
}
diff -urN gtk+-2.8.20.orig/gtk/gtkrc.c gtk+-2.8.20/gtk/gtkrc.c
--- gtk+-2.8.20.orig/gtk/gtkrc.c 2005-11-23 15:24:51.000000000 +0100
+++ gtk+-2.8.20/gtk/gtkrc.c 2007-03-04 11:55:19.000000000 +0100
@@ -364,7 +364,20 @@
if (im_module_file)
result = g_strdup (im_module_file);
else
- result = g_build_filename (GTK_SYSCONFDIR, "gtk-2.0", "gtk.immodules", NULL);
+ {
+#if defined(__linux__) && ( defined(__i386__) || defined (__x86_64__) || defined(__ia64__) )
+# if defined (__i386__)
+ result = g_build_filename (GTK_SYSCONFDIR, "gtk-2.0", "gtk.immodules.32", NULL);
+# else
+ result = g_build_filename (GTK_SYSCONFDIR, "gtk-2.0", "gtk.immodules.64", NULL);
+# endif
+ /* Prefer compat gtk.immodules file if it's usable. */
+ if (g_file_test(result, G_FILE_TEST_EXISTS))
+ return result;
+ g_free (result);
+#endif
+ result = g_build_filename (GTK_SYSCONFDIR, "gtk-2.0", "gtk.immodules", NULL);
+ }
}
return result;
@@ -433,7 +446,17 @@
else
{
const gchar *home;
- str = g_build_filename (GTK_SYSCONFDIR, "gtk-2.0", "gtkrc", NULL);
+#if defined(__linux__) && ( defined(__i386__) || defined (__x86_64__) || defined(__ia64__) )
+# if defined (__i386__)
+ str = g_build_filename (GTK_SYSCONFDIR, "gtk-2.0", "gtkrc.32", NULL);
+# else
+ str = g_build_filename (GTK_SYSCONFDIR, "gtk-2.0", "gtkrc.64", NULL);
+# endif
+ /* Prefer compat gtkrc if it's usable. */
+ if (g_file_test(str, G_FILE_TEST_EXISTS))
+ g_free (str), /* continue in next line */
+#endif
+ str = g_build_filename (GTK_SYSCONFDIR, "gtk-2.0", "gtkrc", NULL);
gtk_rc_add_default_file (str);
g_free (str);
@@ -441,7 +464,17 @@
home = g_get_home_dir ();
if (home)
{
- str = g_build_filename (home, ".gtkrc-2.0", NULL);
+#if defined(__linux__) && ( defined(__i386__) || defined (__x86_64__) || defined(__ia64__) )
+# if defined (__i386__)
+ str = g_build_filename (home, ".gtkrc-2.0.32", NULL);
+# else
+ str = g_build_filename (home, ".gtkrc-2.0.64", NULL);
+# endif
+ /* Prefer compat .gtkrc-2.0 if it's usable. */
+ if (g_file_test(str, G_FILE_TEST_EXISTS))
+ g_free (str), /* continue in next line */
+#endif
+ str = g_build_filename (home, ".gtkrc-2.0", NULL);
gtk_rc_add_default_file (str);
g_free (str);
}
Reply to: