gnu: bigloo: Use 'modify-phases' syntax.

* gnu/packages/scheme.scm (bigloo)[arguments]: Use 'modify-phases' syntax.
This commit is contained in:
Efraim Flashner 2016-10-23 11:36:27 +03:00
parent 04014de6f5
commit fb685df8f8
No known key found for this signature in database
GPG Key ID: F4C1D3917EACEE93
1 changed files with 46 additions and 47 deletions

View File

@ -205,58 +205,57 @@ features an integrated Emacs-like editor and a large runtime library.")
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:test-target "test" `(#:test-target "test"
#:phases (alist-replace #:phases
'configure (modify-phases %standard-phases
(lambda* (#:key outputs #:allow-other-keys) (replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "configure" (substitute* "configure"
(("^shell=.*$") (("^shell=.*$")
(string-append "shell=" (which "bash") "\n"))) (string-append "shell=" (which "bash") "\n")))
;; Since libgc's pthread redirects are used, we end up ;; Since libgc's pthread redirects are used, we end up
;; using libgc symbols, so we must link against it. ;; using libgc symbols, so we must link against it.
;; Reported on 2013-06-25. ;; Reported on 2013-06-25.
(substitute* "api/pthread/src/Makefile" (substitute* "api/pthread/src/Makefile"
(("^EXTRALIBS[[:blank:]]*=(.*)$" _ value) (("^EXTRALIBS[[:blank:]]*=(.*)$" _ value)
(string-append "EXTRALIBS = " (string-append "EXTRALIBS = "
(string-trim-right value) (string-trim-right value)
" -l$(GCLIB)_fth-$(RELEASE)" " -l$(GCLIB)_fth-$(RELEASE)"
" -Wl,-rpath=" (assoc-ref outputs "out") " -Wl,-rpath=" (assoc-ref outputs "out")
"/lib/bigloo/" ,version))) "/lib/bigloo/" ,version)))
;; Those variables are used by libgc's `configure'. ;; Those variables are used by libgc's `configure'.
(setenv "SHELL" (which "sh")) (setenv "SHELL" (which "sh"))
(setenv "CONFIG_SHELL" (which "sh")) (setenv "CONFIG_SHELL" (which "sh"))
;; ... but they turned out to be overridden later, so work ;; ... but they turned out to be overridden later, so work
;; around that. ;; around that.
(substitute* (find-files "gc" "^configure-gc") (substitute* (find-files "gc" "^configure-gc")
(("sh=/bin/sh") (("sh=/bin/sh")
(string-append "sh=" (which "sh")))) (string-append "sh=" (which "sh"))))
;; The `configure' script doesn't understand options ;; The `configure' script doesn't understand options
;; of those of Autoconf. ;; of those of Autoconf.
(let ((out (assoc-ref outputs "out"))) (let ((out (assoc-ref outputs "out")))
(zero? (zero?
(system* "./configure" (system* "./configure"
(string-append "--prefix=" out) (string-append "--prefix=" out)
;; FIXME: Currently fails, see ;; FIXME: Currently fails, see
;; <http://article.gmane.org/gmane.lisp.scheme.bigloo/6126>. ;; <http://article.gmane.org/gmane.lisp.scheme.bigloo/6126>.
;; "--customgc=no" ; use our libgc ;; "--customgc=no" ; use our libgc
(string-append"--mv=" (which "mv")) (string-append"--mv=" (which "mv"))
(string-append "--rm=" (which "rm")) (string-append "--rm=" (which "rm"))
(string-append "--ldflags=-Wl,-rpath=" (string-append "--ldflags=-Wl,-rpath="
(assoc-ref outputs "out") (assoc-ref outputs "out")
"/lib/bigloo/" ,version))))) "/lib/bigloo/" ,version))))))
(alist-cons-after (add-after 'install 'install-emacs-modes
'install 'install-emacs-modes (lambda* (#:key outputs #:allow-other-keys)
(lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out"))
(let* ((out (assoc-ref outputs "out")) (dir (string-append out "/share/emacs/site-lisp")))
(dir (string-append out "/share/emacs/site-lisp"))) (zero? (system* "make" "-C" "bmacs" "all" "install"
(zero? (system* "make" "-C" "bmacs" "all" "install" (string-append "EMACSBRAND=emacs24")
(string-append "EMACSBRAND=emacs24") (string-append "EMACSDIR=" dir)))))))))
(string-append "EMACSDIR=" dir)))))
%standard-phases))))
(inputs (inputs
`(("emacs" ,emacs) ;UDE needs the X version of Emacs `(("emacs" ,emacs) ;UDE needs the X version of Emacs