gnu: python-pandas: Fix build on 32-bit.
[jackhill/guix/guix.git] / gnu / packages / libevent.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
5 ;;; Copyright © 2016 David Thompson <davet@gnu.org>
6 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
7 ;;;
8 ;;; This file is part of GNU Guix.
9 ;;;
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or (at
13 ;;; your option) any later version.
14 ;;;
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
19 ;;;
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23 (define-module (gnu packages libevent)
24 #:use-module (gnu packages)
25 #:use-module (guix licenses)
26 #:use-module (guix packages)
27 #:use-module (guix download)
28 #:use-module (guix build-system gnu)
29 #:use-module (guix build-system perl)
30 #:use-module (gnu packages autotools)
31 #:use-module (gnu packages base)
32 #:use-module (gnu packages perl)
33 #:use-module (gnu packages pkg-config)
34 #:use-module (gnu packages python)
35 #:use-module (gnu packages tls))
36
37 (define-public libevent
38 (package
39 (name "libevent")
40 (version "2.1.8")
41 (source (origin
42 (method url-fetch)
43 (uri (string-append
44 "https://github.com/libevent/libevent/releases/download/release-"
45 version "-stable/libevent-" version "-stable.tar.gz"))
46 (sha256
47 (base32
48 "1hhxnxlr0fsdv7bdmzsnhdz16fxf3jg2r6vyljcl3kj6pflcap4n"))
49 (patches (search-patches "libevent-2.1-dns-tests.patch"
50 ;; XXX: Try removing this for > 2.1.8.
51 ;; https://github.com/libevent/libevent/issues/452
52 "libevent-2.1-skip-failing-test.patch"))))
53 (build-system gnu-build-system)
54 (inputs
55 `(("python" ,python-2))) ; for 'event_rpcgen.py'
56 (native-inputs
57 `(("which" ,which)))
58 (home-page "http://libevent.org/")
59 (synopsis "Event notification library")
60 (description
61 "The libevent API provides a mechanism to execute a callback
62 function when a specific event occurs on a file descriptor or after a
63 timeout has been reached. Furthermore, libevent also support callbacks
64 due to signals or regular timeouts.
65
66 libevent is meant to replace the event loop found in event driven
67 network servers. An application just needs to call event_dispatch() and
68 then add or remove events dynamically without having to change the event
69 loop.")
70 (license bsd-3)))
71
72 (define-public libevent-2.0
73 (package
74 (inherit libevent)
75 (version "2.0.22")
76 (source (origin
77 (method url-fetch)
78 (uri (string-append
79 "https://github.com/libevent/libevent/releases/download/release-"
80 version "-stable/libevent-" version "-stable.tar.gz"))
81 (sha256
82 (base32
83 "18qz9qfwrkakmazdlwxvjmw8p76g70n3faikwvdwznns1agw9hki"))
84 (patches (search-patches
85 "libevent-dns-tests.patch"
86 "libevent-2.0-evdns-fix-remote-stack-overread.patch"
87 "libevent-2.0-evutil-fix-buffer-overflow.patch"
88 "libevent-2.0-evdns-fix-searching-empty-hostnames.patch"))))))
89
90 (define-public libev
91 (package
92 (name "libev")
93 (version "4.24")
94 (source (origin
95 (method url-fetch)
96 (uri (string-append "http://dist.schmorp.de/libev/Attic/libev-"
97 version
98 ".tar.gz"))
99 (sha256
100 (base32
101 "08gqsza1czx0nf62nkk183jb0946yzjsymaacxbzdgcs8z9r6dcp"))))
102 (build-system gnu-build-system)
103 (home-page "http://software.schmorp.de/pkg/libev.html")
104 (synopsis "Event loop loosely modelled after libevent")
105 (description
106 "libev is a full-featured and high-performance event loop that
107 is loosely modelled after libevent, but without its limitations and
108 bugs. It is used in GNU Virtual Private Ethernet, rxvt-unicode,
109 auditd, the Deliantra MORPG Server and Client, and many other
110 programs.")
111 (license
112 (list bsd-2 gpl2+))))
113
114 (define-public libuv
115 (package
116 (name "libuv")
117 (version "1.11.0")
118 (source (origin
119 (method url-fetch)
120 (uri (string-append "https://github.com/libuv/libuv/archive/v"
121 version ".tar.gz"))
122 (file-name (string-append name "-" version ".tar.gz"))
123 (sha256
124 (base32
125 "0yhw86011l2dg2prms0d86szygrix4pxpgnyzs7iljy2xk3fxivf"))))
126 (build-system gnu-build-system)
127 (arguments
128 '(#:phases (alist-cons-after
129 'unpack 'autogen
130 (lambda _
131 ;; Fashionable people don't run 'make dist' these days, so
132 ;; we need to do that ourselves.
133 (zero? (system* "sh" "autogen.sh")))
134 %standard-phases)
135
136 ;; XXX: Some tests want /dev/tty, attempt to make connections, etc.
137 #:tests? #f))
138 (native-inputs `(("autoconf" ,(autoconf-wrapper))
139 ("automake" ,automake)
140 ("libtool" ,libtool)
141
142 ;; libuv.pc is installed only when pkg-config is found.
143 ("pkg-config" ,pkg-config)))
144 (home-page "https://github.com/libuv/libuv")
145 (synopsis "Library for asynchronous I/O")
146 (description
147 "libuv is a multi-platform support library with a focus on asynchronous
148 I/O. Among other things, it supports event loops via epoll, kqueue, and
149 similar IOCP, and event ports, asynchronous TCP/UDP sockets, asynchronous DNS
150 resolution, asynchronous file system operations, and threading primitives.")
151
152 ;; A few files fall under other non-copyleft licenses; see 'LICENSE' for
153 ;; details.
154 (license x11)))
155
156 (define-public perl-anyevent
157 (package
158 (name "perl-anyevent")
159 (version "7.13")
160 (source (origin
161 (method url-fetch)
162 (uri (string-append "mirror://cpan/authors/id/M/ML/MLEHMANN/"
163 "AnyEvent-" version ".tar.gz"))
164 (sha256
165 (base32
166 "1b84ilkbrfbzqapv25x8z6gva92skbrf2srybdabb1wnxx6ky454"))))
167 (build-system perl-build-system)
168 (native-inputs
169 `(("perl-canary-stability" ,perl-canary-stability)))
170 (propagated-inputs
171 `(("perl-async-interrupt" ,perl-async-interrupt)
172 ("perl-ev" ,perl-ev)
173 ("perl-guard" ,perl-guard)
174 ("perl-json" ,perl-json)
175 ("perl-json-xs" ,perl-json-xs)
176 ("perl-net-ssleay" ,perl-net-ssleay)
177 ("perl-task-weaken" ,perl-task-weaken)))
178 (home-page "http://search.cpan.org/dist/AnyEvent")
179 (synopsis
180 "API for I/O, timer, signal, child process and completion events")
181 (description
182 "This module allows using a variety of events without forcing module
183 authors to pick a specific event loop, and without noticable overhead.
184 Currently supported event loops are EV, Event, Glib/Gtk2, Tk, Qt,
185 @code{Event::Lib}, Irssi, @code{IO::Async} and POE (and thus also WxWidgets
186 and Prima). It also comes with a very fast Pure Perl event loop that does
187 not rely on XS.")
188 (license (package-license perl))))
189
190 (define-public perl-ev
191 (package
192 (name "perl-ev")
193 (version "4.22")
194 (source (origin
195 (method url-fetch)
196 (uri (string-append "mirror://cpan/authors/id/M/ML/MLEHMANN/EV-"
197 version ".tar.gz"))
198 (sha256
199 (base32
200 "14d9115q8f2ca2q3vbcalm55zqsbx8xjq5aj098laj9f9rrzirra"))
201 (modules '((guix build utils)))
202 (snippet
203 '(begin
204 ;; Drop bundled libev.
205 (delete-file-recursively "libev")
206 #t))))
207 (build-system perl-build-system)
208 (arguments
209 '(#:phases
210 (modify-phases %standard-phases
211 (add-after 'unpack 'unpack-libev
212 ;; This package requires the libev *sources* in order
213 ;; to build. Unpack system libev here...
214 (lambda* (#:key inputs #:allow-other-keys)
215 (mkdir "./libev")
216 (zero? (system* "tar" "-xf" (assoc-ref inputs "libev-source")
217 "-C" "./libev" "--strip-components=1")))))))
218 (native-inputs
219 `(("libev-source" ,(package-source libev))
220 ("perl-canary-stability" ,perl-canary-stability)))
221 (propagated-inputs
222 `(("perl-common-sense" ,perl-common-sense)))
223 (home-page "http://search.cpan.org/dist/EV")
224 (synopsis "Perl interface to libev")
225 (description
226 "This module provides an interface to @code{libev}, a high performance
227 full-featured event loop. It can be used through the @code{AnyEvent} module
228 and still be faster than other event loops currently supported in Perl.")
229 (license (package-license perl))))