* [gentoo-commits] repo/proj/libressl:master commit in: dev-libs/libevent/, dev-libs/libevent/files/
@ 2022-03-15 20:47 Quentin Retornaz
0 siblings, 0 replies; only message in thread
From: Quentin Retornaz @ 2022-03-15 20:47 UTC (permalink / raw
To: gentoo-commits
commit: d8450563f6e0d102847b7d20bbd0471c50fb5671
Author: Mike Skec <skec <AT> protonmail <DOT> ch>
AuthorDate: Tue Mar 15 01:09:45 2022 +0000
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Tue Mar 15 20:45:17 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=d8450563
dev-libs/libevent: add package with patch for LibreSSL 3.5+
Signed-off-by: Mike Skec <skec <AT> protonmail.ch>
Closes: https://github.com/gentoo/libressl/pull/386
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
dev-libs/libevent/Manifest | 1 +
.../libevent/files/libevent-2.1.12-libressl.patch | 25 +++++++
dev-libs/libevent/libevent-2.1.12.ebuild | 80 ++++++++++++++++++++++
dev-libs/libevent/metadata.xml | 21 ++++++
4 files changed, 127 insertions(+)
diff --git a/dev-libs/libevent/Manifest b/dev-libs/libevent/Manifest
new file mode 100644
index 0000000..204afbb
--- /dev/null
+++ b/dev-libs/libevent/Manifest
@@ -0,0 +1 @@
+DIST libevent-2.1.12.tar.gz 1100847 BLAKE2B bc1ace15f639ecef2e6b3f95976b8830c1d86f1d06606dd949e2978611fdf9859ed4eb9292d13e6e90e3835063edb94aae64a15c518d5dabe680f37d5a7f5290 SHA512 88d8944cd75cbe78bc4e56a6741ca67c017a3686d5349100f1c74f8a68ac0b6410ce64dff160be4a4ba0696ee29540dfed59aaf3c9a02f0c164b00307fcfe84f
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 0000000..be9e04d
--- /dev/null
+++ b/dev-libs/libevent/files/libevent-2.1.12-libressl.patch
@@ -0,0 +1,25 @@
+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.ebuild b/dev-libs/libevent/libevent-2.1.12.ebuild
new file mode 100644
index 0000000..2db7685
--- /dev/null
+++ b/dev-libs/libevent/libevent-2.1.12.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit libtool multilib-minimal
+
+DESCRIPTION="Library to execute a function when a specific event occurs on a file descriptor"
+HOMEPAGE="
+ https://libevent.org/
+ https://github.com/libevent/libevent/
+"
+SRC_URI="
+ https://github.com/${PN}/${PN}/releases/download/release-${PV/_/-}-stable/${P/_/-}-stable.tar.gz -> ${P}.tar.gz
+"
+LICENSE="BSD"
+
+SLOT="0/2.1-7"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="
+ +clock-gettime debug malloc-replacement +ssl static-libs test
+ +threads verbose-debug
+"
+RESTRICT="!test? ( 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
+)
+S=${WORKDIR}/${P/_/-}-stable
+
+src_prepare() {
+ default
+ # bug #767472
+ elibtoolize
+
+ # LibreSSL 3.5.0 compatibility patch.
+ # Will not be necessary in next release of libevent as this patch is
+ # already upstream
+ eapply "${FILESDIR}/${PN}-2.1.12-libressl.patch"
+}
+
+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 threads thread-support) \
+ $(use_enable verbose-debug) \
+ --disable-samples
+}
+
+src_test() {
+ # The test suite doesn't quite work (see bug #406801 for the latest
+ # installment in a riveting series of reports).
+ :
+ # emake -C test check | tee "${T}"/tests
+}
+
+DOCS=( ChangeLog{,-1.4,-2.0} )
+
+multilib_src_install_all() {
+ einstalldocs
+ find "${ED}" -name '*.la' -delete || die
+}
diff --git a/dev-libs/libevent/metadata.xml b/dev-libs/libevent/metadata.xml
new file mode 100644
index 0000000..382b011
--- /dev/null
+++ b/dev-libs/libevent/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:niels_provos:libevent</remote-id>
+ <remote-id type="github">libevent/libevent</remote-id>
+ <remote-id type="sourceforge">levent</remote-id>
+ </upstream>
+ <use>
+ <flag name="clock-gettime">Disable use of clock_gettime even if it is available</flag>
+ <flag name="debug">Support for running in debug mode</flag>
+ <flag name="malloc-replacement">Support for replacing the memory management functions</flag>
+ <flag name="mbedtls">Support for <pkg>net-libs/mbedtls</pkg> encryption</flag>
+ <flag name="ssl">Support for <pkg>dev-libs/openssl</pkg> encryption</flag>
+ <flag name="verbose-debug">Support for verbose debug logging</flag>
+ </use>
+</pkgmetadata>
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-03-15 21:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-15 20:47 [gentoo-commits] repo/proj/libressl:master commit in: dev-libs/libevent/, dev-libs/libevent/files/ Quentin Retornaz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox