Ludovic Courtès writes: > Roel Janssen <r...@gnu.org> 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 >>> <https://libreplanet.org/wiki/List_of_software_that_does_not_respect_the_Free_System_Distribution_Guidelines>. >>> Debian has a package: <https://packages.debian.org/source/sid/nlopt>. >>> 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 <r...@gnu.org> 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