guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

108/113: gnu: gtk+: Update to 4.1.2.


From: guix-commits
Subject: 108/113: gnu: gtk+: Update to 4.1.2.
Date: Wed, 24 Mar 2021 19:24:02 -0400 (EDT)

lle_bout pushed a commit to branch wip-gnome-40
in repository guix.

commit a66e41444f4b01a9e32e637312316a793741c8bf
Author: Léo Le Bouter <lle-bout@zaclys.net>
AuthorDate: Wed Mar 24 16:50:38 2021 +0100

    gnu: gtk+: Update to 4.1.2.
    
    * gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch: New patch.
    * gnu/local.mk (dist_patch_DATA): Register it.
    * gnu/packages/gtk.scm (gtk+): Rename older definition to gtk+-3. New
    variable.
---
 gnu/local.mk                                       |  1 +
 gnu/packages/gtk.scm                               | 21 +++++++++-
 .../patches/gtk4-respect-GUIX_GTK4_PATH.patch      | 47 ++++++++++++++++++++++
 3 files changed, 68 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index ce0a79f..64f74ed 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1186,6 +1186,7 @@ dist_patch_DATA =                                         
\
   %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/gtk4-respect-GUIX_GTK4_PATH.patch       \
   %D%/packages/patches/gtkglext-disable-disable-deprecated.patch \
   %D%/packages/patches/gtksourceview-2-add-default-directory.patch \
   %D%/packages/patches/gvfs-add-support-for-libplist-2.2.patch \
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index ca901aa..19b7e39 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -853,7 +853,7 @@ application suites.")
    (license license:lgpl2.0+)
    (home-page "https://www.gtk.org/";)))
 
-(define-public gtk+
+(define-public gtk+-3
   (package (inherit gtk+-2)
    (name "gtk+")
    (version "3.24.24")
@@ -946,6 +946,25 @@ application suites.")
            (variable "GUIX_GTK3_PATH")
            (files '("lib/gtk-3.0")))))))
 
+(define-public gtk+
+  (package
+    (inherit gtk+-3)
+    (version "4.1.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnome/sources/gtk/"
+                                  (version-major+minor version)  "/"
+                                  "gtk-" version ".tar.xz"))
+              (sha256
+               (base32
+                "0xwnc397vsdwwaxvhlqrpa03vni5s0xvlqx4ww4srrf56yj7sh1k"))
+              (patches (search-patches
+                        "gtk4-respect-GUIX_GTK4_PATH.patch"))))
+    (native-search-paths
+     (list (search-path-specification
+            (variable "GUIX_GTK4_PATH")
+            (files '("lib/gtk-4.0")))))))
+
 ;;;
 ;;; Guile bindings.
 ;;;
diff --git a/gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch 
b/gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch
new file mode 100644
index 0000000..62fc0b4
--- /dev/null
+++ b/gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch
@@ -0,0 +1,47 @@
+From 1aebcc619a5fc58820ff2a8e36da1615fd81ff41 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?L=C3=A9o=20Le=20Bouter?= <lle-bout@zaclys.net>
+Date: Wed, 24 Mar 2021 16:35:37 +0100
+Subject: [PATCH] GUIX_GTK4_PATH
+
+---
+ gtk/gtkmodules.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c
+index aace5dcbc9..192a1ec58d 100644
+--- a/gtk/gtkmodules.c
++++ b/gtk/gtkmodules.c
+@@ -105,6 +105,7 @@ static char **
+ get_module_path (void)
+ {
+   const char *module_path_env;
++  const char *module_guix_gtk4_path_env;
+   const char *exe_prefix;
+   char *module_path;
+   char *default_dir;
+@@ -114,6 +115,7 @@ get_module_path (void)
+     return result;
+ 
+   module_path_env = g_getenv ("GTK_PATH");
++  module_guix_gtk4_path_env = g_getenv ("GUIX_GTK4_PATH");
+   exe_prefix = g_getenv ("GTK_EXE_PREFIX");
+ 
+   if (exe_prefix)
+@@ -121,7 +123,13 @@ get_module_path (void)
+   else
+     default_dir = g_build_filename (_gtk_get_libdir (), "gtk-4.0", NULL);
+ 
+-  if (module_path_env)
++  if (module_guix_gtk4_path_env && module_path_env)
++    module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S,
++                              module_guix_gtk4_path_env, module_path_env, 
default_dir, NULL);
++  else if (module_guix_gtk4_path_env)
++    module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S,
++                              module_guix_gtk4_path_env, default_dir, NULL);
++  else if (module_path_env)
+     module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S,
+                               module_path_env, default_dir, NULL);
+   else
+-- 
+2.31.0
+



reply via email to

[Prev in Thread] Current Thread [Next in Thread]