guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

05/05: gnu: guile-fibers: Add "guile3.0-fibers" variant.


From: guix-commits
Subject: 05/05: gnu: guile-fibers: Add "guile3.0-fibers" variant.
Date: Thu, 16 Jan 2020 17:14:25 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 9e016129e16962d4f751d934fdc0fbd6c6d64ef8
Author: Ludovic Courtès <address@hidden>
AuthorDate: Thu Jan 16 23:13:08 2020 +0100

    gnu: guile-fibers: Add "guile3.0-fibers" variant.
    
    * gnu/packages/guile-xyz.scm (guile-fibers)[source]: Add 'modules' and
    'snippet'.
    (guile3.0-fibers): New variable.
---
 gnu/packages/guile-xyz.scm | 34 +++++++++++++++++++++++++++++++++-
 1 file changed, 33 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 9edb718..bb9b259 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -496,7 +496,29 @@ Unix-style DSV format and RFC 4180 format.")
                                   version ".tar.gz"))
               (sha256
                (base32
-                "0vjkg72ghgdgphzbjz9ig8al8271rq8974viknb2r1rg4lz92ld0"))))
+                "0vjkg72ghgdgphzbjz9ig8al8271rq8974viknb2r1rg4lz92ld0"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  ;; Allow builds with Guile 3.0.
+                  (substitute* "configure"
+                    (("search=\"2\\.2\"")
+                     "search=\"3.0 2.2\""))
+
+                  ;; Explicitly include system headers rather than relying on
+                  ;; <libguile.h> to do it for us.
+                  (substitute* "epoll.c"
+                    (("#include.*libguile\\.h.*$" all)
+                     (string-append "#include <unistd.h>\n"
+                                    "#include <string.h>\n"
+                                    all "\n")))
+
+                  ;; Import (ice-9 threads) for 'current-processor-count'.
+                  (substitute* "tests/channels.scm"
+                    (("#:use-module \\(fibers\\)")
+                     (string-append "#:use-module (fibers)\n"
+                                    "#:use-module (ice-9 threads)\n")))
+                  #t))))
     (build-system gnu-build-system)
     (arguments
      '(#:phases (modify-phases %standard-phases
@@ -532,6 +554,16 @@ is not available for Guile 2.0.")
     (home-page "https://github.com/wingo/fibers";)
     (license license:lgpl3+)))
 
+(define-public guile3.0-fibers
+  (package
+    (inherit guile-fibers)
+    (name "guile3.0-fibers")
+    (arguments
+     ;; The code uses 'scm_t_uint64' et al., which are deprecated in 3.0.
+     `(#:configure-flags '("CFLAGS=-Wno-error=deprecated-declarations")
+       ,@(package-arguments guile-fibers)))
+    (inputs `(("guile" ,guile-3.0)))))
+
 (define-public guile-syntax-highlight
   (package
     (name "guile-syntax-highlight")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]