gnu: guile-fibers: Add 1.3.1.
* gnu/packages/guile-xyz.scm (guile-fibers-1.3): New variable. (guile-fibers-1.1): Inherit from it. * gnu/packages/patches/guile-fibers-libevent-32-bit.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it.master
parent
09449ef6f6
commit
49119eee2b
|
@ -1321,6 +1321,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/guile-fibers-epoll-instance-is-dead.patch \
|
%D%/packages/patches/guile-fibers-epoll-instance-is-dead.patch \
|
||||||
%D%/packages/patches/guile-fibers-fd-finalizer-leak.patch \
|
%D%/packages/patches/guile-fibers-fd-finalizer-leak.patch \
|
||||||
%D%/packages/patches/guile-fibers-wait-for-io-readiness.patch \
|
%D%/packages/patches/guile-fibers-wait-for-io-readiness.patch \
|
||||||
|
%D%/packages/patches/guile-fibers-libevent-32-bit.patch \
|
||||||
%D%/packages/patches/guile-fix-invalid-unicode-handling.patch \
|
%D%/packages/patches/guile-fix-invalid-unicode-handling.patch \
|
||||||
%D%/packages/patches/guile-gdbm-ffi-support-gdbm-1.14.patch \
|
%D%/packages/patches/guile-gdbm-ffi-support-gdbm-1.14.patch \
|
||||||
%D%/packages/patches/guile-git-adjust-for-libgit2-1.2.0.patch \
|
%D%/packages/patches/guile-git-adjust-for-libgit2-1.2.0.patch \
|
||||||
|
|
|
@ -92,6 +92,7 @@
|
||||||
#:use-module (gnu packages hurd)
|
#:use-module (gnu packages hurd)
|
||||||
#:use-module (gnu packages image)
|
#:use-module (gnu packages image)
|
||||||
#:use-module (gnu packages imagemagick)
|
#:use-module (gnu packages imagemagick)
|
||||||
|
#:use-module (gnu packages libevent)
|
||||||
#:use-module (gnu packages libffi)
|
#:use-module (gnu packages libffi)
|
||||||
#:use-module (gnu packages libunistring)
|
#:use-module (gnu packages libunistring)
|
||||||
#:use-module (gnu packages linux)
|
#:use-module (gnu packages linux)
|
||||||
|
@ -783,10 +784,10 @@ Unix-style DSV format and RFC 4180 format.")
|
||||||
(inputs (list guile-2.2))
|
(inputs (list guile-2.2))
|
||||||
(propagated-inputs `(("guile-lib" ,guile2.2-lib)))))
|
(propagated-inputs `(("guile-lib" ,guile2.2-lib)))))
|
||||||
|
|
||||||
(define-public guile-fibers-1.1
|
(define-public guile-fibers-1.3
|
||||||
(package
|
(package
|
||||||
(name "guile-fibers")
|
(name "guile-fibers")
|
||||||
(version "1.1.1")
|
(version "1.3.1")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
|
@ -795,11 +796,9 @@ Unix-style DSV format and RFC 4180 format.")
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0ll63d7202clapg1k4bilbnlmfa4qvpjnsd7chbkka4kxf5klilc"))
|
"0wvdi4l58f9a5c9wi3cdc9l1bniscsixb6w2zj86mch7j7j814lc"))
|
||||||
(patches
|
(patches
|
||||||
(search-patches "guile-fibers-wait-for-io-readiness.patch"
|
(search-patches "guile-fibers-libevent-32-bit.patch"))))
|
||||||
"guile-fibers-epoll-instance-is-dead.patch"
|
|
||||||
"guile-fibers-fd-finalizer-leak.patch"))))
|
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list #:make-flags
|
(list #:make-flags
|
||||||
|
@ -817,17 +816,15 @@ Unix-style DSV format and RFC 4180 format.")
|
||||||
(substitute* "Makefile"
|
(substitute* "Makefile"
|
||||||
(("tests/speedup.scm") ""))))))))
|
(("tests/speedup.scm") ""))))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list texinfo pkg-config autoconf automake libtool
|
(list texinfo pkg-config autoconf-2.71 automake libtool
|
||||||
guile-3.0 ;for 'guild compile
|
guile-3.0 ;for 'guild compile
|
||||||
;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'
|
;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'
|
||||||
gettext-minimal))
|
gettext-minimal))
|
||||||
(inputs
|
(inputs
|
||||||
(list guile-3.0)) ;for libguile-3.0.so
|
(append (list guile-3.0) ;for libguile-3.0.so
|
||||||
(supported-systems
|
(if (hurd-target?)
|
||||||
;; This version requires 'epoll' and is thus limited to Linux-based
|
(list libevent)
|
||||||
;; systems, but this may change soon:
|
'())))
|
||||||
;; <https://github.com/wingo/fibers/pull/53>.
|
|
||||||
(filter (cut string-suffix? "-linux" <>) %supported-systems))
|
|
||||||
(synopsis "Lightweight concurrency facility for Guile")
|
(synopsis "Lightweight concurrency facility for Guile")
|
||||||
(description
|
(description
|
||||||
"Fibers is a Guile library that implements a a lightweight concurrency
|
"Fibers is a Guile library that implements a a lightweight concurrency
|
||||||
|
@ -844,6 +841,36 @@ is not available for Guile 2.0.")
|
||||||
(properties '((upstream-name . "fibers")))
|
(properties '((upstream-name . "fibers")))
|
||||||
(license license:lgpl3+)))
|
(license license:lgpl3+)))
|
||||||
|
|
||||||
|
(define-public guile-fibers-1.1
|
||||||
|
(package
|
||||||
|
(inherit guile-fibers-1.3)
|
||||||
|
(version "1.1.1")
|
||||||
|
(source (origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://github.com/wingo/fibers")
|
||||||
|
(commit (string-append "v" version))))
|
||||||
|
(file-name (git-file-name "guile-fibers" version))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"0ll63d7202clapg1k4bilbnlmfa4qvpjnsd7chbkka4kxf5klilc"))
|
||||||
|
(patches
|
||||||
|
(search-patches "guile-fibers-wait-for-io-readiness.patch"
|
||||||
|
"guile-fibers-epoll-instance-is-dead.patch"
|
||||||
|
"guile-fibers-fd-finalizer-leak.patch"))))
|
||||||
|
(native-inputs
|
||||||
|
(list texinfo pkg-config autoconf automake libtool
|
||||||
|
guile-3.0 ;for 'guild compile
|
||||||
|
;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'
|
||||||
|
gettext-minimal))
|
||||||
|
(inputs
|
||||||
|
(list guile-3.0)) ;for libguile-3.0.so
|
||||||
|
(supported-systems
|
||||||
|
;; This version requires 'epoll' and is thus limited to Linux-based
|
||||||
|
;; systems, which is fixed in 1.2.0:
|
||||||
|
;; <https://github.com/wingo/fibers/pull/53>.
|
||||||
|
(filter (cut string-suffix? "-linux" <>) %supported-systems))))
|
||||||
|
|
||||||
(define-public guile-fibers-next
|
(define-public guile-fibers-next
|
||||||
(let ((commit "99fc3e38048f732de67c43fde52e949fa294aa7d")
|
(let ((commit "99fc3e38048f732de67c43fde52e949fa294aa7d")
|
||||||
(revision "1"))
|
(revision "1"))
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
This fixes a bug with the libevent backend on 32-bit platforms:
|
||||||
|
|
||||||
|
https://github.com/wingo/fibers/issues/86
|
||||||
|
|
||||||
|
diff --git a/extensions/libevent.c b/extensions/libevent.c
|
||||||
|
index 4f44de9..52c9d73 100644
|
||||||
|
--- a/extensions/libevent.c
|
||||||
|
+++ b/extensions/libevent.c
|
||||||
|
@@ -215,7 +215,8 @@ run_event_loop (void *p)
|
||||||
|
microsec = -1;
|
||||||
|
else if (data->timeout >= 0)
|
||||||
|
{
|
||||||
|
- microsec = data->timeout / time_units_per_microsec;
|
||||||
|
+ microsec = (time_units_per_microsec == 0)
|
||||||
|
+ ? 0 : data->timeout / time_units_per_microsec;
|
||||||
|
tv.tv_sec = 0;
|
||||||
|
tv.tv_usec = microsec;
|
||||||
|
}
|
Reference in New Issue