[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#51428] [PATCH core-update-frozen 01/13] build: glib-or-gtk-build-sy
From: |
Maxim Cournoyer |
Subject: |
[bug#51428] [PATCH core-update-frozen 01/13] build: glib-or-gtk-build-system: Simplify the wrap-all-programs phase. |
Date: |
Wed, 27 Oct 2021 00:51:32 -0400 |
* guix/build/glib-or-gtk-build-system.scm (wrap-all-programs)
<handle-output>: Precisely build the list of variable specifications, rather
than relying on a bunch of conditionals.
---
guix/build/glib-or-gtk-build-system.scm | 59 ++++++-------------------
1 file changed, 13 insertions(+), 46 deletions(-)
diff --git a/guix/build/glib-or-gtk-build-system.scm
b/guix/build/glib-or-gtk-build-system.scm
index 9f4cc09eeb..655f20cd12 100644
--- a/guix/build/glib-or-gtk-build-system.scm
+++ b/guix/build/glib-or-gtk-build-system.scm
@@ -169,52 +169,19 @@ (define handle-output
(alist-cons output directory inputs)))
(gio-mod-dirs (gio-module-directories
(alist-cons output directory inputs)))
- (data-env-var
- (if (not (null? datadirs))
- `("XDG_DATA_DIRS" ":" prefix ,datadirs)
- #f))
- (gtk-mod-env-var
- (if (not (null? gtk-mod-dirs))
- `("GTK_PATH" ":" prefix ,gtk-mod-dirs)
- #f))
- (gio-mod-env-var
- (if (not (null? gio-mod-dirs))
- `("GIO_EXTRA_MODULES" ":" prefix ,gio-mod-dirs)
- #f)))
- (cond
- ((and data-env-var gtk-mod-env-var gio-mod-env-var)
- (for-each (cut wrap-program <> #:sh (sh)
- data-env-var
- gtk-mod-env-var
- gio-mod-env-var)
- bin-list))
- ((and data-env-var gtk-mod-env-var (not gio-mod-env-var))
- (for-each (cut wrap-program <> #:sh (sh)
- data-env-var
- gtk-mod-env-var)
- bin-list))
- ((and data-env-var (not gtk-mod-env-var) gio-mod-env-var)
- (for-each (cut wrap-program <> #:sh (sh)
- data-env-var
- gio-mod-env-var)
- bin-list))
- ((and (not data-env-var) gtk-mod-env-var gio-mod-env-var)
- (for-each (cut wrap-program <> #:sh (sh)
- gio-mod-env-var
- gtk-mod-env-var)
- bin-list))
- ((and data-env-var (not gtk-mod-env-var) (not gio-mod-env-var))
- (for-each (cut wrap-program <> #:sh (sh)
- data-env-var)
- bin-list))
- ((and (not data-env-var) gtk-mod-env-var (not gio-mod-env-var))
- (for-each (cut wrap-program <> #:sh (sh)
- gtk-mod-env-var)
- bin-list))
- ((and (not data-env-var) (not gtk-mod-env-var) gio-mod-env-var)
- (for-each (cut wrap-program <> #:sh (sh)
- gio-mod-env-var)
- bin-list))))))))
+ (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
- [bug#51428] core-updates-frozen-batched-changes built and ready to merge, Maxim Cournoyer, 2021/10/27
- [bug#51428] [PATCH core-update-frozen 01/13] build: glib-or-gtk-build-system: Simplify the wrap-all-programs phase.,
Maxim Cournoyer <=
- [bug#51428] [PATCH core-update-frozen 02/13] build: glib-or-gtk-build-system: Fix indentation., Maxim Cournoyer, 2021/10/27
- [bug#51428] [PATCH core-update-frozen 03/13] gnu: at-spi2-core: Reverse inheritance relationship with minimal variant., Maxim Cournoyer, 2021/10/27
- [bug#51428] [PATCH core-update-frozen 09/13] gnu: colord-minimal: Introduce minimal variant., Maxim Cournoyer, 2021/10/27
- [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
- [bug#51428] [PATCH core-update-frozen 08/13] gnu: Add docbook-xsl-ns., Maxim Cournoyer, 2021/10/27
- [bug#51428] [PATCH core-update-frozen 07/13] gnu: json-glib-minimal: Introduce minimal variant., Maxim Cournoyer, 2021/10/27
- [bug#51428] [PATCH core-update-frozen 11/13] gnu: gusb-minimal: Introduce minimal variant., Maxim Cournoyer, 2021/10/27
- [bug#51428] [PATCH core-update-frozen 12/13] gnu: rest: Use libsoup-minimal., Maxim Cournoyer, 2021/10/27
- [bug#51428] [PATCH core-update-frozen 10/13] gnu: libcloudproviders-minimal: Introduce minimal variant., Maxim Cournoyer, 2021/10/27
- [bug#51428] [PATCH core-update-frozen 13/13] gnu: inkscape: Remove the legacy 0.92 version., Maxim Cournoyer, 2021/10/27