[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] gnu: Add GNU Prolog.
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH] gnu: Add GNU Prolog. |
Date: |
Thu, 31 Jan 2013 10:13:23 +0100 |
User-agent: |
Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux) |
Hi,
Nikita Karetnikov <address@hidden> skribis:
> + (arguments `(#:phases (alist-cons-before
> + 'configure 'fix-sh
> + (lambda _
> + (substitute* "./src/configure"
> + (("-/bin/sh")
> + (string-append "-" (which "sh"))))
> + (substitute* "./src/configure"
> + (("= /bin/sh")
> + (string-append "= " (which "sh")))))
‘substitute*’ can have several clauses, so you can write:
(substitute* "src/configure"
(("-/bin/sh") (string-append "-" (which "sh")))
(("= /bin/sh") (string-append "= " (which "sh"))))
> + (alist-replace
> + 'configure
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let ((out (assoc-ref outputs "out")))
> + (zero? (system
> + (string-append "cd src && ./configure "
> + "--prefix=" out)))))
> + (alist-replace
> + 'build
> + (lambda _
> + (zero? (system "cd src && make")))
> + (alist-replace
> + 'check
> + (lambda _
> + (zero? (system "cd src && make check")))
> + (alist-replace
> + 'install
> + (lambda _
> + (zero? (system "cd src && make install")))
> + %standard-phases)))))))
Instead of repeating “cd src”, you can just add a phase before the
‘configure’ phase that does:
(chdir "src")
> + (license '(gpl2+ lgpl3+))))
This should be (list gpl2+ lgpl3+), to refer to the ‘license’ objects.
HTH,
Ludo’.