summaryrefslogtreecommitdiff
path: root/dev-libs/libevent
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-05-02 23:23:40 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-05-02 23:23:40 +0100
commitf20958f66a5e97c92cc44354e07e3e3089dfc23d (patch)
treefbf2993fb14c0f373d35922030b711e3fda4f864 /dev-libs/libevent
parente805507c58bab294dddb75f6fc9b551d9d92de86 (diff)
gentoo auto-resync : 02:05:2023 - 23:23:39
Diffstat (limited to 'dev-libs/libevent')
-rw-r--r--dev-libs/libevent/Manifest5
-rw-r--r--dev-libs/libevent/files/libevent-2.1.12-clang16.patch105
-rw-r--r--dev-libs/libevent/files/libevent-2.1.12-libressl.patch30
-rw-r--r--dev-libs/libevent/libevent-2.1.12-r1.ebuild5
-rw-r--r--dev-libs/libevent/libevent-2.1.9999.ebuild66
5 files changed, 143 insertions, 68 deletions
diff --git a/dev-libs/libevent/Manifest b/dev-libs/libevent/Manifest
index 3b8cbd79d078..b74c03f270ee 100644
--- a/dev-libs/libevent/Manifest
+++ b/dev-libs/libevent/Manifest
@@ -1,5 +1,6 @@
+AUX libevent-2.1.12-clang16.patch 3562 BLAKE2B d2cf6b7d9499330f0ea5abddd935b2370da2f82e8941a82b81ed9821297d77f1ac39195b12f7966edd06f909491e6ab519fc28c11d97fe6014a646e6431eb038 SHA512 e6d2dbd3e0db9afc4d60a23c7302d56be74aed355d975b6a401fec1c33d7252f67854354249683a0722cccb0176f554e641d2366e9ac00c47edf7d381fbe3de3
+AUX libevent-2.1.12-libressl.patch 1237 BLAKE2B 796e4138fa97ff99c6431ee0de84f8ff23469d2b761f83190679b1c7bf19a3354087948707fbcf1b5e6172e65c91b0848acf701e907ab7b08f6a3e712208ce15 SHA512 491311429b0ec63b90c27228271830d55590090623cac4b4400bec4b46bed3f0e7542ef671f467afc1732e3b76eec448179734c2c642d13cbccf8508fae1bf20
DIST libevent-2.1.12.tar.gz 1100847 BLAKE2B bc1ace15f639ecef2e6b3f95976b8830c1d86f1d06606dd949e2978611fdf9859ed4eb9292d13e6e90e3835063edb94aae64a15c518d5dabe680f37d5a7f5290 SHA512 88d8944cd75cbe78bc4e56a6741ca67c017a3686d5349100f1c74f8a68ac0b6410ce64dff160be4a4ba0696ee29540dfed59aaf3c9a02f0c164b00307fcfe84f
-EBUILD libevent-2.1.12-r1.ebuild 1736 BLAKE2B f9f6279d09e91a7e378e2d52054ce3c1f550228a23ef1b794aadc1407458c52143b224e4713266648115c4c4cc6ba77cda54e8b958c5212e3c77ead92df1e46e SHA512 8b2c35dff6be4a1ccb445b714c4227a7636d579e21ae556b19fd9f3b21cc476baf38ba44cb8e9d783213fd97e7297383d7fac546f53f0cc3ac8ee51f8bf115ba
-EBUILD libevent-2.1.9999.ebuild 1323 BLAKE2B 64f054d7b7fd01f9429da6dc6d08529364b98e996f13e40f5ffc0664244fd46340f499907c649c62462d0b9171e1406637414d5fc444754923282e9209b58ea4 SHA512 b80d887f868f8ea5efd52ffc09d6c5c1e2cc1a9773d2b029ee07287d3507a7cff1bb13d7316cd9e62226aeb76527ee20abb200353770373652bf45228a6c7962
+EBUILD libevent-2.1.12-r1.ebuild 1834 BLAKE2B f249081803492a9adf9fbc5021fdba2a9734063ce57235f43dfa68fb515a8de56aca28f8b077bc7ec00a25069a9e2b1b25a04f52a6bf476caa9d0ca59d7b1b58 SHA512 ceb95f6651595ffcbcffe59d74c7b0862e24d9a8e08be2d70e1ac3f5dc6cab887dd643652f69a00569a257581e60bf1c64cc49116f40218dde525d1ad4dd951f
EBUILD libevent-9999.ebuild 1325 BLAKE2B cf9b2d43f87d6dede05b4a8249e041c793eb38187e20f445b08dfc8ababda07b4dec48a6fcd4a57178ca90e6b2f29b22de38a3c19c9635ffed6ee59d70518a6f SHA512 bb2d56df73c13844fbc6627480f2f9e4dc7de150316c4df0df823dda1a9508f3603db945678fc27c7ec40a9e45546d2fcac67955ee5353ab56886aa31de72fda
MISC metadata.xml 935 BLAKE2B 45e1677dd467a0b9f0de89bf9966cec3368da090bc330c7b31aa8528d19440e3523ef3afb67d27102cbf4b40ad8343dc03d040f5961629e2a43d55fe46d7e5a6 SHA512 a7a5ac5c59e2a767bbb511c4eefb53535d894a936d5cd0e9206c176a4f50dfc90387a46a35ece2b48740974f9352793ab56026573678ab74e3e1e5250799bdcf
diff --git a/dev-libs/libevent/files/libevent-2.1.12-clang16.patch b/dev-libs/libevent/files/libevent-2.1.12-clang16.patch
new file mode 100644
index 000000000000..2ecf2472079f
--- /dev/null
+++ b/dev-libs/libevent/files/libevent-2.1.12-clang16.patch
@@ -0,0 +1,105 @@
+https://bugs.gentoo.org/880381
+https://github.com/libevent/libevent/commit/35375101e741d78bf49642c6929c1eb69a7c3d79
+
+From 35375101e741d78bf49642c6929c1eb69a7c3d79 Mon Sep 17 00:00:00 2001
+From: Azat Khuzhin <azat@libevent.org>
+Date: Fri, 27 Jan 2023 08:57:33 +0100
+Subject: [PATCH] Fixes some new warnings under clang-15
+
+- -Wdeprecated-non-prototype
+
+ /src/le/libevent/strlcpy.c:48:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
+ event_strlcpy_(dst, src, siz)
+
+- -Wstrict-prototypes
+
+ /src/le/libevent/evthread.c:82:70: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
+ struct evthread_condition_callbacks *evthread_get_condition_callbacks()
+
+- -Wunused-but-set-variable
+
+ /src/le/libevent/test/regress_buffer.c:130:6: warning: variable 'n' set but not used [-Wunused-but-set-variable]
+ int n = 0;
+ ^
+---
+ evthread.c | 4 ++--
+ strlcpy.c | 6 +-----
+ test/regress_buffer.c | 5 -----
+ 3 files changed, 3 insertions(+), 12 deletions(-)
+
+diff --git a/evthread.c b/evthread.c
+index 3eac594d64..c2da914da1 100644
+--- a/evthread.c
++++ b/evthread.c
+@@ -74,12 +74,12 @@ evthread_set_id_callback(unsigned long (*id_fn)(void))
+ evthread_id_fn_ = id_fn;
+ }
+
+-struct evthread_lock_callbacks *evthread_get_lock_callbacks()
++struct evthread_lock_callbacks *evthread_get_lock_callbacks(void)
+ {
+ return evthread_lock_debugging_enabled_
+ ? &original_lock_fns_ : &evthread_lock_fns_;
+ }
+-struct evthread_condition_callbacks *evthread_get_condition_callbacks()
++struct evthread_condition_callbacks *evthread_get_condition_callbacks(void)
+ {
+ return evthread_lock_debugging_enabled_
+ ? &original_cond_fns_ : &evthread_cond_fns_;
+diff --git a/strlcpy.c b/strlcpy.c
+index 3876475f5a..04c74298dc 100644
+--- a/strlcpy.c
++++ b/strlcpy.c
+@@ -44,11 +44,7 @@ static char *rcsid = "$OpenBSD: strlcpy.c,v 1.5 2001/05/13 15:40:16 deraadt Exp
+ * will be copied. Always NUL terminates (unless siz == 0).
+ * Returns strlen(src); if retval >= siz, truncation occurred.
+ */
+-size_t
+-event_strlcpy_(dst, src, siz)
+- char *dst;
+- const char *src;
+- size_t siz;
++size_t event_strlcpy_(char *dst, const char *src, size_t siz)
+ {
+ register char *d = dst;
+ register const char *s = src;
+diff --git a/test/regress_buffer.c b/test/regress_buffer.c
+index 5683810e26..b0a9e0c162 100644
+--- a/test/regress_buffer.c
++++ b/test/regress_buffer.c
+@@ -127,19 +127,16 @@ evbuffer_get_waste(struct evbuffer *buf, size_t *allocatedp, size_t *wastedp, si
+ {
+ struct evbuffer_chain *chain;
+ size_t a, w, u;
+- int n = 0;
+ u = a = w = 0;
+
+ chain = buf->first;
+ /* skip empty at start */
+ while (chain && chain->off==0) {
+- ++n;
+ a += chain->buffer_len;
+ chain = chain->next;
+ }
+ /* first nonempty chain: stuff at the end only is wasted. */
+ if (chain) {
+- ++n;
+ a += chain->buffer_len;
+ u += chain->off;
+ if (chain->next && chain->next->off)
+@@ -148,7 +145,6 @@ evbuffer_get_waste(struct evbuffer *buf, size_t *allocatedp, size_t *wastedp, si
+ }
+ /* subsequent nonempty chains */
+ while (chain && chain->off) {
+- ++n;
+ a += chain->buffer_len;
+ w += (size_t)chain->misalign;
+ u += chain->off;
+@@ -158,7 +154,6 @@ evbuffer_get_waste(struct evbuffer *buf, size_t *allocatedp, size_t *wastedp, si
+ }
+ /* subsequent empty chains */
+ while (chain) {
+- ++n;
+ a += chain->buffer_len;
+ }
+ *allocatedp = a;
diff --git a/dev-libs/libevent/files/libevent-2.1.12-libressl.patch b/dev-libs/libevent/files/libevent-2.1.12-libressl.patch
new file mode 100644
index 000000000000..4c809aface12
--- /dev/null
+++ b/dev-libs/libevent/files/libevent-2.1.12-libressl.patch
@@ -0,0 +1,30 @@
+https://bugs.gentoo.org/903001
+https://github.com/libevent/libevent/issues/1277
+https://github.com/libevent/libevent/pull/1227
+https://github.com/libevent/libevent/commit/883630f76cbf512003b81de25cd96cb75c6cf0f9
+
+From 883630f76cbf512003b81de25cd96cb75c6cf0f9 Mon Sep 17 00:00:00 2001
+From: Theo Buehler <tb@openbsd.org>
+Date: Sun, 21 Nov 2021 21:38:20 +0100
+Subject: [PATCH] Don't define BIO_get_init() for LibreSSL 3.5+
+
+BIO_get_init() is available in LibreSSL 3.5 and later. The BIO type
+will become opaque, so the existing macro will break the build.
+---
+ openssl-compat.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/openssl-compat.h b/openssl-compat.h
+index a23e34251b..f5de25539f 100644
+--- a/openssl-compat.h
++++ b/openssl-compat.h
+@@ -40,7 +40,8 @@ static inline BIO_METHOD *BIO_meth_new(int type, const char *name)
+ #endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
+ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) */
+
+-#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x20700000L
++#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x20700000L && \
++ LIBRESSL_VERSION_NUMBER < 0x30500000L
+ #define BIO_get_init(b) (b)->init
+ #endif
+
diff --git a/dev-libs/libevent/libevent-2.1.12-r1.ebuild b/dev-libs/libevent/libevent-2.1.12-r1.ebuild
index 2077b9fd606f..52b0dc8fd562 100644
--- a/dev-libs/libevent/libevent-2.1.12-r1.ebuild
+++ b/dev-libs/libevent/libevent-2.1.12-r1.ebuild
@@ -37,6 +37,11 @@ MULTILIB_WRAPPED_HEADERS=(
)
S=${WORKDIR}/${P/_/-}-stable
+PATCHES=(
+ "${FILESDIR}"/${P}-clang16.patch #880381
+ "${FILESDIR}"/${P}-libressl.patch #903001
+)
+
src_prepare() {
default
# bug #767472
diff --git a/dev-libs/libevent/libevent-2.1.9999.ebuild b/dev-libs/libevent/libevent-2.1.9999.ebuild
deleted file mode 100644
index 41545a096b4c..000000000000
--- a/dev-libs/libevent/libevent-2.1.9999.ebuild
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-inherit autotools git-r3 multilib-minimal
-
-DESCRIPTION="Library to execute a function when a specific event occurs on a file descriptor"
-EGIT_BRANCH="patches-$(ver_cut 1-2)"
-EGIT_REPO_URI="https://github.com/libevent/libevent"
-HOMEPAGE="
- https://libevent.org/
- https://github.com/libevent/libevent
-"
-
-LICENSE="BSD"
-# libevent-2.1.so.6
-SLOT="0/2.1-7"
-KEYWORDS=""
-IUSE="
- +clock-gettime debug malloc-replacement +ssl static-libs test
- verbose-debug
-"
-RESTRICT="test"
-
-DEPEND="
- ssl? (
- >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}]
- )
-"
-RDEPEND="
- ${DEPEND}
- !<=dev-libs/9libs-1.0
-"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/event2/event-config.h
-)
-DOCS=(
- ChangeLog{,-1.4,-2.0}
-)
-
-src_prepare() {
- default
- eautoreconf
-}
-
-multilib_src_configure() {
- # fix out-of-source builds
- mkdir -p test || die
-
- ECONF_SOURCE="${S}" \
- econf \
- $(use_enable clock-gettime) \
- $(use_enable debug debug-mode) \
- $(use_enable malloc-replacement malloc-replacement) \
- $(use_enable ssl openssl) \
- $(use_enable static-libs static) \
- $(use_enable test libevent-regress) \
- $(use_enable verbose-debug) \
- --disable-samples
-}
-
-multilib_src_install_all() {
- einstalldocs
- find "${ED}" -name '*.la' -delete || die
-}