gnu: r-rcppparallel: Fix build with gcc-14.

* gnu/packages/cran.scm (r-rcppparallel)[arguments]: Use G-Expressions.  Add
phase "setup-build-environment" to relax gcc-14's strictness.

Change-Id: I3d6c0d0986405dcc327bddb1eccaf95c298aec1d
This commit is contained in:
Janneke Nieuwenhuizen 2025-01-03 14:39:21 +01:00
parent 8e48eeeae1
commit 0b8b36778d
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273

View file

@ -39,6 +39,7 @@
;;; Copyright © 2022 Greg Hogan <code@greghogan.com>
;;; Copyright © 2024 Marco Baggio <guix@mawumag.com>
;;; Copyright © 2024 Spencer King <spencer.king@geneoscopy.com>
;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@ -21664,10 +21665,22 @@ (define-public r-rcppparallel
(arguments
(list
#:phases
'(modify-phases %standard-phases
(add-after 'unpack 'use-system-tbb
(lambda* (#:key inputs #:allow-other-keys)
(setenv "TBB_ROOT" (assoc-ref inputs "tbb")))))))
#~(modify-phases %standard-phases
(add-after 'unpack 'use-system-tbb
(lambda* (#:key inputs #:allow-other-keys)
(setenv "TBB_ROOT" (assoc-ref inputs "tbb"))))
(add-before 'install 'setup-build-environment
(lambda _
;; XXX FIXME: $HOME/.R/Makevars seems to be the only way to
;; set custom CFLAGS for R?
(setenv "HOME" (getcwd))
(mkdir-p ".R")
(with-directory-excursion ".R"
(with-output-to-file "Makevars"
(lambda _
(display (string-append
"CXXFLAGS=-g -O2"
" -Wno-error=changes-meaning\n"))))))))))
(inputs (list tbb-2020))
(native-inputs (list r-rcpp r-runit))
(home-page "https://rcppcore.github.io/RcppParallel/")