Diff libevent-2.1.12-r1 with a libevent-2.2.1-r2

/usr/portage/dev-libs/libevent/libevent-2.2.1-r2.ebuild 2023-10-09 14:52:29.512368351 +0300
1 1
# Copyright 1999-2023 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=7
4
EAPI=8
5 5

  
6
inherit libtool multilib-minimal verify-sig
6
inherit multilib-minimal verify-sig
7 7

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

  
23 23
LICENSE="BSD"
24
SLOT="0/2.1-7"
25
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
24
SLOT="0/2.2.1-r2"
25
KEYWORDS=""
26 26
IUSE="
27
	+clock-gettime debug malloc-replacement +ssl static-libs test
28
	verbose-debug
27
	+clock-gettime debug malloc-replacement mbedtls +ssl static-libs
28
	test verbose-debug
29 29
"
30
RESTRICT="!test? ( test )"
30
# TODO: hangs
31
RESTRICT="test"
31 32

  
32 33
DEPEND="
33
	ssl? (
34
		>=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}]
35
	)
34
	mbedtls? ( net-libs/mbedtls:=[${MULTILIB_USEDEP}] )
35
	ssl? ( >=dev-libs/openssl-1.0.1h-r2:=[${MULTILIB_USEDEP}] )
36 36
"
37 37
RDEPEND="
38 38
	${DEPEND}
39
	!<=dev-libs/9libs-1.0
40 39
"
41 40
BDEPEND="
42 41
	verify-sig? (
......
44 43
	)
45 44
"
46 45

  
46
DOCS=( README.md ChangeLog{,-1.4,-2.0} whatsnew-2.{0,1}.txt )
47 47
MULTILIB_WRAPPED_HEADERS=(
48 48
	/usr/include/event2/event-config.h
49 49
)
50
PATCHES=(
51
	"${FILESDIR}"/${P}-clang16.patch #880381
52
	"${FILESDIR}"/${P}-libressl.patch #903001
53
)
54 50
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/libevent.asc
55 51

  
56
src_prepare() {
57
	default
58
	# bug #767472
59
	elibtoolize
60
}
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
)
61 57

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

  
66
	ECONF_SOURCE="${S}" \
67
	econf \
68
		$(use_enable clock-gettime) \
69
		$(use_enable debug debug-mode) \
70
		$(use_enable malloc-replacement malloc-replacement) \
71
		$(use_enable ssl openssl) \
72
		$(use_enable static-libs static) \
73
		$(use_enable test libevent-regress) \
74
		$(use_enable verbose-debug) \
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)
75 72
		--disable-samples
76
}
73
	)
74
	econf "${myconf[@]}"
77 75

  
78
src_test() {
79
	# The test suite doesn't quite work (see bug #406801 for the latest
80
	# installment in a riveting series of reports).
81
	:
82
	# emake -C test check | tee "${T}"/tests
76
	# workaround https://github.com/libevent/libevent/issues/1459
77
	sed -i -e 's:@CMAKE_DEBUG_POSTFIX@::' *.pc || die
83 78
}
84 79

  
85
DOCS=( ChangeLog{,-1.4,-2.0} )
86

  
87 80
multilib_src_install_all() {
88 81
	einstalldocs
89 82
	find "${ED}" -name '*.la' -delete || die
Thank you!