dev-libs/librelp: bump to v1.4.0
[gentoo.git] / dev-libs / librelp / librelp-1.4.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 PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} )
6
7 inherit autotools python-any-r1
8
9 DESCRIPTION="An easy to use library for the RELP protocol"
10 HOMEPAGE="http://www.librelp.com/"
11 SRC_URI="http://download.rsyslog.com/${PN}/${P}.tar.gz"
12
13 LICENSE="GPL-3+ doc? ( FDL-1.3 )"
14
15 # subslot = soname version
16 SLOT="0/0.5.0"
17
18 KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~sparc ~x86"
19 IUSE="debug doc +ssl +gnutls libressl openssl static-libs test"
20 REQUIRED_USE="ssl? ( ^^ ( gnutls openssl ) )
21         gnutls? ( ssl )
22         openssl? ( ssl )
23         libressl? ( openssl )"
24
25 RDEPEND="ssl? (
26                 gnutls? ( >=net-libs/gnutls-3.3.17.1:0= )
27                 openssl? (
28                         !libressl? ( dev-libs/openssl:0= )
29                         libressl? ( dev-libs/libressl:0= )
30                 )
31         )"
32
33 DEPEND="ssl? (
34                 gnutls? ( >=net-libs/gnutls-3.3.17.1:0= )
35                 openssl? (
36                         !libressl? ( dev-libs/openssl:0= )
37                         libressl? ( dev-libs/libressl:0= )
38                 )
39         )
40         test? ( ${PYTHON_DEPS} )
41         virtual/pkgconfig"
42
43 RESTRICT="!test? ( test )"
44
45 pkg_setup() {
46         use test && python-any-r1_pkg_setup
47 }
48
49 src_prepare() {
50         sed -i \
51                 -e 's/ -g"/"/g' \
52                 configure.ac || die "sed failed"
53
54         default
55
56         eautoreconf
57 }
58
59 src_configure() {
60         local myeconfargs=(
61                 --disable-valgrind
62                 $(use_enable debug)
63                 $(use_enable gnutls tls)
64                 $(use_enable openssl tls-openssl)
65                 $(use_enable static-libs static)
66         )
67
68         econf "${myeconfargs[@]}"
69 }
70
71 src_test() {
72         emake -j1 check
73 }
74
75 src_install() {
76         local DOCS=( ChangeLog )
77         use doc && local HTML_DOCS=( doc/relp.html )
78         default
79
80         if ! use static-libs; then
81                 find "${ED%/}"/usr/lib* -name '*.la' -delete || die
82         fi
83 }