diff mbox

[2/2] gnu: gtk+: Add patch to support GUIX_GTK3_IM_MODULE_FILE.

Message ID 20160824220937.8745-3-rekado@elephly.net
State New
Headers show

Commit Message

Ricardo Wurmus Aug. 24, 2016, 10:09 p.m. UTC
* gnu/packages/patches/gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch: New file.
* gnu/packages/gtk.scm (gtk+)[source]: Add it.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                              |  1 +
 gnu/packages/gtk.scm                                      |  3 ++-
 .../patches/gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch   | 15 +++++++++++++++
 3 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch
diff mbox

Patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 3cb85d1..263b93c 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -553,6 +553,7 @@  dist_patch_DATA =						\
   %D%/packages/patches/gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch \
   %D%/packages/patches/gtk2-theme-paths.patch			\
   %D%/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch	\
+  %D%/packages/patches/gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch \
   %D%/packages/patches/gtkglext-disable-disable-deprecated.patch \
   %D%/packages/patches/hdf5-config-date.patch			\
   %D%/packages/patches/higan-remove-march-native-flag.patch	\
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index e1d9cf9..396ff1f 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -625,7 +625,8 @@  application suites.")
             (sha256
              (base32
               "157nh9gg0p2avw765hrnkvr8lsh2w811397yxgjv6q5j4fzz6d1q"))
-            (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"))))
+            (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
+                                     "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
    (propagated-inputs
     `(("at-spi2-atk" ,at-spi2-atk)
       ("atk" ,atk)
diff --git a/gnu/packages/patches/gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch b/gnu/packages/patches/gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch
new file mode 100644
index 0000000..aa63a54
--- /dev/null
+++ b/gnu/packages/patches/gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch
@@ -0,0 +1,15 @@ 
+This patch replaces the environment variable "GTK_IM_MODULE" with
+"GUIX_GTK3_IM_MODULE_FILE" to prevent this version of GTK+ from loading input
+method modules for other major versions of GTK+.
+
+--- gtk+-3.20.3/gtk/deprecated/gtkrc.c	2016-08-21 22:40:48.168437905 +0200
++++ gtk+-3.20.3/gtk/deprecated/gtkrc.c	2016-08-23 10:12:09.097070097 +0200
+@@ -768,7 +768,7 @@
+ gchar *
+ gtk_rc_get_im_module_file (void)
+ {
+-  const gchar *var = g_getenv ("GTK_IM_MODULE_FILE");
++  const gchar *var = g_getenv ("GUIX_GTK3_IM_MODULE_FILE");
+   gchar *result = NULL;
+ 
+   if (var)