gnu: cups: Use 'modify-phases'.

* gnu/packages/cups.scm (cups)[arguments]: Use 'modify-phases'.
This commit is contained in:
Efraim Flashner 2016-08-15 11:22:59 +03:00
parent 8337cb210d
commit 3064d1763b
No known key found for this signature in database
GPG Key ID: F4C1D3917EACEE93
1 changed files with 98 additions and 104 deletions

View File

@ -178,16 +178,13 @@ device-specific programs to convert and print many types of files.")
'("--disable-launchd" '("--disable-launchd"
"--disable-systemd") "--disable-systemd")
#:phases #:phases
(alist-cons-before (modify-phases %standard-phases
'configure (add-before 'configure 'patch-makedefs
'patch-makedefs
(lambda _ (lambda _
(substitute* "Makedefs.in" (substitute* "Makedefs.in"
(("INITDIR.*=.*@INITDIR@") "INITDIR = @prefix@/@INITDIR@") (("INITDIR.*=.*@INITDIR@") "INITDIR = @prefix@/@INITDIR@")
(("/bin/sh") (which "sh")))) (("/bin/sh") (which "sh")))))
(alist-cons-before (add-before 'check 'patch-tests
'check
'patch-tests
(lambda _ (lambda _
(let ((filters (assoc-ref %build-inputs "cups-filters")) (let ((filters (assoc-ref %build-inputs "cups-filters"))
(catpath (string-append (catpath (string-append
@ -244,10 +241,8 @@ device-specific programs to convert and print many types of files.")
(("cupsFileFind\\(\"cat\", \"/bin\"") (("cupsFileFind\\(\"cat\", \"/bin\"")
(string-append "cupsFileFind(\"cat\", \"" catpath "\"")) (string-append "cupsFileFind(\"cat\", \"" catpath "\""))
(("cupsFileFind\\(\"cat\", \"/bin:/usr/bin\"") (("cupsFileFind\\(\"cat\", \"/bin:/usr/bin\"")
(string-append "cupsFileFind(\"cat\", \"" catpath "\""))))) (string-append "cupsFileFind(\"cat\", \"" catpath "\""))))))
(alist-cons-after (add-after 'install 'install-cups-filters-symlinks
'install
'install-cups-filters-symlinks
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")) (let ((out (assoc-ref outputs "out"))
(cups-filters (assoc-ref inputs "cups-filters"))) (cups-filters (assoc-ref inputs "cups-filters")))
@ -292,8 +287,7 @@ device-specific programs to convert and print many types of files.")
(let ((data "/share/cups/data")) (let ((data "/share/cups/data"))
(delete-file-recursively (string-append out data)) (delete-file-recursively (string-append out data))
(symlink (string-append cups-filters data) (symlink (string-append cups-filters data)
(string-append out data))))) (string-append out data)))))))))
%standard-phases)))))
(inputs (inputs
`(("avahi" ,avahi) `(("avahi" ,avahi)
("gnutls" ,gnutls) ("gnutls" ,gnutls)