Archived
1
0
Fork 0

gnu: r-spams: Update to 2.6.1.

* gnu/packages/statistics.scm (r-spams): Update to 2.6.1.
[source]: Migrate from gforge.inria.fr to gitlab.inria.fr, fetching from git.
[phases]: Use gexps.
{patch-paths, mkdist}: New phases.
{no-mtune}: Delete trailing #t.
[native-inputs]: New field.
[home-page]: Update URL.
This commit is contained in:
Maxim Cournoyer 2022-10-03 09:33:56 -04:00
parent 1390e38264
commit 67e9513e40
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -12,7 +12,7 @@
;;; Copyright © 2017 Alex Kost <alezost@gmail.com> ;;; Copyright © 2017 Alex Kost <alezost@gmail.com>
;;; Copyright © 2018 Alex Branham <alex.branham@gmail.com> ;;; Copyright © 2018 Alex Branham <alex.branham@gmail.com>
;;; Copyright © 2020 Tim Howes <timhowes@lavabit.com> ;;; Copyright © 2020 Tim Howes <timhowes@lavabit.com>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Bonface Munyoki Kilyungi <me@bonfacemunyoki.com> ;;; Copyright © 2021 Bonface Munyoki Kilyungi <me@bonfacemunyoki.com>
;;; Copyright © 2021 Lars-Dominik Braun <lars@6xq.net> ;;; Copyright © 2021 Lars-Dominik Braun <lars@6xq.net>
;;; Copyright © 2021 Frank Pursel <frank.pursel@gmail.com> ;;; Copyright © 2021 Frank Pursel <frank.pursel@gmail.com>
@ -73,6 +73,7 @@
#:use-module (gnu packages maths) #:use-module (gnu packages maths)
#:use-module (gnu packages multiprecision) #:use-module (gnu packages multiprecision)
#:use-module (gnu packages ncurses) #:use-module (gnu packages ncurses)
#:use-module (gnu packages ocaml)
#:use-module (gnu packages pcre) #:use-module (gnu packages pcre)
#:use-module (gnu packages perl) #:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config) #:use-module (gnu packages pkg-config)
@ -83,6 +84,7 @@
#:use-module (gnu packages shells) #:use-module (gnu packages shells)
#:use-module (gnu packages sphinx) #:use-module (gnu packages sphinx)
#:use-module (gnu packages ssh) #:use-module (gnu packages ssh)
#:use-module (gnu packages swig)
#:use-module (gnu packages tcl) #:use-module (gnu packages tcl)
#:use-module (gnu packages tex) #:use-module (gnu packages tex)
#:use-module (gnu packages texinfo) #:use-module (gnu packages texinfo)
@ -4407,31 +4409,55 @@ from within R.")
(define-public r-spams (define-public r-spams
(package (package
(name "r-spams") (name "r-spams")
(version "2.6-2017-03-22") (version "2.6.1")
(source (source (origin
(origin (method git-fetch)
(method url-fetch) (uri (git-reference
;; Use the Latest version link for a stable URI across releases. (url "https://gitlab.inria.fr/thoth/spams-devel")
(uri (string-append "https://gforge.inria.fr/frs/download.php/" (commit (string-append "v" version))))
"latestfile/4531/spams-R-v" version ".tar.gz")) (file-name (git-file-name name version))
(sha256 (sha256
(base32 (base32
"13z2293jixf1r9g8dyy856xrhvpjr2ln2n9smn6644126r9hmhkx")))) "0qvj87fw4sm54c7dvhxjgmgvnyyrrz9fk6dqp3ak0gwgb42gqh60"))))
(build-system r-build-system) (build-system r-build-system)
(arguments (arguments
`(#:phases (list
(modify-phases %standard-phases #:phases
(add-after 'unpack 'chdir #~(modify-phases %standard-phases
(lambda _ (chdir "spams") #t)) (add-after 'patch-generated-file-shebangs 'patch-paths
(lambda _
(substitute* (cons* "swig/setRelease"
"swig/R/docmatlab2R"
"swig/R/mkdist"
(find-files "." "(^mk|\\.sh$)"))
(("/bin/pwd") "pwd")
(("/bin/rm") "rm"))))
(add-after 'patch-paths 'mkdist
(lambda _
(chdir "swig/R")
(setenv "TEXINPUTS" (string-append (getcwd) "/../../doc:"))
(substitute* "mkdist"
(("^SWIG=.*")
(string-append "SWIG=" (which "swig")))
(("^../mkdoc") "")) ;requires texlive-aeguill
(invoke "./mkdist")
(chdir "dist/spams-R/spams")))
;; Don't tune for the building machine. ;; Don't tune for the building machine.
(add-after 'chdir 'no-mtune (add-after 'mkdist 'no-mtune
(lambda _ (lambda _
(substitute* "src/Makevars" (substitute* "src/Makevars"
(("-mtune=native") "")) (("-mtune=native") "")))))))
#t))))) (native-inputs
(list hevea
perl
swig
;;texlive-aeguill ;;FIXME: package me!
texlive-base
texlive-jknappen))
(propagated-inputs (propagated-inputs
(list r-lattice r-matrix)) (list r-lattice
(home-page "https://spams-devel.gforge.inria.fr") r-matrix))
(home-page "https://gitlab.inria.fr/thoth/spams-devel/")
(synopsis "Toolbox for solving sparse estimation problems") (synopsis "Toolbox for solving sparse estimation problems")
(description "SPAMS (SPArse Modeling Software) is an optimization toolbox (description "SPAMS (SPArse Modeling Software) is an optimization toolbox
for solving various sparse estimation problems. It includes tools for the for solving various sparse estimation problems. It includes tools for the