Libevent version 2.x

The libevent API provides a mechanism to execute a callback function when
a specific event occurs on a file descriptor or after a timeout has been
reached. Furthermore, libevent also support callbacks due to signals or
regular timeouts.

libevent is meant to replace the event loop found in event driven network
servers. An application just needs to call event_dispatch() and then add
or remove events dynamically without having to change the event loop.

Currently, libevent supports /dev/poll, kqueue(2), event ports, select(2),
poll(2) and epoll(4). The internal event mechanism is completely independent
of the exposed event API, and a simple update of libevent can provide new
functionality without having to redesign the applications. As a result,
Libevent allows for portable application development and provides the most
scalable event notification mechanism available on an operating system.
Libevent can also be used for multi-threaded applications.

WWW: http://www.monkey.org/~provos/libevent/
This commit is contained in:
Martin Matuska 2011-02-22 13:22:14 +00:00
parent cf0c80c7be
commit 4a3139de63
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=269500
6 changed files with 161 additions and 0 deletions

View file

@ -782,6 +782,7 @@
SUBDIR += libepp-nicbr
SUBDIR += libev
SUBDIR += libevent
SUBDIR += libevent2
SUBDIR += libevocosm
SUBDIR += libexecinfo
SUBDIR += libffi

58
devel/libevent2/Makefile Normal file
View file

@ -0,0 +1,58 @@
# New ports collection makefile for: libevent2
# Date created: 22 February 2011
# Whom: Martin Matuska <mm@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= libevent2
DISTVERSION= 2.0.10
CATEGORIES= devel
MASTER_SITES= http://monkey.org/~provos/
DISTNAME= ${PORTNAME:S/2//}-${DISTVERSION}-stable
MAINTAINER= mm@FreeBSD.org
COMMENT= API for executing callback functions on events or timeouts
USE_GNOME= lthack
GNU_CONFIGURE= yes
USE_LDCONFIG= ${PREFIX}/lib/event2
OPTIONS= OPENSSL "Enable OpenSSL support" on \
THREADS "Enable threads support" on
CONFIGURE_ARGS+= --libdir=${LOCALBASE}/lib/event2
.include <bsd.port.options.mk>
.if !defined(WITH_OPENSSL)
CONFIGURE_ARGS+= --disable-openssl
PLIST_SUB+= OPENSSL="@comment "
.else
USE_OPENSSL= yes
PLIST_SUB+= OPENSSL=""
.endif
.include <bsd.port.pre.mk>
.if !defined(WITH_THREADS)
CONFIGURE_ARGS+= --disable-thread-support
PLIST_SUB+= THREADS="@comment "
.else
CONFIGURE_ENV+= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
PTHREAD_LIBS="${PTHREAD_LIBS}"
PLIST_SUB+= THREADS=""
.endif
post-patch:
@${REINPLACE_CMD} -E \
-e "s,^pkgconfigdir =.*,pkgconfigdir = \$$(prefix)/libdata/pkgconfig,g" \
${WRKSRC}/Makefile.in
post-install:
@${INSTALL_SCRIPT} ${WRKSRC}/event_rpcgen.py ${PREFIX}/bin/event2_rpcgen.py
regression-test: build
@(${SH} ${WRKSRC}/test/regress)
.include <bsd.port.post.mk>

2
devel/libevent2/distinfo Normal file
View file

@ -0,0 +1,2 @@
SHA256 (libevent-2.0.10-stable.tar.gz) = a4b55810a9e21e9991b86ba5e82dbc9280598cc070544c4ecef4ab91b93dfc55
SIZE (libevent-2.0.10-stable.tar.gz) = 793010

View file

@ -0,0 +1,20 @@
--- Makefile.in.orig 2011-02-22 13:57:32.509779266 +0100
+++ Makefile.in 2011-02-22 14:03:10.651310739 +0100
@@ -338,7 +338,7 @@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
-includedir = @includedir@
+includedir = @includedir@/event2/compat
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
@@ -1130,7 +1130,7 @@
install-dvi-am:
-install-exec-am: install-dist_binSCRIPTS install-libLTLIBRARIES
+install-exec-am: install-libLTLIBRARIES
install-html: install-html-recursive

18
devel/libevent2/pkg-descr Normal file
View file

@ -0,0 +1,18 @@
The libevent API provides a mechanism to execute a callback function when
a specific event occurs on a file descriptor or after a timeout has been
reached. Furthermore, libevent also support callbacks due to signals or
regular timeouts.
libevent is meant to replace the event loop found in event driven network
servers. An application just needs to call event_dispatch() and then add
or remove events dynamically without having to change the event loop.
Currently, libevent supports /dev/poll, kqueue(2), event ports, select(2),
poll(2) and epoll(4). The internal event mechanism is completely independent
of the exposed event API, and a simple update of libevent can provide new
functionality without having to redesign the applications. As a result,
Libevent allows for portable application development and provides the most
scalable event notification mechanism available on an operating system.
Libevent can also be used for multi-threaded applications.
WWW: http://www.monkey.org/~provos/libevent/

62
devel/libevent2/pkg-plist Normal file
View file

@ -0,0 +1,62 @@
bin/event2_rpcgen.py
include/event2/compat/evdns.h
include/event2/compat/event.h
include/event2/compat/evhttp.h
include/event2/compat/evrpc.h
include/event2/compat/evutil.h
include/event2/keyvalq_struct.h
include/event2/util.h
include/event2/event-config.h
include/event2/event.h
include/event2/http_struct.h
include/event2/dns_compat.h
include/event2/thread.h
include/event2/rpc_struct.h
include/event2/tag_compat.h
include/event2/bufferevent_compat.h
include/event2/rpc.h
include/event2/bufferevent.h
include/event2/event_struct.h
include/event2/tag.h
include/event2/listener.h
include/event2/bufferevent_ssl.h
include/event2/http.h
include/event2/buffer_compat.h
include/event2/http_compat.h
include/event2/dns.h
include/event2/buffer.h
include/event2/rpc_compat.h
include/event2/dns_struct.h
include/event2/event_compat.h
include/event2/bufferevent_struct.h
lib/event2/libevent-2.0.so
lib/event2/libevent-2.0.so.5
lib/event2/libevent_core-2.0.so
lib/event2/libevent_core-2.0.so.5
lib/event2/libevent_core.a
lib/event2/libevent_core.la
lib/event2/libevent_core.so
lib/event2/libevent_extra-2.0.so
lib/event2/libevent_extra-2.0.so.5
lib/event2/libevent_extra.a
lib/event2/libevent_extra.la
lib/event2/libevent_extra.so
%%THREADS%%lib/event2/libevent_pthreads-2.0.so
%%THREADS%%lib/event2/libevent_pthreads-2.0.so.5
%%THREADS%%lib/event2/libevent_pthreads.a
%%THREADS%%lib/event2/libevent_pthreads.la
%%THREADS%%lib/event2/libevent_pthreads.so
%%OPENSSL%%lib/event2/libevent_openssl-2.0.so
%%OPENSSL%%lib/event2/libevent_openssl-2.0.so.5
%%OPENSSL%%lib/event2/libevent_openssl.a
%%OPENSSL%%lib/event2/libevent_openssl.la
%%OPENSSL%%lib/event2/libevent_openssl.so
lib/event2/libevent.a
lib/event2/libevent.la
lib/event2/libevent.so
libdata/pkgconfig/libevent.pc
%%THREADS%%libdata/pkgconfig/libevent_pthreads.pc
%%OPENSSL%%libdata/pkgconfig/libevent_openssl.pc
@dirrm lib/event2
@dirrm include/event2/compat
@dirrm include/event2