diff options
Diffstat (limited to 'gnu/packages/gtk.scm')
-rw-r--r-- | gnu/packages/gtk.scm | 1778 |
1 files changed, 1119 insertions, 659 deletions
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 4e427deaef..b69fa372d9 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -24,9 +24,10 @@ ;;; Copyright © 2019 Giacomo Leidi <[email protected]> ;;; Copyright © 2020 Brendan Tildesley <[email protected]> ;;; Copyright © 2020 Guillaume Le Vaillant <[email protected]> -;;; Copyright © 2020 Maxim Cournoyer <[email protected]> +;;; Copyright © 2020, 2021 Maxim Cournoyer <[email protected]> ;;; Copyright © 2021 Leo Famulari <[email protected]> ;;; Copyright © 2021 Simon Streit <[email protected]> +;;; Copyright © 2021 Maxime Devos <[email protected]> ;;; ;;; This file is part of GNU Guix. ;;; @@ -45,6 +46,7 @@ (define-module (gnu packages gtk) #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix gexp) #:use-module (guix utils) #:use-module (guix packages) #:use-module (guix download) @@ -60,6 +62,9 @@ #:use-module (gnu packages algebra) #:use-module (gnu packages autotools) #:use-module (gnu packages base) + #:use-module (gnu packages bash) + #:use-module (gnu packages boost) + #:use-module (gnu packages build-tools) #:use-module (gnu packages texinfo) #:use-module (gnu packages check) #:use-module (gnu packages compression) @@ -74,21 +79,30 @@ #:use-module (gnu packages gl) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) + #:use-module (gnu packages graphviz) #:use-module (gnu packages icu4c) #:use-module (gnu packages image) + #:use-module (gnu packages iso-codes) #:use-module (gnu packages libffi) #:use-module (gnu packages linux) + #:use-module (gnu packages m4) + #:use-module (gnu packages man) #:use-module (gnu packages pdf) #:use-module (gnu packages perl) #:use-module (gnu packages perl-check) #:use-module (gnu packages pkg-config) #:use-module (gnu packages pretty-print) #: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) #:use-module (gnu packages xdisorg) @@ -99,86 +113,113 @@ (define-public atk (package - (name "atk") - (version "2.34.1") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnome/sources/" name "/" - (version-major+minor version) "/" - name "-" version ".tar.xz")) - (sha256 - (base32 - "1jwp16r6p5z66k4b2v8zlzhyshhwlmyi27ippkrgqr8jsary7w6l")))) - (build-system meson-build-system) - (propagated-inputs `(("glib" ,glib))) ; required by atk.pc - (native-inputs - `(("pkg-config" ,pkg-config) - ("gettext" ,gettext-minimal) - ("glib" ,glib "bin") ; glib-mkenums, etc. - ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc. - (synopsis "GNOME accessibility toolkit") - (description - "ATK provides the set of accessibility interfaces that are implemented + (name "atk") + (version "2.36.0") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "1217cmmykjgkkim0zr1lv5j13733m4w5vipmy4ivw0ll6rz28xpv")))) + (build-system meson-build-system) + (arguments + `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas + ,@(if (%current-target-system) + `(#:configure-flags + ;; introspection requires running binaries for the host system + ;; on the build system. + '("-Dintrospection=false")) + '()))) + (propagated-inputs `(("glib" ,glib))) ; required by atk.pc + (native-inputs + `(("gettext" ,gettext-minimal) + ("glib" ,glib "bin") ; glib-mkenums, etc. + ("gobject-introspection" ,gobject-introspection) ; g-ir-compiler, etc. + ("pkg-config" ,pkg-config))) + (synopsis "GNOME accessibility toolkit") + (description + "ATK provides the set of accessibility interfaces that are implemented by other toolkits and applications. Using the ATK interfaces, accessibility tools have full access to view and control running applications.") - (license license:lgpl2.0+) - (home-page "https://developer.gnome.org/atk/"))) + (license license:lgpl2.1+) + (home-page "https://wiki.gnome.org/Accessibility"))) (define-public cairo (package - (name "cairo") - (version "1.16.0") - (source (origin - (method url-fetch) - (uri (string-append "https://cairographics.org/releases/cairo-" - version ".tar.xz")) - (patches (search-patches "cairo-CVE-2018-19876.patch" - "cairo-CVE-2020-35492.patch")) - (sha256 - (base32 - "0c930mk5xr2bshbdljv005j3j8zr47gqmkry3q6qgvqky6rjjysy")))) - (build-system gnu-build-system) - (propagated-inputs - `(("fontconfig" ,fontconfig) - ("freetype" ,freetype) - ("glib" ,glib) - ("libpng" ,libpng) - ("libx11" ,libx11) - ("libxext" ,libxext) - ("libxrender" ,libxrender) - ("pixman" ,pixman))) - (inputs - `(("ghostscript" ,ghostscript) - ("libspectre" ,libspectre) - ("poppler" ,poppler) - ("xorgproto" ,xorgproto) - ("zlib" ,zlib))) - (native-inputs - `(("pkg-config" ,pkg-config) - ("python" ,python-wrapper))) + (name "cairo") + (version "1.16.0") + (source + (origin + (method url-fetch) + (uri + (string-append "https://cairographics.org/releases/cairo-" + version ".tar.xz")) + (sha256 + (base32 "0c930mk5xr2bshbdljv005j3j8zr47gqmkry3q6qgvqky6rjjysy")) + (patches (search-patches + "cairo-CVE-2018-19876.patch" + "cairo-CVE-2020-35492.patch")))) + (build-system glib-or-gtk-build-system) + (outputs '("out" "doc")) (arguments - `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html - #:configure-flags '("--enable-tee" ;needed for GNU Icecat - "--enable-xml" ;for cairo-xml support - "--disable-static"))) - (synopsis "2D graphics library") - (description - "Cairo is a 2D graphics library with support for multiple output devices. -Currently supported output targets include the X Window System (via both -Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file -output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB. - -Cairo is designed to produce consistent output on all output media while -taking advantage of display hardware acceleration when available -eg. through the X Render Extension). - -The cairo API provides operations similar to the drawing operators of -PostScript and PDF. Operations in cairo including stroking and filling cubic -Bézier splines, transforming and compositing translucent images, and -antialiased text rendering. All drawing operations can be transformed by any -affine transformation (scale, rotation, shear, etc.).") - (license license:lgpl2.1) ; or Mozilla Public License 1.1 - (home-page "https://cairographics.org/"))) + `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html + #:configure-flags + (list + "--disable-static" + ;; XXX: To be enabled. + ;; "--enable-gallium=yes" + ;; "--enable-gl=yes" + ;; " --enable-glesv2=yes" + ;; "--enable-glesv3=yes" + ;; "--enable-cogl=yes" + ;; "--enable-directfb=yes" + ;; "--enable-vg=yes" + "--enable-tee=yes" ;needed for GNU IceCat + "--enable-xml=yes" ;for cairo-xml support + (string-append "--with-html-dir=" + (assoc-ref %outputs "doc") + "/share/gtk-doc/html")))) + (native-inputs + `(("gobject-introspection" ,gobject-introspection) + ("pkg-config" ,pkg-config) + ("python" ,python-wrapper))) + (inputs + ;; TODO(core-updates): make this unconditional + `(,@(if (%current-target-system) + `(("bash-minimal" ,bash-minimal)) ; for glib-or-gtk-wrap + '()) + ("drm" ,libdrm) + ("ghostscript" ,ghostscript) + ("libspectre" ,libspectre) + ("poppler" ,poppler))) + (propagated-inputs + `( ;; ("cogl" ,cogl) + ;; ("directfb" ,directfb) + ("fontconfig" ,fontconfig) + ("freetype" ,freetype) + ("glib" ,glib) + ;; ("gtk+" ,gtk+) + ("libpng" ,libpng) + ;; ("librsvg" ,librsvg) + ;; ("opengl" ,mesa) + ("pixman" ,pixman) + ("x11" ,libx11) + ("xcb" ,libxcb) + ("xext" ,libxext) + ("xrender" ,libxrender))) + (synopsis "Multi-platform 2D graphics library") + (description "Cairo is a 2D graphics library with support for multiple output +devices. Currently supported output targets include the X Window System (via +both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file +output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.") + (home-page "https://cairographics.org/") + (license + ;; This project is dual-licensed. + (list + license:lgpl2.1+ + license:mpl1.1)))) (define-public cairo-sans-poppler ;; Variant used to break the dependency cycle between Poppler and Cairo. @@ -201,15 +242,15 @@ affine transformation (scale, rotation, shear, etc.).") (define-public harfbuzz (package (name "harfbuzz") - (version "2.6.4") + (version "2.8.2") (source (origin (method url-fetch) - (uri (string-append "https://www.freedesktop.org/software/" - "harfbuzz/release/harfbuzz-" + (uri (string-append "https://github.com/harfbuzz/harfbuzz" + "/releases/download/" version "/harfbuzz-" version ".tar.xz")) (sha256 (base32 - "04iwq13w6zkdhljmsxrzgg4fyh04qnwfn57rgrl9kmijc7cvh4wl")))) + "1rvv86wpm3y04fqns1655268rhvhvms469837709v2z2bhwn316m")))) (build-system gnu-build-system) (outputs '("out" "bin")) ; 160K, only hb-view depend on cairo @@ -266,11 +307,13 @@ affine transformation (scale, rotation, shear, etc.).") (build-system gnu-build-system) (outputs '("out" "doc")) (arguments - `(#:configure-flags - (list - (string-append "--with-html-docdir=" - (assoc-ref %outputs "doc") - "/share/doc/datrie/html")))) + (list #:configure-flags + #~(list (string-append "--with-html-docdir=" #$output:doc + "/share/doc/datrie/html")) + + ;; Several tests refer to the 'test.tri' file, leading to race + ;; conditions when running tests in parallel. + #:parallel-tests? #f)) (native-inputs `(("doxygen" ,doxygen) ("pkg-config" ,pkg-config))) @@ -301,7 +344,8 @@ representing trie. Trie is a kind of digital search tree.") (assoc-ref %outputs "doc") "/share/doc/libthai/html")))) (native-inputs - `(("doxygen" ,doxygen) + `(("datrie" ,libdatrie) + ("doxygen" ,doxygen) ("pkg-config" ,pkg-config))) (propagated-inputs `(("datrie" ,libdatrie))) @@ -314,54 +358,61 @@ applications.") (define-public pango (package - (name "pango") - (version "1.44.7") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnome/sources/pango/" - (version-major+minor version) "/" - name "-" version ".tar.xz")) - (patches (search-patches "pango-skip-libthai-test.patch")) - (sha256 - (base32 - "07qvxa2sk90chp1l12han6vxvy098mc37sdqcznyywyv2g6bd9b6")))) - (build-system meson-build-system) - (arguments - '(#:phases (modify-phases %standard-phases - (add-after 'unpack 'disable-cantarell-tests - (lambda _ - (substitute* "tests/meson.build" - ;; XXX FIXME: These tests require "font-abattis-cantarell", but - ;; adding it here would introduce a circular dependency. - (("\\[ 'test-harfbuzz'.*") "") - (("\\[ 'test-itemize'.*") "") - (("\\[ 'test-layout'.*") "")) - #t))))) - (propagated-inputs - ;; These are all in Requires or Requires.private of the '.pc' files. - `(("cairo" ,cairo) - ("fribidi" ,fribidi) - ("fontconfig" ,fontconfig) - ("freetype" ,freetype) - ("glib" ,glib) - ("harfbuzz" ,harfbuzz) - - ;; Some packages, such as Openbox, expect Pango to be built with the - ;; optional libxft support. - ("libxft" ,libxft))) - (inputs - `(("zlib" ,zlib))) - (native-inputs - `(("pkg-config" ,pkg-config) - ("glib" ,glib "bin") ; glib-mkenums, etc. - ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc. - (synopsis "GNOME text and font handling library") - (description - "Pango is the core text and font handling library used in GNOME -applications. It has extensive support for the different writing systems -used throughout the world.") - (license license:lgpl2.0+) - (home-page "https://developer.gnome.org/pango/"))) + (name "pango") + (version "1.48.10") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/pango/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (patches (search-patches "pango-skip-libthai-test.patch")) + (sha256 + (base32 + "166wxhsjb6hb0dk7wkkdcmpvasl9n0a0aa64mdgagzfdidwzbq91")))) + (build-system meson-build-system) + (arguments + '(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas + #:phases (modify-phases %standard-phases + (add-after 'unpack 'disable-cantarell-tests + (lambda _ + (substitute* "tests/meson.build" + ;; XXX FIXME: These tests require "font-abattis-cantarell", but + ;; adding it here would introduce a circular dependency. + (("\\[ 'test-layout'.*") "") + (("\\[ 'test-itemize'.*") "") + (("\\[ 'test-font'.*") "") + (("\\[ 'test-harfbuzz'.*") ""))))))) + (propagated-inputs + ;; These are all in Requires or Requires.private of the '.pc' files. + `(("cairo" ,cairo) + ("fontconfig" ,fontconfig) + ("freetype" ,freetype) + ("fribidi" ,fribidi) + ("glib" ,glib) + ("harfbuzz" ,harfbuzz) + ("libthai" ,libthai) + ;; Some packages, such as Openbox, expect Pango to be built with the + ;; optional libxft support. + ("libxft" ,libxft) + ("libxrender" ,libxrender))) + (inputs + `(("bash-minimal" ,bash-minimal) + ("zlib" ,zlib))) + (native-inputs + `(("glib" ,glib "bin") ; glib-mkenums, etc. + ("gobject-introspection" ,gobject-introspection) ; g-ir-compiler, etc. + ("help2man" ,help2man) + ("perl" ,perl) + ("pkg-config" ,pkg-config) + ("python" ,python-wrapper))) + (synopsis "Text and font handling library") + (description "Pango is a library for laying out and rendering of text, with +an emphasis on internationalization. Pango can be used anywhere that text +layout is needed, though most of the work on Pango so far has been done in the +context of the GTK+ widget toolkit. Pango forms the core of text and font +handling for GTK+-2.x.") + (home-page "https://pango.gnome.org/") + (license license:lgpl2.0+))) (define-public pango-1.42 (package @@ -381,10 +432,11 @@ used throughout the world.") (add-after 'configure 'disable-layout-test (lambda _ ;; This test requires that fontconfig uses bitmap fonts - ;; such as "gs-fonts"; however providing such a package - ;; alone is not enough, as the requirement comes from - ;; deeper in the font stack. Since this version of Pango - ;; is only used for librsvg, simply disable the test. + ;; such as "font-ghostscript"; however providing such a + ;; package alone is not enough, as the requirement comes + ;; from deeper in the font stack. Since this version of + ;; Pango is only used for librsvg, simply disable the + ;; test. (substitute* "tests/Makefile" (("test-layout\\$\\(EXEEXT\\)") "")) #t))))))) @@ -573,378 +625,645 @@ highlighting and other features typical of a source code editor.") (define-public gdk-pixbuf (package - (name "gdk-pixbuf") - (version "2.40.0") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnome/sources/" name "/" - (version-major+minor version) "/" - name "-" version ".tar.xz")) - (patches (search-patches "gdk-pixbuf-CVE-2020-29385.patch")) - (sha256 - (base32 - "1rnlx9yfw970maxi2x6niaxmih5la11q1ilr7gzshz2kk585k0hm")))) - (build-system meson-build-system) - (arguments - `(#:configure-flags '("-Dinstalled_tests=false") - #:phases - (modify-phases %standard-phases - (add-after - 'unpack 'disable-failing-tests - (lambda _ - (substitute* "tests/meson.build" - ;; XXX FIXME: This test fails on armhf machines with: - ;; SKIP Not enough memory to load bitmap image - ;; ERROR: cve-2015-4491 - too few tests run (expected 4, got 2) - ((".*'cve-2015-4491'.*") "") - ;; XXX FIXME: This test fails with: - ;; ERROR:pixbuf-jpeg.c:74:test_type9_rotation_exif_tag: - ;; assertion failed (error == NULL): Data differ - ;; (gdk-pixbuf-error-quark, 0) - ((".*'pixbuf-jpeg'.*") "")) - #t)) - ;; The slow tests take longer than the specified timeout. - ,@(if (any (cute string=? <> (%current-system)) - '("armhf-linux" "aarch64-linux")) - '((replace 'check - (lambda _ - (invoke "meson" "test" "--timeout-multiplier" "5")))) - '())))) - (propagated-inputs - `(;; Required by gdk-pixbuf-2.0.pc - ("glib" ,glib) - ("libpng" ,libpng) - ;; Used for testing and required at runtime. - ("shared-mime-info" ,shared-mime-info))) - (inputs - `(("libjpeg" ,libjpeg-turbo) - ("libtiff" ,libtiff) - ("libx11" ,libx11))) - (native-inputs - `(("pkg-config" ,pkg-config) - ("gettext" ,gettext-minimal) - ("glib" ,glib "bin") ; glib-mkenums, etc. - ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc. - (synopsis "GNOME image loading and manipulation library") - (description - "GdkPixbuf is a library for image loading and manipulation developed -in the GNOME project.") - (license license:lgpl2.0+) - (home-page "https://developer.gnome.org/gdk-pixbuf/"))) - -;; To build gdk-pixbuf with SVG support, we need librsvg, and librsvg depends -;; on gdk-pixbuf, so this new varibale. Also, librsvg adds 90MiB to the -;; closure size. -(define-public gdk-pixbuf+svg - (package/inherit gdk-pixbuf - (name "gdk-pixbuf+svg") - (inputs - `(("librsvg" ,librsvg) - ,@(package-inputs gdk-pixbuf))) + (name "gdk-pixbuf") + (version "2.42.4") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "0k9f9177qxaryaxprwrhqnv5p2gdq4a8i6y05gm98qa8izc5v77y")))) + (build-system meson-build-system) + (outputs '("out" "debug")) (arguments - '(#:configure-flags '("-Dinstalled-tests=false") - #:tests? #f ; tested by the gdk-pixbuf package already + `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas + #:configure-flags '("-Dinstalled_tests=false") #:phases (modify-phases %standard-phases - (add-after 'install 'register-svg-loader - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (librsvg (assoc-ref inputs "librsvg")) - (loaders - (append - (find-files out "^libpixbufloader-.*\\.so$") - (find-files librsvg "^libpixbufloader-.*\\.so$"))) - (gdk-pixbuf-query-loaders - (string-append out "/bin/gdk-pixbuf-query-loaders"))) - (apply invoke - gdk-pixbuf-query-loaders - "--update-cache" - loaders))))))) - (synopsis - "GNOME image loading and manipulation library, with SVG support"))) + (add-after 'unpack 'patch-docbook + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (with-directory-excursion "docs" + (substitute* "meson.build" + (("http://docbook.sourceforge.net/release/xsl/current/") + (string-append (assoc-ref ,(if (%current-target-system) + '(or native-inputs inputs) + 'inputs) "docbook-xsl") + "/xml/xsl/docbook-xsl-1.79.2/"))) + (substitute* (find-files "." "\\.xml$") + (("http://www.oasis-open.org/docbook/xml/4\\.3/") + (string-append (assoc-ref ,(if (%current-target-system) + '(or native-inputs inputs) + 'inputs) "docbook-xml") + "/xml/dtd/docbook/")))))) + (add-before 'configure 'disable-failing-tests + (lambda _ + (substitute* "tests/meson.build" + (("\\[ 'pixbuf-fail', \\['conform', 'slow'\\], \\],") + "")))) + ;; The slow tests take longer than the specified timeout. + ,@(if (any (cute string=? <> (%current-system)) + '("armhf-linux" "aarch64-linux")) + '((replace 'check + (lambda _ + (invoke "meson" "test" "--timeout-multiplier" "5")))) + '())))) + (propagated-inputs + `( ;; Required by gdk-pixbuf-2.0.pc + ("glib" ,glib) + ;; Required by gdk-pixbuf-xlib-2.0.pc + ("libx11" ,libx11) + ;; Used for testing and required at runtime. + ("shared-mime-info" ,shared-mime-info))) + (inputs + `(,@(if (%current-target-system) + `(("bash-minimal" ,bash-minimal)) ; for glib-or-gtk-wrap + '()) + ("libjpeg" ,libjpeg-turbo) + ("libpng" ,libpng) + ("libtiff" ,libtiff))) + (native-inputs + `(("docbook-xml" ,docbook-xml-4.3) + ("docbook-xsl" ,docbook-xsl) + ("gettext" ,gettext-minimal) + ("glib" ,glib "bin") ; glib-mkenums, etc. + ("gobject-introspection" ,gobject-introspection) ; g-ir-compiler, etc. + ("perl" ,perl) + ("pkg-config" ,pkg-config) + ("xsltproc" ,libxslt))) + (native-search-paths + ;; This file is produced by the gdk-pixbuf-loaders-cache-file + ;; profile hook. + (list (search-path-specification + (variable "GDK_PIXBUF_MODULE_FILE") + (files (list %gdk-pixbuf-loaders-cache-file)) + (separator #f) ;single valued + (file-type 'regular)))) + (synopsis "Image loading library") + (description "GdkPixbuf is a library that loads image data in various +formats and stores it as linear buffers in memory. The buffers can then be +scaled, composited, modified, saved, or rendered.") + (home-page "https://wiki.gnome.org/Projects/GdkPixbuf") + (license license:lgpl2.1+))) -(define-public at-spi2-core - (package - (name "at-spi2-core") - (version "2.34.0") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnome/sources/" name "/" - (version-major+minor version) "/" - name "-" version ".tar.xz")) - (sha256 - (base32 - "1ihixwhh3c16q6253qj9gf69741rb2pi51822a4rylsfcyywsafn")))) - (build-system meson-build-system) - (outputs '("out" "doc")) - (arguments - '(#:configure-flags - (list "-Ddocs=true") - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'set-documentation-path - (lambda* (#:key outputs #:allow-other-keys) - ;; Ensure that the cross-references point to the "doc" output. - (substitute* "doc/libatspi/meson.build" - (("docpath =.*") - (string-append "docpath = '" (assoc-ref outputs "doc") "/share/gtk-doc/html'\n"))) - #t)) - (add-before 'install 'prepare-doc-directory - (lambda* (#:key outputs #:allow-other-keys) - (mkdir-p (string-append (assoc-ref outputs "doc") "/share")) - #t)) - (add-after 'install 'move-documentation - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (doc (assoc-ref outputs "doc"))) - (copy-recursively - (string-append out "/share/gtk-doc") - (string-append doc "/share/gtk-doc")) - (delete-file-recursively - (string-append out "/share/gtk-doc"))) - #t)) - (add-after 'install 'check - (lambda _ - (setenv "HOME" (getenv "TMPDIR")) ; xfconfd requires a writable HOME - ;; Run test-suite under a dbus session. - (setenv "XDG_DATA_DIRS" ; for finding org.xfce.Xfconf.service - (string-append %output "/share")) - ;; Don't fail on missing '/etc/machine-id'. - (setenv "DBUS_FATAL_WARNINGS" "0") ; - (invoke "dbus-launch" "ninja" "test"))) - (delete 'check)))) - (propagated-inputs - ;; atspi-2.pc refers to all these. - `(("dbus" ,dbus) - ("glib" ,glib) - ("libxi" ,libxi) - ("libxtst" ,libxtst))) - (native-inputs - `(("gettext" ,gettext-minimal) - ("gobject-introspection" ,gobject-introspection) - ("gtk-doc" ,gtk-doc/stable) - ("glib" ,glib "bin") - ("pkg-config" ,pkg-config))) - (synopsis "Assistive Technology Service Provider Interface, core components") - (description - "The Assistive Technology Service Provider Interface, core components, +;;; A minimal variant used to prevent a cycle with Inkscape. +(define-public at-spi2-core-minimal + (hidden-package + (package + (name "at-spi2-core") + (version "2.40.0") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "0a9l6cfxynjn6jcp29d72i75xbkrzs1l5kmqcwmfal801b9sg5j1")))) + (build-system meson-build-system) + (arguments + '(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas + #:phases + (modify-phases %standard-phases + (add-after 'install 'check + (lambda _ + (setenv "HOME" (getenv "TMPDIR")) ; xfconfd requires a writable HOME + ;; Run test-suite under a dbus session. + (setenv "XDG_DATA_DIRS" ; for finding org.xfce.Xfconf.service + (string-append %output "/share")) + ;; Don't fail on missing '/etc/machine-id'. + (setenv "DBUS_FATAL_WARNINGS" "0") ; + (invoke "dbus-launch" "ninja" "test"))) + (delete 'check)))) + (inputs + `(("bash-minimal" ,bash-minimal))) + (propagated-inputs + ;; atspi-2.pc refers to all these. + `(("dbus" ,dbus) + ("glib" ,glib) + ("libx11" ,libx11) + ("libxi" ,libxi) + ("libxtst" ,libxtst))) + (native-inputs + `(("gettext" ,gettext-minimal) + ("glib" ,glib "bin") + ("gobject-introspection" ,gobject-introspection) + ("pkg-config" ,pkg-config) + ("python" ,python-wrapper))) + (synopsis "Assistive Technology Service Provider Interface, core components") + (description + "The Assistive Technology Service Provider Interface, core components, is part of the GNOME accessibility project.") - (license license:lgpl2.0+) - (home-page "https://projects.gnome.org/accessibility/"))) + (license license:lgpl2.1+) + (home-page "https://wiki.gnome.org/Accessibility/")))) -;;; A minimal variant used to prevent a cycle with Inkscape. -(define at-spi2-core-minimal - (package - (inherit at-spi2-core) - (name "at-spi2-core-minimal") - (outputs (delete "doc" (package-outputs at-spi2-core))) +(define-public at-spi2-core + (package/inherit at-spi2-core-minimal + (outputs (cons "doc" (package-outputs at-spi2-core-minimal))) (arguments - (substitute-keyword-arguments (package-arguments at-spi2-core) - ((#:configure-flags configure-flags) - `(delete "-Ddocs=true" ,configure-flags)) + (substitute-keyword-arguments (package-arguments at-spi2-core-minimal) + ((#:configure-flags flags ''()) + `(cons ,(if (%current-target-system) + "-Ddocs=false" + "-Ddocs=true") + ,flags)) ((#:phases phases) `(modify-phases ,phases - (delete 'set-documentation-path) - (delete 'prepare-doc-directory) - (delete 'move-documentation))))) + (add-after 'unpack 'set-documentation-path + (lambda* (#:key outputs #:allow-other-keys) + ;; Ensure that the cross-references point to the "doc" output. + (substitute* "doc/libatspi/meson.build" + (("docpath =.*") + (string-append "docpath = '" (assoc-ref outputs "doc") + "/share/gtk-doc/html'\n"))))) + (add-before 'install 'prepare-doc-directory + (lambda* (#:key outputs #:allow-other-keys) + (mkdir-p (string-append (assoc-ref outputs "doc") "/share")))) + ,@(if (%current-target-system) + '() + '((add-after 'install 'move-documentation + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (doc (assoc-ref outputs "doc"))) + (copy-recursively + (string-append out "/share/gtk-doc") + (string-append doc "/share/gtk-doc")) + (delete-file-recursively + (string-append out "/share/gtk-doc"))))))))))) (native-inputs - (alist-delete "gtk-doc" (package-native-inputs at-spi2-core))))) + (append `(("docbook-xml" ,docbook-xml-4.3) + ("gtk-doc" ,gtk-doc/stable) + ("libxml2" ,libxml2)) ;for XML_CATALOG_FILES + (package-native-inputs at-spi2-core-minimal))) + (properties (alist-delete 'hidden? + (package-properties at-spi2-core-minimal))))) (define-public at-spi2-atk (package - (name "at-spi2-atk") - (version "2.34.1") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnome/sources/" name "/" - (version-major+minor version) "/" - name "-" version ".tar.xz")) - (sha256 - (base32 - "05ncp7s5nddjinffs26mcvpbd63vk1m3cv5y530p3plgfhqgjvbp")))) - (build-system meson-build-system) - (arguments - '(#:phases - (modify-phases %standard-phases - (replace 'check - ;; Run test-suite under a dbus session. - (lambda _ - (setenv "DBUS_FATAL_WARNINGS" "0") - (invoke "dbus-launch" "meson" "test")))))) - (propagated-inputs - ;; TODO: Replace by at-spi2-core-minimal in the next staging window, or - ;; when Inkscape 0.92 is upgraded to 1.0 to avoid a cycle. - `(("at-spi2-core" ,at-spi2-core))) ; required by atk-bridge-2.0.pc - (inputs - `(("atk" ,atk))) - (native-inputs - `(("pkg-config" ,pkg-config) - ;; For tests. - ("dbus" ,dbus) - ("libxml2" ,libxml2))) - (synopsis "Assistive Technology Service Provider Interface, ATK bindings") - (description - "The Assistive Technology Service Provider Interface + (name "at-spi2-atk") + (version "2.38.0") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "0ks6r9sx27l80n3a7yjmkilxv48cqj183wc7cap3caw2myjhi86g")))) + (build-system meson-build-system) + (arguments + `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas + ;; Compiling tests requires "libxml2" to be in 'inputs'. + ,@(if (%current-target-system) + `(#:configure-flags '("-Dtests=false")) + '()) + #:phases + (modify-phases %standard-phases + (replace 'check + ;; Run test-suite under a dbus session. + (lambda _ + (setenv "DBUS_FATAL_WARNINGS" "0") + (invoke "dbus-launch" "meson" "test")))))) + (propagated-inputs + `(("at-spi2-core" ,at-spi2-core-minimal))) ; required by atk-bridge-2.0.pc + (inputs + `(("atk" ,atk) + ("glib" ,glib))) + (native-inputs + `(("dbus" ,dbus) ; For tests + ("gobject-introspection" ,gobject-introspection) + ("libxml2" ,libxml2) + ("pkg-config" ,pkg-config))) + (synopsis "Assistive Technology Service Provider Interface, ATK bindings") + (description + "The Assistive Technology Service Provider Interface is part of the GNOME accessibility project.") - (license license:lgpl2.0+) - (home-page "https://projects.gnome.org/accessibility/"))) + (license license:lgpl2.1+) + (home-page "https://wiki.gnome.org/Accessibility/"))) (define-public gtk+-2 (package - (name "gtk+") - (version "2.24.32") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnome/sources/" name "/" - (version-major+minor version) "/" - name "-" version ".tar.xz")) - (sha256 - (base32 - "0bjq7ja9gwcv6n5q4qkvdjjx40wsdiikksz1zqxvxsm5vlyskj5n")) - (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) - ("gdk-pixbuf" ,gdk-pixbuf+svg) - ("pango" ,pango))) - (inputs - `(("cups" ,cups) - ("libxcomposite" ,libxcomposite) - ("libxcursor" ,libxcursor) - ("libxdamage" ,libxdamage) - ("libxi" ,libxi) - ("libxinerama" ,libxinerama) - ("libxrandr" ,libxrandr))) - (native-inputs - `(("perl" ,perl) - ("gettext" ,gettext-minimal) - ("glib" ,glib "bin") - ("gobject-introspection" ,gobject-introspection) - ("pkg-config" ,pkg-config) - ("python-wrapper" ,python-wrapper))) - (arguments - `(#: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-before 'configure 'disable-tests - (lambda _ - ;; FIXME: re-enable tests requiring an X server - (substitute* "gtk/Makefile.in" - (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits .")) - #t)) - (add-after 'install 'remove-cache - (lambda* (#:key outputs #:allow-other-keys) - (for-each + (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" + "gtk2-fix-builder-test.patch")))) + (build-system gnu-build-system) + (outputs '("out" "bin" "doc" "debug")) + (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))) + librsvg + 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"))))) - (synopsis "Cross-platform toolkit for creating graphical user interfaces") - (description - "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating + #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/"))) + (license license:lgpl2.0+) + (home-page "https://www.gtk.org/"))) (define-public gtk+ - (package (inherit gtk+-2) - (name "gtk+") - (version "3.24.24") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnome/sources/" name "/" - (version-major+minor version) "/" - name "-" version ".tar.xz")) - (sha256 - (base32 - "12ipk1d376bai9v820qzhxba93kkh5abi6mhyqr4hwjvqmkl77fc")) - (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch" - "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch")))) - (propagated-inputs - `(("at-spi2-atk" ,at-spi2-atk) - ("atk" ,atk) - ("gdk-pixbuf" ,gdk-pixbuf+svg) - ("libepoxy" ,libepoxy) - ("libxcursor" ,libxcursor) - ("libxi" ,libxi) - ("libxinerama" ,libxinerama) - ("libxkbcommon" ,libxkbcommon) - ("libxdamage" ,libxdamage) - ("libxrandr" ,libxrandr) - ("mesa" ,mesa) - ("pango" ,pango) - ("wayland" ,wayland) - ("wayland-protocols" ,wayland-protocols))) - (inputs - `(("libxml2" ,libxml2) - ;; XXX: colord depends on mozjs (through polkit), which fails on - ;; on non-intel systems now. - ;;("colord" ,colord) - ("cups" ,cups) ;for printing support - ;; XXX: rest depends on p11-kit, which fails on mips64el now. - ;;("rest" ,rest) - ("json-glib" ,json-glib))) - (native-inputs - `(("perl" ,perl) - ("glib" ,glib "bin") - ("gettext" ,gettext-minimal) - ("pkg-config" ,pkg-config) - ("gobject-introspection" ,gobject-introspection) - ("python-wrapper" ,python-wrapper) - ;; By using a special xorg-server for GTK+'s tests, we reduce the impact - ;; of updating xorg-server directly on the master branch. - ("xorg-server" ,xorg-server-for-tests))) - (arguments - `(#:disallowed-references (,xorg-server-for-tests) - ;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes - ;; to "doc". - #:configure-flags (list (string-append "--with-html-dir=" - (assoc-ref %outputs "doc") - "/share/gtk-doc/html") - ;; The header file <gdk/gdkwayland.h> is required - ;; by gnome-control-center - "--enable-wayland-backend" - ;; This is necessary to build both backends. - "--enable-x11-backend" - ;; This enables the HTML5 websocket backend. - "--enable-broadway-backend") - #:phases (modify-phases %standard-phases - (add-before 'configure 'pre-configure - (lambda _ - ;; Disable most tests, failing in the chroot with the message: - ;; D-Bus library appears to be incorrectly set up; failed to read - ;; machine uuid: Failed to open "/etc/machine-id": No such file or - ;; directory. - ;; See the manual page for dbus-uuidgen to correct this issue. - (substitute* "testsuite/Makefile.in" - (("SUBDIRS = gdk gtk a11y css reftests") - "SUBDIRS = gdk")) - #t)) - (add-after 'install 'move-desktop-files - ;; Move desktop files into 'bin' to avoid cycle references. - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (bin (assoc-ref outputs "bin"))) - (mkdir-p (string-append bin "/share")) - (rename-file (string-append out "/share/applications") - (string-append bin "/share/applications")) - #t)))))) - (native-search-paths - (list (search-path-specification - (variable "GUIX_GTK3_PATH") - (files '("lib/gtk-3.0"))))))) + (package + (inherit gtk+-2) + (name "gtk+") + (version "3.24.30") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "1a9vg840fjq1mmm403b67k624qrkxh9shaz9pv7z9l8a6bzvyxds")) + (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch" + "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch")))) + (propagated-inputs + `(("atk" ,atk) + ("at-spi2-atk" ,at-spi2-atk) + ("cairo" ,cairo) + ("fribidi" ,fribidi) + ("fontconfig" ,fontconfig) + ("freetype" ,freetype) + ;; SVG support is optional and requires librsvg, which pulls in rust. + ;; Rust is not supported well on every architecture yet. + ("gdk-pixbuf" ,(if (target-x86-64?) + librsvg + gdk-pixbuf)) + ("glib" ,glib) + ("libcloudproviders" ,libcloudproviders-minimal) + ("libepoxy" ,libepoxy) + ("libx11" ,libx11) + ("libxcomposite" ,libxcomposite) + ("libxcursor" ,libxcursor) + ("libxdamage" ,libxdamage) + ("libxext" ,libxext) + ("libxfixes" ,libxfixes) + ("libxi" ,libxi) + ("libxinerama" ,libxinerama) + ("libxkbcommon" ,libxkbcommon) + ("libxrandr" ,libxrandr) + ("libxrender" ,libxrender) + ("mesa" ,mesa) + ("pango" ,pango) + ("wayland" ,wayland) + ("wayland-protocols" ,wayland-protocols))) + (inputs + `(("colord" ,colord-minimal) ;to prevent a cycle with inkscape + ("cups" ,cups) + ("graphene" ,graphene) + ("harfbuzz" ,harfbuzz) + ("iso-codes" ,iso-codes) + ("json-glib" ,json-glib-minimal) + ("libxml2" ,libxml2) + ("rest" ,rest))) + (native-inputs + `(("docbook-xml" ,docbook-xml-4.1.2) + ("gettext" ,gettext-minimal) + ("glib" ,glib "bin") + ("gobject-introspection" ,gobject-introspection) + ("hicolor-icon-theme" ,hicolor-icon-theme) + ("perl" ,perl) + ("pkg-config" ,pkg-config) + ("python-wrapper" ,python-wrapper) + ("sassc" ,sassc) + ;; By using a special xorg-server for GTK+'s tests, we reduce the impact + ;; of updating xorg-server directly on the master branch. + ("xorg-server" ,xorg-server-for-tests) + ("xsltproc" ,libxslt))) + (arguments + `(#:imported-modules ((guix build glib-or-gtk-build-system) + ,@%gnu-build-system-modules) + #:modules ((guix build utils) + (guix build gnu-build-system) + ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)) + #:disallowed-references (,xorg-server-for-tests) + ;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes + ;; to "doc". + #:configure-flags (list (string-append "--with-html-dir=" + (assoc-ref %outputs "doc") + "/share/gtk-doc/html") + "--enable-cloudproviders" + ;; The header file <gdk/gdkwayland.h> is required + ;; by gnome-control-center + "--enable-wayland-backend" + ;; This is necessary to build both backends. + "--enable-x11-backend" + ;; This enables the HTML5 websocket backend. + "--enable-broadway-backend") + #: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 'disable-failing-tests + (lambda _ + (substitute* "testsuite/gtk/Makefile.in" + (("builderparser cellarea check-icon-names check-cursor-names") + "builderparser cellarea check-cursor-names") + (("notify no-gtk-init object objects-finalize papersize rbtree") + "no-gtk-init papersize rbtree") + (("stylecontext templates textbuffer textiter treemodel treepath") + "stylecontext textbuffer textiter treemodel treepath") + ;; The ‘icontheme’ test needs SVG support. + ,@(if (not (target-x86-64?)) + '((("floating focus gestures grid gtkmenu icontheme keyhash listbox") + "floating focus gestures grid gtkmenu keyhash listbox")) + '())) + (substitute* "testsuite/a11y/Makefile.in" + (("accessibility-dump tree-performance text children derive") + "tree-performance text children derive") + ,@(if (not (target-x86-64?)) + '((("value misc tree-relationships util") + "value misc util")) + '())) + (substitute* "testsuite/reftests/Makefile.in" + (("TEST_PROGS = gtk-reftest") + "TEST_PROGS = ")) + #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-desktop-files + ;; Move desktop files into 'bin' to avoid cycle references. + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (bin (assoc-ref outputs "bin"))) + (mkdir-p (string-append bin "/share")) + (rename-file (string-append out "/share/applications") + (string-append bin "/share/applications")) + #t)))))) + (native-search-paths + (list (search-path-specification + (variable "GUIX_GTK3_PATH") + (files '("lib/gtk-3.0"))))))) + +(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 + `(#: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 + (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',") "")) + (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 _ + ;; 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"))) + (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")))))))) + (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 cloud-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) + ("librsvg" ,librsvg) + ("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+))) ;;; ;;; Guile bindings. @@ -1098,7 +1417,7 @@ exceptions, macros, and a dynamic programming environment.") ("libtool" ,libtool) ("texinfo" ,texinfo))) (inputs `(("guile" ,guile-3.0) - ("librsvg" ,librsvg) + ("librsvg" ,(librsvg-for-system)) ("guile-lib" ,guile-lib))) ;for (unit-test) (propagated-inputs `(("guile-cairo" ,guile-cairo))) (synopsis "Render SVG images using Cairo from Guile") @@ -1252,23 +1571,45 @@ guile-gnome-platform (GNOME developer libraries), and guile-gtksourceview.") (define-public cairomm (package (name "cairomm") - (version "1.12.2") + (version "1.16.0") (source (origin (method url-fetch) (uri (string-append "https://www.cairographics.org/releases/" - name "-" version ".tar.gz")) + name "-" version ".tar.xz")) (sha256 (base32 - "16fmigxsaz85c3lgcls7biwyz8zy8c8h3jndfm54cxxas3a7zi25")))) - (build-system gnu-build-system) + "1ya4y7qa000cjawqwswbqv26y5icfkmhs5iiiil4dxgrqn91923y")))) + (build-system meson-build-system) + (outputs '("out" "doc")) (arguments - ;; The examples lack -lcairo. - '(#:make-flags '("LDFLAGS=-lcairo"))) - (native-inputs `(("pkg-config" ,pkg-config))) + `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas + #:configure-flags + (list + "-Dbuild-documentation=true" + "-Dboost-shared=true") + #:phases + (modify-phases %standard-phases + (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 + `(("boost" ,boost) + ("dot" ,graphviz) + ("doxygen" ,doxygen) + ("mm-common" ,mm-common) + ("perl" ,perl) + ("pkg-config" ,pkg-config) + ("xsltproc" ,libxslt))) + (inputs + `(("fontconfig" ,fontconfig))) (propagated-inputs `(("libsigc++" ,libsigc++) - ("freetype" ,freetype) - ("fontconfig" ,fontconfig) ("cairo" ,cairo))) (home-page "https://cairographics.org/") (synopsis "C++ bindings to the Cairo 2D graphics library") @@ -1277,37 +1618,61 @@ guile-gnome-platform (GNOME developer libraries), and guile-gtksourceview.") library.") (license license:lgpl2.0+))) -(define-public cairomm-1.13 +(define-public cairomm-1.14 (package (inherit cairomm) (name "cairomm") - (version "1.13.1") + (version "1.14.2") (source (origin (method url-fetch) (uri (string-append "https://www.cairographics.org/releases/" - name "-" version ".tar.gz")) + name "-" version ".tar.xz")) (sha256 - (base32 "1xlfl0fm5mgv53lr8xjv2kqsk3bz67qkk6qzvbrqmbvbvvbqp9wp")))) + (base32 "1qwdj9xw1w651kqwh82nipbryimm1ir5n3c6q34nphsx576bj9h1")))) (propagated-inputs - `(("cairo" ,cairo) - ("sigc++" ,libsigc++))))) + `(("libsigc++" ,libsigc++-2) + ,@(package-propagated-inputs cairomm))))) (define-public pangomm (package (name "pangomm") - (version "2.42.0") + (version "2.48.0") (source (origin - (method url-fetch) - (uri (string-append "mirror://gnome/sources/" name "/" - (version-major+minor version) "/" - name "-" version ".tar.xz")) - (sha256 - (base32 - "0mmzxp3wniaafkxr30sb22mq9x44xckb5d60h1bl99lkzxks0vfa")))) - (build-system gnu-build-system) - (native-inputs `(("pkg-config" ,pkg-config))) + (method url-fetch) + (uri (string-append "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "0y2vyp6azvhrii6rzs89kr08wg8z1p562awyr812131zqdsd83ly")))) + (build-system meson-build-system) + (outputs '("out" "doc")) + (arguments + `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas + #:configure-flags + (list + "-Dbuild-documentation=true") + #:phases + (modify-phases %standard-phases + (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) + ("m4" ,m4) + ("mm-common" ,mm-common) + ("perl" ,perl) + ("pkg-config" ,pkg-config) + ("xsltproc" ,libxslt))) (propagated-inputs `(("cairo" ,cairo) ("cairomm" ,cairomm) @@ -1320,11 +1685,11 @@ library.") library.") (license license:lgpl2.1+))) -(define-public pangomm-2.42 +(define-public pangomm-2.46 (package (inherit pangomm) (name "pangomm") - (version "2.42.1") + (version "2.46.0") (source (origin (method url-fetch) @@ -1333,102 +1698,202 @@ library.") (version-major+minor version) "/" name "-" version ".tar.xz")) (sha256 - (base32 "03zli5amizhv9bfklwfq7xyf0b5dagchx1lnz9f0v1rhk69h9gql")))) + (base32 "06zczkaxf5p5kjgnzrfylzi40w9a8lxpndgs7rpn12qrsq27sy6k")))) (propagated-inputs - `(("cairomm" ,cairomm-1.13) + `(("cairomm" ,cairomm-1.14) ("glibmm" ,glibmm-2.64) ("pango" ,pango))))) (define-public atkmm (package (name "atkmm") - (version "2.28.0") + (version "2.36.0") (source (origin - (method url-fetch) - (uri (string-append "mirror://gnome/sources/" name "/" - (version-major+minor version) "/" - name "-" version ".tar.xz")) - (sha256 - (base32 - "0fnxrspxkhhbrjphqrpvl3zjm66n50s4cywrrrwkhbflgy8zqk2c")))) - (build-system gnu-build-system) - (native-inputs `(("pkg-config" ,pkg-config))) + (method url-fetch) + (uri (string-append "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "0wwr0663jrqx2klsasffd9wpk3kqnwisj1y3ahdkjdk5hzrsjgy9")))) + (build-system meson-build-system) + (outputs '("out" "doc")) + (arguments + `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas + #:configure-flags + (list + "-Dbuild-documentation=true") + #:phases + (modify-phases %standard-phases + (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) + ("m4" ,m4) + ("mm-common" ,mm-common) + ("perl" ,perl) + ("pkg-config" ,pkg-config) + ("xsltproc" ,libxslt))) (propagated-inputs `(("glibmm" ,glibmm) ("atk" ,atk))) - (home-page "https://www.gtkmm.org") - (synopsis "C++ interface to the ATK accessibility library") - (description - "ATKmm provides a C++ programming interface to the ATK accessibility -toolkit.") - (license license:lgpl2.1+))) + (synopsis "C++ bindings for ATK") + (description "ATKmm is the C++ binding for the ATK library.") + (home-page "https://wiki.gnome.org/Accessibility") + (license + (list + ;; Library + license:lgpl2.1+ + ;; Tools + license:gpl2+)))) + +(define-public atkmm-2.28 + (package + (inherit atkmm) + (name "atkmm") + (version "2.28.1") + (source + (origin + (method url-fetch) + (uri + (string-append "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 "1b8vycqzr3lfvk2l73f4kk74hj48081zbh9r1r2ilr3h8xh7cs0i")))) + (propagated-inputs + `(("glibmm" ,glibmm-2.64) + ,@(package-propagated-inputs atkmm))))) (define-public gtkmm (package (name "gtkmm") - (version "3.24.2") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnome/sources/" name "/" - (version-major+minor version) "/" - name "-" version ".tar.xz")) - (sha256 - (base32 - "1hxdnhavjyvbcpxhd5z17l9fj4182028s66lc0s16qqqrldhjwbd")))) - (build-system gnu-build-system) - (native-inputs `(("pkg-config" ,pkg-config) - ("glib" ,glib "bin") ;for 'glib-compile-resources' - ("xorg-server" ,xorg-server-for-tests))) + (version "4.4.0") + (source + (origin + (method url-fetch) + (uri + (string-append "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 "1nhdf1s437k41af6frbqw2sky46qci0hgkg9h86a9rlnc0r69d1f")))) + (build-system meson-build-system) + (outputs '("out" "doc")) + (arguments + `(#:configure-flags '("-Dbuild-documentation=true") + #:phases + (modify-phases %standard-phases + (add-before 'build 'set-cache + (lambda _ + (setenv "XDG_CACHE_HOME" (getcwd)))) + (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)) + (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")) + (rename-file + (string-append out "/share/doc") + (string-append doc "/share/doc")))))))) + (native-inputs + `(("dot" ,graphviz) + ("doxygen" ,doxygen) + ("glib:bin" ,glib "bin") + ("m4" ,m4) + ("mm-common" ,mm-common) + ("perl" ,perl) + ("pkg-config" ,pkg-config) + ("xsltproc" ,libxslt) + ("xorg-server" ,xorg-server-for-tests))) (propagated-inputs - `(("pangomm" ,pangomm) + `(("atkmm" ,atkmm) ("cairomm" ,cairomm) - ("atkmm" ,atkmm) - ("gtk+" ,gtk+) - ("glibmm" ,glibmm))) - (arguments - `(#:disallowed-references (,xorg-server-for-tests) - #:phases (modify-phases %standard-phases - (add-before 'check 'run-xvfb - (lambda* (#:key inputs #:allow-other-keys) - (let ((xorg-server (assoc-ref inputs "xorg-server"))) - ;; Tests such as 'object_move/test' require a running - ;; X server. - (system (string-append xorg-server "/bin/Xvfb :1 &")) - (setenv "DISPLAY" ":1") - ;; Don't fail because of the missing /etc/machine-id. - (setenv "DBUS_FATAL_WARNINGS" "0") - #t)))))) + ("glibmm" ,glibmm) + ("gtk" ,gtk) + ("pangomm" ,pangomm))) + (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 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 +tutorial.") (home-page "https://gtkmm.org/") - (synopsis - "C++ interface to the GTK+ graphical user interface library") - (description - "gtkmm is the official C++ interface for the popular GUI 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 tutorial.") - (license license:lgpl2.1+))) + (license + (list + ;; Library + license:lgpl2.1+ + ;; Tools + license:gpl2+)))) +(define-public gtkmm-3 + (package + (inherit gtkmm) + (name "gtkmm") + (version "3.24.5") + (source + (origin + (method url-fetch) + (uri + (string-append "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 "1ri2msp3cmzi6r65ghwb8gfavfaxv0axpwi3q60nm7v8hvg36qw5")))) + (arguments + (substitute-keyword-arguments (package-arguments gtkmm) + ;; Use meson 0.59 to workaround a new issue with meson 0.60 (see: + ;; https://github.com/mesonbuild/meson/issues/9350#issuecomment-953799600). + ((#:meson _ #f) + meson-0.59))) + (propagated-inputs + `(("atkmm-2.28" ,atkmm-2.28) + ("cairomm-1.14" ,cairomm-1.14) + ("glibmm" ,glibmm) + ("gtk+" ,gtk+) + ("pangomm-2.42" ,pangomm-2.46))))) (define-public gtkmm-2 - (package (inherit gtkmm) + (package + (inherit gtkmm) (name "gtkmm") (version "2.24.5") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnome/sources/" name "/" - (version-major+minor version) "/" - name "-" version ".tar.xz")) - (sha256 - (base32 - "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006")))) - (arguments '()) - (native-inputs `(("pkg-config" ,pkg-config))) + (source + (origin + (method url-fetch) + (uri + (string-append "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006")))) + (build-system gnu-build-system) + (arguments + (strip-keyword-arguments + '(#:configure-flags) (package-arguments gtkmm))) (propagated-inputs - `(("pangomm" ,pangomm) - ("cairomm" ,cairomm) - ("atkmm" ,atkmm) + `(("atkmm" ,atkmm-2.28) + ("cairomm" ,cairomm-1.14) + ("glibmm" ,glibmm-2.64) ("gtk+" ,gtk+-2) - ("glibmm" ,glibmm))))) + ("pangomm" ,pangomm-2.46))))) (define-public gtksourceviewmm (package @@ -1447,7 +1912,7 @@ extensive documentation, including API reference and a tutorial.") (propagated-inputs ;; In 'Requires' of gtksourceviewmm-3.0.pc. `(("glibmm" ,glibmm) - ("gtkmm" ,gtkmm) + ("gtkmm" ,gtkmm-3) ("gtksourceview" ,gtksourceview-3))) (synopsis "C++ interface to the GTK+ 'GtkTextView' widget") (description @@ -1465,7 +1930,7 @@ printing and other features typical of a source code editor.") (define-public python-pycairo (package (name "python-pycairo") - (version "1.19.1") + (version "1.20.0") (source (origin (method url-fetch) @@ -1473,7 +1938,7 @@ printing and other features typical of a source code editor.") version "/pycairo-" version ".tar.gz")) (sha256 (base32 - "111fav9m1iagw3nh2ws2vzkjh34r97yl7rdlpvsngsqg521k251c")))) + "1326aa2ybhhhrvz3n4p22z5sic25m016ddb5yq0hvbprnw6a35an")))) (build-system python-build-system) (native-inputs `(("pkg-config" ,pkg-config) @@ -1792,7 +2257,7 @@ information.") (define-public gtk-doc (package (name "gtk-doc") - (version "1.28") + (version "1.33.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -1800,8 +2265,10 @@ information.") name "-" version ".tar.xz")) (sha256 (base32 - "05apmwibkmn1icx05l8aw241lhymcx01zvk5i499cb150bijj7li")))) - (build-system gnu-build-system) + "0hxza8qp52lrq7s1vbilz2vh4170cail560zi8khl0zb42d706yc")) + (patches + (search-patches "gtk-doc-respect-xml-catalog.patch")))) + (build-system meson-build-system) (arguments `(#:parallel-tests? #f #:phases @@ -1809,82 +2276,67 @@ information.") (add-after 'unpack 'patch-gtk-doc-scan (lambda* (#:key inputs #:allow-other-keys) (substitute* "gtk-doc.xsl" - (("http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl") - (string-append (assoc-ref inputs "docbook-xsl") - "/xml/xsl/docbook-xsl-" - ,(package-version docbook-xsl) - "/html/chunk.xsl")) - (("http://docbook.sourceforge.net/release/xsl/current/common/en.xml") - (string-append (assoc-ref inputs "docbook-xsl") - "/xml/xsl/docbook-xsl-" - ,(package-version docbook-xsl) - "/common/en.xml"))) + (("http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl") + (string-append (assoc-ref inputs "docbook-xsl") + "/xml/xsl/docbook-xsl-" + ,(package-version docbook-xsl) + "/html/chunk.xsl")) + (("http://docbook.sourceforge.net/release/xsl/current/common/en.xml") + (string-append (assoc-ref inputs "docbook-xsl") + "/xml/xsl/docbook-xsl-" + ,(package-version docbook-xsl) + "/common/en.xml"))) #t)) - (add-after 'patch-gtk-doc-scan 'patch-test-out + (add-after 'unpack 'disable-failing-tests (lambda _ - ;; sanity.sh counts the number of status lines. Since our - ;; texlive regenerates the fonts every time and the font - ;; generator metafont outputs a lot of extra lines, this - ;; test would always fail. Disable it for now. - (substitute* "tests/Makefile.in" - (("empty.sh sanity.sh") "empty.sh")) - #t)) - (add-before 'build 'set-HOME - (lambda _ - ;; FIXME: dblatex with texlive-union does not find the built - ;; metafonts, so it tries to generate them in HOME. - (setenv "HOME" "/tmp") - #t)) - (add-before 'configure 'fix-docbook - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "configure" - ;; The configure check is overzealous about making sure that - ;; things are in place -- it uses the xmlcatalog tool to make - ;; sure that docbook-xsl is available, but this tool can only - ;; look in one catalog file, unlike the $XML_CATALOG_FILES - ;; variable that Guix defines. Fool the test by using the - ;; docbook-xsl catalog explicitly and get on with life. - (("\"\\$XML_CATALOG_FILE\" \ -\"http://docbook.sourceforge.net/release/xsl/") - (string-append (car (find-files (assoc-ref inputs "docbook-xsl") - "^catalog.xml$")) - " \"http://docbook.sourceforge.net/release/xsl/"))) + (substitute* "tests/Makefile.am" + (("annotations.sh bugs.sh empty.sh fail.sh gobject.sh program.sh") + "")) #t)) (add-after 'install 'wrap-executables (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (for-each (lambda (prog) (wrap-program prog - `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))) - (find-files (string-append out "/bin"))) - #t)))) - #:configure-flags - (list (string-append "--with-xml-catalog=" - (assoc-ref %build-inputs "docbook-xml") - "/xml/dtd/docbook/catalog.xml")))) + `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH"))))) + (find-files (string-append out "/bin"))))))))) (native-inputs - `(("pkg-config" ,pkg-config) + `(("gettext" ,gettext-minimal) + ("glib:bin" ,glib "bin") + ("gobject-introspection" ,gobject-introspection) ("itstool" ,itstool) - ("libxml" ,libxml2) - ("gettext" ,gettext-minimal) - ("bc" ,bc))) + ("perl" ,perl) + ("pkg-config" ,pkg-config) + ("python-wrapper" ,python-wrapper))) (inputs - `(("perl" ,perl) - ("python" ,python) - ("xsltproc" ,libxslt) + `(("bc" ,bc) ("dblatex" ,dblatex) ("docbook-xml" ,docbook-xml-4.3) ("docbook-xsl" ,docbook-xsl) - ("source-highlight" ,source-highlight) ("glib" ,glib) - ("python-six" ,python-six))) - (home-page "https://www.gtk.org/gtk-doc/") - (synopsis "Documentation generator from C source code") - (description - "GTK-Doc generates API documentation from comments added to C code. It is -typically used to document the public API of GTK+ and GNOME libraries, but it -can also be used to document application code.") - (license license:gpl2+))) + ("libxml2" ,libxml2) + ("libxslt" ,libxslt) + ("python" ,python) + ("python-anytree" ,python-anytree) + ("python-lxml" ,python-lxml) + ("python-parameterized" ,python-parameterized) + ("python-pygments" ,python-pygments) + ("python-unittest2" ,python-unittest2) + ("source-highlight" ,source-highlight) + ("yelp-tools" ,yelp-tools))) + (home-page "https://wiki.gnome.org/DocumentationProject/GtkDoc") + (synopsis "GTK+ DocBook Documentation Generator") + (description "GtkDoc is a tool used to extract API documentation from C-code +like Doxygen, but handles documentation of GObject (including signals and +properties) that makes it very suitable for GTK+ apps and libraries. It uses +docbook for intermediate files and can produce html by default and pdf/man-pages +with some extra work.") + (license + (list + ;; Docs. + license:fdl1.1+ + ;; Others. + license:gpl2+)))) ;; This is a variant of the 'gtk-doc' package that is not updated often. It ;; is intended to be used as a native-input at build-time only. This allows @@ -2017,7 +2469,7 @@ Parcellite and adds bugfixes and features.") (define-public graphene (package (name "graphene") - (version "1.10.0") + (version "1.10.6") (source (origin (method git-fetch) @@ -2027,15 +2479,19 @@ Parcellite and adds bugfixes and features.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "14a0j1rvjlc7yhfdmhmckdmkzy4ch61qbzywdlw1xv58h23wx29p")))) + (base32 "0g2jjy6xizzjxlp0dr81h1f5l16dzcnhznhj6jvhpdjqcvgp98xr")))) (build-system meson-build-system) (arguments `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas #:configure-flags (list - "-Dinstalled_tests=false"))) + "-Dinstalled_tests=false" + ,@(if (%current-target-system) + ;; Introspection requires running binaries for 'host' on 'build'. + '("-Dintrospection=false") + '())))) (native-inputs - `(("git" ,git-minimal) + `(("git" ,git-minimal/fixed) ("gobject-introspection" ,gobject-introspection) ("mutest" ,mutest) ("pkg-config" ,pkg-config))) @@ -2349,7 +2805,8 @@ library for drawing.") (build-system gnu-build-system) (arguments `(#:configure-flags (list "--enable-glade" - "--enable-introspection") + "--enable-introspection" + "CFLAGS=-fcommon") #:phases (modify-phases %standard-phases ;; The "configure" script is present, but otherwise the project is @@ -2359,11 +2816,14 @@ library for drawing.") (lambda _ (delete-file "configure") #t)) - (add-after 'unpack 'rename-type + (add-after 'unpack 'patch-for-compatibility (lambda _ (substitute* "glade/glade-gtksheet-editor.c" (("GladeEditableIface") "GladeEditableInterface")) - #t)) + ;; Glade 3.37 renamed the macro GWA_GET_CLASS to + ;; GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS. + (substitute* "glade/glade-gtksheet-editor.c" + (("GWA_GET_CLASS") "GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS")))) ;; Fix glade install directories. (add-before 'bootstrap 'configure-glade-directories (lambda* (#:key outputs #:allow-other-keys) |