summaryrefslogtreecommitdiff
path: root/gnu/packages/glib.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/glib.scm')
-rw-r--r--gnu/packages/glib.scm688
1 files changed, 330 insertions, 358 deletions
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 206222b578..f0be2ddaa4 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -11,8 +11,10 @@
;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
;;; Copyright © 2019, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
-;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
+;;; Copyright © 2020 Florian Pelz <pelzflorian@pelzflorian.de>
+;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2020 Arthur Margerit <ruhtra.mar@gmail.com>
;;;
;;; This file is part of GNU Guix.
@@ -34,16 +36,20 @@
#:use-module (gnu packages)
#:use-module (gnu packages backup)
#:use-module (gnu packages base)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages bison)
+ #:use-module (gnu packages boost)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages docbook)
#:use-module (gnu packages documentation)
+ #:use-module (gnu packages elf)
#:use-module (gnu packages enlightenment)
#:use-module (gnu packages file)
#:use-module (gnu packages flex)
#:use-module (gnu packages gettext)
#:use-module (gnu packages gnome)
+ #:use-module (gnu packages graphviz)
#:use-module (gnu packages gperf)
#:use-module (gnu packages gtk)
#:use-module (gnu packages libffi)
@@ -58,7 +64,6 @@
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
- #:use-module (gnu packages selinux)
#:use-module (gnu packages web)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
@@ -90,7 +95,7 @@
(define dbus
(package
(name "dbus")
- (version "1.12.16")
+ (version "1.12.20")
(source (origin
(method url-fetch)
(uri (string-append
@@ -98,9 +103,8 @@
version ".tar.gz"))
(sha256
(base32
- "107ckxaff1cv4q6kmfdi2fb1nlsv03312a7kf6lb4biglhpjv8jl"))
- (patches (search-patches "dbus-CVE-2020-12049.patch"
- "dbus-helper-search-path.patch"))))
+ "1zp5gpx61v1cpqf2zwb1cidhp9xylvw49d3zydkxqk6b1qa20xpp"))
+ (patches (search-patches "dbus-helper-search-path.patch"))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags
@@ -170,264 +174,165 @@ shared NFS home directories.")
(define glib
(package
- (name "glib")
- (version "2.62.6")
- (replacement glib/fixed)
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnome/sources/"
- name "/" (string-take version 4) "/"
- name "-" version ".tar.xz"))
- (sha256
- (base32
- "174bsmbmcvaw69ff9g60q5sx0fn23rkhqcwqz17h5s7sprps4kqh"))
- (patches (search-patches "glib-appinfo-watch.patch"
- "glib-tests-timer.patch"))
- (modules '((guix build utils)))
- (snippet
- '(begin
- (substitute* "tests/spawn-test.c"
- (("/bin/sh") "sh"))
- #t))))
- (build-system meson-build-system)
- (outputs '("out" ; everything
- "bin")) ; glib-mkenums, gtester, etc.; depends on Python
- (propagated-inputs
- `(("pcre" ,pcre) ; in the Requires.private field of glib-2.0.pc
- ("libffi" ,libffi) ; in the Requires.private field of gobject-2.0.pc
- ;; These are in the Requires.private field of gio-2.0.pc
- ("util-linux" ,util-linux "lib") ;for libmount
- ("libselinux" ,libselinux)
- ("zlib" ,zlib)))
- (native-inputs
- `(("gettext" ,gettext-minimal)
- ("m4" ,m4) ; for installing m4 macros
- ("dbus" ,dbus) ; for GDBus tests
- ("pkg-config" ,pkg-config)
- ("python" ,python-wrapper)
- ("perl" ,perl) ; needed by GIO tests
- ("tzdata" ,tzdata-for-tests))) ; for tests/gdatetime.c
- (arguments
- `(#:disallowed-references (,tzdata-for-tests)
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-dbus-launch-path
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((dbus (assoc-ref inputs "dbus")))
- (substitute* "gio/gdbusaddress.c"
- (("command_line = g_strdup_printf \\(\"dbus-launch")
- (string-append "command_line = g_strdup_printf (\""
- dbus "/bin/dbus-launch")))
- #t)))
- (add-after 'unpack 'patch-gio-launch-desktop
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- ;; See also <https://gitlab.gnome.org/GNOME/glib/issues/1633>
- ;; for another future fix.
- (substitute* "gio/gdesktopappinfo.c"
- (("gio-launch-desktop")
- (string-append out "/libexec/gio-launch-desktop")))
- #t)))
- ;; TODO: Remove the conditional in the next core-updates cycle.
- ;; Needed to build glib on slower ARM nodes.
- ,@(if (string-prefix? "arm" (%current-system))
- `((add-after 'unpack 'increase-test-timeout
- (lambda _
- (substitute* "meson.build"
- (("test_timeout = 60")
- "test_timeout = 120")
- (("test_timeout_slow = 120")
- "test_timeout_slow = 180")))))
- '())
- (add-before 'build 'pre-build
- (lambda* (#:key inputs outputs #:allow-other-keys)
- ;; For tests/gdatetime.c.
- (setenv "TZDIR"
- (string-append (assoc-ref inputs "tzdata")
- "/share/zoneinfo"))
-
- ;; Some tests want write access there.
- (setenv "HOME" (getcwd))
- (setenv "XDG_CACHE_HOME" (getcwd))
- #t))
- (add-after 'unpack 'disable-failing-tests
- (lambda _
- (let ((disable
- (lambda (test-file test-paths)
- (define pattern+procs
- (map (lambda (test-path)
- (cons
- ;; XXX: only works for single line statements.
- (format #f "g_test_add_func.*\"~a\".*" test-path)
- (const "")))
- test-paths))
- (substitute test-file pattern+procs)))
- (failing-tests
- '(("glib/tests/thread.c"
- (;; prlimit(2) returns ENOSYS on Linux 2.6.32-5-xen-amd64
- ;; as found on hydra.gnu.org, and strace(1) doesn't
- ;; recognize it.
- "/thread/thread4"))
-
- ;; This tries to find programs in FHS directories.
- ("glib/tests/utils.c"
- ("/utils/find-program"))
-
- ;; This fails because "glib/tests/echo-script" cannot be
- ;; found.
- ("glib/tests/spawn-singlethread.c"
- ("/gthread/spawn-script"))
-
- ("glib/tests/timer.c"
- (;; fails if compiler optimizations are enabled, which they
- ;; are by default.
- "/timer/stop"))
-
- ("gio/tests/gapplication.c"
- (;; XXX: proven to be unreliable. See:
- ;; <https://bugs.debian.org/756273>
- ;; <http://bugs.gnu.org/18445>
- "/gapplication/quit"
-
- ;; XXX: fails randomly for unknown reason. See:
- ;; <https://lists.gnu.org/archive/html/guix-devel/2016-04/msg00215.html>
- "/gapplication/local-actions"))
-
- ("gio/tests/contenttype.c"
- (;; XXX: requires shared-mime-info.
- "/contenttype/guess"
- "/contenttype/guess_svg_from_data"
- "/contenttype/subtype"
- "/contenttype/list"
- "/contenttype/icon"
- "/contenttype/symbolic-icon"
- "/contenttype/tree"))
-
- ("gio/tests/appinfo.c"
- (;; XXX: requires update-desktop-database.
- "/appinfo/associations"))
-
- ("gio/tests/desktop-app-info.c"
- (;; XXX: requires update-desktop-database.
- "/desktop-app-info/delete"
- "/desktop-app-info/default"
- "/desktop-app-info/fallback"
- "/desktop-app-info/lastused"
- "/desktop-app-info/search"))
-
- ("gio/tests/gdbus-peer.c"
- (;; Requires /etc/machine-id.
- "/gdbus/codegen-peer-to-peer"))
-
- ("gio/tests/gdbus-address-get-session.c"
- (;; Requires /etc/machine-id.
- "/gdbus/x11-autolaunch"))
-
- ("gio/tests/gsocketclient-slow.c"
- (;; These tests tries to resolve "localhost", and fails.
- "/socket-client/happy-eyeballs/slow"
- "/socket-client/happy-eyeballs/cancellation/delayed"))
-
- )))
- (for-each (lambda (x) (apply disable x)) failing-tests)
- #t)))
- (replace 'check
- (lambda _
- (setenv "MESON_TESTTHREADS"
- (number->string (parallel-job-count)))
- ;; Do not run tests marked as "flaky".
- (invoke "meson" "test" "--no-suite" "flaky")))
- ;; TODO: meson does not permit the bindir to be outside of prefix.
- ;; See https://github.com/mesonbuild/meson/issues/2561
- ;; We can remove this once meson is patched.
- (add-after 'install 'move-executables
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (bin (assoc-ref outputs "bin")))
- (mkdir-p bin)
- (rename-file (string-append out "/bin")
- (string-append bin "/bin"))
- ;; This one is an implementation detail of glib.
- ;; It is wrong that that's in "/bin" in the first place,
- ;; but that's what upstream is doing right now.
- ;; See <https://gitlab.gnome.org/GNOME/glib/issues/1633>.
- (mkdir (string-append out "/libexec"))
- (rename-file (string-append bin "/bin/gio-launch-desktop")
- (string-append out "/libexec/gio-launch-desktop"))
- ;; Do not refer to "bindir", which points to "${prefix}/bin".
- ;; We don't patch "bindir" to point to "$bin/bin", because that
- ;; would create a reference cycle between the "out" and "bin"
- ;; outputs.
- (substitute* (list (string-append out "/lib/pkgconfig/gio-2.0.pc")
- (string-append out "/lib/pkgconfig/glib-2.0.pc"))
- (("bindir=\\$\\{prefix\\}/bin") "")
- (("=\\$\\{bindir\\}/") "="))
- #t))))))
- ;; TODO: see above for explanation.
- ;; #:configure-flags (list (string-append "--bindir="
- ;; (assoc-ref %outputs "bin")
- ;; "/bin"))
-
- (native-search-paths
- ;; This variable is not really "owned" by GLib, but several related
- ;; packages refer to it: gobject-introspection's tools use it as a search
- ;; path for .gir files, and it's also a search path for schemas produced
- ;; by 'glib-compile-schemas'.
- (list (search-path-specification
- (variable "XDG_DATA_DIRS")
- (files '("share")))
- ;; To load extra gio modules from glib-networking, etc.
- (search-path-specification
- (variable "GIO_EXTRA_MODULES")
- (files '("lib/gio/modules")))))
- (search-paths native-search-paths)
- (properties '((hidden? . #t)))
-
- (synopsis "Thread-safe general utility library; basis of GTK+ and GNOME")
- (description
- "GLib provides data structure handling for C, portability wrappers,
-and interfaces for such runtime functionality as an event loop, threads,
-dynamic loading, and an object system.")
- (home-page "https://developer.gnome.org/glib/")
- (license license:lgpl2.1+)))
-
-(define glib/fixed
- (package
- (inherit glib)
- (source (origin
- (inherit (package-source glib))
- (patches
- (append (search-patches "glib-CVE-2021-27218.patch"
- "glib-CVE-2021-27219-01.patch"
- "glib-CVE-2021-27219-02.patch"
- "glib-CVE-2021-27219-03.patch"
- "glib-CVE-2021-27219-04.patch"
- "glib-CVE-2021-27219-05.patch"
- "glib-CVE-2021-27219-06.patch"
- "glib-CVE-2021-27219-07.patch"
- "glib-CVE-2021-27219-08.patch"
- "glib-CVE-2021-27219-09.patch"
- "glib-CVE-2021-27219-10.patch"
- "glib-CVE-2021-27219-11.patch"
- "glib-CVE-2021-27219-12.patch"
- "glib-CVE-2021-27219-13.patch"
- "glib-CVE-2021-27219-14.patch"
- "glib-CVE-2021-27219-15.patch"
- "glib-CVE-2021-27219-16.patch"
- "glib-CVE-2021-27219-17.patch"
- "glib-CVE-2021-27219-18.patch"
- "glib-CVE-2021-28153.patch")
- (origin-patches (package-source glib))))))))
+ (name "glib")
+ (version "2.68.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "mirror://gnome/sources/"
+ name "/" (string-take version 4) "/"
+ name "-" version ".tar.xz"))
+ (sha256
+ (base32 "1sh3h6b734cxhdd1qlzvhxq6rc7k73dsisap5y3s419s9xc4ywv7"))
+ (patches
+ (search-patches "glib-appinfo-watch.patch"
+ "glib-skip-failing-test.patch"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ (substitute* "tests/spawn-test.c"
+ (("/bin/sh") "sh"))
+ #t))))
+ (build-system meson-build-system)
+ (outputs '("out" ;libraries, locales, etc
+ "static" ;static libraries
+ "bin")) ;executables; depends on Python
+ (arguments
+ `(#:disallowed-references (,tzdata-for-tests)
+ #:configure-flags '("--default-library=both"
+ "-Dman=true"
+ "-Dselinux=disabled")
+ #:phases
+ (modify-phases %standard-phases
+ ;; Needed to pass the test phase on slower ARM and i686 machines.
+ (add-after 'unpack 'increase-test-timeout
+ (lambda _
+ (substitute* "meson.build"
+ (("(test_timeout.*) = ([[:digit:]]+)" all first second)
+ (string-append first " = " second "0")))))
+ (add-after 'unpack 'disable-failing-tests
+ (lambda _
+ (with-directory-excursion "glib/tests"
+ (substitute* '("unix.c" "utils.c")
+ (("[ \t]*g_test_add_func.*;") "")))
+ (with-directory-excursion "gio/tests"
+ (substitute* '("contenttype.c" "gdbus-address-get-session.c"
+ "gdbus-peer.c" "appinfo.c" "desktop-app-info.c")
+ (("[ \t]*g_test_add_func.*;") "")))
+ #t))
+ ;; Python references are not being patched in patch-phase of build,
+ ;; despite using python-wrapper as input. So we patch them manually.
+ (add-after 'unpack 'patch-python-references
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* '("gio/gdbus-2.0/codegen/gdbus-codegen.in"
+ "glib/gtester-report.in"
+ "gobject/glib-genmarshal.in"
+ "gobject/glib-mkenums.in")
+ (("@PYTHON@")
+ (string-append (assoc-ref inputs "python")
+ "/bin/python"
+ ,(version-major+minor
+ (package-version python)))))
+ #t))
+ (add-before 'check 'pre-check
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ ;; For tests/gdatetime.c.
+ (setenv "TZDIR"
+ (string-append (assoc-ref inputs "tzdata")
+ "/share/zoneinfo"))
+ ;; Some tests want write access there.
+ (setenv "HOME" (getcwd))
+ (setenv "XDG_CACHE_HOME" (getcwd))
+ #t))
+ (add-after 'install 'move-static-libraries
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (static (assoc-ref outputs "static")))
+ (mkdir-p (string-append static "/lib"))
+ (for-each (lambda (file)
+ (link file (string-append static "/lib/"
+ (basename file)))
+ (delete-file file))
+ (find-files (string-append out "/lib") "\\.a$")))))
+ ;; Meson does not permit the bindir to be outside of prefix.
+ (add-after 'install 'move-bin
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (assoc-ref outputs "bin")))
+ (mkdir-p bin)
+ (rename-file
+ (string-append out "/bin")
+ (string-append bin "/bin"))
+ ;; Do not refer to "bindir", which points to "${prefix}/bin".
+ ;; We don't patch "bindir" to point to "$bin/bin", because that
+ ;; would create a reference cycle between the "out" and "bin"
+ ;; outputs.
+ (substitute*
+ (list
+ (string-append out "/lib/pkgconfig/gio-2.0.pc")
+ (string-append out "/lib/pkgconfig/glib-2.0.pc"))
+ (("bindir=\\$\\{prefix\\}/bin") "")
+ (("=\\$\\{bindir\\}/") "="))
+ #t))))))
+ ;; TODO: see above for explanation.
+ ;; #:configure-flags (list (string-append "--bindir="
+ ;; (assoc-ref %outputs "bin")
+ ;; "/bin"))
+ (native-inputs
+ `(("docbook-xsl" ,docbook-xsl)
+ ("gettext" ,gettext-minimal)
+ ("libintl" ,intltool)
+ ("m4" ,m4) ; for installing m4 macros
+ ("perl" ,perl) ; needed by GIO tests
+ ("pkg-config" ,pkg-config)
+ ("python" ,python) ; For 'patch-python-references
+ ("python-wrapper" ,python-wrapper)
+ ("tzdata" ,tzdata-for-tests) ; for tests/gdatetime.c
+ ("xmllint" ,libxml2)
+ ("xsltproc" ,libxslt)))
+ (inputs
+ `(("bash-completion" ,bash-completion)
+ ("dbus" ,dbus)
+ ("libelf" ,libelf)))
+ (propagated-inputs
+ `(("libffi" ,libffi) ; in the Requires.private field of gobject-2.0.pc
+ ("pcre" ,pcre) ; in the Requires.private field of glib-2.0.pc
+ ("util-linux" ,util-linux "lib") ;for libmount
+ ("zlib" ,zlib))) ; in the Requires.private field of glib-2.0.pc
+ (native-search-paths
+ ;; This variable is not really "owned" by GLib, but several related
+ ;; packages refer to it: gobject-introspection's tools use it as a search
+ ;; path for .gir files, and it's also a search path for schemas produced
+ ;; by 'glib-compile-schemas'.
+ (list
+ (search-path-specification
+ (variable "XDG_DATA_DIRS")
+ (files '("share")))
+ ;; To load extra gio modules from glib-networking, etc.
+ (search-path-specification
+ (variable "GIO_EXTRA_MODULES")
+ (files '("lib/gio/modules")))))
+ (search-paths native-search-paths)
+ (synopsis "Low-level core library for GNOME projects")
+ (description "GLib provides the core application building blocks for
+libraries and applications written in C. It provides the core object system
+used in GNOME, the main loop implementation, and a large set of utility
+functions for strings and common data structures.")
+ (home-page "https://wiki.gnome.org/Projects/GLib")
+ (license license:lgpl2.1+)))
(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)))
+ ;; (properties (alist-delete 'hidden? (package-properties glib)))
+ (properties '((hidden? . #t)))
(outputs (cons "doc" (package-outputs glib))) ; 20 MiB of GTK-Doc reference
(native-inputs
- `(("gtk-doc" ,gtk-doc) ; for the doc
- ("docbook-xml" ,docbook-xml)
+ `(("docbook-xml-4.2" ,docbook-xml-4.2)
+ ("docbook-xml-4.5" ,docbook-xml)
+ ("gtk-doc" ,gtk-doc) ; for the doc
("libxml2" ,libxml2)
,@(package-native-inputs glib)))
(arguments
@@ -436,62 +341,43 @@ dynamic loading, and an object system.")
`(cons "-Dgtk_doc=true" ,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/"))))
+ #t))
(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")))
- (copy-recursively (string-append out html)
- (string-append doc html))
- (delete-file-recursively (string-append out html))
+ (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))
#t)))))))))
-;;; TODO: Merge into glib as a 'static' output on core-updates.
-(define-public glib-static
- (hidden-package
- (package
- (inherit glib)
- (name "glib-static")
- (outputs '("out"))
- (arguments
- (substitute-keyword-arguments (package-arguments glib)
- ((#:configure-flags flags ''())
- `(cons* "--default-library=static"
- "-Dselinux=disabled"
- "-Dman=false"
- "-Dgtk_doc=false"
- "-Dinternal_pcre=false"
- ,flags))
- ((#:phases phases)
- `(modify-phases ,phases
- (delete 'move-executables)
- (replace 'install
- ;; Only install the static libraries.
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (lib (string-append out "/lib")))
- (for-each (lambda (f)
- (install-file f lib))
- (find-files "." "\\.a$"))))))))))))
-
(define gobject-introspection
(package
(name "gobject-introspection")
- (version "1.62.0")
- (source
- (origin
- (method url-fetch)
- (uri
- (string-append "mirror://gnome/sources/"
- "gobject-introspection/" (version-major+minor version)
- "/gobject-introspection-" version ".tar.xz"))
- (sha256
- (base32 "18lhglg9v6y83lhqzyifc1z0wrlawzrhzzxx0a3h1g7xaz97xvmi"))
- (patches
- (search-patches
- "gobject-introspection-cc.patch"
- "gobject-introspection-girepository.patch"
- "gobject-introspection-absolute-shlib-path.patch"))))
+ (version "1.66.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/"
+ "gobject-introspection/" (version-major+minor version)
+ "/gobject-introspection-" version ".tar.xz"))
+ (sha256
+ (base32 "078n0q7b6z682mf4irclrksm73cyixq295mqnqifl9plwmgaai6x"))
+ (patches (search-patches
+ "gobject-introspection-cc.patch"
+ "gobject-introspection-girepository.patch"
+ "gobject-introspection-absolute-shlib-path.patch"))))
(build-system meson-build-system)
(arguments
`(#:phases
@@ -508,11 +394,11 @@ dynamic loading, and an object system.")
(inputs
`(("bison" ,bison)
("flex" ,flex)
- ("glib" ,glib)
("python" ,python-wrapper)
("zlib" ,zlib)))
(propagated-inputs
- `(;; In practice, GIR users will need libffi when using
+ `(("glib" ,glib)
+ ;; In practice, GIR users will need libffi when using
;; gobject-introspection.
("libffi" ,libffi)))
(native-search-paths
@@ -609,7 +495,7 @@ The intltool collection can be used to do these things:
(let ((prog (string-append (assoc-ref outputs "out")
"/bin/itstool")))
(wrap-program prog
- `("PYTHONPATH" = (,(getenv "PYTHONPATH"))))
+ `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH"))))
#t))))))
(home-page "http://www.itstool.org")
(synopsis "Tool to translate XML documents with PO files")
@@ -664,63 +550,149 @@ by GDBus included in Glib.")
(define libsigc++
(package
(name "libsigc++")
- (version "2.10.3")
+ (version "3.0.6")
(source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnome/sources/libsigc++/"
- (version-major+minor version) "/"
- name "-" version ".tar.xz"))
- (sha256
- (base32
- "11j7j1jv4z58d9s7jvl42fnqa1dzl4idgil9r45cjv1w673dys0b"))))
- (build-system gnu-build-system)
- (native-inputs `(("pkg-config" ,pkg-config)
- ("m4" ,m4)))
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/libsigc++/"
+ (version-major+minor version) "/"
+ name "-" version ".tar.xz"))
+ (sha256
+ (base32
+ "1kn57b039lg20182lnchl1ys27vf34brn43f895cal8nc7sdq3mp"))))
+ (build-system meson-build-system)
+ (outputs '("out" "doc"))
+ (arguments
+ `(#:configure-flags
+ (list
+ "-Dbuild-documentation=true")
+ #:phases
+ (modify-phases %standard-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\\.1\\.2/")
+ (string-append (assoc-ref inputs "docbook-xml")
+ "/xml/dtd/docbook/"))))
+ #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"))
+ (rename-file
+ (string-append out "/share/doc")
+ (string-append doc "/share/doc"))
+ #t))))))
+ (native-inputs
+ `(("docbook-xml" ,docbook-xml-4.1.2)
+ ("docbook-xsl" ,docbook-xsl)
+ ("dot" ,graphviz)
+ ("doxygen" ,doxygen)
+ ("m4" ,m4)
+ ("mm-common" ,mm-common)
+ ("perl" ,perl)
+ ("pkg-config" ,pkg-config)
+ ("xmllint" ,libxml2)
+ ("xsltproc" ,libxslt)))
+ (inputs
+ `(("boost" ,boost)))
(home-page "https://libsigcplusplus.github.io/libsigcplusplus/")
(synopsis "Type-safe callback system for standard C++")
(description
"Libsigc++ implements a type-safe callback system for standard C++. It
-allows you to define signals and to connect those signals to any callback
-function, either global or a member function, regardless of whether it is
-static or virtual.
+ allows you to define signals and to connect those signals to any callback
+ function, either global or a member function, regardless of whether it is
+ static or virtual.
-It also contains adaptor classes for connection of dissimilar callbacks and
-has an ease of use unmatched by other C++ callback libraries.")
- (license license:lgpl2.1+)))
+ It also contains adaptor classes for connection of dissimilar callbacks and
+ has an ease of use unmatched by other C++ callback libraries.")
+ (license license:lgpl3+)))
+
+ (define-public libsigc++-2
+ (package
+ (inherit libsigc++)
+ (name "libsigc++")
+ (version "2.9.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "mirror://gnome/sources/libsigc++/"
+ (version-major+minor version)
+ "/libsigc++-" version ".tar.xz"))
+ (sha256
+ (base32 "0zq963d0sss82q62fdfjs7l9iwbdch51albck18cb631ml0v7y8b"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-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\\.1\\.2/")
+ (string-append (assoc-ref inputs "docbook-xml")
+ "/xml/dtd/docbook/"))))
+ #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"))
+ (rename-file
+ (string-append out "/share/doc")
+ (string-append doc "/share/doc"))
+ #t))))))))
(define glibmm
(package
(name "glibmm")
- (version "2.62.0")
+ (version "2.68.0")
(source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnome/sources/glibmm/"
- (version-major+minor version)
- "/glibmm-" version ".tar.xz"))
- (sha256
- (base32
- "1ziwx6r7k7wbvg4qq1rgrv8zninapgrmhn1hs6926a3krh9ryr9n"))))
- (build-system gnu-build-system)
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/glibmm/"
+ (version-major+minor version)
+ "/glibmm-" version ".tar.xz"))
+ (sha256
+ (base32
+ "0xgkyhb2876mcyyib5rk3ya9aingyj68h02nl22yvkhx35rqbwy1"))))
+ (build-system meson-build-system)
+ (outputs '("out" "doc"))
(arguments
- `(#:phases
+ `(#:configure-flags
+ (list
+ "-Dbuild-documentation=true")
+ #:phases
(modify-phases %standard-phases
- (add-before 'build 'pre-build
+ (add-after 'unpack 'disable-failing-tests
(lambda _
- ;; This test uses /etc/fstab as an example file to read
- ;; from; choose a better example.
- (substitute* "tests/giomm_simple/main.cc"
- (("/etc/fstab")
- (string-append (getcwd)
- "/tests/giomm_simple/main.cc")))
-
- ;; This test does a DNS lookup, and then expects to be able
- ;; to open a TLS session; just skip it.
- (substitute* "tests/giomm_tls_client/main.cc"
- (("Gio::init.*$")
- "return 77;\n"))
- #t)))))
- (native-inputs `(("pkg-config" ,pkg-config)
- ("glib" ,glib "bin")))
+ (substitute* "tests/meson.build"
+ ;; This test uses /etc/fstab as an example file to read
+ ;; from; disable it.
+ (("[ \t]*.*giomm_simple.*$") "")
+ ;; This test does a DNS lookup, and then expects to be able
+ ;; to open a TLS session; just skip it.
+ (("[ \t]*.*giomm_tls_client.*$") ""))
+ #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"))
+ (rename-file
+ (string-append out "/share/doc")
+ (string-append doc "/share/doc"))
+ #t))))))
+ (native-inputs
+ `(("dot" ,graphviz)
+ ("doxygen" ,doxygen)
+ ("glib:bin" ,glib "bin")
+ ("m4" ,m4)
+ ("mm-common" ,mm-common)
+ ("perl" ,perl)
+ ("pkg-config" ,pkg-config)
+ ("xsltproc" ,libxslt)))
(propagated-inputs
`(("libsigc++" ,libsigc++)
("glib" ,glib)))
@@ -735,7 +707,7 @@ useful for C++.")
(package
(inherit glibmm)
(name "glibmm")
- (version "2.64.2")
+ (version "2.64.5")
(source
(origin
(method url-fetch)
@@ -744,10 +716,10 @@ useful for C++.")
(version-major+minor version)
"/glibmm-" version ".tar.xz"))
(sha256
- (base32 "1v6lp23fr2qh4zshcnm28sn29j3nzgsvcqj2nhmrnvamipjq4lm7"))))
+ (base32 "11m37sbx0i18cl17d0fkq0bik4bbzlb5n8kcl651jhci5ipci3sh"))))
(propagated-inputs
- `(("libsigc++" ,libsigc++)
- ("glib" ,glib)))))
+ `(("libsigc++" ,libsigc++-2)
+ ,@(package-propagated-inputs glibmm)))))
(define-public python2-pygobject-2
(package
@@ -790,7 +762,7 @@ useful for C++.")
(define-public python-pygobject
(package
(name "python-pygobject")
- (version "3.34.0")
+ (version "3.40.1")
(source
(origin
(method url-fetch)
@@ -799,7 +771,7 @@ useful for C++.")
"/pygobject-" version ".tar.xz"))
(sha256
(base32
- "06i7ynnbvgpz0gw09zsjbvhgcp5qz4yzdifw27qjwdazg2mckql7"))
+ "0d80g5kgf2i9cginyhalvb7ibfk9g30yilqzmcsw6h6byj8xbih0"))
(modules '((guix build utils)))
(snippet
'(begin