dev-libs/librdkafka: bump to v1.0.0
[gentoo.git] / dev-libs / librdkafka / librdkafka-0.11.6.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 toolchain-funcs
7
8 DESCRIPTION="Apache Kafka C/C++ client library"
9 HOMEPAGE="https://github.com/edenhill/librdkafka"
10
11 if [[ ${PV} == "9999" ]]; then
12         EGIT_REPO_URI="https://github.com/edenhill/${PN}.git"
13
14         inherit git-r3
15 else
16         SRC_URI="https://github.com/edenhill/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
17         KEYWORDS="amd64 arm ~arm64 hppa ~ppc x86"
18 fi
19
20 LICENSE="BSD-2"
21
22 # subslot = soname version
23 SLOT="0/1"
24
25 IUSE="lz4 sasl ssl static-libs"
26
27 RDEPEND="
28         lz4? ( app-arch/lz4:=[static-libs(-)?] )
29         sasl? ( dev-libs/cyrus-sasl:= )
30         ssl? ( dev-libs/openssl:0= )
31         sys-libs/zlib
32 "
33
34 DEPEND="
35         ${RDEPEND}
36         virtual/pkgconfig
37 "
38
39 src_configure() {
40         tc-export CC CXX LD NM OBJDUMP PKG_CONFIG STRIP
41
42         local myeconf=(
43                 --no-cache
44                 --no-download
45                 --disable-debug-symbols
46                 $(use_enable lz4)
47                 $(use_enable sasl)
48                 $(usex static-libs '--enable-static' '')
49                 $(use_enable ssl)
50         )
51
52         econf ${myeconf[@]}
53 }
54
55 src_test() {
56         emake -C tests run_local
57 }
58
59 src_install() {
60         local DOCS=(
61                 README.md
62                 CONFIGURATION.md
63                 INTRODUCTION.md
64         )
65
66         default
67
68         if ! use static-libs; then
69                 find "${ED}"/usr/lib* -name '*.la' -o -name '*.a' -delete || die
70         fi
71 }