mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
gnu: r-sdmtools: Replace removed constants.
R 4.5.0 removed previously deprecated definitions. * gnu/packages/cran.scm (r-sdmtools)[arguments]: Add phase 'patch-constants. Change-Id: I06125aeff8b7b1f219f8458b6c9aeeb696e33f11
This commit is contained in:
@@ -19674,6 +19674,22 @@ normalizations, minimum variance matching, and so on.")
|
||||
"1xvcd97ikqsfdpk2fddy3k0z1ajqga7nv9bgac9c1wnjk1gqrpgh"))))
|
||||
(properties `((upstream-name . "SDMTools")))
|
||||
(build-system r-build-system)
|
||||
(arguments
|
||||
(list
|
||||
#:phases
|
||||
'(modify-phases %standard-phases
|
||||
(add-after 'unpack 'patch-constants
|
||||
(lambda _
|
||||
;; Older versions of R used to define PI. As of R 4.5.0 the
|
||||
;; definition from the default math headers is supposed to be
|
||||
;; used instead.
|
||||
(substitute* "src/pointinpolygon.c"
|
||||
(("double TWOPI = " m)
|
||||
(string-append "#define PI M_PI\n" m)))
|
||||
(with-fluids ((%default-port-encoding "ISO-8859-1"))
|
||||
(substitute* "src/vincenty.geodesics.c"
|
||||
(("#include <math.h>" m)
|
||||
(string-append m "\n#define PI M_PI")))))))))
|
||||
(propagated-inputs (list r-r-utils))
|
||||
(home-page "https://www.rforge.net/SDMTools/")
|
||||
(synopsis "Species distribution modelling tools")
|
||||
|
||||
Reference in New Issue
Block a user