From abfa74c68b55460227a319deb75690e319aabb39 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 26 Aug 2022 15:29:36 -0400 Subject: gnu: gtk: Update to 4.8.0 and use gexps. * gnu/packages/gtk.scm (gtk): Update to 4.8.0. [arguments]: Use gexps. [parallel-tests?]: Remove argument. [phases]{patch}: Use this-package-native-input. Disable the inscription-markup.ui test. {move-files}: Adjust for gexps. --- gnu/packages/gtk.scm | 197 ++++++++++++++++++++++++++------------------------- 1 file changed, 99 insertions(+), 98 deletions(-) (limited to 'gnu/packages/gtk.scm') diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 4beaebf64a..31ffba0f58 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -1142,7 +1142,7 @@ (define-public gtk+ (define-public gtk (package (name "gtk") - (version "4.6.6") + (version "4.8.0") (source (origin (method url-fetch) @@ -1150,110 +1150,111 @@ (define-public gtk (version-major+minor version) "/" name "-" version ".tar.xz")) (sha256 - (base32 "0w5fb4grgmb6nhf2glq2y5xqnc9y4v3lm0s9xnbw5xv96p8y9gvv")) + (base32 "0zxxvjnbmaahvm9lwm007dzgc0yl8qamkp1467c5kqyi6ws21mn8")) (patches (search-patches "gtk4-respect-GUIX_GTK4_PATH.patch")))) (build-system meson-build-system) (outputs '("out" "bin" "doc")) (arguments - `(#:modules ((guix build utils) + (list + #:modules '((guix build utils) (guix build meson-build-system) ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)) - #: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") - #:parallel-tests? #f ;parallel tests are not supported - #:test-options '("--setup=x11" ;defaults to wayland - ;; Use the same test options as upstream uses for - ;; their CI. - "--suite=gtk" - "--no-suite=gsk-compare-broadway") - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'generate-gdk-pixbuf-loaders-cache-file - (assoc-ref glib-or-gtk:%standard-phases - 'generate-gdk-pixbuf-loaders-cache-file)) - (add-after 'unpack 'patch-rst2man - (lambda _ - (substitute* "docs/reference/gtk/meson.build" - (("find_program\\('rst2man'") "find_program('rst2man.py'")))) - (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. - (substitute* (find-files "testsuite" "meson.build") - (("[ \t]*'empty-text.node',") "") - (("[ \t]*'testswitch.node',") "") - (("[ \t]*'widgetfactory.node',") "") - ;; The unaligned-offscreen test fails for unknown reasons, also - ;; on different distributions (see: - ;; https://gitlab.gnome.org/GNOME/gtk/-/issues/4889). - ((" 'unaligned-offscreen',") "")) - (substitute* "testsuite/reftests/meson.build" - (("[ \t]*'label-wrap-justify.ui',") "")))) - (add-before 'build 'set-cache - (lambda _ - (setenv "XDG_CACHE_HOME" (getcwd)))) - (add-before 'check 'pre-check - (lambda* (#:key inputs #:allow-other-keys) - ;; Tests require a running X server. - (system "Xvfb :1 +extension GLX &") - (setenv "DISPLAY" ":1") - ;; Tests write to $HOME. - (setenv "HOME" (getcwd)) - ;; Tests look for those variables. - (setenv "XDG_RUNTIME_DIR" (getcwd)) - ;; For missing '/etc/machine-id'. - (setenv "DBUS_FATAL_WARNINGS" "0") - ;; Required for the calendar test. - (setenv "TZDIR" (search-input-directory inputs - "share/zoneinfo")))) - (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")))))))) + #: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") + #:test-options '(list "--setup=x11" ;defaults to wayland + ;; Use the same test options as upstream uses for + ;; their CI. + "--suite=gtk" + "--no-suite=gsk-compare-broadway") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'generate-gdk-pixbuf-loaders-cache-file + (assoc-ref glib-or-gtk:%standard-phases + 'generate-gdk-pixbuf-loaders-cache-file)) + (add-after 'unpack 'patch-rst2man + (lambda _ + (substitute* "docs/reference/gtk/meson.build" + (("find_program\\('rst2man'") + "find_program('rst2man.py'")))) + (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 #$(this-package-native-input "docbook-xml") + "/xml/dtd/docbook/"))) + ;; Disable building of icon cache. + (substitute* "meson.build" + (("gtk_update_icon_cache: true") + "gtk_update_icon_cache: false")) + ;; Disable failing tests. + (substitute* (find-files "testsuite" "meson.build") + (("[ \t]*'empty-text.node',") "") + (("[ \t]*'testswitch.node',") "") + (("[ \t]*'widgetfactory.node',") "") + ;; The unaligned-offscreen test fails for unknown reasons, also + ;; on different distributions (see: + ;; https://gitlab.gnome.org/GNOME/gtk/-/issues/4889). + ((" 'unaligned-offscreen',") "")) + (substitute* "testsuite/reftests/meson.build" + (("[ \t]*'label-wrap-justify.ui',") "") + ;; The inscription-markup.ui fails due to /etc/machine-id + ;; related warnings (see: + ;; https://gitlab.gnome.org/GNOME/gtk/-/issues/5169). + (("[ \t]*'inscription-markup.ui',") "")))) + (add-before 'build 'set-cache + (lambda _ + (setenv "XDG_CACHE_HOME" (getcwd)))) + (add-before 'check 'pre-check + (lambda* (#:key inputs #:allow-other-keys) + ;; Tests require a running X server. + (system "Xvfb :1 +extension GLX &") + (setenv "DISPLAY" ":1") + ;; Tests write to $HOME. + (setenv "HOME" (getcwd)) + ;; Tests look for those variables. + (setenv "XDG_RUNTIME_DIR" (getcwd)) + ;; For missing '/etc/machine-id'. + (setenv "DBUS_FATAL_WARNINGS" "0") + ;; Required for the calendar test. + (setenv "TZDIR" (search-input-directory inputs + "share/zoneinfo")))) + (add-after 'install 'move-files + (lambda _ + (for-each mkdir-p + (list + (string-append #$output:bin "/bin") + (string-append #$output:bin "/share/applications") + (string-append #$output:bin "/share/icons") + (string-append #$output:bin "/share/man") + (string-append #$output:bin "/share/metainfo") + (string-append #$output:doc "/share/doc"))) + ;; Move programs and related files to output 'bin'. + (for-each (lambda (dir) + (rename-file + (string-append #$output dir) + (string-append #$output:bin dir))) + (list + "/bin" + "/share/applications" + "/share/icons" + "/share/man" + "/share/metainfo")) + ;; Move HTML documentation to output 'doc'. + (rename-file + (string-append #$output "/share/doc") + (string-append #$output:doc "/share/doc"))))))) (native-inputs (list docbook-xml-4.3 docbook-xsl -- cgit v1.2.3 From 579facddec29ec47c0b1bd9c0489fcecdc758f4c Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sun, 4 Sep 2022 12:59:32 -0400 Subject: gnu: gtk: Replace librsvg with librsvg-bootstrap. This is to use the same version of librsvg as used by the 'gtk+' package and avoid propagation conflicts. * gnu/packages/gtk.scm (guile-cairo)[inputs]: Remove librsvg. [propagated-inputs]: Replace librsvg with librsvg-bootstrap. --- gnu/packages/gtk.scm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gnu/packages/gtk.scm') diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 31ffba0f58..58ae7bf766 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -1293,7 +1293,6 @@ (define-public gtk libcloudproviders ;for cloud-providers support libjpeg-turbo libpng - librsvg libtiff python rest @@ -1302,7 +1301,7 @@ (define-public gtk ;; Following dependencies are referenced in .pc files. (list cairo fontconfig - librsvg + librsvg-bootstrap glib graphene libepoxy -- cgit v1.2.3 From 560a47aa9331d8d293701746bdb460a0071338c1 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sun, 4 Sep 2022 21:40:50 -0400 Subject: gnu: gtksourceview: Update to 5.5.1. * gnu/packages/gtk.scm (gtksourceview): Update to 5.5.1. [build-system]: Use meson-build-system. [phases]: Use gexps. {disable-gtk-update-icon-cache}: New phase. {pre-check}: Use search-input-file. [native-inputs]: Remove labels. Remove intltool and itstool. Add gettext-minimal, gi-docgen and gobject-introspection-next. [propagated-inputs]: Remove labels. Remove gtk+. Add fontconfig, fribidi, gtk, pango-next and pcre2. Replace glib with glib-next. (gtksourceview-4): New variable. (gtksourceview-3): Inherit from gtksourceview-4 and adjust accordingly. * gnu/packages/gnome.scm (tepl): Replace gtksourceview with gtksourceview-4. (sushi)[inputs]: Likewise. * gnu/packages/guile-xyz.scm (nomad): Likewise. --- gnu/packages/gnome.scm | 4 +- gnu/packages/gtk.scm | 145 ++++++++++++++++++++++++++++----------------- gnu/packages/guile-xyz.scm | 2 +- 3 files changed, 95 insertions(+), 56 deletions(-) (limited to 'gnu/packages/gtk.scm') diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 14b6727934..654032ba25 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -1060,7 +1060,7 @@ (define-public tepl (list amtk glib gtk+ - gtksourceview + gtksourceview-4 libxml2 uchardet)) (synopsis "Text editor product line") @@ -1627,7 +1627,7 @@ (define-public sushi gjs gst-plugins-base gstreamer - gtksourceview + gtksourceview-4 harfbuzz libepoxy libmusicbrainz diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 58ae7bf766..697bf3c018 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -91,6 +91,7 @@ (define-module (gnu packages gtk) #:use-module (gnu packages linux) #:use-module (gnu packages m4) #:use-module (gnu packages man) + #:use-module (gnu packages pcre) #:use-module (gnu packages pdf) #:use-module (gnu packages perl) #:use-module (gnu packages perl-check) @@ -610,63 +611,101 @@ (define-public gtksourceview-2 (home-page "https://developer.gnome.org/gtksourceview/"))) (define-public gtksourceview - (package - (name "gtksourceview") - (version "4.2.0") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnome/sources/gtksourceview/" - (version-major+minor version) "/" - "gtksourceview-" version ".tar.xz")) - (sha256 - (base32 - "0xgnjj7jd56wbl99s76sa1vjq9bkz4mdsxwgwlcphg689liyncf4")))) - (build-system gnu-build-system) - (arguments - '(#:phases - (modify-phases %standard-phases - (add-before - 'check 'pre-check - (lambda* (#:key inputs #:allow-other-keys) - (let ((xorg-server (assoc-ref inputs "xorg-server"))) - ;; Tests require a running X server. - (system (format #f "~a/bin/Xvfb :1 &" xorg-server)) - (setenv "DISPLAY" ":1") - ;; For the missing /etc/machine-id. - (setenv "DBUS_FATAL_WARNINGS" "0") - #t)))))) - (native-inputs - `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc. - ("intltool" ,intltool) - ("itstool" ,itstool) - ("gobject-introspection" ,gobject-introspection) - ("pkg-config" ,pkg-config) - ("vala" ,vala) - ;; For testing. - ("xorg-server" ,xorg-server-for-tests) - ("shared-mime-info" ,shared-mime-info))) - (propagated-inputs - ;; gtksourceview-3.0.pc refers to all these. - (list glib gtk+ libxml2)) - (home-page "https://wiki.gnome.org/Projects/GtkSourceView") - (synopsis "GNOME source code widget") - (description "GtkSourceView is a text widget that extends the standard + (package + (name "gtksourceview") + (version "5.5.1") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/gtksourceview/" + (version-major+minor version) "/" + "gtksourceview-" version ".tar.xz")) + (sha256 + (base32 + "068dqhacvs65gnmrryahm6qs0q050admlpqqi1gy8wgh2p6qrraa")))) + (build-system meson-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'disable-gtk-update-icon-cache + (lambda _ + (substitute* "meson.build" + (("gtk_update_icon_cache: true") + "gtk_update_icon_cache: false")))) + (add-before 'check 'pre-check + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (let ((Xvfb (search-input-file (or native-inputs inputs) + "bin/Xvfb"))) + ;; Tests require a running X server. + (system (string-append Xvfb " :1 &")) + (setenv "DISPLAY" ":1") + ;; For the missing /etc/machine-id. + (setenv "DBUS_FATAL_WARNINGS" "0"))))))) + (native-inputs + (list `(,glib "bin") ; for glib-genmarshal, etc. + gettext-minimal + gi-docgen + gobject-introspection-next + pkg-config + vala + ;; For testing. + xorg-server-for-tests + shared-mime-info)) + (propagated-inputs + ;; gtksourceview-5.pc refers to all these. + (list fontconfig + fribidi + glib-next + gtk + libxml2 + pcre2 + pango-next)) + (home-page "https://wiki.gnome.org/Projects/GtkSourceView") + (synopsis "GNOME source code widget") + (description "GtkSourceView is a text widget that extends the standard GTK+ text widget GtkTextView. It improves GtkTextView by implementing syntax highlighting and other features typical of a source code editor.") - (license license:lgpl2.1+))) + (license license:lgpl2.1+))) + +;;; This older version is used by tepl. +(define-public gtksourceview-4 + (package + (inherit gtksourceview) + (version "4.8.3") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/gtksourceview/" + (version-major+minor version) "/" + "gtksourceview-" version ".tar.xz")) + (sha256 + (base32 + "10n61sa0g447nx73yapb00z57shp48gfvk1lv1s29ji0cd81j063")))) + (native-inputs + (modify-inputs (package-native-inputs gtksourceview) + (replace "gobject-introspection" gobject-introspection))) + (propagated-inputs + (modify-inputs (package-propagated-inputs gtksourceview) + (replace "gtk" gtk+) + (replace "pango-next" pango) + (replace "glib" glib))))) (define-public gtksourceview-3 - (package (inherit gtksourceview) - (name "gtksourceview") - (version "3.24.10") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnome/sources/" name "/" - (version-major+minor version) "/" - name "-" version ".tar.xz")) - (sha256 - (base32 - "16ym7jwiki4s1pilwr4incx0yg7ll94f1cajrnpndkxxs36hcm5b")))))) + (package + (inherit gtksourceview-4) + (name "gtksourceview") + (version "3.24.11") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "1zbpj283b5ycz767hqz5kdq02wzsga65pp4fykvhg8xj6x50f6v9")))) + (build-system gnu-build-system) + (arguments (substitute-keyword-arguments (package-arguments gtksourceview) + ((#:phases phases) + `(modify-phases ,phases + (delete 'disable-gtk-update-icon-cache))))))) (define-public gdk-pixbuf (package diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index 1affb90027..56f0bb8acc 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -3524,7 +3524,7 @@ (define-public nomad ("gtk+" ,gtk+) ("gtk+:bin" ,gtk+ "bin") ("webkitgtk" ,webkitgtk) - ("gtksourceview" ,gtksourceview) + ("gtksourceview" ,gtksourceview-4) ("gsettings-desktop-schemas" ,gsettings-desktop-schemas) ("vte" ,vte) ;; Gstreamer -- cgit v1.2.3 From c20660827e0d6b854c6500e685889f7c3beba40b Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 5 Sep 2022 17:34:39 -0400 Subject: gnu: pango-next: Rename from "pango "to "pango-next". * gnu/packages/gtk.scm (pango-next)[name]: Rename from pango to pango-next. --- gnu/packages/gtk.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/gtk.scm') diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 697bf3c018..16049a8052 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -429,7 +429,7 @@ (define-public pango (define-public pango-next (package (inherit pango) - (name "pango") + (name "pango-next") ;to avoid profile conflicts (version "1.50.4") (source (origin (method url-fetch) -- cgit v1.2.3 From 4d510e5411f2522fe3feae60391ea91ba7decb9a Mon Sep 17 00:00:00 2001 From: arkhan Date: Mon, 12 Sep 2022 21:45:05 -0500 Subject: gnu: dragon-drop: Correct PREFIX. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/gtk.scm (dragon-drop)[#:make-flags]: Remove gratuitous “/bin” from PREFIX. Signed-off-by: Liliana Marie Prikler --- gnu/packages/gtk.scm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gnu/packages/gtk.scm') diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 16049a8052..1ee2a99bf6 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -2625,8 +2625,7 @@ (define-public dragon-drop #:make-flags (list (string-append "CC=" ,(cc-for-target)) ;; makefile uses PREFIX for the binary location - (string-append "PREFIX=" (assoc-ref %outputs "out") - "/bin")) + (string-append "PREFIX=" (assoc-ref %outputs "out"))) #:phases (modify-phases %standard-phases (delete 'configure)))) ; no configure script -- cgit v1.2.3 From cad4b0cc07eef109362b736651f34c14d149c8c5 Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Wed, 14 Sep 2022 21:01:41 +0200 Subject: gnu: dragon-drop: Use G-Expressions. * gnu/packages/gtk.scm (dragon-drop)[arguments]: Convert to list of G-Expressions. --- gnu/packages/gtk.scm | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'gnu/packages/gtk.scm') diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 1ee2a99bf6..606021a7ea 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -2621,14 +2621,13 @@ (define-public dragon-drop (inputs (list gtk+)) (native-inputs (list pkg-config)) (arguments - `(#:tests? #f ; no check - #:make-flags - (list (string-append "CC=" ,(cc-for-target)) - ;; makefile uses PREFIX for the binary location - (string-append "PREFIX=" (assoc-ref %outputs "out"))) - #:phases - (modify-phases %standard-phases - (delete 'configure)))) ; no configure script + (list + #:tests? #f ; no check target + #:make-flags #~(list (string-append "CC=" #$(cc-for-target)) + (string-append "PREFIX=" #$output)) + #:phases + #~(modify-phases %standard-phases + (delete 'configure)))) ; no configure script (synopsis "Drag and drop source/target for X") (description "Dragon is a lightweight drag-and-drop source for X where you can run: -- cgit v1.2.3