gnu: r-spams: Update to 2.6-2017-03-22.

* gnu/packages/statistics.scm (r-spams): Update to 2.6-2017-03-22.
[arguments]: Remove R-3.3 work-around and syntax fixes, add phase to
prevent tuning r-spams to the compiling hardware.
This commit is contained in:
Efraim Flashner 2017-06-29 10:02:32 +03:00
parent 691ae7fa7a
commit fcf4003950
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -2,7 +2,7 @@
;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015 Vicente Vera Parra <vicentemvp@gmail.com> ;;; Copyright © 2015 Vicente Vera Parra <vicentemvp@gmail.com>
;;; Copyright © 2016 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Pjotr Prins <pjotr.guix@thebird.nl> ;;; Copyright © 2016 Pjotr Prins <pjotr.guix@thebird.nl>
;;; Copyright © 2016 Roel Janssen <roel@gnu.org> ;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com> ;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
@ -3768,37 +3768,26 @@ (define-public r-googlesheets
(define-public r-spams (define-public r-spams
(package (package
(name "r-spams") (name "r-spams")
(version "2.5-svn2014-07-04") (version "2.6-2017-03-22")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "https://gforge.inria.fr/frs/download.php/33815/" (uri (string-append "https://gforge.inria.fr/frs/download.php/36615/"
"spams-R-v" version ".tar.gz")) "spams-R-v" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"1k459jg9a334slkw31w63l4d39xszjzsng7dv5j1mp78zifz7hvx")))) "13z2293jixf1r9g8dyy856xrhvpjr2ln2n9smn6644126r9hmhkx"))))
(build-system r-build-system) (build-system r-build-system)
(arguments (arguments
`(#:phases `(#:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-after 'unpack 'chdir (add-after 'unpack 'chdir
(lambda _ (chdir "spams") #t)) (lambda _ (chdir "spams") #t))
;; Since R 3.3.0 including R headers inside of an extern "C" block ;; Don't tune for the building machine
;; causes C headers to be included, which results in a lot of (add-after 'chdir 'no-mtune
;; duplicate definitions. This can be avoided by defining
;; NO_C_HEADERS before including the R headers.
(add-after 'chdir 'patch-use-of-R-headers
(lambda _ (lambda _
(substitute* "src/spams.cpp" (substitute* "src/Makevars"
(("#include <R.h>" line) (("-mtune=native") ""))
(string-append "#define NO_C_HEADERS\n" line)))
#t))
;; This looks like a syntax error.
(add-after 'chdir 'patch-isnan
(lambda _
(substitute* '"src/spams/linalg/linalg.h"
(("if isnan\\(lambda\\) \\{")
"if (isnan(lambda)) {"))
#t))))) #t)))))
(propagated-inputs (propagated-inputs
`(("r-lattice" ,r-lattice) `(("r-lattice" ,r-lattice)