unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#48554] GTK v4
@ 2021-05-21  4:06 Raghav Gururajan via Guix-patches via
  2021-05-21  4:08 ` [bug#48554] [PATCH wip-gnome v1] gnu: Add gtk Raghav Gururajan via Guix-patches via
                   ` (14 more replies)
  0 siblings, 15 replies; 35+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-05-21  4:06 UTC (permalink / raw)
  To: 48554


[-- Attachment #1.1: Type: text/plain, Size: 512 bytes --]

Hello Guix,

I am opening this thread for gtk v4 packaging.

GTK project changed the name from gtk+ gtk for v4. The versions are 
still referred to as gtk+. Therefore, we don't have to append '4' to the 
variable and package name. This package definition of gtk (v4) will not 
interfere with the use gtk+ (v3) and/or gtk+-2 (v2).

This path-series are to be tried or used, on top of wip-gnome, along 
with #48459.

Currently I am facing issues with tests. Help are welcome.

:)

Regards,
RG.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [bug#48554] [PATCH wip-gnome v1] gnu: Add gtk.
  2021-05-21  4:06 [bug#48554] GTK v4 Raghav Gururajan via Guix-patches via
@ 2021-05-21  4:08 ` Raghav Gururajan via Guix-patches via
  2021-07-16 15:39 ` [bug#48554] Successful Build Charles via Guix-patches via
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 35+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-05-21  4:08 UTC (permalink / raw)
  To: 48554; +Cc: Raghav Gururajan

* gnu/packages/gtk.scm (gtk): New variable.
* gnu/packages/patches/gtk4-honor-GUIX_GTK4_PATH.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                  |   1 +
 gnu/packages/gtk.scm                          | 133 ++++++++++++++++++
 .../patches/gtk4-honor-GUIX_GTK4_PATH.patch   |  51 +++++++
 3 files changed, 185 insertions(+)
 create mode 100644 gnu/packages/patches/gtk4-honor-GUIX_GTK4_PATH.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 49bdd12d58..353a931cef 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1179,6 +1179,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-honor-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 f52294b6e2..526c2ac50d 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -90,11 +90,13 @@
   #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages profiling)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-build)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages guile-xyz)
   #:use-module (gnu packages cups)
   #:use-module (gnu packages version-control)
+  #:use-module (gnu packages vulkan)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
@@ -832,6 +834,137 @@ is part of the GNOME accessibility project.")
     (license license:lgpl2.1+)
     (home-page "https://wiki.gnome.org/Accessibility/")))
 
+(define-public gtk
+  (package
+    (name "gtk")
+    (version "4.2.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://gnome/sources/" name "/"
+                           (version-major+minor version)  "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32 "1rh9fd5axf79pmd93hb2fmmflic5swcvqvq6vqghlgz4bmvnjc82"))
+       (patches
+        (search-patches "gtk4-honor-GUIX_GTK4_PATH.patch"))))
+    (build-system meson-build-system)
+    (outputs '("out" "doc"))
+    (arguments
+     `(#:meson ,meson-0.55
+       #:tests? #f                      ; FIXME
+       #:configure-flags
+       (list
+        "-Dbroadway-backend=true"       ; for broadway display-backend
+        "-Dcloudproviders=enabled"      ; for cloud-providers support
+        ;;"-Dsysprof=enabled"           ; for tracing support
+        "-Dtracker=enabled"           ; for filechooser search support
+        "-Dcolord=enabled"            ; for color printing support
+        "-Dgtk_doc=true"
+        "-Dman-pages=true")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-docs
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "docs"
+               (substitute* (find-files "." "\\.xml$")
+                 (("http://www.oasis-open.org/docbook/xml/4.3/")
+                  (string-append (assoc-ref inputs "docbook-xml")
+                                 "/xml/dtd/docbook/"))))
+             #t))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; Tests require a running X server.
+             (system "Xvfb :1 +extension GLX &")
+             (setenv "DISPLAY" ":1")
+             ;; Tests write to $HOME.
+             (setenv "HOME" (getcwd))
+             ;; Tests look for $XDG_RUNTIME_DIR.
+             (setenv "XDG_RUNTIME_DIR" (getcwd))
+             ;; For missing '/etc/machine-id'.
+             (setenv "DBUS_FATAL_WARNINGS" "0")
+             #t))
+         (add-after 'install 'move-doc
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (doc (assoc-ref outputs "doc")))
+               (mkdir-p (string-append doc "/share/doc"))
+               (rename-file
+                (string-append out "/share/doc")
+                (string-append doc "/share/doc")))
+             #t)))))
+    (native-inputs
+     `(("docbook-xml" ,docbook-xml-4.3)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection) ; for building introspection data
+       ("gtk-doc" ,gtk-doc)             ; for building documentation
+       ("intltool" ,intltool)
+       ("pkg-config" ,pkg-config)
+       ;;; These python modules are required for building documentation.
+       ("python-jinja2" ,python-jinja2)
+       ("python-markdown" ,python-markdown)
+       ("python-markupsafe" ,python-markupsafe)
+       ("python-pygments" ,python-pygments)
+       ("python-toml" ,python-toml)
+       ("python-typogrify" ,python-typogrify)
+       ("sassc" ,sassc)                 ; for building themes
+       ("vapigen" ,vala)
+       ("xsltproc" ,libxslt)            ; for building man-pages
+       ("xorg-server" ,xorg-server-for-tests)))
+    (inputs
+     `(("cloudproviders" ,libcloudproviders) ; for clould-providers support
+       ("colord" ,colord)               ; for color printing support
+       ("cups" ,cups)                   ; for CUPS print-backend
+       ;;("ffmpeg" ,ffmpeg)               ; for ffmpeg media-backend
+       ("fribidi" ,fribidi)
+       ;;("gstreamer" ,gstreamer)         ; for gstreamer media-backend
+       ("harfbuzz" ,harfbuzz)
+       ("iso-codes" ,iso-codes)
+       ("json-glib" ,json-glib)
+       ("librsvg" ,librsvg)
+       ("python" ,python)
+       ("rest" ,rest)
+       ;;("sysprof" ,sysprof)           ; for tracing support
+       ("tracker" ,tracker)))         ; for filechooser search support
+    (propagated-inputs
+     ;;; Following dependencies are referenced in .pc files.
+     `(("cairo" ,cairo)
+       ("epoxy" ,libepoxy)
+       ("fontconfig" ,fontconfig)
+       ("gdk-pixbuf" ,gdk-pixbuf+svg)
+       ("glib" ,glib)
+       ("graphene" ,graphene)
+       ("pango" ,pango)
+       ("vulkan" ,vulkan-loader)     ; for vulkan graphics API support
+       ("vulkan-headers" ,vulkan-headers)
+       ("wayland" ,wayland)             ; for wayland display-backend
+       ("wayland-protocols" ,wayland-protocols)
+       ("x11" ,libx11)                  ; for x11 display-backend
+       ("xcomposite" ,libxcomposite)
+       ("xcursor" ,libxcursor)
+       ("xdamage" ,libxdamage)
+       ("xext" ,libxext)
+       ("xfixes" ,libxfixes)
+       ("xi" ,libxi)
+       ("xinerama" ,libxinerama)        ; for xinerama support
+       ("xkbcommon" ,libxkbcommon)
+       ("xrandr" ,libxrandr)
+       ("xrender" ,libxrender)))
+    (native-search-paths
+     (list
+      (search-path-specification
+       (variable "GUIX_GTK4_PATH")
+       (files '("lib/gtk-4.0")))))
+    (search-paths native-search-paths)
+    (home-page "https://www.gtk.org/")
+    (synopsis "Cross-platform widget toolkit")
+    (description "GTK is a multi-platform toolkit for creating graphical user
+interfaces.  Offering a complete set of widgets, GTK is suitable for projects
+ranging from small one-off tools to complete application suites.")
+    (license license:lgpl2.1+)))
+
 (define-public gtk+-2
   (package
     (name "gtk+")
diff --git a/gnu/packages/patches/gtk4-honor-GUIX_GTK4_PATH.patch b/gnu/packages/patches/gtk4-honor-GUIX_GTK4_PATH.patch
new file mode 100644
index 0000000000..4a60023bf7
--- /dev/null
+++ b/gnu/packages/patches/gtk4-honor-GUIX_GTK4_PATH.patch
@@ -0,0 +1,51 @@
+From 889294a93fc6464c2c2919bc47f6fd85ec823363 Mon Sep 17 00:00:00 2001
+From: Raghav Gururajan <rg@raghavgururajan.name>
+Date: Tue, 18 May 2021 19:57:00 -0400
+Subject: [PATCH] [PATCH]: Honor GUIX_GTK4_PATH.
+
+This patch makes GTK look for additional modules in a list of directories
+specified by the environment variable "GUIX_GTK4_PATH". This can be used
+instead of "GTK_PATH" to make GTK find modules that are incompatible with
+other major versions of GTK.
+---
+ gtk/gtkmodules.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c
+index aace5dcbc9..193b6a02e9 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 gchar *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.1
+
-- 
2.31.1





^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [bug#48554] Successful Build
  2021-05-21  4:06 [bug#48554] GTK v4 Raghav Gururajan via Guix-patches via
  2021-05-21  4:08 ` [bug#48554] [PATCH wip-gnome v1] gnu: Add gtk Raghav Gururajan via Guix-patches via
@ 2021-07-16 15:39 ` Charles via Guix-patches via
  2021-08-16  4:29 ` Raghav Gururajan via Guix-patches via
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 35+ messages in thread
From: Charles via Guix-patches via @ 2021-07-16 15:39 UTC (permalink / raw)
  To: 48554@debbugs.gnu.org

[-- Attachment #1: Type: text/plain, Size: 285 bytes --]

This is char from irc. I checked out wip-gnome, applied your patch, and built guix then gtk4. It took forever, but was built successfully. I used `./pre-inst-env guix build gtk` (that runs the tests right?). Event though there is no name conflict, I would still name the package gtk-4.

[-- Attachment #2: Type: text/html, Size: 305 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [bug#48554] Successful Build
  2021-05-21  4:06 [bug#48554] GTK v4 Raghav Gururajan via Guix-patches via
  2021-05-21  4:08 ` [bug#48554] [PATCH wip-gnome v1] gnu: Add gtk Raghav Gururajan via Guix-patches via
  2021-07-16 15:39 ` [bug#48554] Successful Build Charles via Guix-patches via
@ 2021-08-16  4:29 ` Raghav Gururajan via Guix-patches via
  2021-08-31  1:05 ` [bug#48554] GTK v4 Raghav Gururajan via Guix-patches via
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 35+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-08-16  4:29 UTC (permalink / raw)
  To: 48554


[-- Attachment #1.1.1: Type: text/plain, Size: 218 bytes --]

Hi Charles!

The tests are currently disabled in the package-definition via `#:tests? 
#f`.

You can remove that argument in the package-definition and then do 
`./pre-inst-env guix build gtk`.

Regards,
RG.

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 2649 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [bug#48554] GTK v4
  2021-05-21  4:06 [bug#48554] GTK v4 Raghav Gururajan via Guix-patches via
                   ` (2 preceding siblings ...)
  2021-08-16  4:29 ` Raghav Gururajan via Guix-patches via
@ 2021-08-31  1:05 ` Raghav Gururajan via Guix-patches via
  2021-08-31  5:53 ` Raghav Gururajan via Guix-patches via
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 35+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-08-31  1:05 UTC (permalink / raw)
  To: 48554


[-- Attachment #1.1.1: Type: text/plain, Size: 178 bytes --]

Hello Folks!

Just wanted to mention here that str1ngs and I had a discussion on 
2021-08-18 in IRC.

https://logs.guix.gnu.org/guix/2021-08-18.log#040318

Regards,
RG.

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 2649 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [bug#48554] GTK v4
  2021-05-21  4:06 [bug#48554] GTK v4 Raghav Gururajan via Guix-patches via
                   ` (3 preceding siblings ...)
  2021-08-31  1:05 ` [bug#48554] GTK v4 Raghav Gururajan via Guix-patches via
@ 2021-08-31  5:53 ` Raghav Gururajan via Guix-patches via
  2021-09-02 14:12 ` [bug#48554] [PATCH wip-gnome v2] gnu: Add gtk Raghav Gururajan via Guix-patches via
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 35+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-08-31  5:53 UTC (permalink / raw)
  To: 48554


[-- Attachment #1.1.1: Type: text/plain, Size: 66 bytes --]

Majority of tests fail with the error "cannot open display: :1".

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 2649 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [bug#48554] [PATCH wip-gnome v2] gnu: Add gtk.
  2021-05-21  4:06 [bug#48554] GTK v4 Raghav Gururajan via Guix-patches via
                   ` (4 preceding siblings ...)
  2021-08-31  5:53 ` Raghav Gururajan via Guix-patches via
@ 2021-09-02 14:12 ` Raghav Gururajan via Guix-patches via
  2021-09-02 14:20   ` Maxime Devos
                     ` (2 more replies)
  2021-09-02 15:06 ` [bug#48554] [PATCH wip-gnome v3] " Raghav Gururajan via Guix-patches via
                   ` (8 subsequent siblings)
  14 siblings, 3 replies; 35+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-09-02 14:12 UTC (permalink / raw)
  To: 48554; +Cc: Raghav Gururajan

* gnu/packages/gtk.scm (gtk): New variable.
* gnu/packages/patches/gtk4-honor-GUIX_GTK4_PATH.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                  |   1 +
 gnu/packages/gtk.scm                          | 143 ++++++++++++++++++
 .../patches/gtk4-honor-GUIX_GTK4_PATH.patch   |  51 +++++++
 3 files changed, 195 insertions(+)
 create mode 100644 gnu/packages/patches/gtk4-honor-GUIX_GTK4_PATH.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 8aa20471d5..7922712b04 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1204,6 +1204,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-honor-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 ada006b671..d4f856ed21 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -91,11 +91,13 @@
   #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages profiling)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-build)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages guile-xyz)
   #:use-module (gnu packages cups)
   #:use-module (gnu packages version-control)
+  #:use-module (gnu packages vulkan)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
@@ -833,6 +835,147 @@ is part of the GNOME accessibility project.")
     (license license:lgpl2.1+)
     (home-page "https://wiki.gnome.org/Accessibility/")))
 
+(define-public gtk
+  (package
+    (name "gtk")
+    (version "4.2.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://gnome/sources/" name "/"
+                           (version-major+minor version)  "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32 "1rh9fd5axf79pmd93hb2fmmflic5swcvqvq6vqghlgz4bmvnjc82"))
+       (patches
+        (search-patches "gtk4-honor-GUIX_GTK4_PATH.patch"))))
+    (build-system meson-build-system)
+    (outputs '("out" "doc"))
+    (arguments
+     `(#:meson ,meson-0.55     ;project requires meson v0.55 or higher
+       #:configure-flags
+       (list
+        "-Dbroadway-backend=true"       ;for broadway display-backend
+        "-Dcloudproviders=enabled"      ;for cloud-providers support
+        ;;"-Dsysprof=enabled"           ;for tracing support
+        "-Dtracker=enabled"            ;for filechooser search support
+        "-Dcolord=enabled"             ;for color printing support
+        "-Dgtk_doc=true"
+        "-Dman-pages=true")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; Fix DTD resource of docbook-xml.
+             (substitute* (find-files "docs" "\\.xml$")
+               (("http://www.oasis-open.org/docbook/xml/4.3/")
+                (string-append (assoc-ref inputs "docbook-xml-4.3")
+                               "/xml/dtd/docbook/")))
+             ;; Use X display server for tests.
+             (substitute* (find-files "testsuite" "meson.build")
+               (("GDK_BACKEND=(wayland|broadway)")
+                "GDK_BACKEND=x11")
+               (("TEST_OUTPUT_SUBDIR=(wayland|brodway)")
+                "TEST_OUTPUT_SUBDIR=x11"))
+             ;; Disable failing tests.
+             ;; https://paste.sr.ht/blob/d70e2a92f329ed9b557f3268101cd312f7762a84
+             (substitute* '("testsuite/tools/meson.build"
+                            "testsuite/gsk/meson.build")
+               (("'validate', ") "")
+               (("[ \t]*'empty-text.node',") "")
+               (("[ \t]*'testswitch.node',") "")
+               (("[ \t]*'widgetfactory.node',") ""))))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; Tests require a running X server.
+             (system "Xvfb :1 +extension GLX &")
+             (setenv "DISPLAY" ":1")
+             ;; Tests write to $HOME.
+             (setenv "HOME" (getcwd))
+             ;; Tests look for $XDG_RUNTIME_DIR.
+             (setenv "XDG_RUNTIME_DIR" (getcwd))
+             ;; For missing '/etc/machine-id'.
+             (setenv "DBUS_FATAL_WARNINGS" "0")))
+         (add-after 'install 'move-doc
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (doc (assoc-ref outputs "doc")))
+               (mkdir-p (string-append doc "/share/doc"))
+               (rename-file
+                (string-append out "/share/doc")
+                (string-append doc "/share/doc"))))))))
+    (native-inputs
+     `(("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext-minimal" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection) ;for building introspection data
+       ("gtk-doc" ,gtk-doc)             ;for building documentation
+       ("intltool" ,intltool)
+       ("libxslt" ,libxslt)             ;for building man-pages
+       ("pkg-config" ,pkg-config)
+       ;; These python modules are required for building documentation.
+       ("python-jinja2" ,python-jinja2)
+       ("python-markdown" ,python-markdown)
+       ("python-markupsafe" ,python-markupsafe)
+       ("python-pygments" ,python-pygments)
+       ("python-toml" ,python-toml)
+       ("python-typogrify" ,python-typogrify)
+       ("sassc" ,sassc)                 ;for building themes
+       ("vala" ,vala)
+       ("xorg-server-for-tests" ,xorg-server-for-tests)))
+    (inputs
+     `(("colord" ,colord)               ;for color printing support
+       ("cups" ,cups)                   ;for CUPS print-backend
+       ;;("ffmpeg" ,ffmpeg)               ;for ffmpeg media-backend
+       ("fribidi" ,fribidi)
+       ;;("gstreamer" ,gstreamer)         ;for gstreamer media-backend
+       ("harfbuzz" ,harfbuzz)
+       ("iso-codes" ,iso-codes)
+       ("json-glib" ,json-glib)
+       ("libcloudproviders" ,libcloudproviders) ; for clould-providers support
+       ("librsvg" ,librsvg)
+       ("python" ,python)
+       ("rest" ,rest)
+       ;;("sysprof" ,sysprof)           ;for tracing support
+       ("tracker" ,tracker)))          ;for filechooser search support
+    (propagated-inputs
+     ;; Following dependencies are referenced in .pc files.
+     `(("cairo" ,cairo)
+       ("fontconfig" ,fontconfig)
+       ("gdk-pixbuf+svg" ,gdk-pixbuf+svg)
+       ("glib" ,glib)
+       ("graphene" ,graphene)
+       ("libepoxy" ,libepoxy)
+       ("libx11" ,libx11)               ;for x11 display-backend
+       ("libxcomposite" ,libxcomposite)
+       ("libxcursor" ,libxcursor)
+       ("libxdamage" ,libxdamage)
+       ("libxext" ,libxext)
+       ("libxfixes" ,libxfixes)
+       ("libxi" ,libxi)
+       ("libxinerama" ,libxinerama)     ;for xinerama support
+       ("libxkbcommon" ,libxkbcommon)
+       ("libxrandr" ,libxrandr)
+       ("libxrender" ,libxrender)
+       ("pango" ,pango)
+       ("vulkan-headers" ,vulkan-headers)
+       ("vulkan-loader" ,vulkan-loader) ;for vulkan graphics API support
+       ("wayland" ,wayland)             ;for wayland display-backend
+       ("wayland-protocols" ,wayland-protocols)))
+    (native-search-paths
+     (list
+      (search-path-specification
+       (variable "GUIX_GTK4_PATH")
+       (files '("lib/gtk-4.0")))))
+    (search-paths native-search-paths)
+    (home-page "https://www.gtk.org/")
+    (synopsis "Cross-platform widget toolkit")
+    (description "GTK is a multi-platform toolkit for creating graphical user
+interfaces.  Offering a complete set of widgets, GTK is suitable for projects
+ranging from small one-off tools to complete application suites.")
+    (license license:lgpl2.1+)))
+
 (define-public gtk+-2
   (package
     (name "gtk+")
diff --git a/gnu/packages/patches/gtk4-honor-GUIX_GTK4_PATH.patch b/gnu/packages/patches/gtk4-honor-GUIX_GTK4_PATH.patch
new file mode 100644
index 0000000000..4a60023bf7
--- /dev/null
+++ b/gnu/packages/patches/gtk4-honor-GUIX_GTK4_PATH.patch
@@ -0,0 +1,51 @@
+From 889294a93fc6464c2c2919bc47f6fd85ec823363 Mon Sep 17 00:00:00 2001
+From: Raghav Gururajan <rg@raghavgururajan.name>
+Date: Tue, 18 May 2021 19:57:00 -0400
+Subject: [PATCH] [PATCH]: Honor GUIX_GTK4_PATH.
+
+This patch makes GTK look for additional modules in a list of directories
+specified by the environment variable "GUIX_GTK4_PATH". This can be used
+instead of "GTK_PATH" to make GTK find modules that are incompatible with
+other major versions of GTK.
+---
+ gtk/gtkmodules.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c
+index aace5dcbc9..193b6a02e9 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 gchar *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.1
+
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [bug#48554] [PATCH wip-gnome v2] gnu: Add gtk.
  2021-09-02 14:12 ` [bug#48554] [PATCH wip-gnome v2] gnu: Add gtk Raghav Gururajan via Guix-patches via
@ 2021-09-02 14:20   ` Maxime Devos
  2021-09-02 14:23     ` Raghav Gururajan via Guix-patches via
  2021-09-02 14:28   ` Maxime Devos
  2021-09-02 14:29   ` Maxime Devos
  2 siblings, 1 reply; 35+ messages in thread
From: Maxime Devos @ 2021-09-02 14:20 UTC (permalink / raw)
  To: Raghav Gururajan, 48554

[-- Attachment #1: Type: text/plain, Size: 514 bytes --]

Raghav Gururajan via Guix-patches via schreef op do 02-09-2021 om 10:12 [-0400]:
> +                (string-append (assoc-ref inputs "docbook-xml-4.3")

'docbook-xml-4.3' is in 'native-inputs', not 'inputs', so this should
use (assoc-ref (or native-inputs inputs) "docbook-xml-4.3").
There are a number of package definitions that do
(assoc-ref inputs "docbook-xml-4.3"), but they are wrong,
and I had to fix a few in <https://issues.guix.gnu.org/50201>
to make them cross-compile.

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [bug#48554] [PATCH wip-gnome v2] gnu: Add gtk.
  2021-09-02 14:20   ` Maxime Devos
@ 2021-09-02 14:23     ` Raghav Gururajan via Guix-patches via
  0 siblings, 0 replies; 35+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-09-02 14:23 UTC (permalink / raw)
  To: Maxime Devos, 48554


[-- Attachment #1.1.1: Type: text/plain, Size: 433 bytes --]

Hi Maxime!

> 'docbook-xml-4.3' is in 'native-inputs', not 'inputs', so this should
> use (assoc-ref (or native-inputs inputs) "docbook-xml-4.3").
> There are a number of package definitions that do
> (assoc-ref inputs "docbook-xml-4.3"), but they are wrong,
> and I had to fix a few in <https://issues.guix.gnu.org/50201>
> to make them cross-compile.

Thanks for catching it. I'll make the change in v3.

Regards,
RG.

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 2649 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [bug#48554] [PATCH wip-gnome v2] gnu: Add gtk.
  2021-09-02 14:12 ` [bug#48554] [PATCH wip-gnome v2] gnu: Add gtk Raghav Gururajan via Guix-patches via
  2021-09-02 14:20   ` Maxime Devos
@ 2021-09-02 14:28   ` Maxime Devos
  2021-09-02 15:07     ` Raghav Gururajan via Guix-patches via
  2021-09-02 14:29   ` Maxime Devos
  2 siblings, 1 reply; 35+ messages in thread
From: Maxime Devos @ 2021-09-02 14:28 UTC (permalink / raw)
  To: Raghav Gururajan, 48554

[-- Attachment #1: Type: text/plain, Size: 530 bytes --]

Raghav Gururajan via Guix-patches via schreef op do 02-09-2021 om 10:12 [-0400]:
> +        "-Dgtk_doc=true"

Only when compiling natively.  At least for json-glib,
setting Dgtk_doc=true will cause gtk-doc-scangobj to try to
execute a cross-compiled binary, which won't work, see
<https://issues.guix.gnu.org/50201#33>.

Though possibly not all packages with gtk_doc use gtk-doc-scangobj,
so leaving this for later, when all dependencies of gtk are actually
cross-compilable, might be reasonable.

Greetings,
Maxime

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [bug#48554] [PATCH wip-gnome v2] gnu: Add gtk.
  2021-09-02 14:12 ` [bug#48554] [PATCH wip-gnome v2] gnu: Add gtk Raghav Gururajan via Guix-patches via
  2021-09-02 14:20   ` Maxime Devos
  2021-09-02 14:28   ` Maxime Devos
@ 2021-09-02 14:29   ` Maxime Devos
  2021-09-02 15:10     ` Raghav Gururajan via Guix-patches via
  2 siblings, 1 reply; 35+ messages in thread
From: Maxime Devos @ 2021-09-02 14:29 UTC (permalink / raw)
  To: Raghav Gururajan, 48554

[-- Attachment #1: Type: text/plain, Size: 812 bytes --]

Raghav Gururajan via Guix-patches via schreef op do 02-09-2021 om 10:12 [-0400]:
> +     `(("colord" ,colord)               ;for color printing support
> +       ("cups" ,cups)                   ;for CUPS print-backend
> +       ;;("ffmpeg" ,ffmpeg)               ;for ffmpeg media-backend
> +       ("fribidi" ,fribidi)
> +       ;;("gstreamer" ,gstreamer)         ;for gstreamer media-backend
> +       ("harfbuzz" ,harfbuzz)
> +       ("iso-codes" ,iso-codes)
> +       ("json-glib" ,json-glib)
> +       ("libcloudproviders" ,libcloudproviders) ; for clould-providers support
> +       ("librsvg" ,librsvg)
> +       ("python" ,python)
> +       ("rest" ,rest)
> +       ;;("sysprof" ,sysprof)           ;for tracing support

What's the reason for commenting them out?

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [bug#48554] [PATCH wip-gnome v3] gnu: Add gtk.
  2021-05-21  4:06 [bug#48554] GTK v4 Raghav Gururajan via Guix-patches via
                   ` (5 preceding siblings ...)
  2021-09-02 14:12 ` [bug#48554] [PATCH wip-gnome v2] gnu: Add gtk Raghav Gururajan via Guix-patches via
@ 2021-09-02 15:06 ` Raghav Gururajan via Guix-patches via
  2021-09-02 15:37 ` [bug#48554] [PATCH wip-gnome v4] " Raghav Gururajan via Guix-patches via
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 35+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-09-02 15:06 UTC (permalink / raw)
  To: 48554; +Cc: Raghav Gururajan

* gnu/packages/gtk.scm (gtk): New variable.
* gnu/packages/patches/gtk4-honor-GUIX_GTK4_PATH.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                  |   1 +
 gnu/packages/gtk.scm                          | 149 ++++++++++++++++++
 .../patches/gtk4-honor-GUIX_GTK4_PATH.patch   |  51 ++++++
 3 files changed, 201 insertions(+)
 create mode 100644 gnu/packages/patches/gtk4-honor-GUIX_GTK4_PATH.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 8aa20471d5..7922712b04 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1204,6 +1204,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-honor-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 ada006b671..6e1d747259 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -91,11 +91,13 @@
   #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages profiling)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-build)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages guile-xyz)
   #:use-module (gnu packages cups)
   #:use-module (gnu packages version-control)
+  #:use-module (gnu packages vulkan)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
@@ -833,6 +835,153 @@ is part of the GNOME accessibility project.")
     (license license:lgpl2.1+)
     (home-page "https://wiki.gnome.org/Accessibility/")))
 
+(define-public gtk
+  (package
+    (name "gtk")
+    (version "4.2.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://gnome/sources/" name "/"
+                           (version-major+minor version)  "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32 "1rh9fd5axf79pmd93hb2fmmflic5swcvqvq6vqghlgz4bmvnjc82"))
+       (patches
+        (search-patches "gtk4-honor-GUIX_GTK4_PATH.patch"))))
+    (build-system meson-build-system)
+    (outputs '("out" "doc"))
+    (arguments
+     `(#:meson ,meson-0.55     ;project requires meson v0.55 or higher
+       #:configure-flags
+       (list
+        "-Dbroadway-backend=true"       ;for broadway display-backend
+        "-Dcloudproviders=enabled"      ;for cloud-providers support
+        ;;"-Dsysprof=enabled"           ;for tracing support
+        "-Dtracker=enabled"            ;for filechooser search support
+        "-Dcolord=enabled"             ;for color printing support
+        ,@(if (%current-target-system)
+              ;; If true, gtkdoc-scangobj will try to execute a
+              ;; cross-compiled binary.
+              '("-Dgtk_doc=false")
+              '("-Dgtk_doc=true"))
+        "-Dman-pages=true")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch
+           (lambda* (#:key inputs native-inputs #:allow-other-keys)
+             ;; Fix DTD resource of docbook-xml.
+             (substitute* (find-files "docs" "\\.xml$")
+               (("http://www.oasis-open.org/docbook/xml/4.3/")
+                (string-append
+                 (assoc-ref (or native-inputs inputs) "docbook-xml-4.3")
+                 "/xml/dtd/docbook/")))
+             ;; Disable failing tests.
+             ;; https://paste.sr.ht/blob/d70e2a92f329ed9b557f3268101cd312f7762a84
+             (substitute* (find-files "testsuite" "meson.build")
+               (("'validate', ") "")
+               (("[ \t]*'empty-text.node',") "")
+               (("[ \t]*'testswitch.node',") "")
+               (("[ \t]*'widgetfactory.node',") ""))))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; Tests require a running X server.
+             (system "Xvfb :1 +extension GLX &")
+             (setenv "DISPLAY" ":1")
+             ;; Tests write to $HOME.
+             (setenv "HOME" (getcwd))
+             ;; Tests look for $XDG_RUNTIME_DIR.
+             (setenv "XDG_RUNTIME_DIR" (getcwd))
+             ;; For missing '/etc/machine-id'.
+             (setenv "DBUS_FATAL_WARNINGS" "0")))
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               ;; Only run tests with x11 setup, instead of wayland.
+               (invoke "meson" "test" "--setup=x11"))))
+         (add-after 'install 'move-doc
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (doc (assoc-ref outputs "doc")))
+               (mkdir-p (string-append doc "/share/doc"))
+               (rename-file
+                (string-append out "/share/doc")
+                (string-append doc "/share/doc"))))))))
+    (native-inputs
+     `(("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext-minimal" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection) ;for building introspection data
+       ("gtk-doc" ,gtk-doc)             ;for building documentation
+       ("intltool" ,intltool)
+       ("libxslt" ,libxslt)             ;for building man-pages
+       ("pkg-config" ,pkg-config)
+       ;; These python modules are required for building documentation.
+       ("python-jinja2" ,python-jinja2)
+       ("python-markdown" ,python-markdown)
+       ("python-markupsafe" ,python-markupsafe)
+       ("python-pygments" ,python-pygments)
+       ("python-toml" ,python-toml)
+       ("python-typogrify" ,python-typogrify)
+       ("sassc" ,sassc)                 ;for building themes
+       ("vala" ,vala)
+       ("xorg-server-for-tests" ,xorg-server-for-tests)))
+    (inputs
+     ;; The disabled packages currently doesn't
+     ;; build successfully on wip-gnome branch.
+     ;; Enable them once they are fixed.
+     `(("colord" ,colord)               ;for color printing support
+       ("cups" ,cups)                   ;for CUPS print-backend
+       ;;("ffmpeg" ,ffmpeg)               ;for ffmpeg media-backend
+       ("fribidi" ,fribidi)
+       ;;("gstreamer" ,gstreamer)         ;for gstreamer media-backend
+       ("harfbuzz" ,harfbuzz)
+       ("iso-codes" ,iso-codes)
+       ("json-glib" ,json-glib)
+       ("libcloudproviders" ,libcloudproviders) ; for clould-providers support
+       ("librsvg" ,librsvg)
+       ("python" ,python)
+       ("rest" ,rest)
+       ;;("sysprof" ,sysprof)           ;for tracing support
+       ("tracker" ,tracker)))          ;for filechooser search support
+    (propagated-inputs
+     ;; Following dependencies are referenced in .pc files.
+     `(("cairo" ,cairo)
+       ("fontconfig" ,fontconfig)
+       ("gdk-pixbuf+svg" ,gdk-pixbuf+svg)
+       ("glib" ,glib)
+       ("graphene" ,graphene)
+       ("libepoxy" ,libepoxy)
+       ("libx11" ,libx11)               ;for x11 display-backend
+       ("libxcomposite" ,libxcomposite)
+       ("libxcursor" ,libxcursor)
+       ("libxdamage" ,libxdamage)
+       ("libxext" ,libxext)
+       ("libxfixes" ,libxfixes)
+       ("libxi" ,libxi)
+       ("libxinerama" ,libxinerama)     ;for xinerama support
+       ("libxkbcommon" ,libxkbcommon)
+       ("libxrandr" ,libxrandr)
+       ("libxrender" ,libxrender)
+       ("pango" ,pango)
+       ("vulkan-headers" ,vulkan-headers)
+       ("vulkan-loader" ,vulkan-loader) ;for vulkan graphics API support
+       ("wayland" ,wayland)             ;for wayland display-backend
+       ("wayland-protocols" ,wayland-protocols)))
+    (native-search-paths
+     (list
+      (search-path-specification
+       (variable "GUIX_GTK4_PATH")
+       (files '("lib/gtk-4.0")))))
+    (search-paths native-search-paths)
+    (home-page "https://www.gtk.org/")
+    (synopsis "Cross-platform widget toolkit")
+    (description "GTK is a multi-platform toolkit for creating graphical user
+interfaces.  Offering a complete set of widgets, GTK is suitable for projects
+ranging from small one-off tools to complete application suites.")
+    (license license:lgpl2.1+)))
+
 (define-public gtk+-2
   (package
     (name "gtk+")
diff --git a/gnu/packages/patches/gtk4-honor-GUIX_GTK4_PATH.patch b/gnu/packages/patches/gtk4-honor-GUIX_GTK4_PATH.patch
new file mode 100644
index 0000000000..4a60023bf7
--- /dev/null
+++ b/gnu/packages/patches/gtk4-honor-GUIX_GTK4_PATH.patch
@@ -0,0 +1,51 @@
+From 889294a93fc6464c2c2919bc47f6fd85ec823363 Mon Sep 17 00:00:00 2001
+From: Raghav Gururajan <rg@raghavgururajan.name>
+Date: Tue, 18 May 2021 19:57:00 -0400
+Subject: [PATCH] [PATCH]: Honor GUIX_GTK4_PATH.
+
+This patch makes GTK look for additional modules in a list of directories
+specified by the environment variable "GUIX_GTK4_PATH". This can be used
+instead of "GTK_PATH" to make GTK find modules that are incompatible with
+other major versions of GTK.
+---
+ gtk/gtkmodules.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c
+index aace5dcbc9..193b6a02e9 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 gchar *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.1
+
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [bug#48554] [PATCH wip-gnome v2] gnu: Add gtk.
  2021-09-02 14:28   ` Maxime Devos
@ 2021-09-02 15:07     ` Raghav Gururajan via Guix-patches via
  0 siblings, 0 replies; 35+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-09-02 15:07 UTC (permalink / raw)
  To: Maxime Devos, 48554


[-- Attachment #1.1.1: Type: text/plain, Size: 506 bytes --]

Hi Maxime!

> Only when compiling natively.  At least for json-glib,
> setting Dgtk_doc=true will cause gtk-doc-scangobj to try to
> execute a cross-compiled binary, which won't work, see
> <https://issues.guix.gnu.org/50201#33>.
> 
> Though possibly not all packages with gtk_doc use gtk-doc-scangobj,
> so leaving this for later, when all dependencies of gtk are actually
> cross-compilable, might be reasonable.

Thanks for pointing it out. I have added if-condition in v3.

Regards,
RG.

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 2649 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [bug#48554] [PATCH wip-gnome v2] gnu: Add gtk.
  2021-09-02 14:29   ` Maxime Devos
@ 2021-09-02 15:10     ` Raghav Gururajan via Guix-patches via
  0 siblings, 0 replies; 35+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-09-02 15:10 UTC (permalink / raw)
  To: Maxime Devos, 48554


[-- Attachment #1.1.1: Type: text/plain, Size: 270 bytes --]

Hi Maxime!

> What's the reason for commenting them out?

Those packages doesn't build on wip-gnome, due to an issue with gtkmm. 
Once gtk is merged, I will be fixing the build of gtkmm. Once done, I'll 
be enabling those packages in the inputs.

Regards,
RG.

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 2649 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [bug#48554] [PATCH wip-gnome v4] gnu: Add gtk.
  2021-05-21  4:06 [bug#48554] GTK v4 Raghav Gururajan via Guix-patches via
                   ` (6 preceding siblings ...)
  2021-09-02 15:06 ` [bug#48554] [PATCH wip-gnome v3] " Raghav Gururajan via Guix-patches via
@ 2021-09-02 15:37 ` Raghav Gururajan via Guix-patches via
  2021-09-02 20:09 ` [bug#48554] [PATCH wip-gnome v5 1/2] " Raghav Gururajan via Guix-patches via
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 35+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-09-02 15:37 UTC (permalink / raw)
  To: 48554; +Cc: Raghav Gururajan

* gnu/packages/gtk.scm (gtk): New variable.
* gnu/packages/patches/gtk4-honor-GUIX_GTK4_PATH.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                  |   1 +
 gnu/packages/gtk.scm                          | 148 ++++++++++++++++++
 .../patches/gtk4-honor-GUIX_GTK4_PATH.patch   |  51 ++++++
 3 files changed, 200 insertions(+)
 create mode 100644 gnu/packages/patches/gtk4-honor-GUIX_GTK4_PATH.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 8aa20471d5..7922712b04 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1204,6 +1204,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-honor-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 ada006b671..3f0042d7d0 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -91,11 +91,13 @@
   #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages profiling)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-build)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages guile-xyz)
   #:use-module (gnu packages cups)
   #:use-module (gnu packages version-control)
+  #:use-module (gnu packages vulkan)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
@@ -833,6 +835,152 @@ is part of the GNOME accessibility project.")
     (license license:lgpl2.1+)
     (home-page "https://wiki.gnome.org/Accessibility/")))
 
+(define-public gtk
+  (package
+    (name "gtk")
+    (version "4.2.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://gnome/sources/" name "/"
+                           (version-major+minor version)  "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32 "1rh9fd5axf79pmd93hb2fmmflic5swcvqvq6vqghlgz4bmvnjc82"))
+       (patches
+        (search-patches "gtk4-honor-GUIX_GTK4_PATH.patch"))))
+    (build-system meson-build-system)
+    (outputs '("out" "doc"))
+    (arguments
+     `(#:meson ,meson-0.55     ;project requires meson v0.55 or higher
+       #:configure-flags
+       (list
+        "-Dbroadway-backend=true"       ;for broadway display-backend
+        "-Dcloudproviders=enabled"      ;for cloud-providers support
+        ;;"-Dsysprof=enabled"           ;for tracing support
+        "-Dtracker=enabled"            ;for filechooser search support
+        "-Dcolord=enabled"             ;for color printing support
+        ,@(if (%current-target-system)
+              ;; If true, gtkdoc-scangobj will try to execute a
+              ;; cross-compiled binary.
+              '("-Dgtk_doc=false")
+              '("-Dgtk_doc=true"))
+        "-Dman-pages=true")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch
+           (lambda* (#:key inputs native-inputs #:allow-other-keys)
+             ;; Fix DTD resource of docbook-xml.
+             (substitute* (find-files "docs" "\\.xml$")
+               (("http://www.oasis-open.org/docbook/xml/4.3/")
+                (string-append
+                 (assoc-ref (or native-inputs inputs) "docbook-xml-4.3")
+                 "/xml/dtd/docbook/")))
+             ;; Disable failing tests.
+             ;; https://paste.sr.ht/blob/0af160f1172a58dff88a5cf6354ecba613cccdef
+             (substitute* (find-files "testsuite" "meson.build")
+               (("[ \t]*'empty-text.node',") "")
+               (("[ \t]*'testswitch.node',") "")
+               (("[ \t]*'widgetfactory.node',") ""))))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; Tests require a running X server.
+             (system "Xvfb :1 +extension GLX &")
+             (setenv "DISPLAY" ":1")
+             ;; Tests write to $HOME.
+             (setenv "HOME" (getcwd))
+             ;; Tests look for $XDG_RUNTIME_DIR.
+             (setenv "XDG_RUNTIME_DIR" (getcwd))
+             ;; For missing '/etc/machine-id'.
+             (setenv "DBUS_FATAL_WARNINGS" "0")))
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               ;; Only run tests with x11 setup, instead of wayland.
+               (invoke "meson" "test" "--setup=x11"))))
+         (add-after 'install 'move-doc
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (doc (assoc-ref outputs "doc")))
+               (mkdir-p (string-append doc "/share/doc"))
+               (rename-file
+                (string-append out "/share/doc")
+                (string-append doc "/share/doc"))))))))
+    (native-inputs
+     `(("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext-minimal" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection) ;for building introspection data
+       ("gtk-doc" ,gtk-doc)             ;for building documentation
+       ("intltool" ,intltool)
+       ("libxslt" ,libxslt)             ;for building man-pages
+       ("pkg-config" ,pkg-config)
+       ;; These python modules are required for building documentation.
+       ("python-jinja2" ,python-jinja2)
+       ("python-markdown" ,python-markdown)
+       ("python-markupsafe" ,python-markupsafe)
+       ("python-pygments" ,python-pygments)
+       ("python-toml" ,python-toml)
+       ("python-typogrify" ,python-typogrify)
+       ("sassc" ,sassc)                 ;for building themes
+       ("vala" ,vala)
+       ("xorg-server-for-tests" ,xorg-server-for-tests)))
+    (inputs
+     ;; The disabled packages currently doesn't
+     ;; build successfully on wip-gnome branch.
+     ;; Enable them once they are fixed.
+     `(("colord" ,colord)               ;for color printing support
+       ("cups" ,cups)                   ;for CUPS print-backend
+       ;;("ffmpeg" ,ffmpeg)               ;for ffmpeg media-backend
+       ("fribidi" ,fribidi)
+       ;;("gstreamer" ,gstreamer)         ;for gstreamer media-backend
+       ("harfbuzz" ,harfbuzz)
+       ("iso-codes" ,iso-codes)
+       ("json-glib" ,json-glib)
+       ("libcloudproviders" ,libcloudproviders) ;for clould-providers support
+       ("librsvg" ,librsvg)
+       ("python" ,python)
+       ("rest" ,rest)
+       ;;("sysprof" ,sysprof)           ;for tracing support
+       ("tracker" ,tracker)))          ;for filechooser search support
+    (propagated-inputs
+     ;; Following dependencies are referenced in .pc files.
+     `(("cairo" ,cairo)
+       ("fontconfig" ,fontconfig)
+       ("gdk-pixbuf+svg" ,gdk-pixbuf+svg)
+       ("glib" ,glib)
+       ("graphene" ,graphene)
+       ("libepoxy" ,libepoxy)
+       ("libx11" ,libx11)               ;for x11 display-backend
+       ("libxcomposite" ,libxcomposite)
+       ("libxcursor" ,libxcursor)
+       ("libxdamage" ,libxdamage)
+       ("libxext" ,libxext)
+       ("libxfixes" ,libxfixes)
+       ("libxi" ,libxi)
+       ("libxinerama" ,libxinerama)     ;for xinerama support
+       ("libxkbcommon" ,libxkbcommon)
+       ("libxrandr" ,libxrandr)
+       ("libxrender" ,libxrender)
+       ("pango" ,pango)
+       ("vulkan-headers" ,vulkan-headers)
+       ("vulkan-loader" ,vulkan-loader) ;for vulkan graphics API support
+       ("wayland" ,wayland)             ;for wayland display-backend
+       ("wayland-protocols" ,wayland-protocols)))
+    (native-search-paths
+     (list
+      (search-path-specification
+       (variable "GUIX_GTK4_PATH")
+       (files '("lib/gtk-4.0")))))
+    (search-paths native-search-paths)
+    (home-page "https://www.gtk.org/")
+    (synopsis "Cross-platform widget toolkit")
+    (description "GTK is a multi-platform toolkit for creating graphical user
+interfaces.  Offering a complete set of widgets, GTK is suitable for projects
+ranging from small one-off tools to complete application suites.")
+    (license license:lgpl2.1+)))
+
 (define-public gtk+-2
   (package
     (name "gtk+")
diff --git a/gnu/packages/patches/gtk4-honor-GUIX_GTK4_PATH.patch b/gnu/packages/patches/gtk4-honor-GUIX_GTK4_PATH.patch
new file mode 100644
index 0000000000..4a60023bf7
--- /dev/null
+++ b/gnu/packages/patches/gtk4-honor-GUIX_GTK4_PATH.patch
@@ -0,0 +1,51 @@
+From 889294a93fc6464c2c2919bc47f6fd85ec823363 Mon Sep 17 00:00:00 2001
+From: Raghav Gururajan <rg@raghavgururajan.name>
+Date: Tue, 18 May 2021 19:57:00 -0400
+Subject: [PATCH] [PATCH]: Honor GUIX_GTK4_PATH.
+
+This patch makes GTK look for additional modules in a list of directories
+specified by the environment variable "GUIX_GTK4_PATH". This can be used
+instead of "GTK_PATH" to make GTK find modules that are incompatible with
+other major versions of GTK.
+---
+ gtk/gtkmodules.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c
+index aace5dcbc9..193b6a02e9 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 gchar *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.1
+
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [bug#48554] [PATCH wip-gnome v5 1/2] gnu: Add gtk.
  2021-05-21  4:06 [bug#48554] GTK v4 Raghav Gururajan via Guix-patches via
                   ` (7 preceding siblings ...)
  2021-09-02 15:37 ` [bug#48554] [PATCH wip-gnome v4] " Raghav Gururajan via Guix-patches via
@ 2021-09-02 20:09 ` Raghav Gururajan via Guix-patches via
  2021-09-02 20:09   ` [bug#48554] [PATCH wip-gnome v5 2/2] gnu: Update gtkmm to 4.2.0, add gtkmm@3, and adjust gtkmm@2 Raghav Gururajan via Guix-patches via
  2021-09-02 20:41 ` [bug#48554] [PATCH wip-gnome v6 1/4] gnu: Add gtk Raghav Gururajan via Guix-patches via
                   ` (5 subsequent siblings)
  14 siblings, 1 reply; 35+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-09-02 20:09 UTC (permalink / raw)
  To: 48554; +Cc: Raghav Gururajan

* gnu/packages/gtk.scm (gtk): New variable.
* gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                  |   1 +
 gnu/packages/gtk.scm                          | 148 ++++++++++++++++++
 .../patches/gtk4-respect-GUIX_GTK4_PATH.patch |  51 ++++++
 3 files changed, 200 insertions(+)
 create mode 100644 gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 8aa20471d5..7922712b04 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1204,6 +1204,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-honor-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 ada006b671..97eda06d4b 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -91,11 +91,13 @@
   #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages profiling)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-build)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages guile-xyz)
   #:use-module (gnu packages cups)
   #:use-module (gnu packages version-control)
+  #:use-module (gnu packages vulkan)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
@@ -833,6 +835,152 @@ is part of the GNOME accessibility project.")
     (license license:lgpl2.1+)
     (home-page "https://wiki.gnome.org/Accessibility/")))
 
+(define-public gtk
+  (package
+    (name "gtk")
+    (version "4.2.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://gnome/sources/" name "/"
+                           (version-major+minor version)  "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32 "1rh9fd5axf79pmd93hb2fmmflic5swcvqvq6vqghlgz4bmvnjc82"))
+       (patches
+        (search-patches "gtk4-respect-GUIX_GTK4_PATH.patch"))))
+    (build-system meson-build-system)
+    (outputs '("out" "doc"))
+    (arguments
+     `(#:meson ,meson-0.55     ;project requires meson v0.55 or higher
+       #:configure-flags
+       (list
+        "-Dbroadway-backend=true"       ;for broadway display-backend
+        "-Dcloudproviders=enabled"      ;for cloud-providers support
+        ;;"-Dsysprof=enabled"           ;for tracing support
+        "-Dtracker=enabled"            ;for filechooser search support
+        "-Dcolord=enabled"             ;for color printing support
+        ,@(if (%current-target-system)
+              ;; If true, gtkdoc-scangobj will try to execute a
+              ;; cross-compiled binary.
+              '("-Dgtk_doc=false")
+              '("-Dgtk_doc=true"))
+        "-Dman-pages=true")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch
+           (lambda* (#:key inputs native-inputs #:allow-other-keys)
+             ;; Fix DTD resource of docbook-xml.
+             (substitute* (find-files "docs" "\\.xml$")
+               (("http://www.oasis-open.org/docbook/xml/4.3/")
+                (string-append
+                 (assoc-ref (or native-inputs inputs) "docbook-xml-4.3")
+                 "/xml/dtd/docbook/")))
+             ;; Disable failing tests.
+             ;; https://paste.sr.ht/blob/0af160f1172a58dff88a5cf6354ecba613cccdef
+             (substitute* (find-files "testsuite" "meson.build")
+               (("[ \t]*'empty-text.node',") "")
+               (("[ \t]*'testswitch.node',") "")
+               (("[ \t]*'widgetfactory.node',") ""))))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; Tests require a running X server.
+             (system "Xvfb :1 +extension GLX &")
+             (setenv "DISPLAY" ":1")
+             ;; Tests write to $HOME.
+             (setenv "HOME" (getcwd))
+             ;; Tests look for $XDG_RUNTIME_DIR.
+             (setenv "XDG_RUNTIME_DIR" (getcwd))
+             ;; For missing '/etc/machine-id'.
+             (setenv "DBUS_FATAL_WARNINGS" "0")))
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               ;; Only run tests with x11 setup, instead of wayland.
+               (invoke "meson" "test" "--setup=x11"))))
+         (add-after 'install 'move-doc
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (doc (assoc-ref outputs "doc")))
+               (mkdir-p (string-append doc "/share/doc"))
+               (rename-file
+                (string-append out "/share/doc")
+                (string-append doc "/share/doc"))))))))
+    (native-inputs
+     `(("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext-minimal" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection) ;for building introspection data
+       ("gtk-doc" ,gtk-doc)             ;for building documentation
+       ("intltool" ,intltool)
+       ("libxslt" ,libxslt)             ;for building man-pages
+       ("pkg-config" ,pkg-config)
+       ;; These python modules are required for building documentation.
+       ("python-jinja2" ,python-jinja2)
+       ("python-markdown" ,python-markdown)
+       ("python-markupsafe" ,python-markupsafe)
+       ("python-pygments" ,python-pygments)
+       ("python-toml" ,python-toml)
+       ("python-typogrify" ,python-typogrify)
+       ("sassc" ,sassc)                 ;for building themes
+       ("vala" ,vala)
+       ("xorg-server-for-tests" ,xorg-server-for-tests)))
+    (inputs
+     ;; The disabled packages currently doesn't
+     ;; build successfully on wip-gnome branch.
+     ;; Enable them once they are fixed.
+     `(("colord" ,colord)               ;for color printing support
+       ("cups" ,cups)                   ;for CUPS print-backend
+       ;;("ffmpeg" ,ffmpeg)               ;for ffmpeg media-backend
+       ("fribidi" ,fribidi)
+       ;;("gstreamer" ,gstreamer)         ;for gstreamer media-backend
+       ("harfbuzz" ,harfbuzz)
+       ("iso-codes" ,iso-codes)
+       ("json-glib" ,json-glib)
+       ("libcloudproviders" ,libcloudproviders) ;for clould-providers support
+       ("librsvg" ,librsvg)
+       ("python" ,python)
+       ("rest" ,rest)
+       ;;("sysprof" ,sysprof)           ;for tracing support
+       ("tracker" ,tracker)))          ;for filechooser search support
+    (propagated-inputs
+     ;; Following dependencies are referenced in .pc files.
+     `(("cairo" ,cairo)
+       ("fontconfig" ,fontconfig)
+       ("gdk-pixbuf+svg" ,gdk-pixbuf+svg)
+       ("glib" ,glib)
+       ("graphene" ,graphene)
+       ("libepoxy" ,libepoxy)
+       ("libx11" ,libx11)               ;for x11 display-backend
+       ("libxcomposite" ,libxcomposite)
+       ("libxcursor" ,libxcursor)
+       ("libxdamage" ,libxdamage)
+       ("libxext" ,libxext)
+       ("libxfixes" ,libxfixes)
+       ("libxi" ,libxi)
+       ("libxinerama" ,libxinerama)     ;for xinerama support
+       ("libxkbcommon" ,libxkbcommon)
+       ("libxrandr" ,libxrandr)
+       ("libxrender" ,libxrender)
+       ("pango" ,pango)
+       ("vulkan-headers" ,vulkan-headers)
+       ("vulkan-loader" ,vulkan-loader) ;for vulkan graphics API support
+       ("wayland" ,wayland)             ;for wayland display-backend
+       ("wayland-protocols" ,wayland-protocols)))
+    (native-search-paths
+     (list
+      (search-path-specification
+       (variable "GUIX_GTK4_PATH")
+       (files '("lib/gtk-4.0")))))
+    (search-paths native-search-paths)
+    (home-page "https://www.gtk.org/")
+    (synopsis "Cross-platform widget toolkit")
+    (description "GTK is a multi-platform toolkit for creating graphical user
+interfaces.  Offering a complete set of widgets, GTK is suitable for projects
+ranging from small one-off tools to complete application suites.")
+    (license license:lgpl2.1+)))
+
 (define-public gtk+-2
   (package
     (name "gtk+")
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 0000000000..4a60023bf7
--- /dev/null
+++ b/gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch
@@ -0,0 +1,51 @@
+From 889294a93fc6464c2c2919bc47f6fd85ec823363 Mon Sep 17 00:00:00 2001
+From: Raghav Gururajan <rg@raghavgururajan.name>
+Date: Tue, 18 May 2021 19:57:00 -0400
+Subject: [PATCH] [PATCH]: Honor GUIX_GTK4_PATH.
+
+This patch makes GTK look for additional modules in a list of directories
+specified by the environment variable "GUIX_GTK4_PATH". This can be used
+instead of "GTK_PATH" to make GTK find modules that are incompatible with
+other major versions of GTK.
+---
+ gtk/gtkmodules.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c
+index aace5dcbc9..193b6a02e9 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 gchar *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.1
+
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [bug#48554] [PATCH wip-gnome v5 2/2] gnu: Update gtkmm to 4.2.0, add gtkmm@3, and adjust gtkmm@2.
  2021-09-02 20:09 ` [bug#48554] [PATCH wip-gnome v5 1/2] " Raghav Gururajan via Guix-patches via
@ 2021-09-02 20:09   ` Raghav Gururajan via Guix-patches via
  0 siblings, 0 replies; 35+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-09-02 20:09 UTC (permalink / raw)
  To: 48554; +Cc: Raghav Gururajan

* gnu/packages/gtk.scm (gtkmm)[version]: Update to 4.2.0.
[arguments](meson): New argument.
[native-inputs]: Add glib:bin.
[propagated-inputs]: Replace gtk+ with gtk.
[synopsis]: Modify.
[description]: Modify
(gtkmm-3): New variable.
(gtkmm-2)[arguments]: Strip certain inherited arguments.
---
 gnu/packages/gtk.scm | 48 +++++++++++++++++++++++++++++++-------------
 1 file changed, 34 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 97eda06d4b..e6bac6a230 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -1747,7 +1747,7 @@ library.")
 (define-public gtkmm
   (package
     (name "gtkmm")
-    (version "3.24.4")
+    (version "4.2.0")
     (source
      (origin
        (method url-fetch)
@@ -1756,11 +1756,12 @@ library.")
                        (version-major+minor version)  "/"
                        name "-" version ".tar.xz"))
        (sha256
-        (base32 "0hv7pviln4cpjvpz7m7ga5krcsbibqzixdcn0dwzpz0cx71p3swv"))))
+        (base32 "12x9j82y37r4v0ngs22rzp4wmw7k2bbb9d3bymcczzz7y8w4q328"))))
     (build-system meson-build-system)
     (outputs '("out" "doc"))
     (arguments
-     `(#:configure-flags '("-Dbuild-documentation=true")
+     `(#:meson ,meson-0.55     ;project requires meson v0.54 or higher
+       #:configure-flags '("-Dbuild-documentation=true")
        #:phases
        (modify-phases %standard-phases
          (add-before 'check 'pre-check
@@ -1783,6 +1784,7 @@ library.")
     (native-inputs
      `(("dot" ,graphviz)
        ("doxygen" ,doxygen)
+       ("glib:bin" ,glib "bin")
        ("m4" ,m4)
        ("mm-common" ,mm-common)
        ("perl" ,perl)
@@ -1793,11 +1795,11 @@ library.")
      `(("atkmm" ,atkmm)
        ("cairomm" ,cairomm)
        ("glibmm" ,glibmm)
-       ("gtk+" ,gtk+)
+       ("gtk" ,gtk)
        ("pangomm" ,pangomm)))
-    (synopsis "C++ Interfaces for GTK+ and GNOME")
+    (synopsis "C++ Interfaces for GTK and GNOME")
     (description "GTKmm is the official C++ interface for the popular GUI
-library GTK+.  Highlights include typesafe callbacks, and a comprehensive set of
+library GTK.  Highlights include typesafe callbacks, and a comprehensive set of
 widgets that are easily extensible via inheritance.  You can create user
 interfaces either in code or with the Glade User Interface designer, using
 libglademm.  There's extensive documentation, including API reference and a
@@ -1810,6 +1812,30 @@ tutorial.")
       ;; Tools
       license:gpl2+))))
 
+(define-public gtkmm-3
+  (package
+    (inherit gtkmm)
+    (name "gtkmm")
+    (version "3.24.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "mirror://gnome/sources/" name "/"
+                       (version-major+minor version)  "/"
+                       name "-" version ".tar.xz"))
+       (sha256
+        (base32 "0hv7pviln4cpjvpz7m7ga5krcsbibqzixdcn0dwzpz0cx71p3swv"))))
+    (arguments
+     (strip-keyword-arguments
+      '(#:meson) (package-arguments gtkmm)))
+    (propagated-inputs
+     `(("atkmm-2.28" ,atkmm-2.28)
+       ("cairomm-1.13" ,cairomm-1.13)
+       ("glibmm" ,glibmm)
+       ("gtk+" ,gtk+)
+       ("pangomm-2.42" ,pangomm-2.42)))))
+
 (define-public gtkmm-2
   (package
     (inherit gtkmm)
@@ -1826,14 +1852,8 @@ tutorial.")
         (base32 "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006"))))
     (build-system gnu-build-system)
     (arguments
-     (substitute-keyword-arguments (package-arguments gtkmm)
-       ((#:modules modules %gnu-build-system-modules)
-        `((srfi srfi-1)
-          ,@modules))
-       ((#:configure-flags flags)
-        `(fold delete
-               ,flags
-               '("-Dbuild-documentation=true")))))
+     (strip-keyword-arguments
+      '(#:meson #:configure-flags) (package-arguments gtkmm)))
     (propagated-inputs
      `(("atkmm" ,atkmm-2.28)
        ("cairomm" ,cairomm-1.13)
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [bug#48554] [PATCH wip-gnome v6 1/4] gnu: Add gtk.
  2021-05-21  4:06 [bug#48554] GTK v4 Raghav Gururajan via Guix-patches via
                   ` (8 preceding siblings ...)
  2021-09-02 20:09 ` [bug#48554] [PATCH wip-gnome v5 1/2] " Raghav Gururajan via Guix-patches via
@ 2021-09-02 20:41 ` Raghav Gururajan via Guix-patches via
  2021-09-02 20:41   ` [bug#48554] [PATCH wip-gnome v6 2/4] gnu: gtk+: Update to 3.24.30 and inherit from gtk instead of gtk+-2 Raghav Gururajan via Guix-patches via
                     ` (2 more replies)
  2021-09-02 20:56 ` [bug#48554] [PATCH wip-gnome v7 1/4] gnu: Add gtk Raghav Gururajan via Guix-patches via
                   ` (4 subsequent siblings)
  14 siblings, 3 replies; 35+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-09-02 20:41 UTC (permalink / raw)
  To: 48554; +Cc: Raghav Gururajan

* gnu/packages/gtk.scm (gtk): New variable.
* gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                  |   1 +
 gnu/packages/gtk.scm                          | 148 ++++++++++++++++++
 .../patches/gtk4-respect-GUIX_GTK4_PATH.patch |  51 ++++++
 3 files changed, 200 insertions(+)
 create mode 100644 gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 8aa20471d5..7922712b04 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1204,6 +1204,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-honor-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 ada006b671..97eda06d4b 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -91,11 +91,13 @@
   #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages profiling)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-build)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages guile-xyz)
   #:use-module (gnu packages cups)
   #:use-module (gnu packages version-control)
+  #:use-module (gnu packages vulkan)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
@@ -833,6 +835,152 @@ is part of the GNOME accessibility project.")
     (license license:lgpl2.1+)
     (home-page "https://wiki.gnome.org/Accessibility/")))
 
+(define-public gtk
+  (package
+    (name "gtk")
+    (version "4.2.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://gnome/sources/" name "/"
+                           (version-major+minor version)  "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32 "1rh9fd5axf79pmd93hb2fmmflic5swcvqvq6vqghlgz4bmvnjc82"))
+       (patches
+        (search-patches "gtk4-respect-GUIX_GTK4_PATH.patch"))))
+    (build-system meson-build-system)
+    (outputs '("out" "doc"))
+    (arguments
+     `(#:meson ,meson-0.55     ;project requires meson v0.55 or higher
+       #:configure-flags
+       (list
+        "-Dbroadway-backend=true"       ;for broadway display-backend
+        "-Dcloudproviders=enabled"      ;for cloud-providers support
+        ;;"-Dsysprof=enabled"           ;for tracing support
+        "-Dtracker=enabled"            ;for filechooser search support
+        "-Dcolord=enabled"             ;for color printing support
+        ,@(if (%current-target-system)
+              ;; If true, gtkdoc-scangobj will try to execute a
+              ;; cross-compiled binary.
+              '("-Dgtk_doc=false")
+              '("-Dgtk_doc=true"))
+        "-Dman-pages=true")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch
+           (lambda* (#:key inputs native-inputs #:allow-other-keys)
+             ;; Fix DTD resource of docbook-xml.
+             (substitute* (find-files "docs" "\\.xml$")
+               (("http://www.oasis-open.org/docbook/xml/4.3/")
+                (string-append
+                 (assoc-ref (or native-inputs inputs) "docbook-xml-4.3")
+                 "/xml/dtd/docbook/")))
+             ;; Disable failing tests.
+             ;; https://paste.sr.ht/blob/0af160f1172a58dff88a5cf6354ecba613cccdef
+             (substitute* (find-files "testsuite" "meson.build")
+               (("[ \t]*'empty-text.node',") "")
+               (("[ \t]*'testswitch.node',") "")
+               (("[ \t]*'widgetfactory.node',") ""))))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; Tests require a running X server.
+             (system "Xvfb :1 +extension GLX &")
+             (setenv "DISPLAY" ":1")
+             ;; Tests write to $HOME.
+             (setenv "HOME" (getcwd))
+             ;; Tests look for $XDG_RUNTIME_DIR.
+             (setenv "XDG_RUNTIME_DIR" (getcwd))
+             ;; For missing '/etc/machine-id'.
+             (setenv "DBUS_FATAL_WARNINGS" "0")))
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               ;; Only run tests with x11 setup, instead of wayland.
+               (invoke "meson" "test" "--setup=x11"))))
+         (add-after 'install 'move-doc
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (doc (assoc-ref outputs "doc")))
+               (mkdir-p (string-append doc "/share/doc"))
+               (rename-file
+                (string-append out "/share/doc")
+                (string-append doc "/share/doc"))))))))
+    (native-inputs
+     `(("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext-minimal" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection) ;for building introspection data
+       ("gtk-doc" ,gtk-doc)             ;for building documentation
+       ("intltool" ,intltool)
+       ("libxslt" ,libxslt)             ;for building man-pages
+       ("pkg-config" ,pkg-config)
+       ;; These python modules are required for building documentation.
+       ("python-jinja2" ,python-jinja2)
+       ("python-markdown" ,python-markdown)
+       ("python-markupsafe" ,python-markupsafe)
+       ("python-pygments" ,python-pygments)
+       ("python-toml" ,python-toml)
+       ("python-typogrify" ,python-typogrify)
+       ("sassc" ,sassc)                 ;for building themes
+       ("vala" ,vala)
+       ("xorg-server-for-tests" ,xorg-server-for-tests)))
+    (inputs
+     ;; The disabled packages currently doesn't
+     ;; build successfully on wip-gnome branch.
+     ;; Enable them once they are fixed.
+     `(("colord" ,colord)               ;for color printing support
+       ("cups" ,cups)                   ;for CUPS print-backend
+       ;;("ffmpeg" ,ffmpeg)               ;for ffmpeg media-backend
+       ("fribidi" ,fribidi)
+       ;;("gstreamer" ,gstreamer)         ;for gstreamer media-backend
+       ("harfbuzz" ,harfbuzz)
+       ("iso-codes" ,iso-codes)
+       ("json-glib" ,json-glib)
+       ("libcloudproviders" ,libcloudproviders) ;for clould-providers support
+       ("librsvg" ,librsvg)
+       ("python" ,python)
+       ("rest" ,rest)
+       ;;("sysprof" ,sysprof)           ;for tracing support
+       ("tracker" ,tracker)))          ;for filechooser search support
+    (propagated-inputs
+     ;; Following dependencies are referenced in .pc files.
+     `(("cairo" ,cairo)
+       ("fontconfig" ,fontconfig)
+       ("gdk-pixbuf+svg" ,gdk-pixbuf+svg)
+       ("glib" ,glib)
+       ("graphene" ,graphene)
+       ("libepoxy" ,libepoxy)
+       ("libx11" ,libx11)               ;for x11 display-backend
+       ("libxcomposite" ,libxcomposite)
+       ("libxcursor" ,libxcursor)
+       ("libxdamage" ,libxdamage)
+       ("libxext" ,libxext)
+       ("libxfixes" ,libxfixes)
+       ("libxi" ,libxi)
+       ("libxinerama" ,libxinerama)     ;for xinerama support
+       ("libxkbcommon" ,libxkbcommon)
+       ("libxrandr" ,libxrandr)
+       ("libxrender" ,libxrender)
+       ("pango" ,pango)
+       ("vulkan-headers" ,vulkan-headers)
+       ("vulkan-loader" ,vulkan-loader) ;for vulkan graphics API support
+       ("wayland" ,wayland)             ;for wayland display-backend
+       ("wayland-protocols" ,wayland-protocols)))
+    (native-search-paths
+     (list
+      (search-path-specification
+       (variable "GUIX_GTK4_PATH")
+       (files '("lib/gtk-4.0")))))
+    (search-paths native-search-paths)
+    (home-page "https://www.gtk.org/")
+    (synopsis "Cross-platform widget toolkit")
+    (description "GTK is a multi-platform toolkit for creating graphical user
+interfaces.  Offering a complete set of widgets, GTK is suitable for projects
+ranging from small one-off tools to complete application suites.")
+    (license license:lgpl2.1+)))
+
 (define-public gtk+-2
   (package
     (name "gtk+")
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 0000000000..4a60023bf7
--- /dev/null
+++ b/gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch
@@ -0,0 +1,51 @@
+From 889294a93fc6464c2c2919bc47f6fd85ec823363 Mon Sep 17 00:00:00 2001
+From: Raghav Gururajan <rg@raghavgururajan.name>
+Date: Tue, 18 May 2021 19:57:00 -0400
+Subject: [PATCH] [PATCH]: Honor GUIX_GTK4_PATH.
+
+This patch makes GTK look for additional modules in a list of directories
+specified by the environment variable "GUIX_GTK4_PATH". This can be used
+instead of "GTK_PATH" to make GTK find modules that are incompatible with
+other major versions of GTK.
+---
+ gtk/gtkmodules.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c
+index aace5dcbc9..193b6a02e9 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 gchar *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.1
+
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [bug#48554] [PATCH wip-gnome v6 2/4] gnu: gtk+: Update to 3.24.30 and inherit from gtk instead of gtk+-2.
  2021-09-02 20:41 ` [bug#48554] [PATCH wip-gnome v6 1/4] gnu: Add gtk Raghav Gururajan via Guix-patches via
@ 2021-09-02 20:41   ` Raghav Gururajan via Guix-patches via
  2021-09-02 20:41   ` [bug#48554] [PATCH wip-gnome v6 3/4] gnu: gtk+@2: Move block and inherit from gtk Raghav Gururajan via Guix-patches via
  2021-09-02 20:41   ` [bug#48554] [PATCH wip-gnome v6 4/4] gnu: Update gtkmm to 4.2.0, add gtkmm@3, and adjust gtkmm@2 Raghav Gururajan via Guix-patches via
  2 siblings, 0 replies; 35+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-09-02 20:41 UTC (permalink / raw)
  To: 48554; +Cc: Raghav Gururajan

* gnu/packages/gtk.scm (gtk+)[inherit]: Change from gtk+-2 to gtk.
[version]: Update to 3.24.30.
[build-system]: New field.
[outputs]: New field.
---
 gnu/packages/gtk.scm | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 97eda06d4b..3367a8dc6e 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -1083,9 +1083,9 @@ application suites.")
 
 (define-public gtk+
   (package
-    (inherit gtk+-2)
+    (inherit gtk)
     (name "gtk+")
-    (version "3.24.27")
+    (version "3.24.30")
     (source
      (origin
        (method url-fetch)
@@ -1094,9 +1094,11 @@ application suites.")
                            name "-" version ".tar.xz"))
        (sha256
         (base32
-         "09ksflq5j257bf5zn8q2nnf2flicg9qqgfy7za79z7rkf1shc77p"))
+         "1a9vg840fjq1mmm403b67k624qrkxh9shaz9pv7z9l8a6bzvyxds"))
        (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
                                 "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
+    (build-system gnu-build-system)
+    (outputs '("out" "bin" "doc"))
     (propagated-inputs
      `(("atk" ,atk)
        ("at-spi2-atk" ,at-spi2-atk)
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [bug#48554] [PATCH wip-gnome v6 3/4] gnu: gtk+@2: Move block and inherit from gtk.
  2021-09-02 20:41 ` [bug#48554] [PATCH wip-gnome v6 1/4] gnu: Add gtk Raghav Gururajan via Guix-patches via
  2021-09-02 20:41   ` [bug#48554] [PATCH wip-gnome v6 2/4] gnu: gtk+: Update to 3.24.30 and inherit from gtk instead of gtk+-2 Raghav Gururajan via Guix-patches via
@ 2021-09-02 20:41   ` Raghav Gururajan via Guix-patches via
  2021-09-02 20:41   ` [bug#48554] [PATCH wip-gnome v6 4/4] gnu: Update gtkmm to 4.2.0, add gtkmm@3, and adjust gtkmm@2 Raghav Gururajan via Guix-patches via
  2 siblings, 0 replies; 35+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-09-02 20:41 UTC (permalink / raw)
  To: 48554; +Cc: Raghav Gururajan

* gnu/packages/gtk.scm (gtk+-2)[inherit]: New field.
[home-page]: Remove field.
[synopsis]: Remove field.
[description]: Remove field.
[license]: Remove field.
---
 gnu/packages/gtk.scm | 193 +++++++++++++++++++++----------------------
 1 file changed, 93 insertions(+), 100 deletions(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 3367a8dc6e..f83d3e3f24 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -981,106 +981,6 @@ interfaces.  Offering a complete set of widgets, GTK is suitable for projects
 ranging from small one-off tools to complete application suites.")
     (license license:lgpl2.1+)))
 
-(define-public gtk+-2
-  (package
-    (name "gtk+")
-    (version "2.24.33")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnome/sources/" name "/"
-                                  (version-major+minor version)  "/"
-                                  name "-" version ".tar.xz"))
-              (sha256
-               (base32
-                "1nn6kks1zyvb5xikr9y2k7r9bwjy1g4b0m0s66532bclymbwfamc"))
-              (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
-                                       "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
-                                       "gtk2-theme-paths.patch"))))
-    (build-system gnu-build-system)
-    (outputs '("out" "bin" "doc"))
-    (propagated-inputs
-     `(("atk" ,atk)
-       ("cairo" ,cairo)
-       ;; SVG support is optional and requires librsvg, which pulls in rust.
-       ;; Rust is not supported well on every architecture yet.
-       ("gdk-pixbuf" ,(if (string-prefix? "x86_64" (or (%current-target-system)
-                                                       (%current-system)))
-                          gdk-pixbuf+svg
-                          gdk-pixbuf))
-       ("glib" ,glib)
-       ("pango" ,pango)))
-    (inputs
-     `(("cups" ,cups)
-       ("libx11" ,libx11)
-       ("libxcomposite" ,libxcomposite)
-       ("libxcursor" ,libxcursor)
-       ("libxext" ,libxext)
-       ("libxdamage" ,libxdamage)
-       ("libxi" ,libxi)
-       ("libxinerama" ,libxinerama)
-       ("libxkbcommon" ,libxkbcommon)
-       ("libxrandr" ,libxrandr)
-       ("libxrender" ,libxrender)
-       ("libxshmfence" ,libxshmfence)))
-    (native-inputs
-     `(("gettext" ,gettext-minimal)
-       ("glib" ,glib "bin")
-       ("gobject-introspection" ,gobject-introspection)
-       ("intltool" ,intltool)
-       ("perl" ,perl)
-       ("pkg-config" ,pkg-config)
-       ("python-wrapper" ,python-wrapper)
-       ("xorg-server" ,xorg-server-for-tests)))
-    (arguments
-     `(#:parallel-tests? #f
-       #:configure-flags
-       (list "--with-xinput=yes"
-             (string-append "--with-html-dir="
-                            (assoc-ref %outputs "doc")
-                            "/share/gtk-doc/html"))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'disable-failing-tests
-           (lambda _
-             (substitute* "gtk/Makefile.in"
-               (("aliasfilescheck\\.sh") ""))
-             (substitute* "gtk/tests/recentmanager.c"
-               (("g_test_add_func \\(\"/recent-manager.*;") ""))
-             (substitute* "gtk/tests/defaultvalue.c"
-               (("return g_test_run\\(\\);") ""))
-             #t))
-         (add-before 'check 'pre-check
-           (lambda _
-             ;; Tests require a running X server.
-             (system "Xvfb :1 +extension GLX &")
-             (setenv "DISPLAY" ":1")
-             ;; Tests write to $HOME.
-             (setenv "HOME" (getcwd))
-             ;; Tests look for $XDG_RUNTIME_DIR.
-             (setenv "XDG_RUNTIME_DIR" (getcwd))
-             ;; For missing '/etc/machine-id'.
-             (setenv "DBUS_FATAL_WARNINGS" "0")
-             #t))
-         (add-after 'install 'remove-cache
-           (lambda* (#:key outputs #:allow-other-keys)
-	     (for-each
-	      delete-file
-	      (find-files (assoc-ref outputs "out") "immodules.cache"))
-             #t)))))
-    (native-search-paths
-     (list (search-path-specification
-            (variable "GUIX_GTK2_PATH")
-            (files '("lib/gtk-2.0")))))
-    (search-paths native-search-paths)
-    (synopsis "Cross-platform toolkit for creating graphical user interfaces")
-    (description
-     "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
-graphical user interfaces.  Offering a complete set of widgets, GTK+ is
-suitable for projects ranging from small one-off tools to complete
-application suites.")
-    (license license:lgpl2.0+)
-    (home-page "https://www.gtk.org/")))
-
 (define-public gtk+
   (package
     (inherit gtk)
@@ -1217,6 +1117,99 @@ application suites.")
             (variable "GUIX_GTK3_PATH")
             (files '("lib/gtk-3.0")))))))
 
+(define-public gtk+-2
+  (package
+    (inherit gtk)
+    (name "gtk+")
+    (version "2.24.33")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnome/sources/" name "/"
+                                  (version-major+minor version)  "/"
+                                  name "-" version ".tar.xz"))
+              (sha256
+               (base32
+                "1nn6kks1zyvb5xikr9y2k7r9bwjy1g4b0m0s66532bclymbwfamc"))
+              (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
+                                       "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
+                                       "gtk2-theme-paths.patch"))))
+    (build-system gnu-build-system)
+    (outputs '("out" "bin" "doc"))
+    (propagated-inputs
+     `(("atk" ,atk)
+       ("cairo" ,cairo)
+       ;; SVG support is optional and requires librsvg, which pulls in rust.
+       ;; Rust is not supported well on every architecture yet.
+       ("gdk-pixbuf" ,(if (string-prefix? "x86_64" (or (%current-target-system)
+                                                       (%current-system)))
+                          gdk-pixbuf+svg
+                          gdk-pixbuf))
+       ("glib" ,glib)
+       ("pango" ,pango)))
+    (inputs
+     `(("cups" ,cups)
+       ("libx11" ,libx11)
+       ("libxcomposite" ,libxcomposite)
+       ("libxcursor" ,libxcursor)
+       ("libxext" ,libxext)
+       ("libxdamage" ,libxdamage)
+       ("libxi" ,libxi)
+       ("libxinerama" ,libxinerama)
+       ("libxkbcommon" ,libxkbcommon)
+       ("libxrandr" ,libxrandr)
+       ("libxrender" ,libxrender)
+       ("libxshmfence" ,libxshmfence)))
+    (native-inputs
+     `(("gettext" ,gettext-minimal)
+       ("glib" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)
+       ("intltool" ,intltool)
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python-wrapper" ,python-wrapper)
+       ("xorg-server" ,xorg-server-for-tests)))
+    (arguments
+     `(#:parallel-tests? #f
+       #:configure-flags
+       (list "--with-xinput=yes"
+             (string-append "--with-html-dir="
+                            (assoc-ref %outputs "doc")
+                            "/share/gtk-doc/html"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'disable-failing-tests
+           (lambda _
+             (substitute* "gtk/Makefile.in"
+               (("aliasfilescheck\\.sh") ""))
+             (substitute* "gtk/tests/recentmanager.c"
+               (("g_test_add_func \\(\"/recent-manager.*;") ""))
+             (substitute* "gtk/tests/defaultvalue.c"
+               (("return g_test_run\\(\\);") ""))
+             #t))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; Tests require a running X server.
+             (system "Xvfb :1 +extension GLX &")
+             (setenv "DISPLAY" ":1")
+             ;; Tests write to $HOME.
+             (setenv "HOME" (getcwd))
+             ;; Tests look for $XDG_RUNTIME_DIR.
+             (setenv "XDG_RUNTIME_DIR" (getcwd))
+             ;; For missing '/etc/machine-id'.
+             (setenv "DBUS_FATAL_WARNINGS" "0")
+             #t))
+         (add-after 'install 'remove-cache
+           (lambda* (#:key outputs #:allow-other-keys)
+	     (for-each
+	      delete-file
+	      (find-files (assoc-ref outputs "out") "immodules.cache"))
+             #t)))))
+    (native-search-paths
+     (list (search-path-specification
+            (variable "GUIX_GTK2_PATH")
+            (files '("lib/gtk-2.0")))))
+    (search-paths native-search-paths)))
+
 ;;;
 ;;; Guile bindings.
 ;;;
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [bug#48554] [PATCH wip-gnome v6 4/4] gnu: Update gtkmm to 4.2.0, add gtkmm@3, and adjust gtkmm@2.
  2021-09-02 20:41 ` [bug#48554] [PATCH wip-gnome v6 1/4] gnu: Add gtk Raghav Gururajan via Guix-patches via
  2021-09-02 20:41   ` [bug#48554] [PATCH wip-gnome v6 2/4] gnu: gtk+: Update to 3.24.30 and inherit from gtk instead of gtk+-2 Raghav Gururajan via Guix-patches via
  2021-09-02 20:41   ` [bug#48554] [PATCH wip-gnome v6 3/4] gnu: gtk+@2: Move block and inherit from gtk Raghav Gururajan via Guix-patches via
@ 2021-09-02 20:41   ` Raghav Gururajan via Guix-patches via
  2 siblings, 0 replies; 35+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-09-02 20:41 UTC (permalink / raw)
  To: 48554; +Cc: Raghav Gururajan

* gnu/packages/gtk.scm (gtkmm)[version]: Update to 4.2.0.
[arguments](meson): New argument.
[native-inputs]: Add glib:bin.
[propagated-inputs]: Replace gtk+ with gtk.
[synopsis]: Modify.
[description]: Modify
(gtkmm-3): New variable.
(gtkmm-2)[arguments]: Strip certain inherited arguments.
---
 gnu/packages/gtk.scm | 48 +++++++++++++++++++++++++++++++-------------
 1 file changed, 34 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index f83d3e3f24..12b3bf2961 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -1742,7 +1742,7 @@ library.")
 (define-public gtkmm
   (package
     (name "gtkmm")
-    (version "3.24.4")
+    (version "4.2.0")
     (source
      (origin
        (method url-fetch)
@@ -1751,11 +1751,12 @@ library.")
                        (version-major+minor version)  "/"
                        name "-" version ".tar.xz"))
        (sha256
-        (base32 "0hv7pviln4cpjvpz7m7ga5krcsbibqzixdcn0dwzpz0cx71p3swv"))))
+        (base32 "12x9j82y37r4v0ngs22rzp4wmw7k2bbb9d3bymcczzz7y8w4q328"))))
     (build-system meson-build-system)
     (outputs '("out" "doc"))
     (arguments
-     `(#:configure-flags '("-Dbuild-documentation=true")
+     `(#:meson ,meson-0.55     ;project requires meson v0.54 or higher
+       #:configure-flags '("-Dbuild-documentation=true")
        #:phases
        (modify-phases %standard-phases
          (add-before 'check 'pre-check
@@ -1778,6 +1779,7 @@ library.")
     (native-inputs
      `(("dot" ,graphviz)
        ("doxygen" ,doxygen)
+       ("glib:bin" ,glib "bin")
        ("m4" ,m4)
        ("mm-common" ,mm-common)
        ("perl" ,perl)
@@ -1788,11 +1790,11 @@ library.")
      `(("atkmm" ,atkmm)
        ("cairomm" ,cairomm)
        ("glibmm" ,glibmm)
-       ("gtk+" ,gtk+)
+       ("gtk" ,gtk)
        ("pangomm" ,pangomm)))
-    (synopsis "C++ Interfaces for GTK+ and GNOME")
+    (synopsis "C++ Interfaces for GTK and GNOME")
     (description "GTKmm is the official C++ interface for the popular GUI
-library GTK+.  Highlights include typesafe callbacks, and a comprehensive set of
+library GTK.  Highlights include typesafe callbacks, and a comprehensive set of
 widgets that are easily extensible via inheritance.  You can create user
 interfaces either in code or with the Glade User Interface designer, using
 libglademm.  There's extensive documentation, including API reference and a
@@ -1805,6 +1807,30 @@ tutorial.")
       ;; Tools
       license:gpl2+))))
 
+(define-public gtkmm-3
+  (package
+    (inherit gtkmm)
+    (name "gtkmm")
+    (version "3.24.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "mirror://gnome/sources/" name "/"
+                       (version-major+minor version)  "/"
+                       name "-" version ".tar.xz"))
+       (sha256
+        (base32 "0hv7pviln4cpjvpz7m7ga5krcsbibqzixdcn0dwzpz0cx71p3swv"))))
+    (arguments
+     (strip-keyword-arguments
+      '(#:meson) (package-arguments gtkmm)))
+    (propagated-inputs
+     `(("atkmm-2.28" ,atkmm-2.28)
+       ("cairomm-1.13" ,cairomm-1.13)
+       ("glibmm" ,glibmm)
+       ("gtk+" ,gtk+)
+       ("pangomm-2.42" ,pangomm-2.42)))))
+
 (define-public gtkmm-2
   (package
     (inherit gtkmm)
@@ -1821,14 +1847,8 @@ tutorial.")
         (base32 "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006"))))
     (build-system gnu-build-system)
     (arguments
-     (substitute-keyword-arguments (package-arguments gtkmm)
-       ((#:modules modules %gnu-build-system-modules)
-        `((srfi srfi-1)
-          ,@modules))
-       ((#:configure-flags flags)
-        `(fold delete
-               ,flags
-               '("-Dbuild-documentation=true")))))
+     (strip-keyword-arguments
+      '(#:meson #:configure-flags) (package-arguments gtkmm)))
     (propagated-inputs
      `(("atkmm" ,atkmm-2.28)
        ("cairomm" ,cairomm-1.13)
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [bug#48554] [PATCH wip-gnome v7 1/4] gnu: Add gtk.
  2021-05-21  4:06 [bug#48554] GTK v4 Raghav Gururajan via Guix-patches via
                   ` (9 preceding siblings ...)
  2021-09-02 20:41 ` [bug#48554] [PATCH wip-gnome v6 1/4] gnu: Add gtk Raghav Gururajan via Guix-patches via
@ 2021-09-02 20:56 ` Raghav Gururajan via Guix-patches via
  2021-09-02 20:56   ` [bug#48554] [PATCH wip-gnome v7 2/4] gnu: gtk+: Inherit from gtk instead of gtk+-2 Raghav Gururajan via Guix-patches via
                     ` (2 more replies)
  2021-09-03 17:08 ` [bug#48554] [PATCH wip-gnome v8 1/4] gnu: Add gtk Raghav Gururajan via Guix-patches via
                   ` (3 subsequent siblings)
  14 siblings, 3 replies; 35+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-09-02 20:56 UTC (permalink / raw)
  To: 48554; +Cc: Raghav Gururajan

* gnu/packages/gtk.scm (gtk): New variable.
* gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                  |   1 +
 gnu/packages/gtk.scm                          | 148 ++++++++++++++++++
 .../patches/gtk4-respect-GUIX_GTK4_PATH.patch |  51 ++++++
 3 files changed, 200 insertions(+)
 create mode 100644 gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 8aa20471d5..7922712b04 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1204,6 +1204,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-honor-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 ada006b671..97eda06d4b 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -91,11 +91,13 @@
   #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages profiling)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-build)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages guile-xyz)
   #:use-module (gnu packages cups)
   #:use-module (gnu packages version-control)
+  #:use-module (gnu packages vulkan)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
@@ -833,6 +835,152 @@ is part of the GNOME accessibility project.")
     (license license:lgpl2.1+)
     (home-page "https://wiki.gnome.org/Accessibility/")))
 
+(define-public gtk
+  (package
+    (name "gtk")
+    (version "4.2.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://gnome/sources/" name "/"
+                           (version-major+minor version)  "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32 "1rh9fd5axf79pmd93hb2fmmflic5swcvqvq6vqghlgz4bmvnjc82"))
+       (patches
+        (search-patches "gtk4-respect-GUIX_GTK4_PATH.patch"))))
+    (build-system meson-build-system)
+    (outputs '("out" "doc"))
+    (arguments
+     `(#:meson ,meson-0.55     ;project requires meson v0.55 or higher
+       #:configure-flags
+       (list
+        "-Dbroadway-backend=true"       ;for broadway display-backend
+        "-Dcloudproviders=enabled"      ;for cloud-providers support
+        ;;"-Dsysprof=enabled"           ;for tracing support
+        "-Dtracker=enabled"            ;for filechooser search support
+        "-Dcolord=enabled"             ;for color printing support
+        ,@(if (%current-target-system)
+              ;; If true, gtkdoc-scangobj will try to execute a
+              ;; cross-compiled binary.
+              '("-Dgtk_doc=false")
+              '("-Dgtk_doc=true"))
+        "-Dman-pages=true")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch
+           (lambda* (#:key inputs native-inputs #:allow-other-keys)
+             ;; Fix DTD resource of docbook-xml.
+             (substitute* (find-files "docs" "\\.xml$")
+               (("http://www.oasis-open.org/docbook/xml/4.3/")
+                (string-append
+                 (assoc-ref (or native-inputs inputs) "docbook-xml-4.3")
+                 "/xml/dtd/docbook/")))
+             ;; Disable failing tests.
+             ;; https://paste.sr.ht/blob/0af160f1172a58dff88a5cf6354ecba613cccdef
+             (substitute* (find-files "testsuite" "meson.build")
+               (("[ \t]*'empty-text.node',") "")
+               (("[ \t]*'testswitch.node',") "")
+               (("[ \t]*'widgetfactory.node',") ""))))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; Tests require a running X server.
+             (system "Xvfb :1 +extension GLX &")
+             (setenv "DISPLAY" ":1")
+             ;; Tests write to $HOME.
+             (setenv "HOME" (getcwd))
+             ;; Tests look for $XDG_RUNTIME_DIR.
+             (setenv "XDG_RUNTIME_DIR" (getcwd))
+             ;; For missing '/etc/machine-id'.
+             (setenv "DBUS_FATAL_WARNINGS" "0")))
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               ;; Only run tests with x11 setup, instead of wayland.
+               (invoke "meson" "test" "--setup=x11"))))
+         (add-after 'install 'move-doc
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (doc (assoc-ref outputs "doc")))
+               (mkdir-p (string-append doc "/share/doc"))
+               (rename-file
+                (string-append out "/share/doc")
+                (string-append doc "/share/doc"))))))))
+    (native-inputs
+     `(("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext-minimal" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection) ;for building introspection data
+       ("gtk-doc" ,gtk-doc)             ;for building documentation
+       ("intltool" ,intltool)
+       ("libxslt" ,libxslt)             ;for building man-pages
+       ("pkg-config" ,pkg-config)
+       ;; These python modules are required for building documentation.
+       ("python-jinja2" ,python-jinja2)
+       ("python-markdown" ,python-markdown)
+       ("python-markupsafe" ,python-markupsafe)
+       ("python-pygments" ,python-pygments)
+       ("python-toml" ,python-toml)
+       ("python-typogrify" ,python-typogrify)
+       ("sassc" ,sassc)                 ;for building themes
+       ("vala" ,vala)
+       ("xorg-server-for-tests" ,xorg-server-for-tests)))
+    (inputs
+     ;; The disabled packages currently doesn't
+     ;; build successfully on wip-gnome branch.
+     ;; Enable them once they are fixed.
+     `(("colord" ,colord)               ;for color printing support
+       ("cups" ,cups)                   ;for CUPS print-backend
+       ;;("ffmpeg" ,ffmpeg)               ;for ffmpeg media-backend
+       ("fribidi" ,fribidi)
+       ;;("gstreamer" ,gstreamer)         ;for gstreamer media-backend
+       ("harfbuzz" ,harfbuzz)
+       ("iso-codes" ,iso-codes)
+       ("json-glib" ,json-glib)
+       ("libcloudproviders" ,libcloudproviders) ;for clould-providers support
+       ("librsvg" ,librsvg)
+       ("python" ,python)
+       ("rest" ,rest)
+       ;;("sysprof" ,sysprof)           ;for tracing support
+       ("tracker" ,tracker)))          ;for filechooser search support
+    (propagated-inputs
+     ;; Following dependencies are referenced in .pc files.
+     `(("cairo" ,cairo)
+       ("fontconfig" ,fontconfig)
+       ("gdk-pixbuf+svg" ,gdk-pixbuf+svg)
+       ("glib" ,glib)
+       ("graphene" ,graphene)
+       ("libepoxy" ,libepoxy)
+       ("libx11" ,libx11)               ;for x11 display-backend
+       ("libxcomposite" ,libxcomposite)
+       ("libxcursor" ,libxcursor)
+       ("libxdamage" ,libxdamage)
+       ("libxext" ,libxext)
+       ("libxfixes" ,libxfixes)
+       ("libxi" ,libxi)
+       ("libxinerama" ,libxinerama)     ;for xinerama support
+       ("libxkbcommon" ,libxkbcommon)
+       ("libxrandr" ,libxrandr)
+       ("libxrender" ,libxrender)
+       ("pango" ,pango)
+       ("vulkan-headers" ,vulkan-headers)
+       ("vulkan-loader" ,vulkan-loader) ;for vulkan graphics API support
+       ("wayland" ,wayland)             ;for wayland display-backend
+       ("wayland-protocols" ,wayland-protocols)))
+    (native-search-paths
+     (list
+      (search-path-specification
+       (variable "GUIX_GTK4_PATH")
+       (files '("lib/gtk-4.0")))))
+    (search-paths native-search-paths)
+    (home-page "https://www.gtk.org/")
+    (synopsis "Cross-platform widget toolkit")
+    (description "GTK is a multi-platform toolkit for creating graphical user
+interfaces.  Offering a complete set of widgets, GTK is suitable for projects
+ranging from small one-off tools to complete application suites.")
+    (license license:lgpl2.1+)))
+
 (define-public gtk+-2
   (package
     (name "gtk+")
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 0000000000..4a60023bf7
--- /dev/null
+++ b/gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch
@@ -0,0 +1,51 @@
+From 889294a93fc6464c2c2919bc47f6fd85ec823363 Mon Sep 17 00:00:00 2001
+From: Raghav Gururajan <rg@raghavgururajan.name>
+Date: Tue, 18 May 2021 19:57:00 -0400
+Subject: [PATCH] [PATCH]: Honor GUIX_GTK4_PATH.
+
+This patch makes GTK look for additional modules in a list of directories
+specified by the environment variable "GUIX_GTK4_PATH". This can be used
+instead of "GTK_PATH" to make GTK find modules that are incompatible with
+other major versions of GTK.
+---
+ gtk/gtkmodules.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c
+index aace5dcbc9..193b6a02e9 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 gchar *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.1
+
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [bug#48554] [PATCH wip-gnome v7 2/4] gnu: gtk+: Inherit from gtk instead of gtk+-2.
  2021-09-02 20:56 ` [bug#48554] [PATCH wip-gnome v7 1/4] gnu: Add gtk Raghav Gururajan via Guix-patches via
@ 2021-09-02 20:56   ` Raghav Gururajan via Guix-patches via
  2021-09-02 20:56   ` [bug#48554] [PATCH wip-gnome v7 3/4] gnu: gtk+@2: Move block and inherit from gtk Raghav Gururajan via Guix-patches via
  2021-09-02 20:56   ` [bug#48554] [PATCH wip-gnome v7 4/4] gnu: Update gtkmm to 4.2.0, add gtkmm@3, and adjust gtkmm@2 Raghav Gururajan via Guix-patches via
  2 siblings, 0 replies; 35+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-09-02 20:56 UTC (permalink / raw)
  To: 48554; +Cc: Raghav Gururajan

* gnu/packages/gtk.scm (gtk+)[inherit]: Change from gtk+-2 to gtk.
[build-system]: New field.
[outputs]: New field.
---
 gnu/packages/gtk.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 97eda06d4b..77655cdd80 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -1083,7 +1083,7 @@ application suites.")
 
 (define-public gtk+
   (package
-    (inherit gtk+-2)
+    (inherit gtk)
     (name "gtk+")
     (version "3.24.27")
     (source
@@ -1097,6 +1097,8 @@ application suites.")
          "09ksflq5j257bf5zn8q2nnf2flicg9qqgfy7za79z7rkf1shc77p"))
        (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
                                 "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
+    (build-system gnu-build-system)
+    (outputs '("out" "bin" "doc"))
     (propagated-inputs
      `(("atk" ,atk)
        ("at-spi2-atk" ,at-spi2-atk)
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [bug#48554] [PATCH wip-gnome v7 3/4] gnu: gtk+@2: Move block and inherit from gtk.
  2021-09-02 20:56 ` [bug#48554] [PATCH wip-gnome v7 1/4] gnu: Add gtk Raghav Gururajan via Guix-patches via
  2021-09-02 20:56   ` [bug#48554] [PATCH wip-gnome v7 2/4] gnu: gtk+: Inherit from gtk instead of gtk+-2 Raghav Gururajan via Guix-patches via
@ 2021-09-02 20:56   ` Raghav Gururajan via Guix-patches via
  2021-09-02 20:56   ` [bug#48554] [PATCH wip-gnome v7 4/4] gnu: Update gtkmm to 4.2.0, add gtkmm@3, and adjust gtkmm@2 Raghav Gururajan via Guix-patches via
  2 siblings, 0 replies; 35+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-09-02 20:56 UTC (permalink / raw)
  To: 48554; +Cc: Raghav Gururajan

* gnu/packages/gtk.scm (gtk+-2)[inherit]: New field.
[home-page]: Remove field.
[synopsis]: Remove field.
[description]: Remove field.
[license]: Remove field.
---
 gnu/packages/gtk.scm | 193 +++++++++++++++++++++----------------------
 1 file changed, 93 insertions(+), 100 deletions(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 77655cdd80..c559ef18b1 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -981,106 +981,6 @@ interfaces.  Offering a complete set of widgets, GTK is suitable for projects
 ranging from small one-off tools to complete application suites.")
     (license license:lgpl2.1+)))
 
-(define-public gtk+-2
-  (package
-    (name "gtk+")
-    (version "2.24.33")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnome/sources/" name "/"
-                                  (version-major+minor version)  "/"
-                                  name "-" version ".tar.xz"))
-              (sha256
-               (base32
-                "1nn6kks1zyvb5xikr9y2k7r9bwjy1g4b0m0s66532bclymbwfamc"))
-              (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
-                                       "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
-                                       "gtk2-theme-paths.patch"))))
-    (build-system gnu-build-system)
-    (outputs '("out" "bin" "doc"))
-    (propagated-inputs
-     `(("atk" ,atk)
-       ("cairo" ,cairo)
-       ;; SVG support is optional and requires librsvg, which pulls in rust.
-       ;; Rust is not supported well on every architecture yet.
-       ("gdk-pixbuf" ,(if (string-prefix? "x86_64" (or (%current-target-system)
-                                                       (%current-system)))
-                          gdk-pixbuf+svg
-                          gdk-pixbuf))
-       ("glib" ,glib)
-       ("pango" ,pango)))
-    (inputs
-     `(("cups" ,cups)
-       ("libx11" ,libx11)
-       ("libxcomposite" ,libxcomposite)
-       ("libxcursor" ,libxcursor)
-       ("libxext" ,libxext)
-       ("libxdamage" ,libxdamage)
-       ("libxi" ,libxi)
-       ("libxinerama" ,libxinerama)
-       ("libxkbcommon" ,libxkbcommon)
-       ("libxrandr" ,libxrandr)
-       ("libxrender" ,libxrender)
-       ("libxshmfence" ,libxshmfence)))
-    (native-inputs
-     `(("gettext" ,gettext-minimal)
-       ("glib" ,glib "bin")
-       ("gobject-introspection" ,gobject-introspection)
-       ("intltool" ,intltool)
-       ("perl" ,perl)
-       ("pkg-config" ,pkg-config)
-       ("python-wrapper" ,python-wrapper)
-       ("xorg-server" ,xorg-server-for-tests)))
-    (arguments
-     `(#:parallel-tests? #f
-       #:configure-flags
-       (list "--with-xinput=yes"
-             (string-append "--with-html-dir="
-                            (assoc-ref %outputs "doc")
-                            "/share/gtk-doc/html"))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'disable-failing-tests
-           (lambda _
-             (substitute* "gtk/Makefile.in"
-               (("aliasfilescheck\\.sh") ""))
-             (substitute* "gtk/tests/recentmanager.c"
-               (("g_test_add_func \\(\"/recent-manager.*;") ""))
-             (substitute* "gtk/tests/defaultvalue.c"
-               (("return g_test_run\\(\\);") ""))
-             #t))
-         (add-before 'check 'pre-check
-           (lambda _
-             ;; Tests require a running X server.
-             (system "Xvfb :1 +extension GLX &")
-             (setenv "DISPLAY" ":1")
-             ;; Tests write to $HOME.
-             (setenv "HOME" (getcwd))
-             ;; Tests look for $XDG_RUNTIME_DIR.
-             (setenv "XDG_RUNTIME_DIR" (getcwd))
-             ;; For missing '/etc/machine-id'.
-             (setenv "DBUS_FATAL_WARNINGS" "0")
-             #t))
-         (add-after 'install 'remove-cache
-           (lambda* (#:key outputs #:allow-other-keys)
-	     (for-each
-	      delete-file
-	      (find-files (assoc-ref outputs "out") "immodules.cache"))
-             #t)))))
-    (native-search-paths
-     (list (search-path-specification
-            (variable "GUIX_GTK2_PATH")
-            (files '("lib/gtk-2.0")))))
-    (search-paths native-search-paths)
-    (synopsis "Cross-platform toolkit for creating graphical user interfaces")
-    (description
-     "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
-graphical user interfaces.  Offering a complete set of widgets, GTK+ is
-suitable for projects ranging from small one-off tools to complete
-application suites.")
-    (license license:lgpl2.0+)
-    (home-page "https://www.gtk.org/")))
-
 (define-public gtk+
   (package
     (inherit gtk)
@@ -1217,6 +1117,99 @@ application suites.")
             (variable "GUIX_GTK3_PATH")
             (files '("lib/gtk-3.0")))))))
 
+(define-public gtk+-2
+  (package
+    (inherit gtk)
+    (name "gtk+")
+    (version "2.24.33")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnome/sources/" name "/"
+                                  (version-major+minor version)  "/"
+                                  name "-" version ".tar.xz"))
+              (sha256
+               (base32
+                "1nn6kks1zyvb5xikr9y2k7r9bwjy1g4b0m0s66532bclymbwfamc"))
+              (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
+                                       "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
+                                       "gtk2-theme-paths.patch"))))
+    (build-system gnu-build-system)
+    (outputs '("out" "bin" "doc"))
+    (propagated-inputs
+     `(("atk" ,atk)
+       ("cairo" ,cairo)
+       ;; SVG support is optional and requires librsvg, which pulls in rust.
+       ;; Rust is not supported well on every architecture yet.
+       ("gdk-pixbuf" ,(if (string-prefix? "x86_64" (or (%current-target-system)
+                                                       (%current-system)))
+                          gdk-pixbuf+svg
+                          gdk-pixbuf))
+       ("glib" ,glib)
+       ("pango" ,pango)))
+    (inputs
+     `(("cups" ,cups)
+       ("libx11" ,libx11)
+       ("libxcomposite" ,libxcomposite)
+       ("libxcursor" ,libxcursor)
+       ("libxext" ,libxext)
+       ("libxdamage" ,libxdamage)
+       ("libxi" ,libxi)
+       ("libxinerama" ,libxinerama)
+       ("libxkbcommon" ,libxkbcommon)
+       ("libxrandr" ,libxrandr)
+       ("libxrender" ,libxrender)
+       ("libxshmfence" ,libxshmfence)))
+    (native-inputs
+     `(("gettext" ,gettext-minimal)
+       ("glib" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)
+       ("intltool" ,intltool)
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python-wrapper" ,python-wrapper)
+       ("xorg-server" ,xorg-server-for-tests)))
+    (arguments
+     `(#:parallel-tests? #f
+       #:configure-flags
+       (list "--with-xinput=yes"
+             (string-append "--with-html-dir="
+                            (assoc-ref %outputs "doc")
+                            "/share/gtk-doc/html"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'disable-failing-tests
+           (lambda _
+             (substitute* "gtk/Makefile.in"
+               (("aliasfilescheck\\.sh") ""))
+             (substitute* "gtk/tests/recentmanager.c"
+               (("g_test_add_func \\(\"/recent-manager.*;") ""))
+             (substitute* "gtk/tests/defaultvalue.c"
+               (("return g_test_run\\(\\);") ""))
+             #t))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; Tests require a running X server.
+             (system "Xvfb :1 +extension GLX &")
+             (setenv "DISPLAY" ":1")
+             ;; Tests write to $HOME.
+             (setenv "HOME" (getcwd))
+             ;; Tests look for $XDG_RUNTIME_DIR.
+             (setenv "XDG_RUNTIME_DIR" (getcwd))
+             ;; For missing '/etc/machine-id'.
+             (setenv "DBUS_FATAL_WARNINGS" "0")
+             #t))
+         (add-after 'install 'remove-cache
+           (lambda* (#:key outputs #:allow-other-keys)
+	     (for-each
+	      delete-file
+	      (find-files (assoc-ref outputs "out") "immodules.cache"))
+             #t)))))
+    (native-search-paths
+     (list (search-path-specification
+            (variable "GUIX_GTK2_PATH")
+            (files '("lib/gtk-2.0")))))
+    (search-paths native-search-paths)))
+
 ;;;
 ;;; Guile bindings.
 ;;;
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [bug#48554] [PATCH wip-gnome v7 4/4] gnu: Update gtkmm to 4.2.0, add gtkmm@3, and adjust gtkmm@2.
  2021-09-02 20:56 ` [bug#48554] [PATCH wip-gnome v7 1/4] gnu: Add gtk Raghav Gururajan via Guix-patches via
  2021-09-02 20:56   ` [bug#48554] [PATCH wip-gnome v7 2/4] gnu: gtk+: Inherit from gtk instead of gtk+-2 Raghav Gururajan via Guix-patches via
  2021-09-02 20:56   ` [bug#48554] [PATCH wip-gnome v7 3/4] gnu: gtk+@2: Move block and inherit from gtk Raghav Gururajan via Guix-patches via
@ 2021-09-02 20:56   ` Raghav Gururajan via Guix-patches via
  2 siblings, 0 replies; 35+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-09-02 20:56 UTC (permalink / raw)
  To: 48554; +Cc: Raghav Gururajan

* gnu/packages/gtk.scm (gtkmm)[version]: Update to 4.2.0.
[arguments](meson): New argument.
[native-inputs]: Add glib:bin.
[propagated-inputs]: Replace gtk+ with gtk.
[synopsis]: Modify.
[description]: Modify
(gtkmm-3): New variable.
(gtkmm-2)[arguments]: Strip certain inherited arguments.
---
 gnu/packages/gtk.scm | 48 +++++++++++++++++++++++++++++++-------------
 1 file changed, 34 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index c559ef18b1..a715c5f033 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -1742,7 +1742,7 @@ library.")
 (define-public gtkmm
   (package
     (name "gtkmm")
-    (version "3.24.4")
+    (version "4.2.0")
     (source
      (origin
        (method url-fetch)
@@ -1751,11 +1751,12 @@ library.")
                        (version-major+minor version)  "/"
                        name "-" version ".tar.xz"))
        (sha256
-        (base32 "0hv7pviln4cpjvpz7m7ga5krcsbibqzixdcn0dwzpz0cx71p3swv"))))
+        (base32 "12x9j82y37r4v0ngs22rzp4wmw7k2bbb9d3bymcczzz7y8w4q328"))))
     (build-system meson-build-system)
     (outputs '("out" "doc"))
     (arguments
-     `(#:configure-flags '("-Dbuild-documentation=true")
+     `(#:meson ,meson-0.55     ;project requires meson v0.54 or higher
+       #:configure-flags '("-Dbuild-documentation=true")
        #:phases
        (modify-phases %standard-phases
          (add-before 'check 'pre-check
@@ -1778,6 +1779,7 @@ library.")
     (native-inputs
      `(("dot" ,graphviz)
        ("doxygen" ,doxygen)
+       ("glib:bin" ,glib "bin")
        ("m4" ,m4)
        ("mm-common" ,mm-common)
        ("perl" ,perl)
@@ -1788,11 +1790,11 @@ library.")
      `(("atkmm" ,atkmm)
        ("cairomm" ,cairomm)
        ("glibmm" ,glibmm)
-       ("gtk+" ,gtk+)
+       ("gtk" ,gtk)
        ("pangomm" ,pangomm)))
-    (synopsis "C++ Interfaces for GTK+ and GNOME")
+    (synopsis "C++ Interfaces for GTK and GNOME")
     (description "GTKmm is the official C++ interface for the popular GUI
-library GTK+.  Highlights include typesafe callbacks, and a comprehensive set of
+library GTK.  Highlights include typesafe callbacks, and a comprehensive set of
 widgets that are easily extensible via inheritance.  You can create user
 interfaces either in code or with the Glade User Interface designer, using
 libglademm.  There's extensive documentation, including API reference and a
@@ -1805,6 +1807,30 @@ tutorial.")
       ;; Tools
       license:gpl2+))))
 
+(define-public gtkmm-3
+  (package
+    (inherit gtkmm)
+    (name "gtkmm")
+    (version "3.24.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "mirror://gnome/sources/" name "/"
+                       (version-major+minor version)  "/"
+                       name "-" version ".tar.xz"))
+       (sha256
+        (base32 "0hv7pviln4cpjvpz7m7ga5krcsbibqzixdcn0dwzpz0cx71p3swv"))))
+    (arguments
+     (strip-keyword-arguments
+      '(#:meson) (package-arguments gtkmm)))
+    (propagated-inputs
+     `(("atkmm-2.28" ,atkmm-2.28)
+       ("cairomm-1.13" ,cairomm-1.13)
+       ("glibmm" ,glibmm)
+       ("gtk+" ,gtk+)
+       ("pangomm-2.42" ,pangomm-2.42)))))
+
 (define-public gtkmm-2
   (package
     (inherit gtkmm)
@@ -1821,14 +1847,8 @@ tutorial.")
         (base32 "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006"))))
     (build-system gnu-build-system)
     (arguments
-     (substitute-keyword-arguments (package-arguments gtkmm)
-       ((#:modules modules %gnu-build-system-modules)
-        `((srfi srfi-1)
-          ,@modules))
-       ((#:configure-flags flags)
-        `(fold delete
-               ,flags
-               '("-Dbuild-documentation=true")))))
+     (strip-keyword-arguments
+      '(#:meson #:configure-flags) (package-arguments gtkmm)))
     (propagated-inputs
      `(("atkmm" ,atkmm-2.28)
        ("cairomm" ,cairomm-1.13)
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [bug#48554] [PATCH wip-gnome v8 1/4] gnu: Add gtk.
  2021-05-21  4:06 [bug#48554] GTK v4 Raghav Gururajan via Guix-patches via
                   ` (10 preceding siblings ...)
  2021-09-02 20:56 ` [bug#48554] [PATCH wip-gnome v7 1/4] gnu: Add gtk Raghav Gururajan via Guix-patches via
@ 2021-09-03 17:08 ` Raghav Gururajan via Guix-patches via
  2021-09-03 17:08   ` [bug#48554] [PATCH wip-gnome v8 2/4] gnu: gtk+: Inherit from gtk instead of gtk+-2 Raghav Gururajan via Guix-patches via
                     ` (2 more replies)
  2021-09-05 13:22 ` [bug#48554] [PATCH wip-gnome v9 1/2] gnu: Add gtk Raghav Gururajan via Guix-patches via
                   ` (2 subsequent siblings)
  14 siblings, 3 replies; 35+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-09-03 17:08 UTC (permalink / raw)
  To: 48554; +Cc: Raghav Gururajan

* gnu/packages/gtk.scm (gtk): New variable.
* gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                  |   1 +
 gnu/packages/gtk.scm                          | 145 ++++++++++++++++++
 .../patches/gtk4-respect-GUIX_GTK4_PATH.patch |  51 ++++++
 3 files changed, 197 insertions(+)
 create mode 100644 gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index c42c879f5a..ced9d7d892 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1203,6 +1203,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-honor-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 ada006b671..ee7044bd63 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -91,11 +91,15 @@
   #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages profiling)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-build)
   #:use-module (gnu packages python-xyz)
+  #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages guile-xyz)
   #:use-module (gnu packages cups)
   #:use-module (gnu packages version-control)
+  #:use-module (gnu packages video)
+  #:use-module (gnu packages vulkan)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
@@ -833,6 +837,147 @@ is part of the GNOME accessibility project.")
     (license license:lgpl2.1+)
     (home-page "https://wiki.gnome.org/Accessibility/")))
 
+(define-public gtk
+  (package
+    (name "gtk")
+    (version "4.2.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://gnome/sources/" name "/"
+                           (version-major+minor version)  "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32 "1rh9fd5axf79pmd93hb2fmmflic5swcvqvq6vqghlgz4bmvnjc82"))
+       (patches
+        (search-patches "gtk4-respect-GUIX_GTK4_PATH.patch"))))
+    (build-system meson-build-system)
+    (outputs '("out" "doc"))
+    (arguments
+     `(#:meson ,meson-0.55     ;project requires meson v0.55 or higher
+       #:configure-flags
+       (list
+        "-Dbroadway-backend=true"       ;for broadway display-backend
+        "-Dcloudproviders=enabled"      ;for cloud-providers support
+        "-Dtracker=enabled"            ;for filechooser search support
+        "-Dcolord=enabled"             ;for color printing support
+        ,@(if (%current-target-system)
+              ;; If true, gtkdoc-scangobj will try to execute a
+              ;; cross-compiled binary.
+              '("-Dgtk_doc=false")
+              '("-Dgtk_doc=true"))
+        "-Dman-pages=true")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch
+           (lambda* (#:key inputs native-inputs #:allow-other-keys)
+             ;; Fix DTD resource of docbook-xml.
+             (substitute* (find-files "docs" "\\.xml$")
+               (("http://www.oasis-open.org/docbook/xml/4.3/")
+                (string-append
+                 (assoc-ref (or native-inputs inputs) "docbook-xml-4.3")
+                 "/xml/dtd/docbook/")))
+             ;; Disable failing tests.
+             ;; https://paste.sr.ht/blob/0af160f1172a58dff88a5cf6354ecba613cccdef
+             (substitute* (find-files "testsuite" "meson.build")
+               (("[ \t]*'empty-text.node',") "")
+               (("[ \t]*'testswitch.node',") "")
+               (("[ \t]*'widgetfactory.node',") ""))))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; Tests require a running X server.
+             (system "Xvfb :1 +extension GLX &")
+             (setenv "DISPLAY" ":1")
+             ;; Tests write to $HOME.
+             (setenv "HOME" (getcwd))
+             ;; Tests look for $XDG_RUNTIME_DIR.
+             (setenv "XDG_RUNTIME_DIR" (getcwd))
+             ;; For missing '/etc/machine-id'.
+             (setenv "DBUS_FATAL_WARNINGS" "0")))
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               ;; Only run tests with x11 setup, instead of wayland.
+               (invoke "meson" "test" "--setup=x11"))))
+         (add-after 'install 'move-doc
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (doc (assoc-ref outputs "doc")))
+               (mkdir-p (string-append doc "/share/doc"))
+               (rename-file
+                (string-append out "/share/doc")
+                (string-append doc "/share/doc"))))))))
+    (native-inputs
+     `(("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext-minimal" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection) ;for building introspection data
+       ("gtk-doc" ,gtk-doc)             ;for building documentation
+       ("intltool" ,intltool)
+       ("libxslt" ,libxslt)             ;for building man-pages
+       ("pkg-config" ,pkg-config)
+       ;; These python modules are required for building documentation.
+       ("python-jinja2" ,python-jinja2)
+       ("python-markdown" ,python-markdown)
+       ("python-markupsafe" ,python-markupsafe)
+       ("python-pygments" ,python-pygments)
+       ("python-toml" ,python-toml)
+       ("python-typogrify" ,python-typogrify)
+       ("sassc" ,sassc)                 ;for building themes
+       ("vala" ,vala)
+       ("xorg-server-for-tests" ,xorg-server-for-tests)))
+    (inputs
+     `(("colord" ,colord)               ;for color printing support
+       ("cups" ,cups)                   ;for CUPS print-backend
+       ("ffmpeg" ,ffmpeg)               ;for ffmpeg media-backend
+       ("fribidi" ,fribidi)
+       ("gstreamer" ,gstreamer)         ;for gstreamer media-backend
+       ("harfbuzz" ,harfbuzz)
+       ("iso-codes" ,iso-codes)
+       ("json-glib" ,json-glib)
+       ("libcloudproviders" ,libcloudproviders) ;for clould-providers support
+       ("librsvg" ,librsvg)
+       ("python" ,python)
+       ("rest" ,rest)
+       ("tracker" ,tracker)))          ;for filechooser search support
+    (propagated-inputs
+     ;; Following dependencies are referenced in .pc files.
+     `(("cairo" ,cairo)
+       ("fontconfig" ,fontconfig)
+       ("gdk-pixbuf+svg" ,gdk-pixbuf+svg)
+       ("glib" ,glib)
+       ("graphene" ,graphene)
+       ("libepoxy" ,libepoxy)
+       ("libx11" ,libx11)               ;for x11 display-backend
+       ("libxcomposite" ,libxcomposite)
+       ("libxcursor" ,libxcursor)
+       ("libxdamage" ,libxdamage)
+       ("libxext" ,libxext)
+       ("libxfixes" ,libxfixes)
+       ("libxi" ,libxi)
+       ("libxinerama" ,libxinerama)     ;for xinerama support
+       ("libxkbcommon" ,libxkbcommon)
+       ("libxrandr" ,libxrandr)
+       ("libxrender" ,libxrender)
+       ("pango" ,pango)
+       ("vulkan-headers" ,vulkan-headers)
+       ("vulkan-loader" ,vulkan-loader) ;for vulkan graphics API support
+       ("wayland" ,wayland)             ;for wayland display-backend
+       ("wayland-protocols" ,wayland-protocols)))
+    (native-search-paths
+     (list
+      (search-path-specification
+       (variable "GUIX_GTK4_PATH")
+       (files '("lib/gtk-4.0")))))
+    (search-paths native-search-paths)
+    (home-page "https://www.gtk.org/")
+    (synopsis "Cross-platform widget toolkit")
+    (description "GTK is a multi-platform toolkit for creating graphical user
+interfaces.  Offering a complete set of widgets, GTK is suitable for projects
+ranging from small one-off tools to complete application suites.")
+    (license license:lgpl2.1+)))
+
 (define-public gtk+-2
   (package
     (name "gtk+")
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 0000000000..4a60023bf7
--- /dev/null
+++ b/gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch
@@ -0,0 +1,51 @@
+From 889294a93fc6464c2c2919bc47f6fd85ec823363 Mon Sep 17 00:00:00 2001
+From: Raghav Gururajan <rg@raghavgururajan.name>
+Date: Tue, 18 May 2021 19:57:00 -0400
+Subject: [PATCH] [PATCH]: Honor GUIX_GTK4_PATH.
+
+This patch makes GTK look for additional modules in a list of directories
+specified by the environment variable "GUIX_GTK4_PATH". This can be used
+instead of "GTK_PATH" to make GTK find modules that are incompatible with
+other major versions of GTK.
+---
+ gtk/gtkmodules.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c
+index aace5dcbc9..193b6a02e9 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 gchar *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.1
+
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [bug#48554] [PATCH wip-gnome v8 2/4] gnu: gtk+: Inherit from gtk instead of gtk+-2.
  2021-09-03 17:08 ` [bug#48554] [PATCH wip-gnome v8 1/4] gnu: Add gtk Raghav Gururajan via Guix-patches via
@ 2021-09-03 17:08   ` Raghav Gururajan via Guix-patches via
  2021-09-03 17:08   ` [bug#48554] [PATCH wip-gnome v8 3/4] gnu: gtk+@2: Move block and inherit from gtk Raghav Gururajan via Guix-patches via
  2021-09-03 17:08   ` [bug#48554] [PATCH wip-gnome v8 4/4] gnu: Update gtkmm to 4.2.0, add gtkmm@3, and adjust gtkmm@2 Raghav Gururajan via Guix-patches via
  2 siblings, 0 replies; 35+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-09-03 17:08 UTC (permalink / raw)
  To: 48554; +Cc: Raghav Gururajan

* gnu/packages/gtk.scm (gtk+)[inherit]: Change from gtk+-2 to gtk.
[build-system]: New field.
[outputs]: New field.
---
 gnu/packages/gtk.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index ee7044bd63..1f8c365190 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -1080,7 +1080,7 @@ application suites.")
 
 (define-public gtk+
   (package
-    (inherit gtk+-2)
+    (inherit gtk)
     (name "gtk+")
     (version "3.24.27")
     (source
@@ -1094,6 +1094,8 @@ application suites.")
          "09ksflq5j257bf5zn8q2nnf2flicg9qqgfy7za79z7rkf1shc77p"))
        (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
                                 "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
+    (build-system gnu-build-system)
+    (outputs '("out" "bin" "doc"))
     (propagated-inputs
      `(("atk" ,atk)
        ("at-spi2-atk" ,at-spi2-atk)
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [bug#48554] [PATCH wip-gnome v8 3/4] gnu: gtk+@2: Move block and inherit from gtk.
  2021-09-03 17:08 ` [bug#48554] [PATCH wip-gnome v8 1/4] gnu: Add gtk Raghav Gururajan via Guix-patches via
  2021-09-03 17:08   ` [bug#48554] [PATCH wip-gnome v8 2/4] gnu: gtk+: Inherit from gtk instead of gtk+-2 Raghav Gururajan via Guix-patches via
@ 2021-09-03 17:08   ` Raghav Gururajan via Guix-patches via
  2021-09-03 17:08   ` [bug#48554] [PATCH wip-gnome v8 4/4] gnu: Update gtkmm to 4.2.0, add gtkmm@3, and adjust gtkmm@2 Raghav Gururajan via Guix-patches via
  2 siblings, 0 replies; 35+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-09-03 17:08 UTC (permalink / raw)
  To: 48554; +Cc: Raghav Gururajan

* gnu/packages/gtk.scm (gtk+-2)[inherit]: New field.
[home-page]: Remove field.
[synopsis]: Remove field.
[description]: Remove field.
[license]: Remove field.
---
 gnu/packages/gtk.scm | 193 +++++++++++++++++++++----------------------
 1 file changed, 93 insertions(+), 100 deletions(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 1f8c365190..b9f919e542 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -978,106 +978,6 @@ interfaces.  Offering a complete set of widgets, GTK is suitable for projects
 ranging from small one-off tools to complete application suites.")
     (license license:lgpl2.1+)))
 
-(define-public gtk+-2
-  (package
-    (name "gtk+")
-    (version "2.24.33")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnome/sources/" name "/"
-                                  (version-major+minor version)  "/"
-                                  name "-" version ".tar.xz"))
-              (sha256
-               (base32
-                "1nn6kks1zyvb5xikr9y2k7r9bwjy1g4b0m0s66532bclymbwfamc"))
-              (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
-                                       "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
-                                       "gtk2-theme-paths.patch"))))
-    (build-system gnu-build-system)
-    (outputs '("out" "bin" "doc"))
-    (propagated-inputs
-     `(("atk" ,atk)
-       ("cairo" ,cairo)
-       ;; SVG support is optional and requires librsvg, which pulls in rust.
-       ;; Rust is not supported well on every architecture yet.
-       ("gdk-pixbuf" ,(if (string-prefix? "x86_64" (or (%current-target-system)
-                                                       (%current-system)))
-                          gdk-pixbuf+svg
-                          gdk-pixbuf))
-       ("glib" ,glib)
-       ("pango" ,pango)))
-    (inputs
-     `(("cups" ,cups)
-       ("libx11" ,libx11)
-       ("libxcomposite" ,libxcomposite)
-       ("libxcursor" ,libxcursor)
-       ("libxext" ,libxext)
-       ("libxdamage" ,libxdamage)
-       ("libxi" ,libxi)
-       ("libxinerama" ,libxinerama)
-       ("libxkbcommon" ,libxkbcommon)
-       ("libxrandr" ,libxrandr)
-       ("libxrender" ,libxrender)
-       ("libxshmfence" ,libxshmfence)))
-    (native-inputs
-     `(("gettext" ,gettext-minimal)
-       ("glib" ,glib "bin")
-       ("gobject-introspection" ,gobject-introspection)
-       ("intltool" ,intltool)
-       ("perl" ,perl)
-       ("pkg-config" ,pkg-config)
-       ("python-wrapper" ,python-wrapper)
-       ("xorg-server" ,xorg-server-for-tests)))
-    (arguments
-     `(#:parallel-tests? #f
-       #:configure-flags
-       (list "--with-xinput=yes"
-             (string-append "--with-html-dir="
-                            (assoc-ref %outputs "doc")
-                            "/share/gtk-doc/html"))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'disable-failing-tests
-           (lambda _
-             (substitute* "gtk/Makefile.in"
-               (("aliasfilescheck\\.sh") ""))
-             (substitute* "gtk/tests/recentmanager.c"
-               (("g_test_add_func \\(\"/recent-manager.*;") ""))
-             (substitute* "gtk/tests/defaultvalue.c"
-               (("return g_test_run\\(\\);") ""))
-             #t))
-         (add-before 'check 'pre-check
-           (lambda _
-             ;; Tests require a running X server.
-             (system "Xvfb :1 +extension GLX &")
-             (setenv "DISPLAY" ":1")
-             ;; Tests write to $HOME.
-             (setenv "HOME" (getcwd))
-             ;; Tests look for $XDG_RUNTIME_DIR.
-             (setenv "XDG_RUNTIME_DIR" (getcwd))
-             ;; For missing '/etc/machine-id'.
-             (setenv "DBUS_FATAL_WARNINGS" "0")
-             #t))
-         (add-after 'install 'remove-cache
-           (lambda* (#:key outputs #:allow-other-keys)
-	     (for-each
-	      delete-file
-	      (find-files (assoc-ref outputs "out") "immodules.cache"))
-             #t)))))
-    (native-search-paths
-     (list (search-path-specification
-            (variable "GUIX_GTK2_PATH")
-            (files '("lib/gtk-2.0")))))
-    (search-paths native-search-paths)
-    (synopsis "Cross-platform toolkit for creating graphical user interfaces")
-    (description
-     "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
-graphical user interfaces.  Offering a complete set of widgets, GTK+ is
-suitable for projects ranging from small one-off tools to complete
-application suites.")
-    (license license:lgpl2.0+)
-    (home-page "https://www.gtk.org/")))
-
 (define-public gtk+
   (package
     (inherit gtk)
@@ -1214,6 +1114,99 @@ application suites.")
             (variable "GUIX_GTK3_PATH")
             (files '("lib/gtk-3.0")))))))
 
+(define-public gtk+-2
+  (package
+    (inherit gtk)
+    (name "gtk+")
+    (version "2.24.33")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnome/sources/" name "/"
+                                  (version-major+minor version)  "/"
+                                  name "-" version ".tar.xz"))
+              (sha256
+               (base32
+                "1nn6kks1zyvb5xikr9y2k7r9bwjy1g4b0m0s66532bclymbwfamc"))
+              (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
+                                       "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
+                                       "gtk2-theme-paths.patch"))))
+    (build-system gnu-build-system)
+    (outputs '("out" "bin" "doc"))
+    (propagated-inputs
+     `(("atk" ,atk)
+       ("cairo" ,cairo)
+       ;; SVG support is optional and requires librsvg, which pulls in rust.
+       ;; Rust is not supported well on every architecture yet.
+       ("gdk-pixbuf" ,(if (string-prefix? "x86_64" (or (%current-target-system)
+                                                       (%current-system)))
+                          gdk-pixbuf+svg
+                          gdk-pixbuf))
+       ("glib" ,glib)
+       ("pango" ,pango)))
+    (inputs
+     `(("cups" ,cups)
+       ("libx11" ,libx11)
+       ("libxcomposite" ,libxcomposite)
+       ("libxcursor" ,libxcursor)
+       ("libxext" ,libxext)
+       ("libxdamage" ,libxdamage)
+       ("libxi" ,libxi)
+       ("libxinerama" ,libxinerama)
+       ("libxkbcommon" ,libxkbcommon)
+       ("libxrandr" ,libxrandr)
+       ("libxrender" ,libxrender)
+       ("libxshmfence" ,libxshmfence)))
+    (native-inputs
+     `(("gettext" ,gettext-minimal)
+       ("glib" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)
+       ("intltool" ,intltool)
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python-wrapper" ,python-wrapper)
+       ("xorg-server" ,xorg-server-for-tests)))
+    (arguments
+     `(#:parallel-tests? #f
+       #:configure-flags
+       (list "--with-xinput=yes"
+             (string-append "--with-html-dir="
+                            (assoc-ref %outputs "doc")
+                            "/share/gtk-doc/html"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'disable-failing-tests
+           (lambda _
+             (substitute* "gtk/Makefile.in"
+               (("aliasfilescheck\\.sh") ""))
+             (substitute* "gtk/tests/recentmanager.c"
+               (("g_test_add_func \\(\"/recent-manager.*;") ""))
+             (substitute* "gtk/tests/defaultvalue.c"
+               (("return g_test_run\\(\\);") ""))
+             #t))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; Tests require a running X server.
+             (system "Xvfb :1 +extension GLX &")
+             (setenv "DISPLAY" ":1")
+             ;; Tests write to $HOME.
+             (setenv "HOME" (getcwd))
+             ;; Tests look for $XDG_RUNTIME_DIR.
+             (setenv "XDG_RUNTIME_DIR" (getcwd))
+             ;; For missing '/etc/machine-id'.
+             (setenv "DBUS_FATAL_WARNINGS" "0")
+             #t))
+         (add-after 'install 'remove-cache
+           (lambda* (#:key outputs #:allow-other-keys)
+	     (for-each
+	      delete-file
+	      (find-files (assoc-ref outputs "out") "immodules.cache"))
+             #t)))))
+    (native-search-paths
+     (list (search-path-specification
+            (variable "GUIX_GTK2_PATH")
+            (files '("lib/gtk-2.0")))))
+    (search-paths native-search-paths)))
+
 ;;;
 ;;; Guile bindings.
 ;;;
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [bug#48554] [PATCH wip-gnome v8 4/4] gnu: Update gtkmm to 4.2.0, add gtkmm@3, and adjust gtkmm@2.
  2021-09-03 17:08 ` [bug#48554] [PATCH wip-gnome v8 1/4] gnu: Add gtk Raghav Gururajan via Guix-patches via
  2021-09-03 17:08   ` [bug#48554] [PATCH wip-gnome v8 2/4] gnu: gtk+: Inherit from gtk instead of gtk+-2 Raghav Gururajan via Guix-patches via
  2021-09-03 17:08   ` [bug#48554] [PATCH wip-gnome v8 3/4] gnu: gtk+@2: Move block and inherit from gtk Raghav Gururajan via Guix-patches via
@ 2021-09-03 17:08   ` Raghav Gururajan via Guix-patches via
  2 siblings, 0 replies; 35+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-09-03 17:08 UTC (permalink / raw)
  To: 48554; +Cc: Raghav Gururajan

* gnu/packages/gtk.scm (gtkmm)[version]: Update to 4.2.0.
[arguments](meson): New argument.
[native-inputs]: Add glib:bin.
[propagated-inputs]: Replace gtk+ with gtk.
[synopsis]: Modify.
[description]: Modify
(gtkmm-3): New variable.
(gtkmm-2)[arguments]: Strip certain inherited arguments.
---
 gnu/packages/gtk.scm | 48 +++++++++++++++++++++++++++++++-------------
 1 file changed, 34 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index b9f919e542..91b7c2a90e 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -1739,7 +1739,7 @@ library.")
 (define-public gtkmm
   (package
     (name "gtkmm")
-    (version "3.24.4")
+    (version "4.2.0")
     (source
      (origin
        (method url-fetch)
@@ -1748,11 +1748,12 @@ library.")
                        (version-major+minor version)  "/"
                        name "-" version ".tar.xz"))
        (sha256
-        (base32 "0hv7pviln4cpjvpz7m7ga5krcsbibqzixdcn0dwzpz0cx71p3swv"))))
+        (base32 "12x9j82y37r4v0ngs22rzp4wmw7k2bbb9d3bymcczzz7y8w4q328"))))
     (build-system meson-build-system)
     (outputs '("out" "doc"))
     (arguments
-     `(#:configure-flags '("-Dbuild-documentation=true")
+     `(#:meson ,meson-0.55     ;project requires meson v0.54 or higher
+       #:configure-flags '("-Dbuild-documentation=true")
        #:phases
        (modify-phases %standard-phases
          (add-before 'check 'pre-check
@@ -1775,6 +1776,7 @@ library.")
     (native-inputs
      `(("dot" ,graphviz)
        ("doxygen" ,doxygen)
+       ("glib:bin" ,glib "bin")
        ("m4" ,m4)
        ("mm-common" ,mm-common)
        ("perl" ,perl)
@@ -1785,11 +1787,11 @@ library.")
      `(("atkmm" ,atkmm)
        ("cairomm" ,cairomm)
        ("glibmm" ,glibmm)
-       ("gtk+" ,gtk+)
+       ("gtk" ,gtk)
        ("pangomm" ,pangomm)))
-    (synopsis "C++ Interfaces for GTK+ and GNOME")
+    (synopsis "C++ Interfaces for GTK and GNOME")
     (description "GTKmm is the official C++ interface for the popular GUI
-library GTK+.  Highlights include typesafe callbacks, and a comprehensive set of
+library GTK.  Highlights include typesafe callbacks, and a comprehensive set of
 widgets that are easily extensible via inheritance.  You can create user
 interfaces either in code or with the Glade User Interface designer, using
 libglademm.  There's extensive documentation, including API reference and a
@@ -1802,6 +1804,30 @@ tutorial.")
       ;; Tools
       license:gpl2+))))
 
+(define-public gtkmm-3
+  (package
+    (inherit gtkmm)
+    (name "gtkmm")
+    (version "3.24.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "mirror://gnome/sources/" name "/"
+                       (version-major+minor version)  "/"
+                       name "-" version ".tar.xz"))
+       (sha256
+        (base32 "0hv7pviln4cpjvpz7m7ga5krcsbibqzixdcn0dwzpz0cx71p3swv"))))
+    (arguments
+     (strip-keyword-arguments
+      '(#:meson) (package-arguments gtkmm)))
+    (propagated-inputs
+     `(("atkmm-2.28" ,atkmm-2.28)
+       ("cairomm-1.13" ,cairomm-1.13)
+       ("glibmm" ,glibmm)
+       ("gtk+" ,gtk+)
+       ("pangomm-2.42" ,pangomm-2.42)))))
+
 (define-public gtkmm-2
   (package
     (inherit gtkmm)
@@ -1818,14 +1844,8 @@ tutorial.")
         (base32 "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006"))))
     (build-system gnu-build-system)
     (arguments
-     (substitute-keyword-arguments (package-arguments gtkmm)
-       ((#:modules modules %gnu-build-system-modules)
-        `((srfi srfi-1)
-          ,@modules))
-       ((#:configure-flags flags)
-        `(fold delete
-               ,flags
-               '("-Dbuild-documentation=true")))))
+     (strip-keyword-arguments
+      '(#:meson #:configure-flags) (package-arguments gtkmm)))
     (propagated-inputs
      `(("atkmm" ,atkmm-2.28)
        ("cairomm" ,cairomm-1.13)
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [bug#48554] [PATCH wip-gnome v9 1/2] gnu: Add gtk.
  2021-05-21  4:06 [bug#48554] GTK v4 Raghav Gururajan via Guix-patches via
                   ` (11 preceding siblings ...)
  2021-09-03 17:08 ` [bug#48554] [PATCH wip-gnome v8 1/4] gnu: Add gtk Raghav Gururajan via Guix-patches via
@ 2021-09-05 13:22 ` Raghav Gururajan via Guix-patches via
  2021-09-05 13:22   ` [bug#48554] [PATCH wip-gnome v9 2/2] gnu: Update gtkmm to 4.2.0, add gtkmm@3, and adjust gtkmm@2 Raghav Gururajan via Guix-patches via
  2021-09-05 14:44 ` [bug#48554] [PATCH wip-gnome v10 1/2] gnu: Add gtk Raghav Gururajan via Guix-patches via
  2021-09-06 19:58 ` [bug#48554] GTK v4 Raghav Gururajan via Guix-patches via
  14 siblings, 1 reply; 35+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-09-05 13:22 UTC (permalink / raw)
  To: 48554; +Cc: Raghav Gururajan

* gnu/packages/gtk.scm (gtk): New variable.
* gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                  |   1 +
 gnu/packages/gtk.scm                          | 180 ++++++++++++++++++
 .../patches/gtk4-respect-GUIX_GTK4_PATH.patch |  51 +++++
 3 files changed, 232 insertions(+)
 create mode 100644 gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index c42c879f5a..ced9d7d892 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1203,6 +1203,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-honor-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 ada006b671..73e7a7b4c4 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -91,11 +91,15 @@
   #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages profiling)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-build)
   #:use-module (gnu packages python-xyz)
+  #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages guile-xyz)
   #:use-module (gnu packages cups)
   #:use-module (gnu packages version-control)
+  #:use-module (gnu packages video)
+  #:use-module (gnu packages vulkan)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
@@ -833,6 +837,182 @@ is part of the GNOME accessibility project.")
     (license license:lgpl2.1+)
     (home-page "https://wiki.gnome.org/Accessibility/")))
 
+(define-public gtk
+  (package
+    (name "gtk")
+    (version "4.2.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://gnome/sources/" name "/"
+                           (version-major+minor version)  "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32 "1rh9fd5axf79pmd93hb2fmmflic5swcvqvq6vqghlgz4bmvnjc82"))
+       (patches
+        (search-patches "gtk4-respect-GUIX_GTK4_PATH.patch"))))
+    (build-system meson-build-system)
+    (outputs '("out" "bin" "doc"))
+    (arguments
+     `(#:meson ,meson-0.55     ;project requires meson v0.55 or higher
+       #:configure-flags
+       (list
+        "-Dbroadway-backend=true"      ;for broadway display-backend
+        "-Dcloudproviders=enabled"     ;for cloud-providers support
+        "-Dtracker=enabled"            ;for filechooser search support
+        "-Dcolord=enabled"             ;for color printing support
+        ,@(if (%current-target-system)
+              ;; If true, gtkdoc-scangobj will try to execute a
+              ;; cross-compiled binary.
+              '("-Dgtk_doc=false")
+              '("-Dgtk_doc=true"))
+        "-Dman-pages=true")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch
+           (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
+             ;; Correct DTD resources of docbook.
+             (substitute* (find-files "docs" "\\.xml$")
+               (("http://www.oasis-open.org/docbook/xml/4.3/")
+                (string-append
+                 (assoc-ref (or native-inputs inputs) "docbook-xml-4.3")
+                 "/xml/dtd/docbook/")))
+             ;; Disable building of icon cache.
+             (substitute* "meson.build"
+               (("gtk_update_icon_cache: true")
+                "gtk_update_icon_cache: false"))
+             ;; Disable failing tests.
+             ;; https://paste.sr.ht/blob/0af160f1172a58dff88a5cf6354ecba613cccdef
+             (substitute* (find-files "testsuite" "meson.build")
+               (("[ \t]*'empty-text.node',") "")
+               (("[ \t]*'testswitch.node',") "")
+               (("[ \t]*'widgetfactory.node',") ""))))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; Tests require a running X server.
+             (system "Xvfb :1 +extension GLX &")
+             (setenv "DISPLAY" ":1")
+             ;; Tests write to $HOME.
+             (setenv "HOME" (getcwd))
+             ;; Tests look for $XDG_RUNTIME_DIR.
+             (setenv "XDG_RUNTIME_DIR" (getcwd))
+             ;; For missing '/etc/machine-id'.
+             (setenv "DBUS_FATAL_WARNINGS" "0")))
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               ;; Run tests using the x11 setup,
+               ;; instead of the default wayland.
+               (invoke "meson" "test" "--setup=x11"))))
+         (add-after 'install 'move-files
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (assoc-ref outputs "bin"))
+                    (doc (assoc-ref outputs "doc")))
+               (for-each mkdir-p
+                         (list
+                          (string-append bin "/bin")
+                          (string-append bin "/share/applications")
+                          (string-append bin "/share/icons")
+                          (string-append bin "/share/man")
+                          (string-append bin "/share/metainfo")
+                          (string-append doc "/share/doc")))
+               ;; Move programs and related files to output 'bin'.
+               (for-each (lambda (dir)
+                           (rename-file
+                            (string-append out dir)
+                            (string-append bin dir)))
+                         (list
+                          "/bin"
+                          "/share/applications"
+                          "/share/icons"
+                          "/share/man"
+                          "/share/metainfo"))
+               ;; Move HTML documentation to output 'doc'.
+               (rename-file
+                (string-append out "/share/doc")
+                (string-append doc "/share/doc")))))
+         (add-after 'move-files 'patch-desktop-files
+           (lambda* (#:key outputs #:allow-other-keys)
+           (let* ((bin (assoc-ref outputs "bin"))
+                  (bindir (string-append bin "/bin"))
+                  (appdir (string-append "/share/applications")))
+             (substitute* (find-files appdir "//.desktop$")
+               (("exec.*=.*/bin")
+                (string-append "exec = " bindir)))))))))
+    (native-inputs
+     `(("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext-minimal" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection) ;for building introspection data
+       ("gtk-doc" ,gtk-doc)             ;for building documentation
+       ("intltool" ,intltool)
+       ("libxslt" ,libxslt)             ;for building man-pages
+       ("pkg-config" ,pkg-config)
+       ;; These python modules are required for building documentation.
+       ("python-jinja2" ,python-jinja2)
+       ("python-markdown" ,python-markdown)
+       ("python-markupsafe" ,python-markupsafe)
+       ("python-pygments" ,python-pygments)
+       ("python-toml" ,python-toml)
+       ("python-typogrify" ,python-typogrify)
+       ("sassc" ,sassc)                 ;for building themes
+       ("vala" ,vala)
+       ("xorg-server-for-tests" ,xorg-server-for-tests)))
+    (inputs
+     `(("colord" ,colord)               ;for color printing support
+       ("cups" ,cups)                   ;for CUPS print-backend
+       ("ffmpeg" ,ffmpeg)               ;for ffmpeg media-backend
+       ("fribidi" ,fribidi)
+       ("gstreamer" ,gstreamer)         ;for gstreamer media-backend
+       ("gst-plugins-bad" ,gst-plugins-bad) ;provides gstreamer-player
+       ("gst-plugins-base" ,gst-plugins-base) ;provides gstreamer-gl
+       ("harfbuzz" ,harfbuzz)
+       ("iso-codes" ,iso-codes)
+       ("json-glib" ,json-glib)
+       ("libcloudproviders" ,libcloudproviders) ;for clould-providers support
+       ("librsvg" ,librsvg)
+       ("python" ,python)
+       ("rest" ,rest)
+       ("tracker" ,tracker)))          ;for filechooser search support
+    (propagated-inputs
+     ;; Following dependencies are referenced in .pc files.
+     `(("cairo" ,cairo)
+       ("fontconfig" ,fontconfig)
+       ("gdk-pixbuf+svg" ,gdk-pixbuf+svg)
+       ("glib" ,glib)
+       ("graphene" ,graphene)
+       ("libepoxy" ,libepoxy)
+       ("libx11" ,libx11)               ;for x11 display-backend
+       ("libxcomposite" ,libxcomposite)
+       ("libxcursor" ,libxcursor)
+       ("libxdamage" ,libxdamage)
+       ("libxext" ,libxext)
+       ("libxfixes" ,libxfixes)
+       ("libxi" ,libxi)
+       ("libxinerama" ,libxinerama)     ;for xinerama support
+       ("libxkbcommon" ,libxkbcommon)
+       ("libxrandr" ,libxrandr)
+       ("libxrender" ,libxrender)
+       ("pango" ,pango)
+       ("vulkan-headers" ,vulkan-headers)
+       ("vulkan-loader" ,vulkan-loader) ;for vulkan graphics API support
+       ("wayland" ,wayland)             ;for wayland display-backend
+       ("wayland-protocols" ,wayland-protocols)))
+    (native-search-paths
+     (list
+      (search-path-specification
+       (variable "GUIX_GTK4_PATH")
+       (files '("lib/gtk-4.0")))))
+    (search-paths native-search-paths)
+    (home-page "https://www.gtk.org/")
+    (synopsis "Cross-platform widget toolkit")
+    (description "GTK is a multi-platform toolkit for creating graphical user
+interfaces.  Offering a complete set of widgets, GTK is suitable for projects
+ranging from small one-off tools to complete application suites.")
+    (license license:lgpl2.1+)))
+
 (define-public gtk+-2
   (package
     (name "gtk+")
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 0000000000..4a60023bf7
--- /dev/null
+++ b/gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch
@@ -0,0 +1,51 @@
+From 889294a93fc6464c2c2919bc47f6fd85ec823363 Mon Sep 17 00:00:00 2001
+From: Raghav Gururajan <rg@raghavgururajan.name>
+Date: Tue, 18 May 2021 19:57:00 -0400
+Subject: [PATCH] [PATCH]: Honor GUIX_GTK4_PATH.
+
+This patch makes GTK look for additional modules in a list of directories
+specified by the environment variable "GUIX_GTK4_PATH". This can be used
+instead of "GTK_PATH" to make GTK find modules that are incompatible with
+other major versions of GTK.
+---
+ gtk/gtkmodules.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c
+index aace5dcbc9..193b6a02e9 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 gchar *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.1
+
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [bug#48554] [PATCH wip-gnome v9 2/2] gnu: Update gtkmm to 4.2.0, add gtkmm@3, and adjust gtkmm@2.
  2021-09-05 13:22 ` [bug#48554] [PATCH wip-gnome v9 1/2] gnu: Add gtk Raghav Gururajan via Guix-patches via
@ 2021-09-05 13:22   ` Raghav Gururajan via Guix-patches via
  0 siblings, 0 replies; 35+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-09-05 13:22 UTC (permalink / raw)
  To: 48554; +Cc: Raghav Gururajan

* gnu/packages/gtk.scm (gtkmm)[version]: Update to 4.2.0.
[arguments](meson): New argument.
[native-inputs]: Add glib:bin.
[propagated-inputs]: Replace gtk+ with gtk.
[synopsis]: Modify.
[description]: Modify
(gtkmm-3): New variable.
(gtkmm-2)[arguments]: Strip certain inherited arguments.
---
 gnu/packages/gtk.scm | 48 +++++++++++++++++++++++++++++++-------------
 1 file changed, 34 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 73e7a7b4c4..eae1981672 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -1779,7 +1779,7 @@ library.")
 (define-public gtkmm
   (package
     (name "gtkmm")
-    (version "3.24.4")
+    (version "4.2.0")
     (source
      (origin
        (method url-fetch)
@@ -1788,11 +1788,12 @@ library.")
                        (version-major+minor version)  "/"
                        name "-" version ".tar.xz"))
        (sha256
-        (base32 "0hv7pviln4cpjvpz7m7ga5krcsbibqzixdcn0dwzpz0cx71p3swv"))))
+        (base32 "12x9j82y37r4v0ngs22rzp4wmw7k2bbb9d3bymcczzz7y8w4q328"))))
     (build-system meson-build-system)
     (outputs '("out" "doc"))
     (arguments
-     `(#:configure-flags '("-Dbuild-documentation=true")
+     `(#:meson ,meson-0.55     ;project requires meson v0.54 or higher
+       #:configure-flags '("-Dbuild-documentation=true")
        #:phases
        (modify-phases %standard-phases
          (add-before 'check 'pre-check
@@ -1815,6 +1816,7 @@ library.")
     (native-inputs
      `(("dot" ,graphviz)
        ("doxygen" ,doxygen)
+       ("glib:bin" ,glib "bin")
        ("m4" ,m4)
        ("mm-common" ,mm-common)
        ("perl" ,perl)
@@ -1825,11 +1827,11 @@ library.")
      `(("atkmm" ,atkmm)
        ("cairomm" ,cairomm)
        ("glibmm" ,glibmm)
-       ("gtk+" ,gtk+)
+       ("gtk" ,gtk)
        ("pangomm" ,pangomm)))
-    (synopsis "C++ Interfaces for GTK+ and GNOME")
+    (synopsis "C++ Interfaces for GTK and GNOME")
     (description "GTKmm is the official C++ interface for the popular GUI
-library GTK+.  Highlights include typesafe callbacks, and a comprehensive set of
+library GTK.  Highlights include typesafe callbacks, and a comprehensive set of
 widgets that are easily extensible via inheritance.  You can create user
 interfaces either in code or with the Glade User Interface designer, using
 libglademm.  There's extensive documentation, including API reference and a
@@ -1842,6 +1844,30 @@ tutorial.")
       ;; Tools
       license:gpl2+))))
 
+(define-public gtkmm-3
+  (package
+    (inherit gtkmm)
+    (name "gtkmm")
+    (version "3.24.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "mirror://gnome/sources/" name "/"
+                       (version-major+minor version)  "/"
+                       name "-" version ".tar.xz"))
+       (sha256
+        (base32 "0hv7pviln4cpjvpz7m7ga5krcsbibqzixdcn0dwzpz0cx71p3swv"))))
+    (arguments
+     (strip-keyword-arguments
+      '(#:meson) (package-arguments gtkmm)))
+    (propagated-inputs
+     `(("atkmm-2.28" ,atkmm-2.28)
+       ("cairomm-1.13" ,cairomm-1.13)
+       ("glibmm" ,glibmm)
+       ("gtk+" ,gtk+)
+       ("pangomm-2.42" ,pangomm-2.42)))))
+
 (define-public gtkmm-2
   (package
     (inherit gtkmm)
@@ -1858,14 +1884,8 @@ tutorial.")
         (base32 "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006"))))
     (build-system gnu-build-system)
     (arguments
-     (substitute-keyword-arguments (package-arguments gtkmm)
-       ((#:modules modules %gnu-build-system-modules)
-        `((srfi srfi-1)
-          ,@modules))
-       ((#:configure-flags flags)
-        `(fold delete
-               ,flags
-               '("-Dbuild-documentation=true")))))
+     (strip-keyword-arguments
+      '(#:meson #:configure-flags) (package-arguments gtkmm)))
     (propagated-inputs
      `(("atkmm" ,atkmm-2.28)
        ("cairomm" ,cairomm-1.13)
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [bug#48554] [PATCH wip-gnome v10 1/2] gnu: Add gtk.
  2021-05-21  4:06 [bug#48554] GTK v4 Raghav Gururajan via Guix-patches via
                   ` (12 preceding siblings ...)
  2021-09-05 13:22 ` [bug#48554] [PATCH wip-gnome v9 1/2] gnu: Add gtk Raghav Gururajan via Guix-patches via
@ 2021-09-05 14:44 ` Raghav Gururajan via Guix-patches via
  2021-09-05 14:44   ` [bug#48554] [PATCH wip-gnome v10 2/2] gnu: Update gtkmm to 4.2.0, add gtkmm@3, and adjust gtkmm@2 Raghav Gururajan via Guix-patches via
  2021-09-06 19:58 ` [bug#48554] GTK v4 Raghav Gururajan via Guix-patches via
  14 siblings, 1 reply; 35+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-09-05 14:44 UTC (permalink / raw)
  To: 48554; +Cc: Raghav Gururajan

* gnu/packages/gtk.scm (gtk): New variable.
* gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                  |   1 +
 gnu/packages/gtk.scm                          | 181 ++++++++++++++++++
 .../patches/gtk4-respect-GUIX_GTK4_PATH.patch |  51 +++++
 3 files changed, 233 insertions(+)
 create mode 100644 gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index eeed4953fa..bbad931643 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1200,6 +1200,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-honor-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 ada006b671..a67519f3cd 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -91,11 +91,15 @@
   #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages profiling)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-build)
   #:use-module (gnu packages python-xyz)
+  #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages guile-xyz)
   #:use-module (gnu packages cups)
   #:use-module (gnu packages version-control)
+  #:use-module (gnu packages video)
+  #:use-module (gnu packages vulkan)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
@@ -833,6 +837,183 @@ is part of the GNOME accessibility project.")
     (license license:lgpl2.1+)
     (home-page "https://wiki.gnome.org/Accessibility/")))
 
+(define-public gtk
+  (package
+    (name "gtk")
+    (version "4.2.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://gnome/sources/" name "/"
+                           (version-major+minor version)  "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32 "1rh9fd5axf79pmd93hb2fmmflic5swcvqvq6vqghlgz4bmvnjc82"))
+       (patches
+        (search-patches "gtk4-respect-GUIX_GTK4_PATH.patch"))))
+    (build-system meson-build-system)
+    (outputs '("out" "bin" "doc"))
+    (arguments
+     `(#:meson ,meson-0.55     ;project requires meson v0.55 or higher
+       #:configure-flags
+       (list
+        "-Dbroadway-backend=true"      ;for broadway display-backend
+        "-Dcloudproviders=enabled"     ;for cloud-providers support
+        "-Dtracker=enabled"            ;for filechooser search support
+        "-Dcolord=enabled"             ;for color printing support
+        ,@(if (%current-target-system)
+              ;; If true, gtkdoc-scangobj will try to execute a
+              ;; cross-compiled binary.
+              '("-Dgtk_doc=false")
+              '("-Dgtk_doc=true"))
+        "-Dman-pages=true")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch
+           (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
+             ;; Correct DTD resources of docbook.
+             (substitute* (find-files "docs" "\\.xml$")
+               (("http://www.oasis-open.org/docbook/xml/4.3/")
+                (string-append
+                 (assoc-ref (or native-inputs inputs) "docbook-xml-4.3")
+                 "/xml/dtd/docbook/")))
+             ;; Disable building of icon cache.
+             (substitute* "meson.build"
+               (("gtk_update_icon_cache: true")
+                "gtk_update_icon_cache: false"))
+             ;; Disable failing tests.
+             ;; https://paste.sr.ht/blob/0af160f1172a58dff88a5cf6354ecba613cccdef
+             (substitute* (find-files "testsuite" "meson.build")
+               (("[ \t]*'empty-text.node',") "")
+               (("[ \t]*'testswitch.node',") "")
+               (("[ \t]*'widgetfactory.node',") ""))))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; Tests require a running X server.
+             (system "Xvfb :1 +extension GLX &")
+             (setenv "DISPLAY" ":1")
+             ;; Tests write to $HOME.
+             (setenv "HOME" (getcwd))
+             ;; Tests look for $XDG_RUNTIME_DIR.
+             (setenv "XDG_RUNTIME_DIR" (getcwd))
+             ;; For missing '/etc/machine-id'.
+             (setenv "DBUS_FATAL_WARNINGS" "0")))
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               ;; Run tests using the x11 setup,
+               ;; instead of the default wayland.
+               (invoke "meson" "test" "--setup=x11"))))
+         (add-after 'install 'move-files
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (assoc-ref outputs "bin"))
+                    (doc (assoc-ref outputs "doc")))
+               (for-each mkdir-p
+                         (list
+                          (string-append bin "/bin")
+                          (string-append bin "/share/applications")
+                          (string-append bin "/share/icons")
+                          (string-append bin "/share/man")
+                          (string-append bin "/share/metainfo")
+                          (string-append doc "/share/doc")))
+               ;; Move programs and related files to output 'bin'.
+               (for-each (lambda (dir)
+                           (rename-file
+                            (string-append out dir)
+                            (string-append bin dir)))
+                         (list
+                          "/bin"
+                          "/share/applications"
+                          "/share/icons"
+                          "/share/man"
+                          "/share/metainfo"))
+               ;; Move HTML documentation to output 'doc'.
+               (rename-file
+                (string-append out "/share/doc")
+                (string-append doc "/share/doc")))))
+         (add-after 'move-files 'patch-desktop-files
+           (lambda* (#:key outputs #:allow-other-keys)
+           (let* ((bin (assoc-ref outputs "bin"))
+                  (bindir (string-append bin "/bin"))
+                  (appdir (string-append "/share/applications")))
+             ;; Correct exec-path of programs.
+             (substitute* (find-files appdir "//.desktop$")
+               (("exec.*=.*/bin")
+                (string-append "exec = " bindir)))))))))
+    (native-inputs
+     `(("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext-minimal" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection) ;for building introspection data
+       ("gtk-doc" ,gtk-doc)             ;for building documentation
+       ("intltool" ,intltool)
+       ("libxslt" ,libxslt)             ;for building man-pages
+       ("pkg-config" ,pkg-config)
+       ;; These python modules are required for building documentation.
+       ("python-jinja2" ,python-jinja2)
+       ("python-markdown" ,python-markdown)
+       ("python-markupsafe" ,python-markupsafe)
+       ("python-pygments" ,python-pygments)
+       ("python-toml" ,python-toml)
+       ("python-typogrify" ,python-typogrify)
+       ("sassc" ,sassc)                 ;for building themes
+       ("vala" ,vala)
+       ("xorg-server-for-tests" ,xorg-server-for-tests)))
+    (inputs
+     `(("colord" ,colord)               ;for color printing support
+       ("cups" ,cups)                   ;for CUPS print-backend
+       ("ffmpeg" ,ffmpeg)               ;for ffmpeg media-backend
+       ("fribidi" ,fribidi)
+       ("gstreamer" ,gstreamer)         ;for gstreamer media-backend
+       ("gst-plugins-bad" ,gst-plugins-bad) ;provides gstreamer-player
+       ("gst-plugins-base" ,gst-plugins-base) ;provides gstreamer-gl
+       ("harfbuzz" ,harfbuzz)
+       ("iso-codes" ,iso-codes)
+       ("json-glib" ,json-glib)
+       ("libcloudproviders" ,libcloudproviders) ;for clould-providers support
+       ("librsvg" ,librsvg)
+       ("python" ,python)
+       ("rest" ,rest)
+       ("tracker" ,tracker)))          ;for filechooser search support
+    (propagated-inputs
+     ;; Following dependencies are referenced in .pc files.
+     `(("cairo" ,cairo)
+       ("fontconfig" ,fontconfig)
+       ("gdk-pixbuf+svg" ,gdk-pixbuf+svg)
+       ("glib" ,glib)
+       ("graphene" ,graphene)
+       ("libepoxy" ,libepoxy)
+       ("libx11" ,libx11)               ;for x11 display-backend
+       ("libxcomposite" ,libxcomposite)
+       ("libxcursor" ,libxcursor)
+       ("libxdamage" ,libxdamage)
+       ("libxext" ,libxext)
+       ("libxfixes" ,libxfixes)
+       ("libxi" ,libxi)
+       ("libxinerama" ,libxinerama)     ;for xinerama support
+       ("libxkbcommon" ,libxkbcommon)
+       ("libxrandr" ,libxrandr)
+       ("libxrender" ,libxrender)
+       ("pango" ,pango)
+       ("vulkan-headers" ,vulkan-headers)
+       ("vulkan-loader" ,vulkan-loader) ;for vulkan graphics API support
+       ("wayland" ,wayland)             ;for wayland display-backend
+       ("wayland-protocols" ,wayland-protocols)))
+    (native-search-paths
+     (list
+      (search-path-specification
+       (variable "GUIX_GTK4_PATH")
+       (files '("lib/gtk-4.0")))))
+    (search-paths native-search-paths)
+    (home-page "https://www.gtk.org/")
+    (synopsis "Cross-platform widget toolkit")
+    (description "GTK is a multi-platform toolkit for creating graphical user
+interfaces.  Offering a complete set of widgets, GTK is suitable for projects
+ranging from small one-off tools to complete application suites.")
+    (license license:lgpl2.1+)))
+
 (define-public gtk+-2
   (package
     (name "gtk+")
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 0000000000..4a60023bf7
--- /dev/null
+++ b/gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch
@@ -0,0 +1,51 @@
+From 889294a93fc6464c2c2919bc47f6fd85ec823363 Mon Sep 17 00:00:00 2001
+From: Raghav Gururajan <rg@raghavgururajan.name>
+Date: Tue, 18 May 2021 19:57:00 -0400
+Subject: [PATCH] [PATCH]: Honor GUIX_GTK4_PATH.
+
+This patch makes GTK look for additional modules in a list of directories
+specified by the environment variable "GUIX_GTK4_PATH". This can be used
+instead of "GTK_PATH" to make GTK find modules that are incompatible with
+other major versions of GTK.
+---
+ gtk/gtkmodules.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c
+index aace5dcbc9..193b6a02e9 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 gchar *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.1
+
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [bug#48554] [PATCH wip-gnome v10 2/2] gnu: Update gtkmm to 4.2.0, add gtkmm@3, and adjust gtkmm@2.
  2021-09-05 14:44 ` [bug#48554] [PATCH wip-gnome v10 1/2] gnu: Add gtk Raghav Gururajan via Guix-patches via
@ 2021-09-05 14:44   ` Raghav Gururajan via Guix-patches via
  0 siblings, 0 replies; 35+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-09-05 14:44 UTC (permalink / raw)
  To: 48554; +Cc: Raghav Gururajan

* gnu/packages/gtk.scm (gtkmm)[version]: Update to 4.2.0.
[arguments](meson): New argument.
[native-inputs]: Add glib:bin.
[propagated-inputs]: Replace gtk+ with gtk.
(gtkmm-3): New variable.
(gtkmm-2)[arguments]: Strip certain inherited arguments.
---
 gnu/packages/gtk.scm | 44 ++++++++++++++++++++++++++++++++------------
 1 file changed, 32 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index a67519f3cd..f28b15890e 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -1780,7 +1780,7 @@ library.")
 (define-public gtkmm
   (package
     (name "gtkmm")
-    (version "3.24.4")
+    (version "4.2.0")
     (source
      (origin
        (method url-fetch)
@@ -1789,11 +1789,12 @@ library.")
                        (version-major+minor version)  "/"
                        name "-" version ".tar.xz"))
        (sha256
-        (base32 "0hv7pviln4cpjvpz7m7ga5krcsbibqzixdcn0dwzpz0cx71p3swv"))))
+        (base32 "12x9j82y37r4v0ngs22rzp4wmw7k2bbb9d3bymcczzz7y8w4q328"))))
     (build-system meson-build-system)
     (outputs '("out" "doc"))
     (arguments
-     `(#:configure-flags '("-Dbuild-documentation=true")
+     `(#:meson ,meson-0.55     ;project requires meson v0.54 or higher
+       #:configure-flags '("-Dbuild-documentation=true")
        #:phases
        (modify-phases %standard-phases
          (add-before 'check 'pre-check
@@ -1816,6 +1817,7 @@ library.")
     (native-inputs
      `(("dot" ,graphviz)
        ("doxygen" ,doxygen)
+       ("glib:bin" ,glib "bin")
        ("m4" ,m4)
        ("mm-common" ,mm-common)
        ("perl" ,perl)
@@ -1826,7 +1828,7 @@ library.")
      `(("atkmm" ,atkmm)
        ("cairomm" ,cairomm)
        ("glibmm" ,glibmm)
-       ("gtk+" ,gtk+)
+       ("gtk" ,gtk)
        ("pangomm" ,pangomm)))
     (synopsis "C++ Interfaces for GTK+ and GNOME")
     (description "GTKmm is the official C++ interface for the popular GUI
@@ -1843,6 +1845,30 @@ tutorial.")
       ;; Tools
       license:gpl2+))))
 
+(define-public gtkmm-3
+  (package
+    (inherit gtkmm)
+    (name "gtkmm")
+    (version "3.24.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "mirror://gnome/sources/" name "/"
+                       (version-major+minor version)  "/"
+                       name "-" version ".tar.xz"))
+       (sha256
+        (base32 "0hv7pviln4cpjvpz7m7ga5krcsbibqzixdcn0dwzpz0cx71p3swv"))))
+    (arguments
+     (strip-keyword-arguments
+      '(#:meson) (package-arguments gtkmm)))
+    (propagated-inputs
+     `(("atkmm-2.28" ,atkmm-2.28)
+       ("cairomm-1.13" ,cairomm-1.13)
+       ("glibmm" ,glibmm)
+       ("gtk+" ,gtk+)
+       ("pangomm-2.42" ,pangomm-2.42)))))
+
 (define-public gtkmm-2
   (package
     (inherit gtkmm)
@@ -1859,14 +1885,8 @@ tutorial.")
         (base32 "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006"))))
     (build-system gnu-build-system)
     (arguments
-     (substitute-keyword-arguments (package-arguments gtkmm)
-       ((#:modules modules %gnu-build-system-modules)
-        `((srfi srfi-1)
-          ,@modules))
-       ((#:configure-flags flags)
-        `(fold delete
-               ,flags
-               '("-Dbuild-documentation=true")))))
+     (strip-keyword-arguments
+      '(#:meson #:configure-flags) (package-arguments gtkmm)))
     (propagated-inputs
      `(("atkmm" ,atkmm-2.28)
        ("cairomm" ,cairomm-1.13)
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [bug#48554] GTK v4
  2021-05-21  4:06 [bug#48554] GTK v4 Raghav Gururajan via Guix-patches via
                   ` (13 preceding siblings ...)
  2021-09-05 14:44 ` [bug#48554] [PATCH wip-gnome v10 1/2] gnu: Add gtk Raghav Gururajan via Guix-patches via
@ 2021-09-06 19:58 ` Raghav Gururajan via Guix-patches via
  2021-09-07  0:41   ` bug#48554: " Raghav Gururajan via Guix-patches via
  14 siblings, 1 reply; 35+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-09-06 19:58 UTC (permalink / raw)
  To: 48554


[-- Attachment #1.1.1: Type: text/plain, Size: 44 bytes --]

Pushed to wip-gnome with some corrections.

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 2649 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* bug#48554: GTK v4
  2021-09-06 19:58 ` [bug#48554] GTK v4 Raghav Gururajan via Guix-patches via
@ 2021-09-07  0:41   ` Raghav Gururajan via Guix-patches via
  0 siblings, 0 replies; 35+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-09-07  0:41 UTC (permalink / raw)
  To: 48554-done


[-- Attachment #1.1.1: Type: text/plain, Size: 46 bytes --]

> Pushed to wip-gnome with some corrections.

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 2649 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2021-09-07  0:42 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-21  4:06 [bug#48554] GTK v4 Raghav Gururajan via Guix-patches via
2021-05-21  4:08 ` [bug#48554] [PATCH wip-gnome v1] gnu: Add gtk Raghav Gururajan via Guix-patches via
2021-07-16 15:39 ` [bug#48554] Successful Build Charles via Guix-patches via
2021-08-16  4:29 ` Raghav Gururajan via Guix-patches via
2021-08-31  1:05 ` [bug#48554] GTK v4 Raghav Gururajan via Guix-patches via
2021-08-31  5:53 ` Raghav Gururajan via Guix-patches via
2021-09-02 14:12 ` [bug#48554] [PATCH wip-gnome v2] gnu: Add gtk Raghav Gururajan via Guix-patches via
2021-09-02 14:20   ` Maxime Devos
2021-09-02 14:23     ` Raghav Gururajan via Guix-patches via
2021-09-02 14:28   ` Maxime Devos
2021-09-02 15:07     ` Raghav Gururajan via Guix-patches via
2021-09-02 14:29   ` Maxime Devos
2021-09-02 15:10     ` Raghav Gururajan via Guix-patches via
2021-09-02 15:06 ` [bug#48554] [PATCH wip-gnome v3] " Raghav Gururajan via Guix-patches via
2021-09-02 15:37 ` [bug#48554] [PATCH wip-gnome v4] " Raghav Gururajan via Guix-patches via
2021-09-02 20:09 ` [bug#48554] [PATCH wip-gnome v5 1/2] " Raghav Gururajan via Guix-patches via
2021-09-02 20:09   ` [bug#48554] [PATCH wip-gnome v5 2/2] gnu: Update gtkmm to 4.2.0, add gtkmm@3, and adjust gtkmm@2 Raghav Gururajan via Guix-patches via
2021-09-02 20:41 ` [bug#48554] [PATCH wip-gnome v6 1/4] gnu: Add gtk Raghav Gururajan via Guix-patches via
2021-09-02 20:41   ` [bug#48554] [PATCH wip-gnome v6 2/4] gnu: gtk+: Update to 3.24.30 and inherit from gtk instead of gtk+-2 Raghav Gururajan via Guix-patches via
2021-09-02 20:41   ` [bug#48554] [PATCH wip-gnome v6 3/4] gnu: gtk+@2: Move block and inherit from gtk Raghav Gururajan via Guix-patches via
2021-09-02 20:41   ` [bug#48554] [PATCH wip-gnome v6 4/4] gnu: Update gtkmm to 4.2.0, add gtkmm@3, and adjust gtkmm@2 Raghav Gururajan via Guix-patches via
2021-09-02 20:56 ` [bug#48554] [PATCH wip-gnome v7 1/4] gnu: Add gtk Raghav Gururajan via Guix-patches via
2021-09-02 20:56   ` [bug#48554] [PATCH wip-gnome v7 2/4] gnu: gtk+: Inherit from gtk instead of gtk+-2 Raghav Gururajan via Guix-patches via
2021-09-02 20:56   ` [bug#48554] [PATCH wip-gnome v7 3/4] gnu: gtk+@2: Move block and inherit from gtk Raghav Gururajan via Guix-patches via
2021-09-02 20:56   ` [bug#48554] [PATCH wip-gnome v7 4/4] gnu: Update gtkmm to 4.2.0, add gtkmm@3, and adjust gtkmm@2 Raghav Gururajan via Guix-patches via
2021-09-03 17:08 ` [bug#48554] [PATCH wip-gnome v8 1/4] gnu: Add gtk Raghav Gururajan via Guix-patches via
2021-09-03 17:08   ` [bug#48554] [PATCH wip-gnome v8 2/4] gnu: gtk+: Inherit from gtk instead of gtk+-2 Raghav Gururajan via Guix-patches via
2021-09-03 17:08   ` [bug#48554] [PATCH wip-gnome v8 3/4] gnu: gtk+@2: Move block and inherit from gtk Raghav Gururajan via Guix-patches via
2021-09-03 17:08   ` [bug#48554] [PATCH wip-gnome v8 4/4] gnu: Update gtkmm to 4.2.0, add gtkmm@3, and adjust gtkmm@2 Raghav Gururajan via Guix-patches via
2021-09-05 13:22 ` [bug#48554] [PATCH wip-gnome v9 1/2] gnu: Add gtk Raghav Gururajan via Guix-patches via
2021-09-05 13:22   ` [bug#48554] [PATCH wip-gnome v9 2/2] gnu: Update gtkmm to 4.2.0, add gtkmm@3, and adjust gtkmm@2 Raghav Gururajan via Guix-patches via
2021-09-05 14:44 ` [bug#48554] [PATCH wip-gnome v10 1/2] gnu: Add gtk Raghav Gururajan via Guix-patches via
2021-09-05 14:44   ` [bug#48554] [PATCH wip-gnome v10 2/2] gnu: Update gtkmm to 4.2.0, add gtkmm@3, and adjust gtkmm@2 Raghav Gururajan via Guix-patches via
2021-09-06 19:58 ` [bug#48554] GTK v4 Raghav Gururajan via Guix-patches via
2021-09-07  0:41   ` bug#48554: " Raghav Gururajan via Guix-patches via

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).