Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.3:Rings:1-MinimalX
gtk3
gtk3-path-local.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gtk3-path-local.patch of Package gtk3
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 @@ -55,6 +55,7 @@ get_module_path (void) const gchar *exe_prefix; gchar *module_path; gchar *default_dir; + gchar *local_dir; static gchar **result = NULL; if (result) @@ -64,18 +65,25 @@ get_module_path (void) 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 + { default_dir = g_build_filename (_gtk_get_libdir (), "gtk-3.0", NULL); + local_dir = g_build_filename ("/usr/local", SUSE_HACK_LIB, "gtk-3.0", NULL); + } if (module_path_env) 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); G_GNUC_BEGIN_IGNORE_DEPRECATIONS result = pango_split_file_list (module_path); Index: gtk/Makefile.am =================================================================== --- gtk/Makefile.am.orig +++ gtk/Makefile.am @@ -2,8 +2,10 @@ AUTOMAKE_OPTIONS = subdir-objects include $(top_srcdir)/Makefile.decl +suse_hack_lib=`echo $(libdir) | sed 's:.*/::'` AM_CPPFLAGS = \ -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 @@ -1190,8 +1190,10 @@ XVFB_START = \ || { echo "Gtk+Tests:ERROR: Failed to start Xvfb environment for X11 target tests."; exit 1; } \ && DISPLAY=:$$XID && export DISPLAY +suse_hack_lib=`echo $(libdir) | sed 's:.*/::'` AM_CPPFLAGS = \ -DG_LOG_DOMAIN=\"Gtk\" \ + -DSUSE_HACK_LIB=\"$(suse_hack_lib)\" \ -DGTK_LIBDIR=\"$(libdir)\" \ -DGTK_DATADIR=\"$(datadir)\" \ -DGTK_DATA_PREFIX=\"$(prefix)\" \
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor