From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roel Janssen Subject: Re: [PATCH] gnu: Add nlopt. Date: Tue, 03 May 2016 14:34:55 +0200 Message-ID: <87bn4n5ngw.fsf@gnu.org> References: <87vb3twtgi.fsf@gnu.org> <87egah85e4.fsf@gnu.org> <87a8l5xc9w.fsf@gnu.org> <87wpo6n8y5.fsf@gnu.org> <87futz5rqv.fsf@gnu.org> <87h9efcqid.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axZYD-0008RA-44 for guix-devel@gnu.org; Tue, 03 May 2016 08:35:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1axZY0-0001u0-QT for guix-devel@gnu.org; Tue, 03 May 2016 08:35:35 -0400 In-reply-to: <87h9efcqid.fsf@gnu.org> 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" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org Ludovic Courtès writes: > Roel Janssen skribis: > >> Ludovic Courtès writes: > > [...] > >>> Still, according to luksan/COPYRIGHT, “[s]ubroutines PBUN, PNEW, PVAR, >>> PSEN” are “for your personal use […] [n]ot for redistribution”. >>> >>> So my understanding is that we need to remove those four subroutines. >>> The rest in that directory is LGPLv2.1+. >>> >>> WDYT? >> >> I agree to your understanding. >> >> A little later in the same file I found: "This library (with exception >> of PBUN, PNEW, PVAR, PSEN) is a free software". >> >>> I don’t see it at >>> . >>> Debian has a package: . >>> Could you check if they apply any patches? >> >> I haven't found any patches. So I dug a little deeper and attempted to >> remove them myself with a patch, but I haven't been able to find these >> subroutines. >> >> I ran the following commands on the root of the source directory: >> grep -i -r "pbun" . >> grep -i -r "pmin" . >> grep -i -r "psen" . >> grep -i -r "pvar" . >> >> And I haven't found the routines. So I think we're safe. That could >> also be why Debian doesn't have a patch for this either. > > Indeed. Actually, luksan/README states: > > [We also did not convert the PMIN, PBUN, PNEW, or PVAR subroutines > since these were published in ACM Trans. on Math. Software (TOMS) and > are subject to the non-free ACM licensing conditions.] > > So indeed, the COPYRIGHT file is confusing, but we’re safe. > > Sorry for the false alarm. > >>> Besides, I suggest reusing the bits about Guile bindings from the patch >>> I sent. >> >> Shall I prepare a new patch? > > Yes please. I added your magic for Guile. Here is the patch: >From 6221baadea331cff7e8ab6b9ea1b3bb7737b227f Mon Sep 17 00:00:00 2001 From: Roel Janssen Date: Tue, 3 May 2016 14:30:25 +0200 Subject: [PATCH] gnu: Add nlopt. * gnu/packages/maths.scm (nlopt): New variable. --- gnu/packages/maths.scm | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index d37897d..0ad6f4b 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -59,6 +59,7 @@ #:use-module (gnu packages less) #:use-module (gnu packages lisp) #:use-module (gnu packages gnome) + #:use-module (gnu packages guile) #:use-module (gnu packages xorg) #:use-module (gnu packages gl) #:use-module (gnu packages m4) @@ -430,6 +431,41 @@ extremely large and complex data collections.") (license (license:x11-style "http://www.hdfgroup.org/ftp/HDF5/current/src/unpacked/COPYING")))) +(define-public nlopt + (package + (name "nlopt") + (version "2.4.2") + (source (origin + (method url-fetch) + (uri (string-append "http://ab-initio.mit.edu/nlopt/nlopt-" + version ".tar.gz")) + (sha256 + (base32 "12cfkkhcdf4zmb6h7y6qvvdvqjs2xf9sjpa3rl3bq76px4yn76c0")))) + (build-system gnu-build-system) + (arguments + `(#:configure-flags '("--enable-shared") ; Also create a shared library. + #:phases + (modify-phases %standard-phases + (add-before 'configure 'fix-guile-path + (lambda* (#:key outputs #:allow-other-keys) + ;; Make sure the Scheme module refers to the library by its + ;; absolute file name (we cannot do that from a snippet + ;; because the expansion of @libdir@ contains + ;; ${exec_prefix}.) + (let ((out (assoc-ref outputs "out"))) + (substitute* "swig/nlopt.scm.in" + (("libnlopt") + (string-append out "/lib/libnlopt"))) + #t)))))) + (inputs + `(("guile" ,guile-2.0))) + (home-page "http://ab-initio.mit.edu/wiki/") + (synopsis "Library for nonlinear optimization") + (description "NLopt is a library for nonlinear optimization, providing a +common interface for a number of different free optimization routines available +online as well as original implementations of various other algorithms.") + (license license:lgpl2.1+))) + ;; For a fully featured Octave, users are strongly recommended also to install ;; the following packages: texinfo, less, ghostscript, gnuplot. -- 2.7.4