From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: Re: [PATCH] gnu: Add GNU Prolog. (was: GNU Prolog: configure: error: cannot run /bin/sh ./config.sub) Date: Thu, 31 Jan 2013 10:22:42 +0100 Message-ID: <201301311022.42480.andreas@enge.fr> References: <87d2wm9y0u.fsf@karetnikov.org> <201301302216.27704.andreas@enge.fr> <87r4l20yad.fsf_-_@karetnikov.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="Boundary-01=_ifjCRYfV0Y0RzT7" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:44533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0qM9-0007X3-ST for bug-guix@gnu.org; Thu, 31 Jan 2013 04:22:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U0qM5-0002Zj-MX for bug-guix@gnu.org; Thu, 31 Jan 2013 04:22:53 -0500 Received: from moutng.kundenserver.de ([212.227.126.187]:56786) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0qM5-0002Wu-C9 for bug-guix@gnu.org; Thu, 31 Jan 2013 04:22:49 -0500 In-Reply-To: <87r4l20yad.fsf_-_@karetnikov.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Nikita Karetnikov Cc: bug-guix@gnu.org --Boundary-01=_ifjCRYfV0Y0RzT7 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Am Donnerstag, 31. Januar 2013 schrieb Nikita Karetnikov: > This patch works, but I'd like to simplify it a bit. Is it possible? There is no need to repeat the phases that do not change in your patch. If you have a look at icu4c.scm, there is an example using "alist-replace" for the configure phase that changes; moreover, it just patches a file first and then calls the normal configure of %standard-phases: (alist-replace 'configure (lambda* (#:key #:allow-other-keys #:rest args) (let ((configure (assoc-ref %standard-phases 'configure))) (substitute* "configure" (("`/bin/sh") (string-append "`" (which "bash")))) (apply configure args))) %standard-phases)) Andreas --Boundary-01=_ifjCRYfV0Y0RzT7 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 7bit

Am Donnerstag, 31. Januar 2013 schrieb Nikita Karetnikov:

> This patch works, but I'd like to simplify it a bit. Is it possible?

 

There is no need to repeat the phases that do not change in your patch. If you have a look at icu4c.scm, there is an example using "alist-replace" for the configure phase that changes; moreover, it just patches a file first and then calls the normal configure of %standard-phases:

 

(alist-replace

'configure

(lambda* (#:key #:allow-other-keys #:rest args)

(let ((configure (assoc-ref %standard-phases 'configure)))

(substitute* "configure"

(("`/bin/sh")

(string-append "`" (which "bash"))))

(apply configure args)))

%standard-phases))

 

Andreas

 

--Boundary-01=_ifjCRYfV0Y0RzT7--