gnu: mit-scheme: Convert to the 'modify-phases' syntax.

* gnu/packages/scheme.scm (mit-scheme): Do it.
This commit is contained in:
Federico Beffa 2015-12-27 19:06:37 +01:00
parent e5045f303a
commit af00e63352
1 changed files with 26 additions and 31 deletions

View File

@ -59,38 +59,33 @@
(arguments (arguments
`(#:tests? #f ; no "check" target `(#:tests? #f ; no "check" target
#:phases #:phases
(alist-replace (modify-phases %standard-phases
'unpack (replace 'unpack
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(and (zero? (system* "tar" "xzvf" (and (zero? (system* "tar" "xzvf"
(assoc-ref inputs "source"))) (assoc-ref inputs "source")))
(chdir ,(mit-scheme-source-directory (%current-system) (chdir ,(mit-scheme-source-directory (%current-system)
version)) version))
(begin (begin
;; Delete these dangling symlinks since they break ;; Delete these dangling symlinks since they break
;; `patch-shebangs'. ;; `patch-shebangs'.
(for-each delete-file (for-each delete-file
(append '("src/lib/shim-config.scm") (append '("src/lib/shim-config.scm")
(find-files "src/lib/lib" "\\.so$") (find-files "src/lib/lib" "\\.so$")
(find-files "src/lib" "^liarc-") (find-files "src/lib" "^liarc-")
(find-files "src/compiler" "^make\\."))) (find-files "src/compiler" "^make\\.")))
(chdir "src") (chdir "src")
#t))) #t))))
(alist-replace (replace 'build
'build (lambda* (#:key system outputs #:allow-other-keys)
(lambda* (#:key system outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out")))
(let ((out (assoc-ref outputs "out"))) (if (or (string-prefix? "x86_64" system)
(if (or (string-prefix? "x86_64" system) (string-prefix? "i686" system))
(string-prefix? "i686" system)) (zero? (system* "make" "compile-microcode"))
(zero? (system* "make" "compile-microcode")) (zero? (system* "./etc/make-liarc.sh"
(zero? (system* "./etc/make-liarc.sh" (string-append "--prefix=" out))))))))))
(string-append "--prefix=" out))))))
%standard-phases))))
(inputs (inputs
`(;; TODO: Build doc when TeX Live is available. `(("texinfo" ,texinfo)
;; ("automake" ,automake)
;; ("texlive-core" ,texlive-core)
("texinfo" ,texinfo)
("m4" ,m4) ("m4" ,m4)
("libx11" ,libx11) ("libx11" ,libx11)