dev-libs/nss: remove unused patches
[gentoo.git] / dev-libs / libevent / libevent-2.1.11.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 inherit multilib-minimal
6
7 DESCRIPTION="Library to execute a function when a specific event occurs on a file descriptor"
8 HOMEPAGE="https://libevent.org/ https://github.com/libevent/libevent/"
9 SRC_URI="
10         https://github.com/${PN}/${PN}/releases/download/release-${PV/_/-}-stable/${P/_/-}-stable.tar.gz -> ${P}.tar.gz
11 "
12 LICENSE="BSD"
13
14 SLOT="0/2.1-7"
15 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
16 IUSE="debug libressl +ssl static-libs test +threads"
17 RESTRICT="!test? ( test )"
18
19 DEPEND="
20         ssl? (
21                 !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] )
22                 libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
23         )
24 "
25 RDEPEND="
26         ${DEPEND}
27         !<=dev-libs/9libs-1.0
28 "
29 MULTILIB_WRAPPED_HEADERS=(
30         /usr/include/event2/event-config.h
31 )
32 S=${WORKDIR}/${P/_/-}-stable
33
34 multilib_src_configure() {
35         # fix out-of-source builds
36         mkdir -p test || die
37
38         ECONF_SOURCE="${S}" \
39         econf \
40                 --disable-samples \
41                 $(use_enable debug debug-mode) \
42                 $(use_enable debug malloc-replacement) \
43                 $(use_enable ssl openssl) \
44                 $(use_enable static-libs static) \
45                 $(use_enable test libevent-regress) \
46                 $(use_enable threads thread-support)
47 }
48
49 src_test() {
50         # The test suite doesn't quite work (see bug #406801 for the latest
51         # installment in a riveting series of reports).
52         :
53         # emake -C test check | tee "${T}"/tests
54 }
55
56 DOCS=( ChangeLog{,-1.4,-2.0} )
57
58 multilib_src_install_all() {
59         einstalldocs
60         find "${ED}" -name '*.la' -delete || die
61 }