Bug#406453: 32bit libgtk2.0 must use
/etc/gtk-2.0/gdk-pixbuf.loaders.32
Goswin von Brederlow
brederlo at informatik.uni-tuebingen.de
Wed Jan 17 19:52:04 CET 2007
reassign 406453 libgtk2.0-0
thanks
Steve Langasek <vorlon at debian.org> writes:
> reassign 406453 ia32-libs-gtk
> thanks
>
> On Thu, Jan 11, 2007 at 10:36:23AM +0100, Goswin von Brederlow wrote:
>> PS: I set this to grave as it makes ia32-libs-gtk unusable which
>> contains libgtk-2.0.
>
> Then the problem is ia32-libs-gtk's, not libgtk2.0-0's. There's no way it's
> an RC bug in gtk that you've repackaged it in a way that doesn't work.
ia32-libs-gtk does contain the libgtk2.0-0.deb, the precompiled binary
from i386. The source (included for GPL compliance only) is not and
can not be compiled so it can't be patched.
We could ship a patched precompiled libgtk2.0-0.deb but I think that
would be a very bad idea.
So back to libgtk2.0-0 with this bug. Patch below.
To get ia32-libs-gtk working properly chunks 1+2 of the patch need to
be applied. Chunks 3+4 just round things up by allowing the admin and
user to have different gtkrc files if they so choose.
MfG
Goswin
--------------[ debian/patches/030_compat_sysconfdir.patch ]---------------
diff -Nurd 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 15:11:49.000000000 +0000
+++ gtk+-2.8.20/gdk-pixbuf/gdk-pixbuf-io.c 2007-01-17 16:38:15.000000000 +0000
@@ -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", "32", "gdk-pixbuf.loaders", NULL);
+# else
+ result = g_build_filename (GTK_SYSCONFDIR, "gtk-2.0", "64", "gdk-pixbuf.loaders", NULL);
+#endif
+ /* Prefer compat gtk.immodules file if it's usable. */
+ if (! g_access(result, R_OK))
+ return result;
+ g_free (result);
+#endif
+ result = g_build_filename (GTK_SYSCONFDIR, "gtk-2.0", "gdk-pixbuf.loaders", NULL);
+ }
return result;
}
diff -Nurd 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 14:24:51.000000000 +0000
+++ gtk+-2.8.20/gtk/gtkrc.c 2007-01-17 16:43:32.000000000 +0000
@@ -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", "32", "gtk.immodules", NULL);
+# else
+ result = g_build_filename (GTK_SYSCONFDIR, "gtk-2.0", "64", "gtk.immodules", NULL);
+# endif
+ /* Prefer compat gtk.immodules file if it's usable. */
+ if (!g_access(result, R_OK))
+ 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", "32", "gtkrc", NULL);
+# else
+ str = g_build_filename (GTK_SYSCONFDIR, "gtk-2.0", "64", "gtkrc", NULL);
+# endif
+ /* Prefer compat gtkrc if it's usable. */
+ if (g_access(str, R_OK))
+ 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_access(str, R_OK))
+ 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);
}
More information about the Pkg-gnome-maintainers
mailing list