2010-08-24 22:32:30 +02:00
|
|
|
https://bugzilla.novell.com/show_bug.cgi?id=369696
|
|
|
|
|
|
|
|
This patch adds support for /usr/local without setting of GTK_PATH.
|
|
|
|
/usr/local path preference is a behavior expected by FHS.
|
|
|
|
This patch cannot be upstreamed as is:
|
|
|
|
- It needs to be platform dependent.
|
|
|
|
- It needs to solve situation, when prefix != /usr (and maybe add /usr
|
|
|
|
to the search path, but after the default_dir).
|
|
|
|
- There is no consensus for /usr/local/lib x /usr/local/lib64 yet.
|
|
|
|
Defaulting to /usr/local/lib64 may need /usr/local/share/config.site
|
|
|
|
file (bnc#382344).
|
|
|
|
|
|
|
|
Note that the patch it does not provide solution for bi-arch path clash:
|
|
|
|
http://bugzilla.gnome.org/show_bug.cgi?id=153848
|
|
|
|
|
|
|
|
Index: gtk/gtkmodules.c
|
|
|
|
===================================================================
|
|
|
|
--- gtk/gtkmodules.c.orig
|
|
|
|
+++ gtk/gtkmodules.c
|
2012-09-08 00:04:48 +02:00
|
|
|
@@ -55,6 +55,7 @@ get_module_path (void)
|
|
|
|
const gchar *exe_prefix;
|
2010-08-24 22:32:30 +02:00
|
|
|
gchar *module_path;
|
|
|
|
gchar *default_dir;
|
|
|
|
+ gchar *local_dir;
|
|
|
|
static gchar **result = NULL;
|
|
|
|
|
|
|
|
if (result)
|
2012-09-08 00:04:48 +02:00
|
|
|
@@ -64,18 +65,25 @@ get_module_path (void)
|
2010-08-24 22:32:30 +02:00
|
|
|
exe_prefix = g_getenv ("GTK_EXE_PREFIX");
|
|
|
|
|
|
|
|
if (exe_prefix)
|
|
|
|
+ {
|
|
|
|
default_dir = g_build_filename (exe_prefix, "lib", "gtk-3.0", NULL);
|
|
|
|
+ local_dir = g_build_filename ("/usr/local", "lib", "gtk-3.0", NULL);
|
|
|
|
+ }
|
|
|
|
else
|
|
|
|
+ {
|
2011-11-15 10:21:47 +01:00
|
|
|
default_dir = g_build_filename (_gtk_get_libdir (), "gtk-3.0", NULL);
|
2010-08-24 22:32:30 +02:00
|
|
|
+ local_dir = g_build_filename ("/usr/local", SUSE_HACK_LIB, "gtk-3.0", NULL);
|
|
|
|
+ }
|
|
|
|
|
2012-09-08 00:04:48 +02:00
|
|
|
if (module_path_env)
|
2010-08-24 22:32:30 +02:00
|
|
|
module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S,
|
|
|
|
- module_path_env, default_dir, NULL);
|
|
|
|
+ module_path_env, local_dir, default_dir, NULL);
|
|
|
|
else
|
|
|
|
module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S,
|
|
|
|
- default_dir, NULL);
|
|
|
|
+ local_dir, default_dir, NULL);
|
|
|
|
|
|
|
|
g_free (default_dir);
|
|
|
|
+ g_free (local_dir);
|
|
|
|
|
|
|
|
result = pango_split_file_list (module_path);
|
|
|
|
g_free (module_path);
|
|
|
|
Index: gtk/Makefile.am
|
|
|
|
===================================================================
|
|
|
|
--- gtk/Makefile.am.orig
|
|
|
|
+++ gtk/Makefile.am
|
2015-03-19 15:36:12 +01:00
|
|
|
@@ -2,8 +2,10 @@ AUTOMAKE_OPTIONS = subdir-objects
|
|
|
|
|
|
|
|
include $(top_srcdir)/Makefile.decl
|
2010-08-24 22:32:30 +02:00
|
|
|
|
|
|
|
+suse_hack_lib=`echo $(libdir) | sed 's:.*/::'`
|
2011-07-26 00:02:12 +02:00
|
|
|
AM_CPPFLAGS = \
|
2010-08-24 22:32:30 +02:00
|
|
|
-DG_LOG_DOMAIN=\"Gtk\" \
|
|
|
|
+ -DSUSE_HACK_LIB=\"$(suse_hack_lib)\" \
|
|
|
|
-DGTK_LIBDIR=\"$(libdir)\" \
|
|
|
|
-DGTK_DATADIR=\"$(datadir)\" \
|
|
|
|
-DGTK_DATA_PREFIX=\"$(prefix)\" \
|
|
|
|
Index: gtk/Makefile.in
|
|
|
|
===================================================================
|
|
|
|
--- gtk/Makefile.in.orig
|
|
|
|
+++ gtk/Makefile.in
|
2015-03-19 15:36:12 +01:00
|
|
|
@@ -1173,8 +1173,10 @@ XVFB_START = \
|
|
|
|
|| { echo "Gtk+Tests:ERROR: Failed to start Xvfb environment for X11 target tests."; exit 1; } \
|
|
|
|
&& DISPLAY=:$$XID && export DISPLAY
|
|
|
|
|
2010-08-24 22:32:30 +02:00
|
|
|
+suse_hack_lib=`echo $(libdir) | sed 's:.*/::'`
|
2011-07-26 00:02:12 +02:00
|
|
|
AM_CPPFLAGS = \
|
2010-08-24 22:32:30 +02:00
|
|
|
-DG_LOG_DOMAIN=\"Gtk\" \
|
2014-04-03 22:51:00 +02:00
|
|
|
+ -DSUSE_HACK_LIB=\"$(suse_hack_lib)\" \
|
2010-08-24 22:32:30 +02:00
|
|
|
-DGTK_LIBDIR=\"$(libdir)\" \
|
|
|
|
-DGTK_DATADIR=\"$(datadir)\" \
|
|
|
|
-DGTK_DATA_PREFIX=\"$(prefix)\" \
|