gtkmodules: also look in /usr/lib/gtk-2.0 on multiarch

Based on Debian's 098_multiarch_module_path.patch by Steve Langasek,
which Ardour's YTK carries as well.
This commit is contained in:
Daemonratte 2026-10-15 09:14:43 +02:00
commit adea3e34af

View file

@ -146,7 +146,22 @@ get_module_path (void)
if (exe_prefix)
default_dir = g_build_filename (exe_prefix, "lib", "gtk-2.0", NULL);
else
default_dir = g_build_filename (GTK_LIBDIR, "gtk-2.0", NULL);
{
default_dir = g_build_filename (GTK_LIBDIR, "gtk-2.0", NULL);
#ifdef __linux__
/* where theme engines and input methods were installed before
* multiarch (/usr/lib/<triplet>), as Debian's GTK+ 2 looks too */
if (strcmp (GTK_LIBDIR, "/usr/lib") != 0 &&
g_str_has_prefix (GTK_LIBDIR, "/usr/lib/"))
{
gchar *both = g_build_path (G_SEARCHPATH_SEPARATOR_S,
default_dir, "/usr/lib/gtk-2.0", NULL);
g_free (default_dir);
default_dir = both;
}
#endif
}
if (module_path_env && home_gtk_dir)
module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S,