Merge branch 'master' into core-updates
[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 ;;;
7 ;;; This file is part of GNU Guix.
8 ;;;
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
13 ;;;
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
18 ;;;
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22 (define-module (gnu packages libevent)
23 #:use-module (gnu packages)
24 #:use-module (guix licenses)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix build-system gnu)
28 #:use-module (gnu packages base)
29 #:use-module (gnu packages python)
30 #:use-module (gnu packages autotools)
31 #:use-module (gnu packages pkg-config))
32
33 (define-public libevent
34 (package
35 (name "libevent")
36 (version "2.0.22")
37 (source (origin
38 (method url-fetch)
39 (uri (string-append
40 "https://github.com/libevent/libevent/releases/download/release-"
41 version "-stable/libevent-" version "-stable.tar.gz"))
42 (sha256
43 (base32
44 "18qz9qfwrkakmazdlwxvjmw8p76g70n3faikwvdwznns1agw9hki"))
45 (patches (search-patches "libevent-dns-tests.patch"))))
46 (build-system gnu-build-system)
47 (inputs
48 `(;; Dependencies used for the tests and for `event_rpcgen.py'.
49 ("which" ,which)
50 ("python" ,python-wrapper)))
51 (home-page "http://libevent.org/")
52 (synopsis "Event notification library")
53 (description
54 "The libevent API provides a mechanism to execute a callback
55 function when a specific event occurs on a file descriptor or after a
56 timeout has been reached. Furthermore, libevent also support callbacks
57 due to signals or regular timeouts.
58
59 libevent is meant to replace the event loop found in event driven
60 network servers. An application just needs to call event_dispatch() and
61 then add or remove events dynamically without having to change the event
62 loop.")
63 (license bsd-3)))
64
65 (define-public libev
66 (package
67 (name "libev")
68 (version "4.20")
69 (source (origin
70 (method url-fetch)
71 (uri (string-append "http://dist.schmorp.de/libev/Attic/libev-"
72 version
73 ".tar.gz"))
74 (sha256
75 (base32
76 "17j47pbkr65a18mfvy2861p5k7w4pxmdgiw723ryfqd9gx636w7q"))))
77 (build-system gnu-build-system)
78 (home-page "http://software.schmorp.de/pkg/libev.html")
79 (synopsis "Event loop loosely modelled after libevent")
80 (description
81 "libev is a full-featured and high-performance event loop that
82 is loosely modelled after libevent, but without its limitations and
83 bugs. It is used in GNU Virtual Private Ethernet, rxvt-unicode,
84 auditd, the Deliantra MORPG Server and Client, and many other
85 programs.")
86 (license
87 (list bsd-2 gpl2+))))
88
89 (define-public libuv
90 (package
91 (name "libuv")
92 (version "1.9.0")
93 (source (origin
94 (method url-fetch)
95 (uri (string-append "https://github.com/libuv/libuv/archive/v"
96 version ".tar.gz"))
97 (file-name (string-append name "-" version ".tar.gz"))
98 (sha256
99 (base32
100 "1sx5lahhg2w92y6mgyg7c7nrx2biyyxd5yiqkmq8n4w01lm2gf7q"))))
101 (build-system gnu-build-system)
102 (arguments
103 '(#:phases (alist-cons-after
104 'unpack 'autogen
105 (lambda _
106 ;; Fashionable people don't run 'make dist' these days, so
107 ;; we need to do that ourselves.
108 (zero? (system* "sh" "autogen.sh")))
109 %standard-phases)
110
111 ;; XXX: Some tests want /dev/tty, attempt to make connections, etc.
112 #:tests? #f))
113 (native-inputs `(("autoconf" ,(autoconf-wrapper))
114 ("automake" ,automake)
115 ("libtool" ,libtool)
116
117 ;; libuv.pc is installed only when pkg-config is found.
118 ("pkg-config" ,pkg-config)))
119 (home-page "https://github.com/joyent/libuv")
120 (synopsis "Library for asynchronous I/O")
121 (description
122 "libuv is a multi-platform support library with a focus on asynchronous
123 I/O. Among other things, it supports event loops via epoll, kqueue, and
124 similar IOCP, and event ports, asynchronous TCP/UDP sockets, asynchronous DNS
125 resolution, asynchronous file system operations, and threading primitives.")
126
127 ;; A few files fall under other non-copyleft licenses; see 'LICENSE' for
128 ;; details.
129 (license x11)))