summary refs log tree commit diff
path: root/gnu/packages/libevent.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-03-09 16:35:41 +0100
committerLudovic Courtès <ludo@gnu.org>2017-03-09 16:35:41 +0100
commite90e0fad1b3ba79d81f02424e143ee6f4f736e8b (patch)
tree2c26190fd9114199b0ef79303e18a61100cab4af /gnu/packages/libevent.scm
parent8ea0700d231a8819fc7e8332e9685f0ce15c174e (diff)
parent9ec2a4d3fec44f08a55df9f5f3d1a04b83e7fcf6 (diff)
downloadguix-e90e0fad1b3ba79d81f02424e143ee6f4f736e8b.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/libevent.scm')
-rw-r--r--gnu/packages/libevent.scm82
1 files changed, 80 insertions, 2 deletions
diff --git a/gnu/packages/libevent.scm b/gnu/packages/libevent.scm
index bc830f6215..551fbf7206 100644
--- a/gnu/packages/libevent.scm
+++ b/gnu/packages/libevent.scm
@@ -26,10 +26,13 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system perl)
+  #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
-  #:use-module (gnu packages autotools)
-  #:use-module (gnu packages pkg-config))
+  #:use-module (gnu packages tls))
 
 (define-public libevent
   (package
@@ -149,3 +152,78 @@ resolution, asynchronous file system operations, and threading primitives.")
     ;; A few files fall under other non-copyleft licenses; see 'LICENSE' for
     ;; details.
     (license x11)))
+
+(define-public perl-anyevent
+  (package
+    (name "perl-anyevent")
+    (version "7.13")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://cpan/authors/id/M/ML/MLEHMANN/"
+                                  "AnyEvent-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1b84ilkbrfbzqapv25x8z6gva92skbrf2srybdabb1wnxx6ky454"))))
+    (build-system perl-build-system)
+    (native-inputs
+     `(("perl-canary-stability" ,perl-canary-stability)))
+    (propagated-inputs
+     `(("perl-async-interrupt" ,perl-async-interrupt)
+       ("perl-ev" ,perl-ev)
+       ("perl-guard" ,perl-guard)
+       ("perl-json" ,perl-json)
+       ("perl-json-xs" ,perl-json-xs)
+       ("perl-net-ssleay" ,perl-net-ssleay)
+       ("perl-task-weaken" ,perl-task-weaken)))
+    (home-page "http://search.cpan.org/dist/AnyEvent")
+    (synopsis
+     "API for I/O, timer, signal, child process and completion events")
+    (description
+     "This module allows using a variety of events without forcing module
+authors to pick a specific event loop, and without noticable overhead.
+Currently supported event loops are EV, Event, Glib/Gtk2, Tk, Qt,
+@code{Event::Lib}, Irssi, @code{IO::Async} and POE (and thus also WxWidgets
+and Prima).  It also comes with a very fast Pure Perl event loop that does
+not rely on XS.")
+    (license (package-license perl))))
+
+(define-public perl-ev
+  (package
+    (name "perl-ev")
+    (version "4.22")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://cpan/authors/id/M/ML/MLEHMANN/EV-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "14d9115q8f2ca2q3vbcalm55zqsbx8xjq5aj098laj9f9rrzirra"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  ;; Drop bundled libev.
+                  (delete-file-recursively "libev")
+                  #t))))
+    (build-system perl-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'unpack-libev
+           ;; This package requires the libev *sources* in order
+           ;; to build. Unpack system libev here...
+           (lambda* (#:key inputs #:allow-other-keys)
+             (mkdir "./libev")
+             (zero? (system* "tar" "-xf" (assoc-ref inputs "libev-source")
+                             "-C" "./libev" "--strip-components=1")))))))
+    (native-inputs
+     `(("libev-source" ,(package-source libev))
+       ("perl-canary-stability" ,perl-canary-stability)))
+    (propagated-inputs
+     `(("perl-common-sense" ,perl-common-sense)))
+    (home-page "http://search.cpan.org/dist/EV")
+    (synopsis "Perl interface to libev")
+    (description
+     "This module provides an interface to @code{libev}, a high performance
+full-featured event loop.  It can be used through the @code{AnyEvent} module
+and still be faster than other event loops currently supported in Perl.")
+    (license (package-license perl))))