net-libs/loudmouth: add 1.5.3-r2
[gentoo.git] / net-libs / loudmouth / loudmouth-1.5.3-r2.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 inherit autotools
6
7 DESCRIPTION="Lightweight C Jabber library"
8 HOMEPAGE="https://github.com/mcabber/loudmouth"
9 SRC_URI="https://github.com/mcabber/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
10
11 LICENSE="LGPL-2.1"
12 SLOT="0"
13 KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~ppc-macos"
14
15 IUSE="asyncns ssl openssl static-libs test"
16
17 # Automagic libidn dependency
18 RDEPEND="
19         >=dev-libs/glib-2.16:2
20         net-dns/libidn
21         ssl? (
22                 !openssl? ( >=net-libs/gnutls-1.4.0:0= )
23                 openssl? ( dev-libs/openssl:0= )
24         )
25         asyncns? ( >=net-libs/libasyncns-0.3 )
26 "
27 DEPEND="${RDEPEND}
28         test? ( dev-libs/check )
29         virtual/pkgconfig
30 "
31
32 PATCHES=(
33         "${FILESDIR}"/${P}-gcc7.patch
34         "${FILESDIR}"/${P}-skip-gtk-doc.patch
35 )
36
37 src_prepare() {
38         default
39         eautoreconf
40 }
41
42 src_configure() {
43         local myconf
44
45         if use ssl; then
46                 if ! use openssl; then
47                         myconf="${myconf} --with-ssl=gnutls"
48                 else
49                         myconf="${myconf} --with-ssl=openssl"
50                 fi
51         else
52                 myconf="${myconf} --with-ssl=no"
53         fi
54
55         econf \
56                 $(use_enable static-libs static) \
57                 $(use_with asyncns) \
58                 ${myconf}
59 }