summaryrefslogtreecommitdiff
path: root/gnu/packages/cran.scm
diff options
context:
space:
mode:
authorLars-Dominik Braun <ldb@leibniz-psychology.org>2020-07-31 14:37:20 +0200
committerLudovic Courtès <ludo@gnu.org>2020-09-04 15:58:42 +0200
commitd6983b1331fce3a014c19963379af7a7e00a2780 (patch)
tree2e9ec4932a54de222bcfd925d2f0da218152ada6 /gnu/packages/cran.scm
parent89e1e4481382d18033a9773b90c09345fa33d6cb (diff)
gnu: r-httpuv: Unvendor libuv.
* gnu/packages/cran.scm (r-httpuv) [source]: Remove bundled libuv, add patch. [arguments] Rewrite header locations, fix pipe server issue. [inputs] Add libuv. * gnu/packages/patches/r-httpuv-1.5.4-unvendor-libuv.patch: New file. * gnu/local.mk: Add it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/cran.scm')
-rw-r--r--gnu/packages/cran.scm32
1 files changed, 31 insertions, 1 deletions
diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index f06e10be58..994637e3b6 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm
@@ -24,6 +24,7 @@
;;; Copyright © 2020 Eric Brown <ecbrown@ericcbrown.com>
;;; Copyright © 2020 Peter Lo <peterloleungyau@gmail.com>
;;; Copyright © 2020 Rafael Luque Leiva <rafael.luque@osoco.es>
+;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -47,6 +48,7 @@
#:use-module (guix git-download)
#:use-module (guix utils)
#:use-module (guix build-system r)
+ #:use-module (gnu packages)
#:use-module (gnu packages algebra)
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
@@ -69,6 +71,7 @@
#:use-module (gnu packages imagemagick)
#:use-module (gnu packages java)
#:use-module (gnu packages javascript)
+ #:use-module (gnu packages libevent)
#:use-module (gnu packages lisp-xyz)
#:use-module (gnu packages machine-learning)
#:use-module (gnu packages maths)
@@ -830,8 +833,35 @@ into a pipeline of data manipulation and visualisation.")
(uri (cran-uri "httpuv" version))
(sha256
(base32
- "066rprqvz9qln6xd85x1yh1wbbmzd157xjl8zq1zbgr8l6347inm"))))
+ "066rprqvz9qln6xd85x1yh1wbbmzd157xjl8zq1zbgr8l6347inm"))
+ ;; Unvendor bundled libraries. As of 1.5.4 the vendored libuv
+ ;; only contains fixes for building on Solaris.
+ (patches (search-patches "r-httpuv-1.5.4-unvendor-libuv.patch"))
+ (modules '((guix build utils)
+ (ice-9 ftw)
+ (srfi srfi-1)))
+ (snippet
+ `(begin
+ (delete-file-recursively "src/libuv")
+ ;; Cannot unbundle http-parser, because it contains local
+ ;; modifications.
+ #t))))
(build-system r-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'unbundle-libuv
+ (lambda* (#:key outputs #:allow-other-keys)
+ (substitute* (find-files "src" "\\.cpp$|\\.h$")
+ (("\"libuv/include/uv\\.h\"")
+ "<uv.h>"))
+ ;; Fix https://github.com/rstudio/httpuv/issues/282
+ (substitute* "src/http.cpp"
+ (("uv_pipe_init\\(pLoop, &pSocket->handle\\.pipe, true\\);")
+ "uv_pipe_init(pLoop, &pSocket->handle.pipe, 0);"))
+ #t)))))
+ (inputs
+ `(("libuv" ,libuv)))
(propagated-inputs
`(("r-bh" ,r-bh)
("r-later" ,r-later)