[PATCH] gnu: Add LAPACK. (was: LAPACK: tests fail; non-free files)

2013-11-04 Thread Nikita Karetnikov
May I push this patch to ‘master’?  Should (format #t "removing '~a'~%"
file) be i18n’d?

From 3e94fe1afc01d08997fd95775aab06c4495ba9d6 Mon Sep 17 00:00:00 2001
From: Nikita Karetnikov 
Date: Mon, 4 Nov 2013 18:58:54 +
Subject: [PATCH] gnu: Add LAPACK.

* gnu/packages/maths.scm (lapack): New variable.
---
 gnu/packages/maths.scm |   49 
 1 file changed, 49 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index ccbb57b..27d83f0 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Andreas Enge 
+;;; Copyright © 2013 Nikita Karetnikov 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -22,13 +23,16 @@
 #:renamer (symbol-prefix-proc 'license:))
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages compression)
   #:use-module ((gnu packages gettext)
 #:renamer (symbol-prefix-proc 'gnu:))
+  #:use-module (gnu packages gcc)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages xml))
 
@@ -153,3 +157,48 @@ interoperate with Gnumeric, LibreOffice and OpenOffice.  Data can be imported
 from spreadsheets, text files and database sources and it can be output in
 text, Postscript, PDF or HTML.")
 (license license:gpl3+)))
+
+(define-public lapack
+  (package
+(name "lapack")
+(version "3.4.2")
+(source
+ (origin
+  (method url-fetch)
+  (uri (string-append "http://www.netlib.org/lapack/lapack-";
+  version ".tgz"))
+  (sha256
+   (base32
+"1w7sfm7fi2kyx1fzgbm22193l8c2d53m8q1ibhvfy6m5v9k0"
+(build-system cmake-build-system)
+(home-page "http://www.netlib.org/lapack/";)
+(inputs `(("fortran" ,gfortran-4.8)
+  ("python" ,python-2)))
+(arguments
+ `(#:modules ((guix build cmake-build-system)
+  (guix build utils)
+  (srfi srfi-1))
+   #:phases (alist-cons-before
+ ;; See .
+ 'configure 'remove-non-free-files
+ (lambda _
+   (for-each (lambda (file)
+   (begin
+ (format #t "removing '~a'~%" file)
+ (delete-file file)))
+ '("lapacke/example/example_DGESV_rowmajor.c"
+   "lapacke/example/example_ZGESV_rowmajor.c"
+   "DOCS/psfig.tex")))
+ (alist-cons-before
+  'check 'patch-python
+  (lambda* (#:key inputs #:allow-other-keys)
+(let ((python (assoc-ref inputs "python")))
+  (substitute* "lapack_testing.py"
+(("/usr/bin/env python") python
+  %standard-phases
+(synopsis "Library for numerical linear algebra")
+(description
+ "LAPACK is a Fortran 90 library for solving the most commonly occurring
+problems in numerical linear algebra.")
+(license (license:bsd-style "file://LICENSE"
+"See LICENSE in the distribution."
-- 
1.7.9.5



pgpIoBnKM05H4.pgp
Description: PGP signature


Re: LAPACK: tests fail; non-free files

2013-10-24 Thread Nikita Karetnikov
> I would suggest to add lapack only after the fortran compiler is in
> master.

Sure.  But I won’t push the compiler without talking to Ludo.

> You might wish to put the variable into maths.scm.

OK.

> Debian removes them:
>
> http://ftp-master.metadata.debian.org/changelogs/main/l/lapack/unstable_copyright
> So does Fedora:
>
> https://lists.fedoraproject.org/pipermail/scm-commits/Week-of-Mon-20130325/987558.html
> I would suggest to do the same; if you feel reporting it, it would be interes-
> ting to see how upstream reacts.

It was already reported [1].  I’ll remove all non-free files.

[1] http://icl.cs.utk.edu/lapack-forum/archives/lapack/msg01383.html


pgpmkgw0sSrg3.pgp
Description: PGP signature


Re: LAPACK: tests fail; non-free files

2013-10-23 Thread Andreas Enge
Hello Nikita,

On Wed, Oct 23, 2013 at 01:08:55PM +0400, Nikita Karetnikov wrote:
> The attached patch requires this one [1].

I would suggest to add lapack only after the fortran compiler is in master.
You might wish to put the variable into maths.scm.

> 2. These files are not free:
>lapacke/example/example_DGESV_rowmajor.c
>lapacke/example/example_ZGESV_rowmajor.c
>Should I report upstream or simply remove them?

Debian removes them:
   
http://ftp-master.metadata.debian.org/changelogs/main/l/lapack/unstable_copyright
So does Fedora:
   
https://lists.fedoraproject.org/pipermail/scm-commits/Week-of-Mon-20130325/987558.html
I would suggest to do the same; if you feel reporting it, it would be interes-
ting to see how upstream reacts.

Andreas




Re: LAPACK: tests fail; non-free files

2013-10-23 Thread Nikita Karetnikov
> (home-page "http://www.gnu.org/software/lapack/";)

Oops, I’ll fix this.


pgpmG10JlJOS3.pgp
Description: PGP signature


LAPACK: tests fail; non-free files

2013-10-23 Thread Nikita Karetnikov
The attached patch requires this one [1].

1. Could anyone explain why the tests fail?

   100% tests passed, 0 tests failed out of 86

   Total Test time (real) = 169.48 sec
   No such file or directory
   Problem running command: ./lapack_testing.py -s -d TESTING
   Problem executing post-test command(s).
   Errors while running CTest
   make: *** [test] Error 8
   phase `check' failed after 169 seconds

   When I sourced environment-variables and ran ‘lapack_testing.py’, it
   didn’t complain.  So it must be something else.  How can I pass the
   verbose flag to CMake?

2. These files are not free:

   lapacke/example/example_DGESV_rowmajor.c
   lapacke/example/example_ZGESV_rowmajor.c

   Should I report upstream or simply remove them?

[1] https://lists.gnu.org/archive/html/guix-devel/2013-10/txtEV9ZKOlmFQ.txt

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Nikita Karetnikov 
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see .

(define-module (gnu packages lapack)
  #:use-module (guix licenses)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix build-system cmake)
  #:use-module (gnu packages gcc)
  #:use-module (gnu packages python))

(define-public lapack
  (package
(name "lapack")
(version "3.4.2")
(source
 (origin
  (method url-fetch)
  (uri (string-append "http://www.netlib.org/lapack/lapack-";
  version ".tgz"))
  (sha256
   (base32
"1w7sfm7fi2kyx1fzgbm22193l8c2d53m8q1ibhvfy6m5v9k0"
(build-system cmake-build-system)
(home-page "http://www.gnu.org/software/lapack/";)
(inputs `(("fortran" ,gcc-fortran-4.8)
  ("python" ,python-2)))
(arguments `(#:modules ((guix build cmake-build-system)
(guix build utils)
(srfi srfi-1))
 #:phases (alist-cons-before
   'check 'patch-python
   (lambda* (#:key inputs #:allow-other-keys)
 (let ((python (assoc-ref inputs "python")))
   (substitute* "lapack_testing.py"
 (("/usr/bin/env python") python
   %standard-phases)))
(synopsis "Library for numerical linear algebra")
(description
 "LAPACK is a Fortran 90 library for solving the most commonly occurring
problems in numerical linear algebra.")
(license (bsd-style "file://LICENSE"
"See LICENSE in the distribution."


pgpY_vo54CXlk.pgp
Description: PGP signature