From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathieu Lirzin Subject: Re: [PATCH] gnu: Add Mlucas. Date: Mon, 05 Oct 2015 12:46:47 +0200 Message-ID: <878u7hmw2w.fsf@openmailbox.org> References: <20151005130123.2091f6e4@debian> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40907) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zj3II-00040M-WB for guix-devel@gnu.org; Mon, 05 Oct 2015 06:46:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zj3IF-0000fl-Ly for guix-devel@gnu.org; Mon, 05 Oct 2015 06:46:58 -0400 Received: from smtp29.openmailbox.org ([62.4.1.63]:41967) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zj3IF-0000eb-DT for guix-devel@gnu.org; Mon, 05 Oct 2015 06:46:55 -0400 In-Reply-To: <20151005130123.2091f6e4@debian> (Alex Vong's message of "Mon, 5 Oct 2015 13:01:23 +0800") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Alex Vong Cc: guix-devel@gnu.org Alex Vong writes: > From e5155b52f636bfee849268b19b81f5b6608540fd Mon Sep 17 00:00:00 2001 > From: Alex Vong > Date: Mon, 5 Oct 2015 12:49:49 +0800 > Subject: [PATCH] gnu: Add Mlucas. > > * gnu/packages/mlucas.scm: New file. > * gnu-system.am (GNU_SYSTEM_MODULES): Register it. > --- This is quite an unusual patch. :) > gnu-system.am | 1 + > gnu/packages/mlucas.scm | 283 ++++++++++++++++++++++++++++++++++++++++++= ++++++ > 2 files changed, 284 insertions(+) > create mode 100644 gnu/packages/mlucas.scm > [...] > +(define-module (gnu packages mlucas) > + #:use-module (srfi srfi-1) > + #:use-module (guix packages) > + #:use-module (guix download) > + #:use-module (guix build-system gnu) > + #:use-module (guix licenses) > + #:use-module (gnu packages autogen) > + #:use-module (gnu packages autotools) > + #:use-module (gnu packages perl)) > + > + > +;;; Procedures to manupulate build flags, similar to dpkg-buildflags. > +;;; > +;;; The data strcture flag-list is constrcuted by (flag-list ...) ^^ =E2=80=9Cconstructed=E2=80=9D > +;;; The constructor flag-list does something to the argument, > +;;; such as trimming whitespaces, to ensure no two arguments mean the sa= me. > +;;; > +;;; The data structure flag-sublist is in fact an ordinary list > +;;; with the following structure ( ...) > +;;; > +;;; Here is an example: > +;;; (flag-list > +;;; '(CFLAGS "-O2" "-g") > +;;; '(LDFLAGS "-lm" "-lpthread")) > +;;; > +;;; flag-list+ and flag-list- are analogous to > +;;; numberic + and - but operate on flag-list. > +;;; > +;;; flag-list->string-list converts flag-list into > +;;; configure-flags-compatible string-list. > +;;; IIUC these procedures are not meant to be specific the definition of package mlucas. So this should be in some other commit and maybe located in other file in =E2=80=9Cguix/guix/build/...=E2=80=9D directory. Can you explain the problem you faced with the current Guix methods to achi= eve that, and what are the benefits of =E2=80=98flag-list=E2=80=99 comparing to= them? Example: --8<---------------cut here---------------start------------->8--- (arguments '(#:configure-flags ... #:make-flags ... --8<---------------cut here---------------end--------------->8--- [...] > +;;; implement the bootstrap-build-system using syntax-case macro > +;;; bootstrap-build-system use a bootstrap script > +;;; to run autoreconf and generate documentation. > +(define-syntax package* > + (lambda(x) > + ;; add autoconf, automake and perl as build dependencies > + ;; Modify the gnu-build-system > + ;; by adding bootstrap phase before configure phase. > + (define (extend-fields s-exp) I'm not competent enough to judge if it's a useful build-system to add but this should be done in another commit and in =E2=80=9Cguix/guix/build/bootstap-build-system.scm=E2=80=9D if yes. > + > +(define-public mlucas > + ;; descriptions of the package > + (let ((short-description > + "Program to perform Lucas-Lehmer test on a Mersenne number") > + (long-description > + "mlucas is an open-source (and free/libre) program ^^^ Being a GNU project, we use the term =E2=80=9Cfree software=E2=80=9D, but i= n the context of a description it is not relevant to describe freedom of a package since every package in Guix is free software. I think there will be more details to cover for an extensive review, but le= t's discuss the big lines first. Thanks for your contribution! -- Mathieu Lirzin