Diff libevent-2.2.1-r3 with a libevent-9999

/usr/portage/dev-libs/libevent/libevent-9999.ebuild 2026-07-11 20:03:05.967009021 +0300
1
# Copyright 1999-2025 Gentoo Authors
1
# Copyright 1999-2026 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4 4
EAPI=8
5 5

  
6
inherit multilib-minimal verify-sig
6
inherit cmake-multilib git-r3
7 7

  
8
MY_P="${P}-alpha-dev"
9 8
DESCRIPTION="Library to execute a function when a specific event occurs on a file descriptor"
10 9
HOMEPAGE="
11 10
	https://libevent.org/
12 11
	https://github.com/libevent/libevent/
13 12
"
14
BASE_URI="https://github.com/libevent/libevent/releases/download/release-${PV}-alpha"
15
SRC_URI="
16
	${BASE_URI}/${MY_P}.tar.gz
17
	verify-sig? (
18
		${BASE_URI}/${MY_P}.tar.gz.asc
19
	)
20
"
21
S=${WORKDIR}/${MY_P}
13
EGIT_REPO_URI="https://github.com/libevent/libevent.git"
22 14

  
23 15
LICENSE="BSD"
24 16
SLOT="0/2.2.1-r2"
......
31 23
RESTRICT="test"
32 24

  
33 25
DEPEND="
34
	mbedtls? ( net-libs/mbedtls:0=[${MULTILIB_USEDEP}] )
26
	mbedtls? ( net-libs/mbedtls:3=[${MULTILIB_USEDEP}] )
35 27
	ssl? ( >=dev-libs/openssl-1.0.1h-r2:=[${MULTILIB_USEDEP}] )
36 28
"
37 29
RDEPEND="
38 30
	${DEPEND}
39 31
"
40
BDEPEND="
41
	verify-sig? (
42
		sec-keys/openpgp-keys-libevent
43
	)
44
"
45 32

  
46
DOCS=( README.md ChangeLog{,-1.4,-2.0} whatsnew-2.{0,1}.txt )
33
DOCS=( README.md ChangeLog{,-2.0,-2.1} whatsnew-2.{0,1}.txt )
47 34
MULTILIB_WRAPPED_HEADERS=(
48 35
	/usr/include/event2/event-config.h
49 36
)
50
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/libevent.asc
51

  
52
PATCHES=(
53
	# signalfd-by-default breaks at least app-misc/tmux
54
	# https://github.com/libevent/libevent/pull/1486
55
	"${FILESDIR}/${P}-disable-signalfd.patch"
56
)
57 37

  
58 38
multilib_src_configure() {
59
	# fix out-of-source builds
60
	mkdir -p test || die
61

  
62
	local ECONF_SOURCE="${S}"
63
	local myconf=(
64
		$(use_enable clock-gettime)
65
		$(use_enable debug debug-mode)
66
		$(use_enable malloc-replacement malloc-replacement)
67
		$(use_enable mbedtls)
68
		$(use_enable ssl openssl)
69
		$(use_enable static-libs static)
70
		$(use_enable test libevent-regress)
71
		$(use_enable verbose-debug)
72
		--disable-samples
39
	local mycmakeargs=(
40
		-DEVENT__DISABLE_CLOCK_GETTIME=$(usex !clock-gettime ON OFF)
41
		-DEVENT__DISABLE_DEBUG_MODE=$(usex !debug ON OFF)
42
		-DEVENT__DISABLE_MBEDTLS=$(usex !mbedtls ON OFF)
43
		-DEVENT__DISABLE_MM_REPLACEMENT=$(usex !malloc-replacement ON OFF)
44
		-DEVENT__DISABLE_OPENSSL=$(usex !ssl ON OFF)
45
		-DEVENT__LIBRARY_TYPE=$(usex static-libs BOTH SHARED)
46
		-DCMAKE_DEBUG_POSTFIX=""
73 47
	)
74
	econf "${myconf[@]}"
75

  
76
	# workaround https://github.com/libevent/libevent/issues/1459
77
	sed -i -e 's:@CMAKE_DEBUG_POSTFIX@::' *.pc || die
78
}
79

  
80
multilib_src_install_all() {
81
	einstalldocs
82
	find "${ED}" -name '*.la' -delete || die
48
	cmake_src_configure
83 49
}
Thank you!