net-libs/ldns: Remove py2.7
[gentoo.git] / net-libs / nghttp2 / nghttp2-9999.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 # TODO: Add python support.
5
6 EAPI=7
7
8 inherit multilib-minimal
9
10 if [[ ${PV} == 9999 ]] ; then
11         EGIT_REPO_URI="https://github.com/nghttp2/nghttp2.git"
12         inherit autotools git-r3
13 else
14         SRC_URI="https://github.com/nghttp2/nghttp2/releases/download/v${PV}/${P}.tar.xz"
15         KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
16 fi
17
18 DESCRIPTION="HTTP/2 C Library"
19 HOMEPAGE="https://nghttp2.org/"
20
21 LICENSE="MIT"
22 SLOT="0/1.14" # <C++>.<C> SONAMEs
23 IUSE="cxx debug hpack-tools jemalloc libressl static-libs test +threads utils xml"
24
25 RESTRICT="!test? ( test )"
26
27 SSL_DEPEND="
28         !libressl? ( >=dev-libs/openssl-1.0.2:0=[-bindist,${MULTILIB_USEDEP}] )
29         libressl? ( dev-libs/libressl:=[${MULTILIB_USEDEP}] )
30 "
31 RDEPEND="
32         cxx? (
33                 ${SSL_DEPEND}
34                 dev-libs/boost:=[${MULTILIB_USEDEP},threads]
35         )
36         hpack-tools? ( >=dev-libs/jansson-2.5 )
37         jemalloc? ( dev-libs/jemalloc[${MULTILIB_USEDEP}] )
38         utils? (
39                 ${SSL_DEPEND}
40                 >=dev-libs/libev-4.15[${MULTILIB_USEDEP}]
41                 >=sys-libs/zlib-1.2.3[${MULTILIB_USEDEP}]
42                 net-dns/c-ares:=[${MULTILIB_USEDEP}]
43         )
44         xml? ( >=dev-libs/libxml2-2.7.7:2[${MULTILIB_USEDEP}] )"
45 DEPEND="${RDEPEND}
46         virtual/pkgconfig
47         test? ( >=dev-util/cunit-2.1[${MULTILIB_USEDEP}] )"
48
49 src_prepare() {
50         default
51         [[ ${PV} == 9999 ]] && eautoreconf
52 }
53
54 multilib_src_configure() {
55         local myeconfargs=(
56                 --disable-examples
57                 --disable-failmalloc
58                 --disable-python-bindings
59                 --disable-werror
60                 --without-cython
61                 $(use_enable cxx asio-lib)
62                 $(use_enable debug)
63                 $(multilib_native_use_enable hpack-tools)
64                 $(use_enable static-libs static)
65                 $(use_enable threads)
66                 $(multilib_native_use_enable utils app)
67                 $(multilib_native_use_with jemalloc)
68                 $(multilib_native_use_with xml libxml2)
69         )
70         ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
71 }
72
73 multilib_src_install_all() {
74         if ! use static-libs ; then
75                 find "${ED}"/usr -name '*.la' -delete || die
76         fi
77 }