[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
90/181: gnu: Add glib-next.
From: |
guix-commits |
Subject: |
90/181: gnu: Add glib-next. |
Date: |
Tue, 13 Sep 2022 02:25:57 -0400 (EDT) |
apteryx pushed a commit to branch master
in repository guix.
commit 7ad9360bd60d5a418c6d3fb8c3ec7d342a24ee69
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Thu Sep 8 14:37:46 2022 -0400
gnu: Add glib-next.
* gnu/packages/glib.scm (glib-next): New variable.
(glib-with-documentation): Inherit from it.
---
gnu/packages/glib.scm | 134 ++++++++++++++++++++++++++++++++++++--------------
1 file changed, 97 insertions(+), 37 deletions(-)
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 32220ee69b..61040c91e7 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -48,6 +48,7 @@
#:use-module (gnu packages enlightenment)
#:use-module (gnu packages file)
#:use-module (gnu packages flex)
+ #:use-module (gnu packages freedesktop)
#:use-module (gnu packages gettext)
#:use-module (gnu packages gnome)
#:use-module (gnu packages graphviz)
@@ -379,46 +380,105 @@ functions for strings and common data structures.")
(license license:lgpl2.1+)
(properties '((hidden? . #t)))))
-(define-public glib-with-documentation
- ;; glib's doc must be built in a separate package since it requires gtk-doc,
- ;; which in turn depends on glib.
- (package/inherit glib
- (properties (alist-delete 'hidden? (package-properties glib)))
- (outputs (cons "doc" (package-outputs glib))) ; 20 MiB of GTK-Doc reference
- (native-inputs
- `(("docbook-xml-4.2" ,docbook-xml-4.2)
- ("docbook-xml-4.5" ,docbook-xml)
- ("docbook-xsl" ,docbook-xsl)
- ("gtk-doc" ,gtk-doc)
- ("libxml2" ,libxml2)
- ("xsltproc" ,libxslt)
- ,@(package-native-inputs glib)))
+(define-public glib-next
+ (package
+ (inherit glib)
+ (name "glib")
+ (version "2.73.3")
+ (source
+ (origin
+ (inherit (package-source glib))
+ (uri
+ (string-append "mirror://gnome/sources/"
+ name "/" (string-take version 4) "/"
+ name "-" version ".tar.xz"))
+ (snippet
+ '(substitute* "glib/tests/spawn-test.c"
+ (("/bin/sh") "sh")))
+ (sha256
+ (base32 "1bgfch7zj1pq4rkqcibfky1470ijljyrx5pn5s5v9mk72s22n6nz"))))
(arguments
(substitute-keyword-arguments (package-arguments glib)
- ((#:configure-flags flags ''())
- #~(cons "-Dgtk_doc=true"
- (delete "-Dman=false" #$flags)))
- ((#:phases phases)
+ ((#:test-options test-options ''())
+ ;; Skip flaky or slow tests.
+ `(cons* "--no-suite=slow" "--no-suite=flaky" ,test-options))
+ ((#:phases phases '%standard-phases)
`(modify-phases ,phases
- (add-after 'unpack 'patch-docbook-xml
- (lambda* (#:key inputs #:allow-other-keys)
- (with-directory-excursion "docs"
- (substitute* (find-files "." "\\.xml$")
- (("http://www.oasis-open.org/docbook/xml/4\\.5/")
- (string-append (assoc-ref inputs "docbook-xml-4.5")
- "/xml/dtd/docbook/"))
- (("http://www.oasis-open.org/docbook/xml/4\\.2/")
- (string-append (assoc-ref inputs "docbook-xml-4.2")
- "/xml/dtd/docbook/"))))))
- (add-after 'install 'move-doc
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (doc (assoc-ref outputs "doc"))
- (html (string-append "/share/gtk-doc")))
- (mkdir-p (string-append doc "/share"))
- (rename-file
- (string-append out html)
- (string-append doc html)))))))))))
+ (replace 'disable-failing-tests
+ (lambda _
+ (with-directory-excursion "glib/tests"
+ (substitute* '("unix.c" "utils.c")
+ (("[ \t]*g_test_add_func.*;") "")))
+ ;; The "glib:gio / file" test fails with the error "No
+ ;; application is registered as handling this file" (see:
+ ;; https://gitlab.gnome.org/GNOME/glib/-/issues/2742).
+ (with-directory-excursion "gio/tests"
+ (substitute* '("appinfo.c"
+ "contenttype.c"
+ "desktop-app-info.c"
+ "file.c"
+ "gdbus-address-get-session.c"
+ "gdbus-peer.c")
+ (("[ \t]*g_test_add_func.*;") "")))
+
+ ,@(if (target-x86-32?)
+ ;; Comment out parts of timer.c that fail on i686 due to
+ ;; excess precision when building with GCC 10:
+ ;; <https://gitlab.gnome.org/GNOME/glib/-/issues/820>.
+ '((substitute* "glib/tests/timer.c"
+ (("^ g_assert_cmpuint \\(micros.*" all)
+ (string-append "//" all "\n"))
+ (("^ g_assert_cmpfloat \\(elapsed, ==.*" all)
+ (string-append "//" all "\n"))))
+ '())))))))
+ (native-inputs
+ (modify-inputs (package-native-inputs glib)
+ (append desktop-file-utils)))
+ (propagated-inputs
+ (modify-inputs (package-propagated-inputs glib)
+ (replace "pcre" pcre2)))))
+
+(define-public glib-with-documentation
+ ;; glib's doc must be built in a separate package since it requires gtk-doc,
+ ;; which in turn depends on glib.
+ (let ((base glib-next))
+ (package/inherit base
+ (properties (alist-delete 'hidden? (package-properties base)))
+ (outputs (cons "doc" (package-outputs base))) ; 20 MiB of GTK-Doc
reference
+ (native-inputs
+ `(("docbook-xml-4.2" ,docbook-xml-4.2)
+ ("docbook-xml-4.5" ,docbook-xml)
+ ("docbook-xsl" ,docbook-xsl)
+ ("gtk-doc" ,gtk-doc)
+ ("libxml2" ,libxml2)
+ ("xsltproc" ,libxslt)
+ ,@(package-native-inputs base)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments base)
+ ((#:configure-flags flags ''())
+ #~(cons "-Dgtk_doc=true"
+ (delete "-Dman=false" #$flags)))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'patch-docbook-xml
+ (lambda* (#:key inputs #:allow-other-keys)
+ (with-directory-excursion "docs"
+ (substitute* (find-files "." "\\.xml$")
+ (("http://www.oasis-open.org/docbook/xml/4\\.5/")
+ (string-append (assoc-ref inputs "docbook-xml-4.5")
+ "/xml/dtd/docbook/"))
+ (("http://www.oasis-open.org/docbook/xml/4\\.2/")
+ (string-append (assoc-ref inputs "docbook-xml-4.2")
+ "/xml/dtd/docbook/"))))))
+ (add-after 'install 'move-doc
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (doc (assoc-ref outputs "doc"))
+ (html (string-append "/share/gtk-doc")))
+ (mkdir-p (string-append doc "/share"))
+ (rename-file
+ (string-append out html)
+ (string-append doc html))))))))))))
(define (python-extension-suffix python triplet)
"Determine the suffix for C extensions for PYTHON when compiled
- 136/181: gnu: libxml++: Update to 5.0.2., (continued)
- 136/181: gnu: libxml++: Update to 5.0.2., guix-commits, 2022/09/13
- 144/181: gnu: python-pyatspi: Update to 2.45.90., guix-commits, 2022/09/13
- 143/181: gnu: libgnomekbd: Update to 3.28.1., guix-commits, 2022/09/13
- 44/181: gnu: gjs: Build with mozjs 78., guix-commits, 2022/09/13
- 61/181: gnu: gnome-clocks: Update to 42.0., guix-commits, 2022/09/13
- 70/181: gnu: gnome-characters: Update to 42.0., guix-commits, 2022/09/13
- 67/181: gnu: gnome-music: Update to 42.0., guix-commits, 2022/09/13
- 69/181: gnu: eog: Update to 42.2., guix-commits, 2022/09/13
- 79/181: gnu: gnome-screenshot: Update to 41.0., guix-commits, 2022/09/13
- 74/181: gnu: gnome-font-viewer: Update to 42.0., guix-commits, 2022/09/13
- 90/181: gnu: Add glib-next.,
guix-commits <=
- 88/181: gnu: Remove tepl-5., guix-commits, 2022/09/13
- 98/181: gnu: libadwaita: Update to 1.2.rc., guix-commits, 2022/09/13
- 106/181: gnu: libmediaart: Update to 1.9.6., guix-commits, 2022/09/13
- 103/181: gnu: python-liblarch: Update to 3.2.0 and apply guix style., guix-commits, 2022/09/13
- 111/181: gnu: vala-next: Update to 0.56.3., guix-commits, 2022/09/13
- 122/181: gnu: eog: Update to 42.3., guix-commits, 2022/09/13
- 124/181: gnu: epiphany: Update to 42.4., guix-commits, 2022/09/13
- 129/181: gnu: shotwell: Update to 0.31.5., guix-commits, 2022/09/13
- 126/181: gnu: yelp: Update to 42.1., guix-commits, 2022/09/13
- 135/181: gnu: mobile-broadband-provider-info: Update to 20220725., guix-commits, 2022/09/13