dev-libs/libxml2: arm64 stable (bug #701020)
[gentoo.git] / dev-libs / libverto / libverto-0.3.0.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit autotools multilib-minimal
7
8 DESCRIPTION="Main event loop abstraction library"
9 HOMEPAGE="https://github.com/latchset/libverto/"
10 SRC_URI="https://github.com/latchset/libverto/releases/download/${PV}/${P}.tar.gz"
11
12 LICENSE="MIT"
13 SLOT="0"
14 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86"
15 IUSE="glib +libev libevent tevent +threads static-libs"
16
17 # file collisions
18 DEPEND="!=app-crypt/mit-krb5-1.10.1-r0
19         !=app-crypt/mit-krb5-1.10.1-r1
20         !=app-crypt/mit-krb5-1.10.1-r2
21         glib? ( >=dev-libs/glib-2.34.3[${MULTILIB_USEDEP}] )
22         libev? ( >=dev-libs/libev-4.15[${MULTILIB_USEDEP}] )
23         libevent? ( >=dev-libs/libevent-2.0.21[${MULTILIB_USEDEP}] )
24         tevent? ( >=sys-libs/tevent-0.9.19[${MULTILIB_USEDEP}] )"
25
26 RDEPEND="${DEPEND}"
27
28 REQUIRED_USE="|| ( glib libev libevent tevent ) "
29
30 PATCHES=( "${FILESDIR}/${PN}-libev-c89.patch" \
31         "${FILESDIR}/${PN}-verify-cflags.patch" \
32         "${FILESDIR}/${PN}-Wflags.patch" \
33         "${FILESDIR}/${PN}-load.patch" )
34
35 DOCS=( AUTHORS ChangeLog NEWS INSTALL README )
36
37 src_prepare() {
38         default
39         # known problem uptream with tevent write test.  tevent does not fire a
40         # callback on error, but we explicitly test for this behaviour.  Do not run
41         # tevent tests for now.
42         sed -i -e 's/def HAVE_TEVENT/ 0/' tests/test.h || die
43         eautoreconf
44 }
45
46 multilib_src_configure() {
47         ECONF_SOURCE="${S}" \
48         econf \
49                 $(use_with glib) \
50                 $(use_with libev) \
51                 $(use_with libevent) \
52                 $(use_with tevent) \
53                 $(use_with threads pthread) \
54                 $(use_enable static-libs static)
55 }
56
57 multilib_src_install_all() {
58         default
59         use static-libs || find "${ED}" -name '*.la' -delete
60 }