git: ae7f77bb682a - main - devel/libevent-devel: new port had been copied from `devel/libevent'

From: Alexey Dokuchaev <danfe_at_FreeBSD.org>
Date: Mon, 05 Jun 2023 11:32:05 UTC
The branch main has been updated by danfe:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ae7f77bb682a91c1f6930a88c9773e86667e5f9f

commit ae7f77bb682a91c1f6930a88c9773e86667e5f9f
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2023-06-05 11:31:24 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2023-06-05 11:31:24 +0000

    devel/libevent-devel: new port had been copied from `devel/libevent'
    
    Current stable release is nearly three years old and lacks a number
    of new features and performance improvements.
    
    A fortnight ago, upstream had tagged pre-release 2.2.1-alpha, which
    this port offers to early adopters.
---
 devel/Makefile                                |  1 +
 devel/libevent-devel/Makefile                 | 38 ++++++++++++++++
 devel/libevent-devel/distinfo                 |  3 ++
 devel/libevent-devel/files/patch-test_test.sh | 32 ++++++++++++++
 devel/libevent-devel/pkg-descr                | 16 +++++++
 devel/libevent-devel/pkg-plist                | 64 +++++++++++++++++++++++++++
 6 files changed, 154 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 6a3fa9fb6447..5b8e8b1733ed 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -1222,6 +1222,7 @@
     SUBDIR += libevdev
     SUBDIR += libevdevplus
     SUBDIR += libevent
+    SUBDIR += libevent-devel
     SUBDIR += libevt
     SUBDIR += libevtx
     SUBDIR += libewf
diff --git a/devel/libevent-devel/Makefile b/devel/libevent-devel/Makefile
new file mode 100644
index 000000000000..212ea6b5a497
--- /dev/null
+++ b/devel/libevent-devel/Makefile
@@ -0,0 +1,38 @@
+PORTNAME=	libevent
+DISTVERSION=	2.2.1
+DISTVERSIONSUFFIX=	-alpha-dev
+CATEGORIES=	devel
+MASTER_SITES=	https://github.com/${PORTNAME}/${PORTNAME}/releases/download/release-${DISTVERSION}${DISTVERSIONSUFFIX}/
+PKGNAMESUFFIX=	-devel
+
+MAINTAINER=	kbowling@FreeBSD.org
+COMMENT=	API for executing callback functions on events or timeouts
+WWW=		https://libevent.org/
+
+LICENSE=	BSD3CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		cpe libtool pathfix pkgconfig python:env shebangfix
+SHEBANG_FILES=	event_rpcgen.py
+GNU_CONFIGURE=	yes
+CPE_VENDOR=	libevent_project
+INSTALL_TARGET=	install-strip
+TEST_TARGET=	check
+USE_LDCONFIG=	yes
+
+CONFLICTS_INSTALL=	${PORTNAME}
+
+OPTIONS_DEFINE=	OPENSSL THREADS MBEDTLS
+OPTIONS_DEFAULT=	OPENSSL THREADS
+OPTIONS_SUB=	yes
+
+MBEDTLS_LIB_DEPENDS=	libmbedtls.so:security/mbedtls
+MBEDTLS_USES=	localbase:ldflags
+MBEDTLS_CONFIGURE_OFF=	--disable-mbedtls
+
+OPENSSL_USES=	ssl
+OPENSSL_CONFIGURE_OFF=	--disable-openssl
+
+THREADS_CONFIGURE_OFF=	--disable-thread-support
+
+.include <bsd.port.mk>
diff --git a/devel/libevent-devel/distinfo b/devel/libevent-devel/distinfo
new file mode 100644
index 000000000000..5ce2a8c10bbd
--- /dev/null
+++ b/devel/libevent-devel/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1684653125
+SHA256 (libevent-2.2.1-alpha-dev.tar.gz) = 36d0726e570fc2ee61a0a27cfb6bf2799e14a28d030a7473a7a2411f7533d359
+SIZE (libevent-2.2.1-alpha-dev.tar.gz) = 1166550
diff --git a/devel/libevent-devel/files/patch-test_test.sh b/devel/libevent-devel/files/patch-test_test.sh
new file mode 100644
index 000000000000..ef1eed633ea5
--- /dev/null
+++ b/devel/libevent-devel/files/patch-test_test.sh
@@ -0,0 +1,32 @@
+regress runs multiple tests, don't silence it completely.
+
+https://github.com/libevent/libevent/pull/446
+
+--- test/test.sh.orig	2017-01-25 23:37:15 UTC
++++ test/test.sh
+@@ -99,10 +99,10 @@ run_tests () {
+ 	fi
+ 
+ 	test -x $TEST_DIR/regress || return
+-	announce_n " regress: "
++	announce " regress: [multiple tests]"
+ 	if test "$TEST_OUTPUT_FILE" = "/dev/null" ;
+ 	then
+-		$TEST_DIR/regress --quiet $REGRESS_ARGS
++		$TEST_DIR/regress $REGRESS_ARGS
+ 	else
+ 		$TEST_DIR/regress $REGRESS_ARGS >>"$TEST_OUTPUT_FILE"
+ 	fi
+@@ -114,10 +114,10 @@ run_tests () {
+ 		FAILED=yes
+ 	fi
+ 
+-	announce_n " regress_debug: "
++	announce " regress_debug: [multiple tests]"
+ 	if test "$TEST_OUTPUT_FILE" = "/dev/null" ;
+ 	then
+-		EVENT_DEBUG_MODE=1 $TEST_DIR/regress --quiet $REGRESS_ARGS
++		EVENT_DEBUG_MODE=1 $TEST_DIR/regress $REGRESS_ARGS
+ 	else
+ 		EVENT_DEBUG_MODE=1 $TEST_DIR/regress $REGRESS_ARGS >>"$TEST_OUTPUT_FILE"
+ 	fi
diff --git a/devel/libevent-devel/pkg-descr b/devel/libevent-devel/pkg-descr
new file mode 100644
index 000000000000..75fd8c367894
--- /dev/null
+++ b/devel/libevent-devel/pkg-descr
@@ -0,0 +1,16 @@
+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.
diff --git a/devel/libevent-devel/pkg-plist b/devel/libevent-devel/pkg-plist
new file mode 100644
index 000000000000..783d01b59001
--- /dev/null
+++ b/devel/libevent-devel/pkg-plist
@@ -0,0 +1,64 @@
+bin/event_rpcgen.py
+include/evdns.h
+include/event.h
+include/event2/buffer.h
+include/event2/buffer_compat.h
+include/event2/bufferevent.h
+include/event2/bufferevent_compat.h
+%%OPENSSL%%include/event2/bufferevent_ssl.h
+include/event2/bufferevent_struct.h
+include/event2/dns.h
+include/event2/dns_compat.h
+include/event2/dns_struct.h
+include/event2/event-config.h
+include/event2/event.h
+include/event2/event_compat.h
+include/event2/event_struct.h
+include/event2/http.h
+include/event2/http_compat.h
+include/event2/http_struct.h
+include/event2/keyvalq_struct.h
+include/event2/listener.h
+include/event2/rpc.h
+include/event2/rpc_compat.h
+include/event2/rpc_struct.h
+include/event2/tag.h
+include/event2/tag_compat.h
+include/event2/thread.h
+include/event2/util.h
+include/event2/visibility.h
+include/event2/watch.h
+include/event2/ws.h
+include/evhttp.h
+include/evrpc.h
+include/evutil.h
+lib/libevent-2.2.so.1
+lib/libevent-2.2.so.1.0.0
+lib/libevent.a
+lib/libevent.so
+lib/libevent_core-2.2.so.1
+lib/libevent_core-2.2.so.1.0.0
+lib/libevent_core.a
+lib/libevent_core.so
+lib/libevent_extra-2.2.so.1
+lib/libevent_extra-2.2.so.1.0.0
+lib/libevent_extra.a
+lib/libevent_extra.so
+%%MBEDTLS%%lib/libevent_mbedtls-2.2.so.1
+%%MBEDTLS%%lib/libevent_mbedtls-2.2.so.1.0.0
+%%MBEDTLS%%lib/libevent_mbedtls.a
+%%MBEDTLS%%lib/libevent_mbedtls.so
+%%OPENSSL%%lib/libevent_openssl-2.2.so.1
+%%OPENSSL%%lib/libevent_openssl-2.2.so.1.0.0
+%%OPENSSL%%lib/libevent_openssl.a
+%%OPENSSL%%lib/libevent_openssl.so
+%%THREADS%%lib/libevent_pthreads-2.2.so.1
+%%THREADS%%lib/libevent_pthreads-2.2.so.1.0.0
+%%THREADS%%lib/libevent_pthreads.a
+%%THREADS%%lib/libevent_pthreads.so
+libdata/pkgconfig/libevent.pc
+libdata/pkgconfig/libevent_core.pc
+libdata/pkgconfig/libevent_extra.pc
+%%MBEDTLS%%libdata/pkgconfig/libevent_mbedtls.pc
+%%OPENSSL%%libdata/pkgconfig/libevent_openssl.pc
+%%THREADS%%libdata/pkgconfig/libevent_pthreads.pc