build-system/glib-or-gtk: Clean up whitespace.

* guix/build/glib-or-gtk-build-system.scm: M-x whitespace-cleanup.
This commit is contained in:
Ludovic Courtès 2014-12-01 22:12:23 +01:00
parent e823c14918
commit 85dbd3dcd0
1 changed files with 11 additions and 11 deletions

View File

@ -36,14 +36,14 @@
(define (directory-included? directory directories-list) (define (directory-included? directory directories-list)
"Is DIRECTORY included in DIRECTORIES-LIST?" "Is DIRECTORY included in DIRECTORIES-LIST?"
(fold (lambda (s p) (or (string-ci=? s directory) p)) (fold (lambda (s p) (or (string-ci=? s directory) p))
#f directories-list)) #f directories-list))
(define (gtk-module-directories inputs) (define (gtk-module-directories inputs)
"Check for the existence of \"libdir/gtk-v.0\" in INPUTS. Return a list "Check for the existence of \"libdir/gtk-v.0\" in INPUTS. Return a list
with all found directories." with all found directories."
(let* ((version (let* ((version
(if (string-match "gtk\\+-3" (if (string-match "gtk\\+-3"
(or (assoc-ref inputs "gtk+") (or (assoc-ref inputs "gtk+")
(assoc-ref inputs "source") (assoc-ref inputs "source")
"gtk+-3")) ; we default to version 3 "gtk+-3")) ; we default to version 3
@ -54,7 +54,7 @@ with all found directories."
(let* ((in (match input (let* ((in (match input
((_ . dir) dir) ((_ . dir) dir)
(_ ""))) (_ "")))
(libdir (libdir
(string-append in "/lib/gtk-" version))) (string-append in "/lib/gtk-" version)))
(if (and (directory-exists? libdir) (if (and (directory-exists? libdir)
(not (directory-included? libdir prev))) (not (directory-included? libdir prev)))
@ -85,18 +85,18 @@ if found."
(bindir (string-append out "/bin")) (bindir (string-append out "/bin"))
(bin-list (find-files bindir ".*")) (bin-list (find-files bindir ".*"))
(schemas (schemas-directories (acons "out" out inputs))) (schemas (schemas-directories (acons "out" out inputs)))
(schemas-env-var (schemas-env-var
(if (not (null? schemas)) (if (not (null? schemas))
`("XDG_DATA_DIRS" ":" prefix ,schemas) `("XDG_DATA_DIRS" ":" prefix ,schemas)
#f)) #f))
(gtk-mod-dirs (gtk-module-directories (acons "out" out inputs))) (gtk-mod-dirs (gtk-module-directories (acons "out" out inputs)))
(gtk-mod-env-var (gtk-mod-env-var
(if (not (null? gtk-mod-dirs)) (if (not (null? gtk-mod-dirs))
`("GTK_PATH" ":" prefix ,gtk-mod-dirs) `("GTK_PATH" ":" prefix ,gtk-mod-dirs)
#f))) #f)))
(cond (cond
((and schemas-env-var gtk-mod-env-var) ((and schemas-env-var gtk-mod-env-var)
(map (lambda (prog) (map (lambda (prog)
(wrap-program prog schemas-env-var gtk-mod-env-var)) (wrap-program prog schemas-env-var gtk-mod-env-var))
bin-list)) bin-list))
(schemas-env-var (schemas-env-var
@ -110,16 +110,16 @@ if needed."
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))
(schemasdir (string-append out "/share/glib-2.0/schemas"))) (schemasdir (string-append out "/share/glib-2.0/schemas")))
(if (and (directory-exists? schemasdir) (if (and (directory-exists? schemasdir)
(not (file-exists? (not (file-exists?
(string-append schemasdir "/gschemas.compiled")))) (string-append schemasdir "/gschemas.compiled"))))
(system* "glib-compile-schemas" schemasdir) (system* "glib-compile-schemas" schemasdir)
#t))) #t)))
(define %standard-phases (define %standard-phases
(alist-cons-after (alist-cons-after
'install 'glib-or-gtk-wrap wrap-all-programs 'install 'glib-or-gtk-wrap wrap-all-programs
(alist-cons-after (alist-cons-after
'install 'glib-or-gtk-compile-schemas compile-glib-schemas 'install 'glib-or-gtk-compile-schemas compile-glib-schemas
gnu:%standard-phases))) gnu:%standard-phases)))
(define* (glib-or-gtk-build #:key inputs (phases %standard-phases) (define* (glib-or-gtk-build #:key inputs (phases %standard-phases)