* [bug#51428] [PATCH core-update-frozen 02/13] build: glib-or-gtk-build-system: Fix indentation.
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 01/13] build: glib-or-gtk-build-system: Simplify the wrap-all-programs phase Maxim Cournoyer
@ 2021-10-27 4:51 ` Maxim Cournoyer
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 03/13] gnu: at-spi2-core: Reverse inheritance relationship with minimal variant Maxim Cournoyer
` (17 subsequent siblings)
18 siblings, 0 replies; 41+ messages in thread
From: Maxim Cournoyer @ 2021-10-27 4:51 UTC (permalink / raw)
To: 51428; +Cc: Maxim Cournoyer
* guix/build/glib-or-gtk-build-system.scm (gtk-module-directories)
(wrap-all-programs): Fix indentation.
---
guix/build/glib-or-gtk-build-system.scm | 58 ++++++++++++-------------
1 file changed, 29 insertions(+), 29 deletions(-)
diff --git a/guix/build/glib-or-gtk-build-system.scm b/guix/build/glib-or-gtk-build-system.scm
index 655f20cd12..c2f814eaeb 100644
--- a/guix/build/glib-or-gtk-build-system.scm
+++ b/guix/build/glib-or-gtk-build-system.scm
@@ -63,9 +63,9 @@ (define (gtk-module-directories inputs)
""))
"3.0")
((string-match "gtk\\+-2"
- (or (assoc-ref inputs "gtk+")
- (assoc-ref inputs "source")
- ""))
+ (or (assoc-ref inputs "gtk+")
+ (assoc-ref inputs "source")
+ ""))
"2.0")
(else
"4.0"))) ; We default to version 4.0.
@@ -156,32 +156,32 @@ (define %sh (delay (search-input-file inputs "bin/bash")))
(define (sh) (force %sh))
(define handle-output
(match-lambda
- ((output . directory)
- (unless (member output glib-or-gtk-wrap-excluded-outputs)
- (let* ((bindir (string-append directory "/bin"))
- (libexecdir (string-append directory "/libexec"))
- (bin-list (filter (negate wrapped-program?)
- (append (find-files bindir ".*")
- (find-files libexecdir ".*"))))
- (datadirs (data-directories
- (alist-cons output directory inputs)))
- (gtk-mod-dirs (gtk-module-directories
- (alist-cons output directory inputs)))
- (gio-mod-dirs (gio-module-directories
- (alist-cons output directory inputs)))
- (env-vars `(,@(if (not (null? datadirs))
- (list `("XDG_DATA_DIRS" ":" prefix ,datadirs))
- '())
- ,@(if (not (null? gtk-mod-dirs))
- (list `("GTK_PATH" ":" prefix ,gtk-mod-dirs))
- '())
- ,@(if (not (null? gio-mod-dirs))
- (list `("GIO_EXTRA_MODULES" ":"
- prefix ,gio-mod-dirs))
- '()))))
- (for-each (lambda (program)
- (apply wrap-program program #:sh (sh) env-vars))
- bin-list))))))
+ ((output . directory)
+ (unless (member output glib-or-gtk-wrap-excluded-outputs)
+ (let* ((bindir (string-append directory "/bin"))
+ (libexecdir (string-append directory "/libexec"))
+ (bin-list (filter (negate wrapped-program?)
+ (append (find-files bindir ".*")
+ (find-files libexecdir ".*"))))
+ (datadirs (data-directories
+ (alist-cons output directory inputs)))
+ (gtk-mod-dirs (gtk-module-directories
+ (alist-cons output directory inputs)))
+ (gio-mod-dirs (gio-module-directories
+ (alist-cons output directory inputs)))
+ (env-vars `(,@(if (not (null? datadirs))
+ (list `("XDG_DATA_DIRS" ":" prefix ,datadirs))
+ '())
+ ,@(if (not (null? gtk-mod-dirs))
+ (list `("GTK_PATH" ":" prefix ,gtk-mod-dirs))
+ '())
+ ,@(if (not (null? gio-mod-dirs))
+ (list `("GIO_EXTRA_MODULES" ":"
+ prefix ,gio-mod-dirs))
+ '()))))
+ (for-each (lambda (program)
+ (apply wrap-program program #:sh (sh) env-vars))
+ bin-list))))))
(for-each handle-output outputs)
#t)
--
2.33.1
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [bug#51428] [PATCH core-update-frozen 03/13] gnu: at-spi2-core: Reverse inheritance relationship with minimal variant.
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 01/13] build: glib-or-gtk-build-system: Simplify the wrap-all-programs phase Maxim Cournoyer
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 02/13] build: glib-or-gtk-build-system: Fix indentation Maxim Cournoyer
@ 2021-10-27 4:51 ` Maxim Cournoyer
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 04/13] gnu: at-spi2-atk: Break a dependency cycle between GTK+ and Inkscape Maxim Cournoyer
` (16 subsequent siblings)
18 siblings, 0 replies; 41+ messages in thread
From: Maxim Cournoyer @ 2021-10-27 4:51 UTC (permalink / raw)
To: 51428; +Cc: Maxim Cournoyer
Since the minimal variant is here to stay, this should make things easier to
maintain.
* gnu/packages/gtk.scm (at-spi2-core-minimal): Rewrite after removing
inheritance, making it the base minimal package, with no documentation-related
inputs or build phases.
(at-spi2-core): Rewrite definition, inherit from the above minimal variant,
adding the documentation-related inputs and build phases.
---
gnu/packages/gtk.scm | 195 +++++++++++++++++++------------------------
1 file changed, 85 insertions(+), 110 deletions(-)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 5dfdaae7e4..c38fd3e907 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -740,122 +740,97 @@ (define-public gdk-pixbuf+svg
loaders))))))))
(synopsis "Image loading library, with SVG support")))
-(define-public at-spi2-core
- (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)
- (outputs '("out" "doc"))
- (arguments
- `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
- #:configure-flags
- ;; Generating documentation requires running binaries for the host
- ;; on the build machine.
- (list ,(if (%current-target-system)
- "-Ddocs=false"
- "-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))
- ;; TODO(core-updates): Unconditionally use (or native-inputs inputs)
- (add-after 'unpack 'patch-docbook-sgml
- (lambda* (#:key ,@(if (%current-target-system)
- '(native-inputs)
- '()) inputs #:allow-other-keys)
- (let* ((xmldoc
- (string-append (assoc-ref ,(if (%current-target-system)
- '(or native-inputs inputs)
- 'inputs)
- "docbook-xml")
- "/xml/dtd/docbook")))
- (substitute* "doc/libatspi/libatspi-docs.sgml"
- (("http://.*/docbookx\\.dtd")
- (string-append xmldoc "/docbookx.dtd")))
- #t)))
- ,@(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")))
- #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))))
- (inputs
- ;; TODO(core-updates): Make this input unconditional.
- (if (%current-target-system)
- `(("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
- `(("docbook-xml" ,docbook-xml-4.3)
- ("gettext" ,gettext-minimal)
- ("glib" ,glib "bin")
- ("gobject-introspection" ,gobject-introspection)
- ("gtk-doc" ,gtk-doc)
- ("pkg-config" ,pkg-config)
- ("python" ,python-wrapper)))
- (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.1+)
- (home-page "https://wiki.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
--
2.33.1
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [bug#51428] [PATCH core-update-frozen 04/13] gnu: at-spi2-atk: Break a dependency cycle between GTK+ and Inkscape.
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 01/13] build: glib-or-gtk-build-system: Simplify the wrap-all-programs phase Maxim Cournoyer
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 02/13] build: glib-or-gtk-build-system: Fix indentation Maxim Cournoyer
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 03/13] gnu: at-spi2-core: Reverse inheritance relationship with minimal variant Maxim Cournoyer
@ 2021-10-27 4:51 ` Maxim Cournoyer
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 05/13] gnu: lsof: Disable the LTlock test Maxim Cournoyer
` (15 subsequent siblings)
18 siblings, 0 replies; 41+ messages in thread
From: Maxim Cournoyer @ 2021-10-27 4:51 UTC (permalink / raw)
To: 51428; +Cc: Maxim Cournoyer
* gnu/packages/gtk.scm (at-spi2-atk)
[propagated-inputs]: Replace at-spi2-core with at-spi2-core-minimal.
---
gnu/packages/gtk.scm | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index c38fd3e907..b67af8c051 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -859,9 +859,7 @@ (define-public at-spi2-atk
(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
+ `(("at-spi2-core" ,at-spi2-core-minimal))) ; required by atk-bridge-2.0.pc
(inputs
`(("atk" ,atk)
("glib" ,glib)))
--
2.33.1
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [bug#51428] [PATCH core-update-frozen 05/13] gnu: lsof: Disable the LTlock test.
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 01/13] build: glib-or-gtk-build-system: Simplify the wrap-all-programs phase Maxim Cournoyer
` (2 preceding siblings ...)
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 04/13] gnu: at-spi2-atk: Break a dependency cycle between GTK+ and Inkscape Maxim Cournoyer
@ 2021-10-27 4:51 ` Maxim Cournoyer
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 06/13] gnu: lsof: Fix indentation Maxim Cournoyer
` (14 subsequent siblings)
18 siblings, 0 replies; 41+ messages in thread
From: Maxim Cournoyer @ 2021-10-27 4:51 UTC (permalink / raw)
To: 51428; +Cc: Maxim Cournoyer
Fixes <https://issues.guix.gnu.org/44953>.
* gnu/packages/lsof.scm (lsof)[phases]: Remove trailing #t.
{disable-failing-tests}: Disable the LTlock test.
---
gnu/packages/lsof.scm | 24 +++++++++++-------------
1 file changed, 11 insertions(+), 13 deletions(-)
diff --git a/gnu/packages/lsof.scm b/gnu/packages/lsof.scm
index b317902ee7..7ded6ee726 100644
--- a/gnu/packages/lsof.scm
+++ b/gnu/packages/lsof.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -61,26 +62,25 @@ (define-public lsof
(string-append "GNU/" (utsname:sysname (uname))
" (GNU Guix)"))
- (invoke "./Configure" "linux")
- #t))
+ (invoke "./Configure" "linux")))
(add-after 'configure 'patch-timestamps
(lambda _
(substitute* "Makefile"
- (("`date`") "`date --date=@1`"))
- #t))
+ (("`date`") "`date --date=@1`"))))
(add-after 'build 'build-man-page
(lambda _
(with-output-to-file "lsof.8"
- (lambda _ (invoke "soelim" "Lsof.8")))
- #t))
+ (lambda _ (invoke "soelim" "Lsof.8")))))
(add-before 'check 'disable-failing-tests
(lambda _
(substitute* "tests/Makefile"
;; Fails with ‘ERROR!!! client gethostbyaddr() failure’.
(("(STDTST=.*) LTsock" _ prefix) prefix)
- ;; Fails without access to a remote NFS server.
- (("(OPTTST=.*) LTnfs" _ prefix) prefix))
- #t))
+ ;; LTnfs fails without access to a remote NFS server, and LTlock
+ ;; fails when run on a Btrfs file system (see:
+ ;; https://github.com/lsof-org/lsof/issues/152).
+ (("OPTTST=[[:space:]]*LTbigf LTdnlc LTlock LTnfs")
+ "OPTTST = LTbigf LTdnlc"))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
@@ -90,14 +90,12 @@ (define-public lsof
(invoke "./Add2TestDB")
;; The ‘standard’ tests suggest running ‘optional’ ones as well.
- (invoke "make" "standard" "optional")))
- #t))
+ (invoke "make" "standard" "optional")))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(install-file "lsof" (string-append out "/bin"))
- (install-file "lsof.8" (string-append out "/share/man/man8")))
- #t)))))
+ (install-file "lsof.8" (string-append out "/share/man/man8"))))))))
(synopsis "Display information about open files")
(description
"Lsof stands for LiSt Open Files, and it does just that.
--
2.33.1
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [bug#51428] [PATCH core-update-frozen 06/13] gnu: lsof: Fix indentation.
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 01/13] build: glib-or-gtk-build-system: Simplify the wrap-all-programs phase Maxim Cournoyer
` (3 preceding siblings ...)
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 05/13] gnu: lsof: Disable the LTlock test Maxim Cournoyer
@ 2021-10-27 4:51 ` Maxim Cournoyer
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 07/13] gnu: json-glib-minimal: Introduce minimal variant Maxim Cournoyer
` (13 subsequent siblings)
18 siblings, 0 replies; 41+ messages in thread
From: Maxim Cournoyer @ 2021-10-27 4:51 UTC (permalink / raw)
To: 51428; +Cc: Maxim Cournoyer
* gnu/packages/lsof.scm (lsof): Fix indentation.
---
gnu/packages/lsof.scm | 136 +++++++++++++++++++++---------------------
1 file changed, 68 insertions(+), 68 deletions(-)
diff --git a/gnu/packages/lsof.scm b/gnu/packages/lsof.scm
index 7ded6ee726..04c1d80b52 100644
--- a/gnu/packages/lsof.scm
+++ b/gnu/packages/lsof.scm
@@ -32,76 +32,76 @@ (define-module (gnu packages lsof)
(define-public lsof
(package
- (name "lsof")
- (version "4.94.0")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/lsof-org/lsof")
- (commit version)))
- (file-name (git-file-name name version))
- (sha256
- (base32 "0yxv2jg6rnzys49lyrz9yjb4knamah4xvlqj596y6ix3vm4k3chp"))
- (patches (search-patches "lsof-fatal-test-failures.patch"))))
- (build-system gnu-build-system)
- (native-inputs
- `(("groff" ,groff) ; for soelim
- ("perl" ,perl)))
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'configure
- (lambda _
- (setenv "LSOF_CC" ,(cc-for-target))
- (setenv "LSOF_MAKE" "make")
+ (name "lsof")
+ (version "4.94.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/lsof-org/lsof")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0yxv2jg6rnzys49lyrz9yjb4knamah4xvlqj596y6ix3vm4k3chp"))
+ (patches (search-patches "lsof-fatal-test-failures.patch"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("groff" ,groff) ; for soelim
+ ("perl" ,perl)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda _
+ (setenv "LSOF_CC" ,(cc-for-target))
+ (setenv "LSOF_MAKE" "make")
- ;; By default, the makefile captures the output of 'uname -a'.
- ;; Provide a fixed output instead to make builds reproducible.
- (setenv "LSOF_SYSINFO"
- (string-append "GNU/" (utsname:sysname (uname))
- " (GNU Guix)"))
+ ;; By default, the makefile captures the output of 'uname -a'.
+ ;; Provide a fixed output instead to make builds reproducible.
+ (setenv "LSOF_SYSINFO"
+ (string-append "GNU/" (utsname:sysname (uname))
+ " (GNU Guix)"))
- (invoke "./Configure" "linux")))
- (add-after 'configure 'patch-timestamps
- (lambda _
- (substitute* "Makefile"
- (("`date`") "`date --date=@1`"))))
- (add-after 'build 'build-man-page
- (lambda _
- (with-output-to-file "lsof.8"
- (lambda _ (invoke "soelim" "Lsof.8")))))
- (add-before 'check 'disable-failing-tests
- (lambda _
- (substitute* "tests/Makefile"
- ;; Fails with ‘ERROR!!! client gethostbyaddr() failure’.
- (("(STDTST=.*) LTsock" _ prefix) prefix)
- ;; LTnfs fails without access to a remote NFS server, and LTlock
- ;; fails when run on a Btrfs file system (see:
- ;; https://github.com/lsof-org/lsof/issues/152).
- (("OPTTST=[[:space:]]*LTbigf LTdnlc LTlock LTnfs")
- "OPTTST = LTbigf LTdnlc"))))
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (with-directory-excursion "tests"
- ;; Tests refuse to run on ‘unvalidated’ platforms.
- (make-file-writable "TestDB")
- (invoke "./Add2TestDB")
+ (invoke "./Configure" "linux")))
+ (add-after 'configure 'patch-timestamps
+ (lambda _
+ (substitute* "Makefile"
+ (("`date`") "`date --date=@1`"))))
+ (add-after 'build 'build-man-page
+ (lambda _
+ (with-output-to-file "lsof.8"
+ (lambda _ (invoke "soelim" "Lsof.8")))))
+ (add-before 'check 'disable-failing-tests
+ (lambda _
+ (substitute* "tests/Makefile"
+ ;; Fails with ‘ERROR!!! client gethostbyaddr() failure’.
+ (("(STDTST=.*) LTsock" _ prefix) prefix)
+ ;; LTnfs fails without access to a remote NFS server, and LTlock
+ ;; fails when run on a Btrfs file system (see:
+ ;; https://github.com/lsof-org/lsof/issues/152).
+ (("OPTTST=[[:space:]]*LTbigf LTdnlc LTlock LTnfs")
+ "OPTTST = LTbigf LTdnlc"))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (with-directory-excursion "tests"
+ ;; Tests refuse to run on ‘unvalidated’ platforms.
+ (make-file-writable "TestDB")
+ (invoke "./Add2TestDB")
- ;; The ‘standard’ tests suggest running ‘optional’ ones as well.
- (invoke "make" "standard" "optional")))))
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (install-file "lsof" (string-append out "/bin"))
- (install-file "lsof.8" (string-append out "/share/man/man8"))))))))
- (synopsis "Display information about open files")
- (description
- "Lsof stands for LiSt Open Files, and it does just that.
+ ;; The ‘standard’ tests suggest running ‘optional’ ones as well.
+ (invoke "make" "standard" "optional")))))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (install-file "lsof" (string-append out "/bin"))
+ (install-file "lsof.8" (string-append out "/share/man/man8"))))))))
+ (synopsis "Display information about open files")
+ (description
+ "Lsof stands for LiSt Open Files, and it does just that.
It lists information about files that are open by the processes running
on the system.")
- (license (license:fsf-free
- "file://00FAQ"
- "License inspired by zlib, see point 1.9 of 00FAQ in the distribution."))
- (home-page "https://people.freebsd.org/~abe/")))
+ (license (license:fsf-free
+ "file://00FAQ"
+ "License inspired by zlib, see point 1.9 of 00FAQ in the distribution."))
+ (home-page "https://people.freebsd.org/~abe/")))
--
2.33.1
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [bug#51428] [PATCH core-update-frozen 07/13] gnu: json-glib-minimal: Introduce minimal variant.
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 01/13] build: glib-or-gtk-build-system: Simplify the wrap-all-programs phase Maxim Cournoyer
` (4 preceding siblings ...)
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 06/13] gnu: lsof: Fix indentation Maxim Cournoyer
@ 2021-10-27 4:51 ` Maxim Cournoyer
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 08/13] gnu: Add docbook-xsl-ns Maxim Cournoyer
` (12 subsequent siblings)
18 siblings, 0 replies; 41+ messages in thread
From: Maxim Cournoyer @ 2021-10-27 4:51 UTC (permalink / raw)
To: 51428; +Cc: Maxim Cournoyer
* gnu/packages/gnome.scm (json-glib-minimal): New variable.
[source]: Adjust URI.
[outputs]: Move doc output to...
(json-glib)[outputs]: ... here. Rewrite in terms of json-glib-minimal.
* gnu/packages/gtk.scm (gtk+): Use json-glib-minimal to break a cycle with
Inkscape.
---
gnu/packages/gnome.scm | 134 ++++++++++++++++++++---------------------
gnu/packages/gtk.scm | 2 +-
2 files changed, 66 insertions(+), 70 deletions(-)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 9532717d89..fc486a4d1e 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -4590,86 +4590,27 @@ (define-public dconf
configuration storage systems.")
(license license:lgpl2.1+)))
-(define-public json-glib
+(define-public json-glib-minimal
(package
- (name "json-glib")
+ (name "json-glib-minimal")
(version "1.6.2")
(source (origin
(method url-fetch)
- (uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
- name "-" version ".tar.xz"))
+ (uri (string-append "mirror://gnome/sources/json-glib/"
+ (version-major+minor version)
+ "/json-glib-" version ".tar.xz"))
(sha256
(base32
"092g2dyy1hhl0ix9kp33wcab0pg1qicnsv0cj5ms9g9qs336cgd3"))))
(build-system meson-build-system)
- (outputs '("out" "doc"))
(arguments
- `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
- #:configure-flags
- (list
- "-Ddocs=true"
- "-Dman=true"
- ,@(if (%current-target-system)
- ;; If enabled, gtkdoc-scangobj will try to execute a
- ;; cross-compiled binary.
- '("-Dgtk_doc=disabled"
- ;; Trying to build introspection data when cross-compiling
- ;; causes errors during linking.
- "-Dintrospection=disabled")
- '()))
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-docbook
- ;; TODO(core-updates): Use (or native-inputs inputs)
- ;; unconditionally.
- (lambda* (#:key ,@(if (%current-target-system)
- '(native-inputs)
- '()) inputs #:allow-other-keys)
- (with-directory-excursion "doc"
- (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/")))
- (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/"))))
- #t))
- ;; When cross-compiling, there are no docs to move.
- ,(if (%current-target-system)
- '(add-after 'install 'stub-docs
- (lambda* (#:key outputs #:allow-other-keys)
- ;; The daemon doesn't like empty output paths.
- (mkdir (assoc-ref outputs "doc"))))
- '(add-after 'install 'move-docs
- (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/gtk-doc")
- (string-append doc "/share/gtk-doc"))
- #t)))))))
+ `(#:glib-or-gtk? #t)) ; To wrap binaries and/or compile schemas
(native-inputs
- `(("docbook-xml" ,docbook-xml-4.3)
- ("docbook-xsl" ,docbook-xsl)
- ("gettext" ,gettext-minimal)
- ("glib" ,glib "bin") ;for glib-mkenums and glib-genmarshal
- ("gobject-introspection" ,gobject-introspection)
- ("gtk-doc" ,gtk-doc)
- ("pkg-config" ,pkg-config)
- ("xsltproc" ,libxslt)))
+ `(("gettext" ,gettext-minimal)
+ ("glib" ,glib "bin") ;for glib-mkenums and glib-genmarshal
+ ("pkg-config" ,pkg-config)))
(inputs
- ;; TODO(core-updates): Make this input unconditional.
- (if (%current-target-system)
- `(("bash-minimal" ,bash-minimal))
- '()))
+ `(("bash-minimal" ,bash-minimal)))
(propagated-inputs
`(("glib" ,glib))) ;according to json-glib-1.0.pc
(home-page "https://wiki.gnome.org/Projects/JsonGlib")
@@ -4679,6 +4620,61 @@ (define-public json-glib
GLib and GObject, and integrates JSON with GLib data types.")
(license license:lgpl2.1+)))
+(define-public json-glib
+ (package/inherit json-glib-minimal
+ (name "json-glib")
+ (outputs (cons "doc" (package-outputs json-glib-minimal)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments json-glib-minimal)
+ ((#:configure-flags _)
+ `(list "-Ddocs=true"
+ "-Dman=true"
+ ,@(if (%current-target-system)
+ ;; If enabled, gtkdoc-scangobj will try to execute a
+ ;; cross-compiled binary.
+ '("-Dgtk_doc=disabled"
+ ;; Trying to build introspection data when cross-compiling
+ ;; causes errors during linking.
+ "-Dintrospection=disabled")
+ '())))
+ ((#:phases phases '%standard-phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'patch-docbook
+ (lambda* (#:key native-inputs inputs #:allow-other-keys)
+ (with-directory-excursion "doc"
+ (substitute* (find-files "." "\\.xml$")
+ (("http://www.oasis-open.org/docbook/xml/4\\.3/")
+ (string-append (assoc-ref (or native-inputs inputs)
+ "docbook-xml")
+ "/xml/dtd/docbook/")))
+ (substitute* "meson.build"
+ (("http://docbook.sourceforge.net/release/xsl/current/")
+ (string-append (assoc-ref (or native-inputs inputs)
+ "docbook-xsl")
+ "/xml/xsl/docbook-xsl-1.79.2/"))))))
+ ;; When cross-compiling, there are no docs to move.
+ ,(if (%current-target-system)
+ '(add-after 'install 'stub-docs
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; The daemon doesn't like empty output paths.
+ (mkdir (assoc-ref outputs "doc"))))
+ '(add-after 'install 'move-docs
+ (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/gtk-doc")
+ (string-append doc "/share/gtk-doc"))))))))))
+ (native-inputs
+ (append
+ `(("docbook-xml" ,docbook-xml-4.3)
+ ("docbook-xsl" ,docbook-xsl)
+ ("gobject-introspection" ,gobject-introspection)
+ ("gtk-doc" ,gtk-doc)
+ ("xsltproc" ,libxslt))
+ (package-native-inputs json-glib-minimal)))))
+
(define-public libxklavier
(package
(name "libxklavier")
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index b67af8c051..1dd2c6c184 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -1028,7 +1028,7 @@ (define-public gtk+
("graphene" ,graphene)
("harfbuzz" ,harfbuzz)
("iso-codes" ,iso-codes)
- ("json-glib" ,json-glib)
+ ("json-glib" ,json-glib-minimal)
("libxml2" ,libxml2)
("rest" ,rest)))
(native-inputs
--
2.33.1
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [bug#51428] [PATCH core-update-frozen 08/13] gnu: Add docbook-xsl-ns.
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 01/13] build: glib-or-gtk-build-system: Simplify the wrap-all-programs phase Maxim Cournoyer
` (5 preceding siblings ...)
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 07/13] gnu: json-glib-minimal: Introduce minimal variant Maxim Cournoyer
@ 2021-10-27 4:51 ` Maxim Cournoyer
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 09/13] gnu: colord-minimal: Introduce minimal variant Maxim Cournoyer
` (11 subsequent siblings)
18 siblings, 0 replies; 41+ messages in thread
From: Maxim Cournoyer @ 2021-10-27 4:51 UTC (permalink / raw)
To: 51428; +Cc: Maxim Cournoyer
* gnu/packages/docbook.scm (docbook-xsl-ns): New variable.
---
gnu/packages/docbook.scm | 56 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 56 insertions(+)
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index ee12f7edeb..92ca706c56 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -41,6 +41,7 @@ (define-module (gnu packages docbook)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module ((guix build utils) #:select (alist-replace))
+ #:use-module (guix build-system copy)
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
#:use-module (guix build-system python))
@@ -229,6 +230,61 @@ (define name-version
"This package provides XSL style sheets for DocBook.")
(license (license:x11-style "" "See 'COPYING' file."))))
+(define-public docbook-xsl-ns
+ (package
+ (name "docbook-xsl-ns")
+ (version "1.79.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/docbook/"
+ name "/" version "/"
+ name "-" version ".tar.bz2"))
+ (sha256
+ (base32
+ "170ggf5dgjar65kkn5n33kvjr3pdinpj66nnxfx8b2avw0k91jin"))))
+ (build-system copy-build-system)
+ (outputs '("out" "doc"))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ ;; XXX: The copy-build-system doesn't seem to allow installing to a
+ ;; different output.
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (xml (string-append out "/xml/xsl/" ,name "-" ,version))
+ (doc (string-append (assoc-ref %outputs "doc")
+ "/share/doc/" ,name "-" ,version))
+ (select-rx (make-regexp
+ "(\\.xml$|\\.xsl$|\\.dtd$|\\.ent$)")))
+ ;; Install catalog.
+ (install-file "catalog.xml" xml)
+ (install-file "VERSION.xsl" xml)
+ (substitute* (string-append xml "/catalog.xml")
+ (("rewritePrefix=\"./")
+ (string-append "rewritePrefix=\"file://" xml "/")))
+ ;; Install style sheets.
+ (for-each (lambda (dir)
+ (for-each (lambda (f)
+ (install-file
+ f (string-append xml "/" (dirname f))))
+ (find-files dir select-rx)))
+ '("assembly" "common" "eclipse" "epub" "epub3" "fo"
+ "highlighting" "html" "htmlhelp" "javahelp" "lib"
+ "manpages" "params" "profiling" "roundtrip"
+ "template" "website"
+ "xhtml" "xhtml-1_1" "xhtml5"))
+ ;; Install documentation.
+ (install-file "NEWS" doc)
+ (install-file "RELEASE-NOTES.html" doc)
+ (copy-recursively "slides" doc)
+ (copy-recursively "webhelp" doc)))))))
+ (home-page "https://docbook.org")
+ (synopsis "DocBook XSL namespaced style sheets for document authoring")
+ (description "This package provides the @emph{namespaced} XSL style sheets
+for DocBook.")
+ (license (license:x11-style "" "See 'COPYING' file."))))
+
(define-public docbook-dsssl
(package
(name "docbook-dsssl")
--
2.33.1
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [bug#51428] [PATCH core-update-frozen 09/13] gnu: colord-minimal: Introduce minimal variant.
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 01/13] build: glib-or-gtk-build-system: Simplify the wrap-all-programs phase Maxim Cournoyer
` (6 preceding siblings ...)
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 08/13] gnu: Add docbook-xsl-ns Maxim Cournoyer
@ 2021-10-27 4:51 ` Maxim Cournoyer
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 10/13] gnu: libcloudproviders-minimal: " Maxim Cournoyer
` (10 subsequent siblings)
18 siblings, 0 replies; 41+ messages in thread
From: Maxim Cournoyer @ 2021-10-27 4:51 UTC (permalink / raw)
To: 51428; +Cc: Maxim Cournoyer
* gnu/packages/gnome.scm (colord-minimal): New minimal variant that doesn't
require Inkscape to be built (through gtk-doc). Remove trailing #t.
[configure-flags]: Disable docs and manpage generation. Sort order.
(colord): Rewrite in terms of colord-minimal.
[configure-flags]: Enable manpages and bash completion.
[phases]{fix-bash-completion-dir}: New phase.
[native-inputs]: Add bash_completion, docbook-xsl-ns and libxml2.
* gnu/packages/gtk.scm (gtk+)[inputs]{colord}: Use the colord-minimal variant
to prevent a cycle with Inkscape.
---
gnu/packages/gnome.scm | 65 +++++++++++++++++++++++++++++-------------
gnu/packages/gtk.scm | 2 +-
2 files changed, 46 insertions(+), 21 deletions(-)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index fc486a4d1e..4b1adc2997 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -5203,9 +5203,9 @@ (define-public gnome-terminal
keyboard shortcuts.")
(license license:gpl3+)))
-(define-public colord
+(define-public colord-minimal
(package
- (name "colord")
+ (name "colord-minimal")
(version "1.4.5")
(source
(origin
@@ -5216,33 +5216,27 @@ (define-public colord
(base32 "05sydi6qqqx1rrqwnga1vbg9srkf89wdcfw5w4p4m7r37m2flx5p"))))
(build-system meson-build-system)
(arguments
- '(;; FIXME: One test fails:
+ '( ;; FIXME: One test fails:
;; /colord/icc-store (in lib/colord/colord-self-test-private):
;; Incorrect content type for /tmp/colord-vkve/already-exists.icc, got
;; application/x-zerosize
#:tests? #f
#:glib-or-gtk? #t
- #:configure-flags (list "-Dlocalstatedir=/var"
- ;; No dep on systemd.
- "-Dsystemd=false"
- ;; Wants to install to global completion dir;
- ;; punt.
+ #:configure-flags (list "-Dargyllcms_sensor=false" ;requires spotread
"-Dbash_completion=false"
"-Ddaemon_user=colord"
+ "-Ddocs=false"
+ "-Dlocalstatedir=/var"
+ "-Dman=false"
"-Dsane=true"
- "-Dvapi=true"
- ;; Requires spotread.
- "-Dargyllcms_sensor=false"
- ;; TODO: Requires docbook2x.
- "-Dman=false")
+ "-Dsystemd=false") ;no systemd
#:phases
(modify-phases %standard-phases
(add-before 'configure 'patch-build-system
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "rules/meson.build"
(("udev.get_pkgconfig_variable\\('udevdir'\\)")
- (string-append "'" (assoc-ref outputs "out") "/lib/udev'")))
- #t))
+ (string-append "'" (assoc-ref outputs "out") "/lib/udev'")))))
(add-before 'configure 'set-sqlite3-file-name
(lambda* (#:key inputs #:allow-other-keys)
;; "colormgr dump" works by invoking the "sqlite3" command.
@@ -5250,13 +5244,10 @@ (define-public colord
(let ((sqlite (assoc-ref inputs "sqlite")))
(substitute* "client/cd-util.c"
(("\"sqlite3\"")
- (string-append "\"" sqlite "/bin/sqlite3\"")))
- #t))))))
+ (string-append "\"" sqlite "/bin/sqlite3\"")))))))))
(native-inputs
`(("glib:bin" ,glib "bin") ; for glib-compile-resources, etc.
("gettext" ,gettext-minimal)
- ("gobject-introspection" ,gobject-introspection)
- ("gtk-doc" ,gtk-doc/stable)
("pkg-config" ,pkg-config)
("vala" ,vala)))
(propagated-inputs
@@ -5266,7 +5257,8 @@ (define-public colord
("udev" ,eudev)))
(inputs
`(("dbus-glib" ,dbus-glib)
- ("gusb" ,gusb)
+ ("gobject-introspection" ,gobject-introspection)
+ ("gusb" ,gusb-minimal)
("libgudev" ,libgudev)
("libusb" ,libusb)
("polkit" ,polkit)
@@ -5280,6 +5272,39 @@ (define-public colord
output devices.")
(license license:gpl2+)))
+(define-public colord
+ (package/inherit colord-minimal
+ (name "colord")
+ (arguments
+ (substitute-keyword-arguments
+ (package-arguments colord-minimal)
+ ((#:configure-flags flags)
+ `(begin
+ (use-modules (srfi srfi-1))
+ (append '("-Dbash_completion=true"
+ "-Ddocs=true"
+ "-Dman=true")
+ (fold delete ,flags '("-Dbash_completion=false"
+ "-Ddocs=false"
+ "-Dman=false")))))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'fix-bash-completion-dir
+ (lambda* (#:key outputs #:allow-other-keys)
+ (substitute* "data/meson.build"
+ (("bash_completion.get_pkgconfig_variable\
+\\('completionsdir'\\)")
+ (string-append "'" (assoc-ref outputs "out")
+ "/etc/bash_completion.d'")))))))))
+ (native-inputs
+ (append
+ `(("bash-completion" ,bash-completion)
+ ("docbook-xsl-ns" ,docbook-xsl-ns)
+ ("gtk-doc" ,gtk-doc/stable)
+ ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
+ ("libxslt" ,libxslt))
+ (package-native-inputs colord-minimal)))))
+
(define-public geoclue
(package
(name "geoclue")
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 1dd2c6c184..a515bca5ac 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -1023,7 +1023,7 @@ (define-public gtk+
("wayland" ,wayland)
("wayland-protocols" ,wayland-protocols)))
(inputs
- `(("colord" ,colord)
+ `(("colord" ,colord-minimal) ;to prevent a cycle with inkscape
("cups" ,cups)
("graphene" ,graphene)
("harfbuzz" ,harfbuzz)
--
2.33.1
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [bug#51428] [PATCH core-update-frozen 10/13] gnu: libcloudproviders-minimal: Introduce minimal variant.
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 01/13] build: glib-or-gtk-build-system: Simplify the wrap-all-programs phase Maxim Cournoyer
` (7 preceding siblings ...)
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 09/13] gnu: colord-minimal: Introduce minimal variant Maxim Cournoyer
@ 2021-10-27 4:51 ` Maxim Cournoyer
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 11/13] gnu: gusb-minimal: " Maxim Cournoyer
` (9 subsequent siblings)
18 siblings, 0 replies; 41+ messages in thread
From: Maxim Cournoyer @ 2021-10-27 4:51 UTC (permalink / raw)
To: 51428; +Cc: Maxim Cournoyer
* gnu/packages/gnome.scm (libcloudproviders-minimal): New minimal variant that
doesn't require Inkscape to be built (through gtk-doc).
[source]: Adjust URI.
[outputs]: Remove field.
[configure-flags]: Disable introspection, docs and vala bindings.
[phases]{move-doc}: Move phase to ...
(libcloudproviders)[phases]: ... here.
Rewrite in terms of libcloudproviders-minimal. The "doc" output is moved
here.
[configure-flags]: Clear inherited flags and enable doc.
* gnu/packages/gtk.scm (gtk+)[inputs]{libcloudproviders}: Use the minimal
variant to prevent a cycle with Inkscape.
---
gnu/packages/gnome.scm | 60 +++++++++++++++++++++++++-----------------
gnu/packages/gtk.scm | 2 +-
2 files changed, 37 insertions(+), 25 deletions(-)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 4b1adc2997..1c4f6a4c94 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -39,7 +39,7 @@
;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2019 Jelle Licht <jlicht@fsfe.org>
;;; Copyright © 2019 Jonathan Frederickson <jonathan@terracrypt.net>
-;;; Copyright © 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2019, 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2019, 2020 Martin Becze <mjbecze@riseup.net>
;;; Copyright © 2019 David Wilson <david@daviwil.com>
;;; Copyright © 2019, 2020 Raghav Gururajan <raghavgururajan@disroot.org>
@@ -338,41 +338,28 @@ (define-public brasero
features to enable users to create their discs easily and quickly.")
(license license:gpl2+)))
-(define-public libcloudproviders
+;;; Minimal variant, used to break a cycle with Inkscape.
+(define-public libcloudproviders-minimal
(package
- (name "libcloudproviders")
+ (name "libcloudproviders-minimal")
(version "0.3.1")
(source
(origin
(method url-fetch)
(uri
- (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
- name "-" version ".tar.xz"))
+ (string-append "mirror://gnome/sources/libcloudproviders/"
+ (version-major+minor version)
+ "/libcloudproviders-" version ".tar.xz"))
(sha256
(base32 "0aars24myf6n8b8hm1n12hsgcm54097kpbpm4ba31zp1l4y22qs7"))))
(build-system meson-build-system)
- (outputs '("out" "doc"))
(arguments
- `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
- #:configure-flags
- (list
- "-Denable-gtk-doc=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/gtk-doc")
- (string-append doc "/share/gtk-doc"))
- #t))))))
+ `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
+ #:configure-flags (list "-Dintrospection=false"
+ "-Denable-gtk-doc=false"
+ "-Dvapigen=false")))
(native-inputs
`(("glib:bin" ,glib "bin")
- ("gobject-introspection" ,gobject-introspection)
- ("gtk-doc" ,gtk-doc/stable)
("pkg-config" ,pkg-config)
("vala" ,vala)))
(inputs
@@ -386,6 +373,31 @@ (define-public libcloudproviders
(home-page "https://csorianognome.wordpress.com/2015/07/07/cloud-providers/")
(license license:lgpl3+)))
+(define-public libcloudproviders
+ (package/inherit libcloudproviders-minimal
+ (name "libcloudproviders")
+ (version "0.3.1")
+ (outputs (cons "doc" (package-outputs libcloudproviders-minimal)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments libcloudproviders-minimal)
+ ((#:configure-flags _)
+ '("-Denable-gtk-doc=true")) ;false by default
+ ((#:phases phases '%standard-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/gtk-doc")
+ (string-append doc "/share/gtk-doc")))))))))
+ (native-inputs
+ (append
+ `(("gobject-introspection" ,gobject-introspection)
+ ("gtk-doc" ,gtk-doc/stable))
+ (package-native-inputs libcloudproviders-minimal)))))
+
(define-public libgrss
(package
(name "libgrss")
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index a515bca5ac..e92c6b1398 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -1005,7 +1005,7 @@ (define-public gtk+
gdk-pixbuf+svg
gdk-pixbuf))
("glib" ,glib)
- ("libcloudproviders" ,libcloudproviders)
+ ("libcloudproviders" ,libcloudproviders-minimal)
("libepoxy" ,libepoxy)
("libx11" ,libx11)
("libxcomposite" ,libxcomposite)
--
2.33.1
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [bug#51428] [PATCH core-update-frozen 11/13] gnu: gusb-minimal: Introduce minimal variant.
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 01/13] build: glib-or-gtk-build-system: Simplify the wrap-all-programs phase Maxim Cournoyer
` (8 preceding siblings ...)
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 10/13] gnu: libcloudproviders-minimal: " Maxim Cournoyer
@ 2021-10-27 4:51 ` Maxim Cournoyer
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 12/13] gnu: rest: Use libsoup-minimal Maxim Cournoyer
` (8 subsequent siblings)
18 siblings, 0 replies; 41+ messages in thread
From: Maxim Cournoyer @ 2021-10-27 4:51 UTC (permalink / raw)
To: 51428; +Cc: Maxim Cournoyer
This is needed to prevent a dependency cycle between Inkscape and GTK+.
* gnu/packages/gnome.scm (gusb-minimal): New variable.
[configure-flags]: Disable docs.
[native-inputs]: Remove gtk-doc.
(gusb): Rewrite in terms of gusb-minimal.
[configure-flags]: Enable docs.
[native-inputs]: Add gtk-doc.
---
gnu/packages/gnome.scm | 42 +++++++++++++++++++++++++++---------------
1 file changed, 27 insertions(+), 15 deletions(-)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 1c4f6a4c94..b79cf48199 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -6587,38 +6587,38 @@ (define-public gvfs
DAV, and others.")
(license license:lgpl2.0+)))
-(define-public gusb
+(define-public gusb-minimal
(package
- (name "gusb")
+ (name "gusb-minimal")
(version "0.3.5")
(source (origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/hughsie/libgusb")
- (commit version)))
+ (url "https://github.com/hughsie/libgusb")
+ (commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"0ifhdqhpyxwsg0z9s1anj7cf5pya5qsqyp5ksh9n7mqwa4lrjkl8"))))
(build-system meson-build-system)
+ (arguments
+ `(#:tests? #f ;libusb fails to initialize. Wonder what that is.
+ #:configure-flags
+ (cons "-Ddocs=false"
+ (if ,(%current-target-system)
+ ;; Introspection data cannot currently be cross-compiled.
+ '("-Dintrospection=false"
+ ;; Requires introspection data.
+ "-Dvapi=false")
+ '()))))
(native-inputs
`(("gobject-introspection" ,gobject-introspection)
("pkg-config" ,pkg-config)
- ("vala" ,vala)
- ("gtk-doc" ,gtk-doc/stable)))
+ ("vala" ,vala)))
(propagated-inputs
;; Both of these are required by gusb.pc.
`(("glib" ,glib)
("libusb" ,libusb)))
- (arguments
- `(#:tests? #f ;libusb fails to initialize. Wonder what that is.
- #:configure-flags
- ,(if (%current-target-system)
- ;; Introspection data cannot currently be cross-compiled.
- ''("-Dintrospection=false"
- ;; Requires introspection data.
- "-Dvapi=false")
- ''())))
(home-page "https://github.com/hughsie/libgusb")
(synopsis "GLib binding for libusb1")
(description
@@ -6628,6 +6628,18 @@ (define-public gusb
USB transfers with your high-level application or system daemon.")
(license license:lgpl2.1+)))
+(define-public gusb
+ (package/inherit gusb-minimal
+ (name "gusb")
+ (arguments
+ (substitute-keyword-arguments (package-arguments gusb-minimal)
+ ((#:configure-flags flags)
+ `(cons "-Ddocs=true"
+ (delete "-Ddocs=false" ,flags)))))
+ (native-inputs
+ (cons `("gtk-doc" ,gtk-doc/stable)
+ (package-native-inputs gusb-minimal)))))
+
(define-public simple-scan
(package
(name "simple-scan")
--
2.33.1
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [bug#51428] [PATCH core-update-frozen 12/13] gnu: rest: Use libsoup-minimal.
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 01/13] build: glib-or-gtk-build-system: Simplify the wrap-all-programs phase Maxim Cournoyer
` (9 preceding siblings ...)
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 11/13] gnu: gusb-minimal: " Maxim Cournoyer
@ 2021-10-27 4:51 ` Maxim Cournoyer
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 13/13] gnu: inkscape: Remove the legacy 0.92 version Maxim Cournoyer
` (7 subsequent siblings)
18 siblings, 0 replies; 41+ messages in thread
From: Maxim Cournoyer @ 2021-10-27 4:51 UTC (permalink / raw)
To: 51428; +Cc: Maxim Cournoyer
This is needed to prevent a dependency cycle between Inkscape and GTK+.
* gnu/packages/gnome.scm (rest)[propagated-inputs]
{libsoup}: Use the minimal variant.
---
gnu/packages/gnome.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index b79cf48199..804b3dfb7f 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -4826,7 +4826,7 @@ (define-public rest
(propagated-inputs
;; rest-0.7.pc refers to all these.
`(("glib" ,glib)
- ("libsoup" ,libsoup)
+ ("libsoup" ,libsoup-minimal)
("libxml2" ,libxml2)))
(home-page "https://www.gtk.org/")
(synopsis "RESTful web api query library")
--
2.33.1
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [bug#51428] [PATCH core-update-frozen 13/13] gnu: inkscape: Remove the legacy 0.92 version.
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 01/13] build: glib-or-gtk-build-system: Simplify the wrap-all-programs phase Maxim Cournoyer
` (10 preceding siblings ...)
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 12/13] gnu: rest: Use libsoup-minimal Maxim Cournoyer
@ 2021-10-27 4:51 ` Maxim Cournoyer
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 14/20] gnu: ungoogled-chromium: Use the new lld-as-ld-wrapper Maxim Cournoyer
` (6 subsequent siblings)
18 siblings, 0 replies; 41+ messages in thread
From: Maxim Cournoyer @ 2021-10-27 4:51 UTC (permalink / raw)
To: 51428; +Cc: Maxim Cournoyer
The older 0.92 Inkscape package was previously kept because of problems
building lib2geom on the ARM architectures. As this no longer appears to be a
problem (tested on the overdrive1 machine), finally replace the older Inkscape
by the newer 1.1 release.
* gnu/packages/inkscape.scm (inkscape-1.1): Delete variable, moving the
package definition to...
(inkscape): ... the now single inkscape variable. Remove trailing #t.
[tests?]: Remove.
[phases]{generate-gdk-pixbuf-loaders-cache-file}: Add phase.
---
gnu/packages/inkscape.scm | 90 +++++----------------------------------
1 file changed, 11 insertions(+), 79 deletions(-)
diff --git a/gnu/packages/inkscape.scm b/gnu/packages/inkscape.scm
index 1fd328eb1c..e891a707c1 100644
--- a/gnu/packages/inkscape.scm
+++ b/gnu/packages/inkscape.scm
@@ -4,7 +4,7 @@
;;; Copyright © 2016, 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2017, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020 Boris A. Dekshteyn <boris.dekshteyn@gmail.com>
;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
;;;
@@ -53,71 +53,6 @@ (define-module (gnu packages inkscape)
#:use-module (gnu packages pkg-config))
(define-public inkscape
- (package
- (name "inkscape")
- (version "0.92.4")
- (source (origin
- (method url-fetch)
- (uri (string-append "https://media.inkscape.org/dl/"
- "resources/file/"
- "inkscape-" version ".tar.bz2"))
- (patches (search-patches "inkscape-poppler-0.76.patch"))
- (sha256
- (base32
- "0pjinhjibfsz1aywdpgpj3k23xrsszpj4a1ya5562dkv2yl2vv2p"))))
- (build-system cmake-build-system)
- (inputs
- `(("aspell" ,aspell)
- ("gtkmm" ,gtkmm-2)
- ("gtk" ,gtk+-2)
- ("gsl" ,gsl)
- ("poppler" ,poppler)
- ("libpng" ,libpng)
- ("libxml2" ,libxml2)
- ("libxslt" ,libxslt)
- ("libgc" ,libgc)
- ("freetype" ,freetype)
- ("popt" ,popt)
- ("potrace" ,potrace)
- ("python" ,python-wrapper)
- ("lcms" ,lcms)
- ("boost" ,boost)))
- (native-inputs
- `(("intltool" ,intltool)
- ("glib" ,glib "bin")
- ("perl" ,perl)
- ("pkg-config" ,pkg-config)))
- ;; FIXME: tests require gmock
- (arguments
- `(#:tests? #f
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-icon-cache-generator
- (lambda _
- (substitute* "share/icons/application/CMakeLists.txt"
- (("gtk-update-icon-cache") "true"))
- #t))
- (add-after 'unpack 'adjust-for-new-poppler
- (lambda _
- (substitute* (find-files "src/extension/internal/pdfinput")
- ;; Needed for Poppler 0.82.
- (("Unicode \\*u") "Unicode const *u")
- ;; Needed for Poppler 0.83.
- (("\\(GfxPath") "(const GfxPath")
- (("GfxSubpath") "const GfxSubpath")
- (("new GlobalParams\\(\\)")
- "std::unique_ptr<GlobalParams>(new GlobalParams())")
- (("new GlobalParams\\(poppler_datadir\\)")
- "std::unique_ptr<GlobalParams>(new GlobalParams(poppler_datadir))"))
- #t)))))
- (home-page "https://inkscape.org/")
- (synopsis "Vector graphics editor")
- (description "Inkscape is a vector graphics editor. What sets Inkscape
-apart is its use of Scalable Vector Graphics (SVG), an XML-based W3C standard,
-as the native format.")
- (license license:gpl2+)))
-
-(define-public inkscape-1.1
(package
(name "inkscape")
(version "1.1")
@@ -211,12 +146,10 @@ (define-public inkscape-1.1
;; Lift the requirement on the double-conversion library, as
;; it is only needed by lib2geom, which is now unbundled.
(substitute* "CMakeScripts/DefineDependsandFlags.cmake"
- ((".*find_package\\(DoubleConversion.*") ""))
- #t))))
+ ((".*find_package\\(DoubleConversion.*") ""))))))
(build-system cmake-build-system)
(arguments
- `(#:tests? #t
- #:test-target "check" ;otherwise some test binaries are missing
+ `(#:test-target "check" ;otherwise some test binaries are missing
#:imported-modules (,@%cmake-build-system-modules
(guix build glib-or-gtk-build-system))
#:modules ((guix build cmake-build-system)
@@ -224,11 +157,13 @@ (define-public inkscape-1.1
(guix build utils))
#: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-icon-cache-generator
(lambda _
(substitute* "share/icons/application/CMakeLists.txt"
- (("gtk-update-icon-cache") "true"))
- #t))
+ (("gtk-update-icon-cache") "true"))))
(add-after 'unpack 'disable-latex-export-tests
;; FIXME: For some reason the test.pdf_tex file generated by the
;; "--export-latex" lacks "some text" in its content when run in
@@ -236,14 +171,11 @@ (define-public inkscape-1.1
(lambda _
(substitute* "testfiles/cli_tests/CMakeLists.txt"
(("add_cli_test\\(export-latex")
- "message(TEST_DISABLED: export-latex"))
- #t))
+ "message(TEST_DISABLED: export-latex"))))
(add-after 'unpack 'set-home
;; Mute Inkscape warnings during tests.
(lambda _
- (setenv "HOME" (getcwd))
- (format #t "ARGS is set to: ~a" (getenv "ARGS"))
- #t))
+ (setenv "HOME" (getcwd))))
;; Move the check phase after the install phase, as when run in the
;; tests, Inkscape relies on files that are not yet installed, such
;; as the "share/inkscape/ui/units.xml" file.
@@ -259,8 +191,8 @@ (define-public inkscape-1.1
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(wrap-program (string-append out "/bin/inkscape")
- `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))))
- #t)))))
+ `("GUIX_PYTHONPATH" ":" prefix
+ (,(getenv "GUIX_PYTHONPATH"))))))))))
(inputs
`(("aspell" ,aspell)
("autotrace" ,autotrace)
--
2.33.1
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [bug#51428] [PATCH core-update-frozen 14/20] gnu: ungoogled-chromium: Use the new lld-as-ld-wrapper.
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 01/13] build: glib-or-gtk-build-system: Simplify the wrap-all-programs phase Maxim Cournoyer
` (11 preceding siblings ...)
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 13/13] gnu: inkscape: Remove the legacy 0.92 version Maxim Cournoyer
@ 2021-10-27 4:51 ` Maxim Cournoyer
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 15/20] gnu: gtk: Add the generate-gdk-pixbuf-loaders-cache-file phase Maxim Cournoyer
` (5 subsequent siblings)
18 siblings, 0 replies; 41+ messages in thread
From: Maxim Cournoyer @ 2021-10-27 4:51 UTC (permalink / raw)
To: 51428; +Cc: Maxim Cournoyer
* gnu/packages/chromium.scm (make-lld-wrapper): Delete procedure.
(ungoogled-chromium)[native-inputs]: Replace its use by lld-as-ld-wrapper.
---
gnu/packages/chromium.scm | 27 +--------------------------
1 file changed, 1 insertion(+), 26 deletions(-)
diff --git a/gnu/packages/chromium.scm b/gnu/packages/chromium.scm
index 534b9a4ad9..2d67182e22 100644
--- a/gnu/packages/chromium.scm
+++ b/gnu/packages/chromium.scm
@@ -460,31 +460,6 @@ (define opus+custom
`(cons "--enable-custom-modes"
,flags))))))
-;; 'make-ld-wrapper' can only work with an 'ld' executable, so we need
-;; this trick to make it wrap 'lld'.
-(define (make-lld-wrapper lld)
- (define lld-as-ld
- (computed-file "lld-ld"
- #~(begin
- (mkdir #$output)
- (mkdir (string-append #$output "/bin"))
- (symlink #$(file-append lld "/bin/lld")
- (string-append #$output "/bin/ld")))))
-
- ;; Create a wrapper for LLD that inserts appropriate -rpath entries.
- (define lld-wrapper
- (make-ld-wrapper "lld-wrapper"
- #:binutils lld-as-ld))
-
- ;; Clang looks for an 'ld.lld' executable, so we need to symlink it back.
- (computed-file "lld-wrapped"
- #~(begin
- (mkdir #$output)
- (mkdir (string-append #$output "/bin"))
- (symlink #$(file-append lld-wrapper "/bin/ld")
- (string-append #$output "/bin/lld"))
- (symlink "lld" (string-append #$output "/bin/ld.lld")))))
-
(define-public ungoogled-chromium
(package
(name "ungoogled-chromium")
@@ -848,7 +823,7 @@ (define-public ungoogled-chromium
("clang" ,clang-12)
("gn" ,gn)
("gperf" ,gperf)
- ("ld-wrapper" ,(make-lld-wrapper lld))
+ ("ld-wrapper" ,lld-as-ld-wrapper)
("ninja" ,ninja)
("node" ,node-lts)
("pkg-config" ,pkg-config)
--
2.33.1
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [bug#51428] [PATCH core-update-frozen 15/20] gnu: gtk: Add the generate-gdk-pixbuf-loaders-cache-file phase.
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 01/13] build: glib-or-gtk-build-system: Simplify the wrap-all-programs phase Maxim Cournoyer
` (12 preceding siblings ...)
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 14/20] gnu: ungoogled-chromium: Use the new lld-as-ld-wrapper Maxim Cournoyer
@ 2021-10-27 4:51 ` Maxim Cournoyer
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 16/20] build: glib-or-gtk: Generate the gdk-pixbuf-loaders cache file in a phase Maxim Cournoyer
` (4 subsequent siblings)
18 siblings, 0 replies; 41+ messages in thread
From: Maxim Cournoyer @ 2021-10-27 4:51 UTC (permalink / raw)
To: 51428; +Cc: Maxim Cournoyer
* gnu/packages/gtk.scm (gtk+)[arguments]: Import the (guix build
glib-or-gtk-build-system) module and put it in scope.
[phases]{generate-gdk-pixbuf-loaders-cache-file}: New phase.
(gtk): Likewise.
---
gnu/packages/gtk.scm | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 8f57f660c4..22106c1185 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -1039,7 +1039,12 @@ (define-public gtk+
("xorg-server" ,xorg-server-for-tests)
("xsltproc" ,libxslt)))
(arguments
- `(#:disallowed-references (,xorg-server-for-tests)
+ `(#: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="
@@ -1055,6 +1060,9 @@ (define-public gtk+
"--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"
@@ -1119,7 +1127,12 @@ (define-public gtk
(build-system meson-build-system)
(outputs '("out" "bin" "doc"))
(arguments
- `(#:configure-flags
+ `(#: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:))
+ #:configure-flags
(list
"-Dbroadway-backend=true" ;for broadway display-backend
"-Dcloudproviders=enabled" ;for cloud-providers support
@@ -1133,6 +1146,9 @@ (define-public gtk
"-Dman-pages=true")
#: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.
--
2.33.1
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [bug#51428] [PATCH core-update-frozen 16/20] build: glib-or-gtk: Generate the gdk-pixbuf-loaders cache file in a phase.
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 01/13] build: glib-or-gtk-build-system: Simplify the wrap-all-programs phase Maxim Cournoyer
` (13 preceding siblings ...)
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 15/20] gnu: gtk: Add the generate-gdk-pixbuf-loaders-cache-file phase Maxim Cournoyer
@ 2021-10-27 4:51 ` Maxim Cournoyer
2021-10-27 14:48 ` [bug#51428] core-updates-frozen-batched-changes built and ready to merge Ludovic Courtès
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 17/20] profiles: Add a gdk-pixbuf-loaders-cache-file hook Maxim Cournoyer
` (3 subsequent siblings)
18 siblings, 1 reply; 41+ messages in thread
From: Maxim Cournoyer @ 2021-10-27 4:51 UTC (permalink / raw)
To: 51428; +Cc: Maxim Cournoyer
Adding a profile hook to do so covers most use cases, but it is still
necessary to have the gdk-pixbuf loaders cache file computed at build time, as
software may expect to find loaders support at that time.
* guix/build/glib-or-gtk-build-system.scm: Delete trailing #t.
(%gdk-pixbuf-loaders-cache-file-prefix): New variable.
(generate-gdk-pixbuf-loaders-cache): New procedure.
(generate-gdk-pixbuf-loaders-cache-file): Add procedure...
(%standard-phases): ... and register it as a build phase.
---
guix/build-system/glib-or-gtk.scm | 5 ++-
guix/build/glib-or-gtk-build-system.scm | 55 +++++++++++++++++++++++--
2 files changed, 55 insertions(+), 5 deletions(-)
diff --git a/guix/build-system/glib-or-gtk.scm b/guix/build-system/glib-or-gtk.scm
index 0c88f039d2..aa9703829b 100644
--- a/guix/build-system/glib-or-gtk.scm
+++ b/guix/build-system/glib-or-gtk.scm
@@ -26,6 +26,8 @@ (define-module (guix build-system glib-or-gtk)
#:use-module (guix monads)
#:use-module (guix derivations)
#:use-module (guix search-paths)
+ #:use-module ((guix build glib-or-gtk-build-system)
+ #:select (%gdk-pixbuf-loaders-cache-file))
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
#:use-module (guix packages)
@@ -33,7 +35,8 @@ (define-module (guix build-system glib-or-gtk)
#:export (%glib-or-gtk-build-system-modules
glib-or-gtk-build
glib-or-gtk-cross-build
- glib-or-gtk-build-system))
+ glib-or-gtk-build-system)
+ #:re-export (%gdk-pixbuf-loaders-cache-file)) ;for convenience
;; Commentary:
;;
diff --git a/guix/build/glib-or-gtk-build-system.scm b/guix/build/glib-or-gtk-build-system.scm
index c2f814eaeb..785eb54fdc 100644
--- a/guix/build/glib-or-gtk-build-system.scm
+++ b/guix/build/glib-or-gtk-build-system.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -28,6 +29,8 @@ (define-module (guix build glib-or-gtk-build-system)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:export (%standard-phases
+ %gdk-pixbuf-loaders-cache-file
+ generate-gdk-pixbuf-loaders-cache
glib-or-gtk-build))
;; Commentary:
@@ -183,8 +186,7 @@ (define handle-output
(apply wrap-program program #:sh (sh) env-vars))
bin-list))))))
- (for-each handle-output outputs)
- #t)
+ (for-each handle-output outputs))
(define* (compile-glib-schemas #:key outputs #:allow-other-keys)
"Implement phase \"glib-or-gtk-compile-schemas\": compile \"glib\" schemas
@@ -197,11 +199,56 @@ (define* (compile-glib-schemas #:key outputs #:allow-other-keys)
(not (file-exists?
(string-append schemasdir "/gschemas.compiled"))))
(invoke "glib-compile-schemas" schemasdir)))))
- outputs)
- #t)
+ outputs))
+
+(define %gdk-pixbuf-loaders-cache-file
+ "lib/gdk-pixbuf-2.0/2.10.0/loaders.cache")
+
+(define (generate-gdk-pixbuf-loaders-cache directories outputs)
+ "Generate the loaders.cache file used by gdk-pixbuf to locate the available
+loaders among DIRECTORIES, and set the GDK_PIXBUF_MODULE_FILE environment
+variable. The cache file is installed under OUTPUTS. Return the first cache
+file name if one was created else #f."
+ (let* ((loaders (append-map
+ (cut find-files <> "^libpixbufloader-.*\\.so$")
+ directories))
+ (outputs* (map (cut string-append <> "/"
+ %gdk-pixbuf-loaders-cache-file)
+ outputs))
+ (loaders.cache (first outputs*))
+ (loaders.cache-copies (cdr outputs*)))
+ (if (not (null? loaders))
+ (begin
+ (mkdir-p (dirname loaders.cache))
+ (setenv "GDK_PIXBUF_MODULE_FILE" loaders.cache)
+ (apply invoke "gdk-pixbuf-query-loaders" "--update-cache" loaders)
+ (for-each (lambda (f)
+ (mkdir-p (dirname f))
+ (copy-file loaders.cache f))
+ loaders.cache-copies)
+ loaders.cache)
+ #f)))
+
+(define* (generate-gdk-pixbuf-loaders-cache-file #:key inputs outputs
+ #:allow-other-keys)
+ "Build phase that Wraps the GENERATE-GDK-PIXBUF-LOADERS-CACHE procedure."
+ ;; Conditionally compute the cache file if the gdk-pixbuf command is
+ ;; available on PATH (it comes with gdk-pixbuf).
+ (when (which "gdk-pixbuf-query-loaders")
+ (let ((loaders.cache (generate-gdk-pixbuf-loaders-cache
+ (map cdr inputs)
+ (filter-map identity
+ (list
+ (assoc-ref outputs "out")
+ (assoc-ref outputs "bin")
+ (assoc-ref outputs "lib"))))))
+ (when loaders.cache
+ (format #t "GDK_PIXBUF_MODULE_FILE set to `~a'~%" loaders.cache)))))
(define %standard-phases
(modify-phases gnu:%standard-phases
+ (add-after 'unpack 'generate-gdk-pixbuf-loaders-cache-file
+ generate-gdk-pixbuf-loaders-cache-file)
(add-after 'install 'glib-or-gtk-compile-schemas compile-glib-schemas)
(add-after 'install 'glib-or-gtk-wrap wrap-all-programs)))
--
2.33.1
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [bug#51428] core-updates-frozen-batched-changes built and ready to merge
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 16/20] build: glib-or-gtk: Generate the gdk-pixbuf-loaders cache file in a phase Maxim Cournoyer
@ 2021-10-27 14:48 ` Ludovic Courtès
2021-10-27 18:00 ` Maxim Cournoyer
0 siblings, 1 reply; 41+ messages in thread
From: Ludovic Courtès @ 2021-10-27 14:48 UTC (permalink / raw)
To: Maxim Cournoyer; +Cc: 51428
Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
> +(define %gdk-pixbuf-loaders-cache-file
> + "lib/gdk-pixbuf-2.0/2.10.0/loaders.cache")
A comment indicating that this file is built by the hook would be nice,
but let’s not trigger a rebuild just for that.
Isn’t the hard-coded version number going to cause troubles when
gdk-pixbuf is upgraded? Or if we have some packages using a newer
version while others remain on 2.10.0?
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [bug#51428] core-updates-frozen-batched-changes built and ready to merge
2021-10-27 14:48 ` [bug#51428] core-updates-frozen-batched-changes built and ready to merge Ludovic Courtès
@ 2021-10-27 18:00 ` Maxim Cournoyer
0 siblings, 0 replies; 41+ messages in thread
From: Maxim Cournoyer @ 2021-10-27 18:00 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 51428
Ludovic Courtès <ludo@gnu.org> writes:
> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>
>> +(define %gdk-pixbuf-loaders-cache-file
>> + "lib/gdk-pixbuf-2.0/2.10.0/loaders.cache")
>
> A comment indicating that this file is built by the hook would be nice,
> but let’s not trigger a rebuild just for that.
I've added the following comment:
;; This file is to be generated by the
;; `generate-gdk-pixbuf-loaders-cache' build phase defined below.
> Isn’t the hard-coded version number going to cause troubles when
> gdk-pixbuf is upgraded? Or if we have some packages using a newer
> version while others remain on 2.10.0?
I was puzzled by it at the beginning, but it seems some historical
related version string that isn't meant to change. Even newer versions
of gdk-pixbuf refer to this older version in their documentation/build
system.
Thank you!
Maxim
^ permalink raw reply [flat|nested] 41+ messages in thread
* [bug#51428] [PATCH core-update-frozen 17/20] profiles: Add a gdk-pixbuf-loaders-cache-file hook.
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 01/13] build: glib-or-gtk-build-system: Simplify the wrap-all-programs phase Maxim Cournoyer
` (14 preceding siblings ...)
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 16/20] build: glib-or-gtk: Generate the gdk-pixbuf-loaders cache file in a phase Maxim Cournoyer
@ 2021-10-27 4:51 ` Maxim Cournoyer
2021-10-27 14:45 ` [bug#51428] core-updates-frozen-batched-changes built and ready to merge Ludovic Courtès
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 18/20] gnu: gdk-pixbuf: Add a search path for the loaders cache file Maxim Cournoyer
` (2 subsequent siblings)
18 siblings, 1 reply; 41+ messages in thread
From: Maxim Cournoyer @ 2021-10-27 4:51 UTC (permalink / raw)
To: 51428; +Cc: Maxim Cournoyer
This paves the way toward properly fixing https://issues.guix.gnu.org/50957.
* guix/profiles.scm (gdk-pixbuf-loaders-cache-file): Add procedure...
(%default-profile-hooks): ... and register it as a profile hook.
---
guix/profiles.scm | 29 ++++++++++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-)
diff --git a/guix/profiles.scm b/guix/profiles.scm
index 9494684228..bdc0d52626 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -7,7 +7,7 @@
;;; Copyright © 2016, 2018, 2019, 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2017 Huang Ying <huang.ying.caritas@gmail.com>
-;;; Copyright © 2017 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2017, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2019 Kyle Meyer <kyle@kyleam.com>
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2020 Danny Milosavljevic <dannym@scratchpost.org>
@@ -1161,6 +1161,32 @@ (define build
`((type . profile-hook)
(hook . emacs-subdirs))))
+(define (gdk-pixbuf-loaders-cache-file manifest)
+ "Return a derivation that produces a loaders cache file for every gdk-pixbuf
+loaders discovered in MANIFEST."
+ (define gdk-pixbuf ;lazy reference
+ (module-ref (resolve-interface '(gnu packages gtk)) 'gdk-pixbuf))
+
+ (mlet %store-monad ((%gdk-pixbuf (manifest-lookup-package
+ manifest "gdk-pixbuf"))
+ (gdk-pixbuf-bin -> (file-append gdk-pixbuf "/bin")))
+ (define build
+ (with-imported-modules (source-module-closure
+ '((guix build glib-or-gtk-build-system)))
+ #~(begin
+ (use-modules (guix build glib-or-gtk-build-system))
+ (setenv "PATH" (string-append #$gdk-pixbuf-bin ":" (getenv "PATH")))
+ (generate-gdk-pixbuf-loaders-cache '#$(manifest-inputs manifest)
+ (list #$output)))))
+ (if %gdk-pixbuf
+ (gexp->derivation "gdk-pixbuf-loaders-cache-file" build
+ #:local-build? #t
+ #:substitutable? #f
+ #:properties
+ '((type . profile-hook)
+ (hook . gdk-pixbuf-loaders-cache-file)))
+ (return #f))))
+
(define (glib-schemas manifest)
"Return a derivation that unions all schemas from manifest entries and
creates the Glib 'gschemas.compiled' file."
@@ -1672,6 +1698,7 @@ (define %default-profile-hooks
ghc-package-cache-file
ca-certificate-bundle
emacs-subdirs
+ gdk-pixbuf-loaders-cache-file
glib-schemas
gtk-icon-themes
gtk-im-modules
--
2.33.1
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [bug#51428] core-updates-frozen-batched-changes built and ready to merge
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 17/20] profiles: Add a gdk-pixbuf-loaders-cache-file hook Maxim Cournoyer
@ 2021-10-27 14:45 ` Ludovic Courtès
2021-10-27 17:51 ` Maxim Cournoyer
0 siblings, 1 reply; 41+ messages in thread
From: Ludovic Courtès @ 2021-10-27 14:45 UTC (permalink / raw)
To: Maxim Cournoyer; +Cc: 51428
Hi,
Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
> This paves the way toward properly fixing https://issues.guix.gnu.org/50957.
>
> * guix/profiles.scm (gdk-pixbuf-loaders-cache-file): Add procedure...
> (%default-profile-hooks): ... and register it as a profile hook.
[...]
> + (mlet %store-monad ((%gdk-pixbuf (manifest-lookup-package
> + manifest "gdk-pixbuf"))
You could call it ‘gdk-pixbuf?’ since it’s used as a boolean.
> + (gexp->derivation "gdk-pixbuf-loaders-cache-file" build
> + #:local-build? #t
> + #:substitutable? #f
> + #:properties
> + '((type . profile-hook)
> + (hook . gdk-pixbuf-loaders-cache-file)))
No showstopper but we should eventually add this to (guix status) for
nicer reporting.
My 2¢,
Ludo’.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [bug#51428] core-updates-frozen-batched-changes built and ready to merge
2021-10-27 14:45 ` [bug#51428] core-updates-frozen-batched-changes built and ready to merge Ludovic Courtès
@ 2021-10-27 17:51 ` Maxim Cournoyer
0 siblings, 0 replies; 41+ messages in thread
From: Maxim Cournoyer @ 2021-10-27 17:51 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 51428
Hello,
Ludovic Courtès <ludo@gnu.org> writes:
> Hi,
>
> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>
>> This paves the way toward properly fixing https://issues.guix.gnu.org/50957.
>>
>> * guix/profiles.scm (gdk-pixbuf-loaders-cache-file): Add procedure...
>> (%default-profile-hooks): ... and register it as a profile hook.
>
> [...]
>
>> + (mlet %store-monad ((%gdk-pixbuf (manifest-lookup-package
>> + manifest "gdk-pixbuf"))
>
> You could call it ‘gdk-pixbuf?’ since it’s used as a boolean.
>
>> + (gexp->derivation "gdk-pixbuf-loaders-cache-file" build
>> + #:local-build? #t
>> + #:substitutable? #f
>> + #:properties
>> + '((type . profile-hook)
>> + (hook . gdk-pixbuf-loaders-cache-file)))
Good idea; done:
modified guix/profiles.scm
@@ -1167,8 +1167,8 @@ (define (gdk-pixbuf-loaders-cache-file manifest)
(define gdk-pixbuf ;lazy reference
(module-ref (resolve-interface '(gnu packages gtk)) 'gdk-pixbuf))
- (mlet %store-monad ((%gdk-pixbuf (manifest-lookup-package
- manifest "gdk-pixbuf"))
+ (mlet %store-monad ((%gdk-pixbuf? (manifest-lookup-package
+ manifest "gdk-pixbuf"))
(gdk-pixbuf-bin -> (file-append gdk-pixbuf "/bin")))
(define build
(with-imported-modules (source-module-closure
@@ -1178,7 +1178,7 @@ (define build
(setenv "PATH" (string-append #$gdk-pixbuf-bin ":" (getenv "PATH")))
(generate-gdk-pixbuf-loaders-cache '#$(manifest-inputs manifest)
(list #$output)))))
- (if %gdk-pixbuf
+ (if %gdk-pixbuf?
(gexp->derivation "gdk-pixbuf-loaders-cache-file" build
#:local-build? #t
#:substitutable? #f
> No showstopper but we should eventually add this to (guix status) for
> nicer reporting.
>
> My 2¢,
> Ludo’.
Thanks, I was wondering why the hook message output looked different.
Done, like:
modified guix/status.scm
@@ -381,6 +381,8 @@ (define (hook-message hook-type)
(G_ "building CA certificate bundle..."))
('emacs-subdirs
(G_ "listing Emacs sub-directories..."))
+ ('gdk-pixbuf-loaders-cache-file
+ (G_ "generating GdkPixbuf loaders cache..."))
('glib-schemas
(G_ "generating GLib schema cache..."))
('gtk-icon-themes
Maxim
^ permalink raw reply [flat|nested] 41+ messages in thread
* [bug#51428] [PATCH core-update-frozen 18/20] gnu: gdk-pixbuf: Add a search path for the loaders cache file.
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 01/13] build: glib-or-gtk-build-system: Simplify the wrap-all-programs phase Maxim Cournoyer
` (15 preceding siblings ...)
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 17/20] profiles: Add a gdk-pixbuf-loaders-cache-file hook Maxim Cournoyer
@ 2021-10-27 4:51 ` Maxim Cournoyer
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 19/20] gnu: gtk: Replace gdk-pixbuf+svg by librsvg Maxim Cournoyer
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 20/20] gnu: librsvg: Preserve the loaders.cache file Maxim Cournoyer
18 siblings, 0 replies; 41+ messages in thread
From: Maxim Cournoyer @ 2021-10-27 4:51 UTC (permalink / raw)
To: 51428; +Cc: Maxim Cournoyer
Fixes <https://issues.guix.gnu.org/50957>.
The previous commit added a profile hook to compute a gdk-pixbuf loaders cache
file. This change enables gdk-pixbuf to make use of it.
* gnu/packages/gtk.scm (gdk-pixbuf)[native-search-paths]: Add a search path
specification to set the GDK_PIXBUF_MODULE_FILE environment variable.
---
gnu/packages/gtk.scm | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 22106c1185..0463e26246 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -52,6 +52,8 @@ (define-module (gnu packages gtk)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module ((guix build utils) #:select (alist-replace))
+ #:use-module ((guix build glib-or-gtk-build-system)
+ #:select (%gdk-pixbuf-loaders-cache-file))
#:use-module (guix build-system glib-or-gtk)
#:use-module (guix build-system gnu)
#:use-module (guix build-system meson)
@@ -697,6 +699,14 @@ (define-public gdk-pixbuf
("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
--
2.33.1
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [bug#51428] [PATCH core-update-frozen 19/20] gnu: gtk: Replace gdk-pixbuf+svg by librsvg.
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 01/13] build: glib-or-gtk-build-system: Simplify the wrap-all-programs phase Maxim Cournoyer
` (16 preceding siblings ...)
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 18/20] gnu: gdk-pixbuf: Add a search path for the loaders cache file Maxim Cournoyer
@ 2021-10-27 4:51 ` Maxim Cournoyer
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 20/20] gnu: librsvg: Preserve the loaders.cache file Maxim Cournoyer
18 siblings, 0 replies; 41+ messages in thread
From: Maxim Cournoyer @ 2021-10-27 4:51 UTC (permalink / raw)
To: 51428; +Cc: Maxim Cournoyer
With the addition of a profile hook for computing the gdk-pixbuf loaders cache
file, there is no longer a need for gdk-pixbuf+svg, and librsvg can propagate
gdk-pixbuf without fear, so replace the former for the latter.
The replacement was automated with the following command:
$ git grep -l ',gdk-pixbuf+svg)' \
| xargs sed 's/(".*" ,gdk-pixbuf+svg)/("librsvg" ,librsvg)/' -i
* gnu/packages/gtk.scm (gdk-pixbuf+svg): Delete package.
(gtk+-2)[propagated-inputs]: Replace gdk-pixbuf+svg with librsvg.
(gtk+)[propagated-inputs]: Likewise.
* gnu/packages/gnome.scm (gdk-pixbuf+svg): Add deprecated package.
---
gnu/packages/dunst.scm | 2 +-
gnu/packages/geo.scm | 2 +-
gnu/packages/gnome.scm | 14 +++++++-------
gnu/packages/graphviz.scm | 2 +-
gnu/packages/gstreamer.scm | 4 ++--
gnu/packages/gtk.scm | 35 +++--------------------------------
gnu/packages/image.scm | 2 +-
gnu/packages/mail.scm | 2 +-
gnu/packages/mate.scm | 12 ++++++------
gnu/packages/messaging.scm | 2 +-
gnu/packages/networking.scm | 2 +-
gnu/packages/tryton.scm | 2 +-
gnu/packages/video.scm | 2 +-
gnu/packages/vnc.scm | 2 +-
14 files changed, 28 insertions(+), 57 deletions(-)
diff --git a/gnu/packages/dunst.scm b/gnu/packages/dunst.scm
index ce2c04bac6..9f3e4c036c 100644
--- a/gnu/packages/dunst.scm
+++ b/gnu/packages/dunst.scm
@@ -67,7 +67,7 @@ (define-public dunst
("which" ,which)))
(inputs
`(("dbus" ,dbus)
- ("gdk-pixbuf" ,gdk-pixbuf+svg) ; for svg support
+ ("librsvg" ,librsvg) ; for svg support
("glib" ,glib)
("cairo" ,cairo)
("pango" ,pango)
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 938720f928..6cba568119 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -279,7 +279,7 @@ (define-public gnome-maps
("libsoup" ,libsoup)
("libgweather" ,libgweather)
("libxml2" ,libxml2)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("glib-networking" ,glib-networking)
("geoclue" ,geoclue)
("geocode-glib" ,geocode-glib)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index cbdf1d9762..a89cd8e7b4 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -602,7 +602,7 @@ (define-public libdmapsharing
("vala" ,vala)))
(inputs
`(("avahi" ,avahi)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("gee" ,libgee)
("gst-plugins-base" ,gst-plugins-base)
("gtk+" ,gtk+)))
@@ -921,7 +921,7 @@ (define-public gnome-photos
(inputs
`(("babl" ,babl)
("cairo" ,cairo)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("gegl" ,gegl)
("geocode-glib" ,geocode-glib)
("gexiv2" ,gexiv2)
@@ -2820,7 +2820,7 @@ (define-public gtg
("gtk+:bin" ,gtk+ "bin")
("pkg-config" ,pkg-config)))
(inputs
- `(("gdk-pixbuf" ,gdk-pixbuf+svg)
+ `(("librsvg" ,librsvg)
("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
("gtk+" ,gtk+)
("pango" ,pango)
@@ -4257,7 +4257,7 @@ (define-public drawing
("gtk+:bin" ,gtk+ "bin")
("pkg-config" ,pkg-config)))
(inputs
- `(("gdk-pixbuf" ,gdk-pixbuf+svg)
+ `(("librsvg" ,librsvg)
("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
("gtk+" ,gtk+)
("pango" ,pango)
@@ -6832,7 +6832,7 @@ (define-public epiphany
(inputs
`(("avahi" ,avahi)
("gcr" ,gcr)
- ("gdk-pixbuf+svg" ,gdk-pixbuf+svg) ; for loading SVG files
+ ("librsvg" ,librsvg) ; for loading SVG files
("glib-networking" ,glib-networking)
("gnome-desktop" ,gnome-desktop)
("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
@@ -8713,7 +8713,7 @@ (define-public gnome-shell
("evolution-data-server" ,evolution-data-server)
("gcr" ,gcr)
("gdm" ,gdm)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("gjs" ,gjs)
("gtk" ,gtk)
("gnome-autoar" ,gnome-autoar)
@@ -8777,7 +8777,7 @@ (define-public gtk-vnc
("vala" ,vala)))
(inputs
`(("cairo" ,cairo)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("glib" ,glib)
("gnutls" ,gnutls)
("libgcrypt" ,libgcrypt)
diff --git a/gnu/packages/graphviz.scm b/gnu/packages/graphviz.scm
index 25ff51194f..16fbfb6842 100644
--- a/gnu/packages/graphviz.scm
+++ b/gnu/packages/graphviz.scm
@@ -357,7 +357,7 @@ (define-public xdot
(,(dirname (search-input-file inputs "bin/dot"))))))))))
(inputs
`(("atk" ,atk)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("graphviz" ,graphviz)
("gtk+" ,gtk+)
("python-pycairo" ,python-pycairo)
diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index 1ac5cd4b8e..2a7679b490 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -311,7 +311,7 @@ (define-public libvisual-plugins
(inputs
`(("alsa-lib" ,alsa-lib)
("esound" ,esound)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("gtk+" ,gtk+-2)
("jack" ,jack-2)
("libx11" ,libx11)
@@ -668,7 +668,7 @@ (define-public gst-plugins-good
("bzip2" ,bzip2)
("cairo" ,cairo)
("flac" ,flac)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("glib" ,glib)
("glib-networking" ,glib-networking)
("glu" ,glu)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 0463e26246..5bfc19e19d 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -714,35 +714,6 @@ (define-public gdk-pixbuf
(home-page "https://wiki.gnome.org/Projects/GdkPixbuf")
(license license:lgpl2.1+)))
-;; To build gdk-pixbuf with SVG support, we need librsvg, and librsvg depends
-;; on gdk-pixbuf, so this new variable. 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)))
- (arguments
- (substitute-keyword-arguments (package-arguments gdk-pixbuf)
- ((#:phases phases)
- `(modify-phases ,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 "Image loading library, with SVG support")))
-
;;; A minimal variant used to prevent a cycle with Inkscape.
(define-public at-spi2-core-minimal
(hidden-package
@@ -903,7 +874,7 @@ (define-public gtk+-2
;; Rust is not supported well on every architecture yet.
("gdk-pixbuf" ,(if (string-prefix? "x86_64" (or (%current-target-system)
(%current-system)))
- gdk-pixbuf+svg
+ librsvg
gdk-pixbuf))
("glib" ,glib)
("pango" ,pango)))
@@ -1005,7 +976,7 @@ (define-public gtk+
;; 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?)
- gdk-pixbuf+svg
+ librsvg
gdk-pixbuf))
("glib" ,glib)
("libcloudproviders" ,libcloudproviders-minimal)
@@ -1267,7 +1238,7 @@ (define-public gtk
;; Following dependencies are referenced in .pc files.
`(("cairo" ,cairo)
("fontconfig" ,fontconfig)
- ("gdk-pixbuf+svg" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("glib" ,glib)
("graphene" ,graphene)
("libepoxy" ,libepoxy)
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 99852fc205..87093b14fa 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -2345,7 +2345,7 @@ (define-public mypaint
("gettext" ,gettext-minimal)))
(inputs
`(("gtk+" ,gtk+)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("hicolor-icon-theme" ,hicolor-icon-theme)
("libmypaint" ,libmypaint)
("mypaint-brushes" ,mypaint-brushes)
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 23a8710b9b..5c72a2f1e1 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -1687,7 +1687,7 @@ (define-public claws-mail
("enchant" ,enchant)
("expat" ,expat)
("fontconfig" ,fontconfig)
- ("gdk-pixbuf+svg" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("ghostscript" ,ghostscript)
("glib" ,glib)
("gnupg" ,gnupg)
diff --git a/gnu/packages/mate.scm b/gnu/packages/mate.scm
index 08fd3562b3..41165e8de7 100644
--- a/gnu/packages/mate.scm
+++ b/gnu/packages/mate.scm
@@ -473,7 +473,7 @@ (define-public libmatekbd
("gobject-introspection" ,gobject-introspection)))
(inputs
`(("cairo" ,cairo)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("glib" ,glib)
("gtk+" ,gtk+)
("libx11" ,libx11)
@@ -983,7 +983,7 @@ (define-public mate-control-center
("polkit" ,polkit)
("startup-notification" ,startup-notification)))
(propagated-inputs
- `(("gdk-pixbuf" ,gdk-pixbuf+svg) ; mate-slab.pc
+ `(("librsvg" ,librsvg) ; mate-slab.pc
("librsvg" ,librsvg))) ; mate-slab.pc
(home-page "https://mate-desktop.org/")
(synopsis "MATE Desktop configuration tool")
@@ -1219,7 +1219,7 @@ (define-public mate-screensaver
("dbus-glib" ,dbus-glib)
("glib" ,glib)
("gtk+" ,gtk+)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("libcanberra" ,libcanberra)
("libglade" ,libglade)
("libmatekbd" ,libmatekbd)
@@ -1271,7 +1271,7 @@ (define-public mate-utils
("cairo" ,cairo)
("glib" ,glib)
("gtk+" ,gtk+)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("libcanberra" ,libcanberra)
("libgtop" ,libgtop)
("libx11" ,libx11)
@@ -1324,7 +1324,7 @@ (define-public eom
("exempi" ,exempi)
("glib" ,glib)
("gtk+" ,gtk+)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("libcanberra" ,libcanberra)
("libx11" ,libx11)
("libxext" ,libxext)
@@ -1384,7 +1384,7 @@ (define-public engrampa
("file" ,file)
("glib" ,glib)
("gtk+" ,gtk+)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("json-glib" ,json-glib)
("libcanberra" ,libcanberra)
("libx11" ,libx11)
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index b5f39cc408..ef7b9085e5 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -1306,7 +1306,7 @@ (define-public dino
;; NOTE: Commented-out lines are to be enabled in v0.3.0.
`(("atk" ,atk)
("cairo" ,cairo)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("glib" ,glib)
("glib-networking" ,glib-networking)
("gpgme" ,gpgme)
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 4a415e9460..c87dd5440a 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -738,7 +738,7 @@ (define-public blueman
(inputs
`(("bluez" ,bluez)
("dbus" ,dbus)
- ("gdkpixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("glib" ,glib)
("gtk+" ,gtk+)
("iproute2" ,iproute)
diff --git a/gnu/packages/tryton.scm b/gnu/packages/tryton.scm
index d5cfb63e1b..c1275edd22 100644
--- a/gnu/packages/tryton.scm
+++ b/gnu/packages/tryton.scm
@@ -113,7 +113,7 @@ (define-public tryton
`(("glib-compile-schemas" ,glib "bin")
("gobject-introspection" ,gobject-introspection)))
(propagated-inputs
- `(("gdk-pixbuf" ,gdk-pixbuf+svg)
+ `(("librsvg" ,librsvg)
("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
("gtk+" ,gtk+)
("python-dateutil" ,python-dateutil)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index ebee15e296..b9b1ca64be 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -4293,7 +4293,7 @@ (define-public pitivi
("gst-libav" ,gst-libav)
("gsound" ,gsound)
("gtk+" ,gtk+)
- ("gdk-pixbuf+svg" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("libpeas" ,libpeas)
("libnotify" ,libnotify)
("pango" ,pango)
diff --git a/gnu/packages/vnc.scm b/gnu/packages/vnc.scm
index 4c2b13c93c..00ae2be63d 100644
--- a/gnu/packages/vnc.scm
+++ b/gnu/packages/vnc.scm
@@ -120,7 +120,7 @@ (define-public remmina
("ffmpeg" ,ffmpeg)
("freerdp" ,freerdp) ; for rdp plugin
("gcrypt" ,libgcrypt)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("glib" ,glib)
("gnome-keyring" ,gnome-keyring)
("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
--
2.33.1
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [bug#51428] [PATCH core-update-frozen 20/20] gnu: librsvg: Preserve the loaders.cache file.
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 01/13] build: glib-or-gtk-build-system: Simplify the wrap-all-programs phase Maxim Cournoyer
` (17 preceding siblings ...)
2021-10-27 4:51 ` [bug#51428] [PATCH core-update-frozen 19/20] gnu: gtk: Replace gdk-pixbuf+svg by librsvg Maxim Cournoyer
@ 2021-10-27 4:51 ` Maxim Cournoyer
18 siblings, 0 replies; 41+ messages in thread
From: Maxim Cournoyer @ 2021-10-27 4:51 UTC (permalink / raw)
To: 51428; +Cc: Maxim Cournoyer
Now that we have a search path that honors it on gdk-pixbuf, it is more
valuable to keep it.
* gnu/packages/gnome.scm (librsvg)[phases]{pre-configure}: Install loaders,
cache file to locations derived from %gdk-pixbuf-loaders-cache-file.
---
gnu/packages/gnome.scm | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index a89cd8e7b4..7556b0cf84 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -3487,17 +3487,20 @@ (define-public librsvg
(substitute* '("Makefile.am" "Makefile.in")
(("--locked") ""))))
(add-before 'configure 'pre-configure
- (lambda _
+ (lambda* (#:key outputs #:allow-other-keys)
(substitute* "gdk-pixbuf-loader/Makefile.in"
;; By default the gdk-pixbuf loader is installed under
;; gdk-pixbuf's prefix. Work around that.
(("gdk_pixbuf_moduledir = .*$")
(string-append "gdk_pixbuf_moduledir = "
- "$(prefix)/lib/gdk-pixbuf-2.0/2.10.0/"
- "loaders\n"))
- ;; Drop the 'loaders.cache' file, it's in gdk-pixbuf+svg.
- (("gdk_pixbuf_cache_file = .*$")
- "gdk_pixbuf_cache_file = $(TMPDIR)/loaders.cache\n"))))
+ "$(prefix)/"
+ ,(dirname %gdk-pixbuf-loaders-cache-file) "/"
+ "loaders\n")))
+ (substitute* "configure"
+ (("gdk_pixbuf_cache_file=.*")
+ (string-append "gdk_pixbuf_cache_file="
+ (assoc-ref outputs "out") "/"
+ ,%gdk-pixbuf-loaders-cache-file "\n")))))
(add-after 'configure 'gnu-configure
(lambda* (#:key outputs #:allow-other-keys #:rest args)
(apply (assoc-ref gnu:%standard-phases 'configure)
--
2.33.1
^ permalink raw reply related [flat|nested] 41+ messages in thread