3 |
3 |
|
4 |
4 |
EAPI=8
|
5 |
5 |
|
6 |
|
inherit cmake-multilib
|
|
6 |
# Built with autotools rather than cmake to avoid circular dep (bug #951524
|
|
7 |
|
|
8 |
inherit multilib-minimal
|
7 |
9 |
|
8 |
10 |
if [[ ${PV} == 9999 ]] ; then
|
9 |
11 |
EGIT_REPO_URI="https://github.com/ngtcp2/ngtcp2.git"
|
10 |
|
inherit git-r3
|
|
12 |
inherit autotools git-r3
|
11 |
13 |
else
|
12 |
14 |
SRC_URI="https://github.com/ngtcp2/ngtcp2/releases/download/v${PV}/${P}.tar.xz"
|
13 |
|
KEYWORDS="amd64 arm arm64 hppa ~loong ~mips ~ppc ppc64 ~riscv sparc x86"
|
|
15 |
|
|
16 |
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
14 |
17 |
fi
|
15 |
18 |
|
16 |
19 |
DESCRIPTION="Implementation of the IETF QUIC Protocol"
|
17 |
|
HOMEPAGE="https://github.com/ngtcp2/ngtcp2/"
|
|
20 |
HOMEPAGE="https://github.com/ngtcp2/ngtcp2"
|
18 |
21 |
|
19 |
22 |
LICENSE="MIT"
|
20 |
23 |
SLOT="0/0"
|
21 |
|
IUSE="+gnutls openssl +ssl static-libs test"
|
22 |
|
# Without static-libs, src_test just won't run any tests and "pass".
|
23 |
|
REQUIRED_USE="ssl? ( || ( gnutls openssl ) ) test? ( static-libs )"
|
|
24 |
IUSE="+gnutls openssl +ssl"
|
|
25 |
REQUIRED_USE="ssl? ( || ( gnutls openssl ) )"
|
24 |
26 |
|
25 |
|
BDEPEND="virtual/pkgconfig"
|
26 |
27 |
RDEPEND="
|
27 |
28 |
ssl? (
|
28 |
29 |
gnutls? ( >=net-libs/gnutls-3.7.2:=[${MULTILIB_USEDEP}] )
|
29 |
30 |
openssl? ( >=dev-libs/openssl-1.1.1:=[${MULTILIB_USEDEP}] )
|
30 |
31 |
)
|
31 |
32 |
"
|
32 |
|
DEPEND="
|
33 |
|
${RDEPEND}
|
34 |
|
test? ( >=dev-util/cunit-2.1[${MULTILIB_USEDEP}] )
|
35 |
|
"
|
36 |
|
RESTRICT="!test? ( test )"
|
|
33 |
DEPEND="${RDEPEND}"
|
|
34 |
BDEPEND="virtual/pkgconfig"
|
|
35 |
|
|
36 |
src_prepare() {
|
|
37 |
default
|
|
38 |
[[ ${PV} == 9999 ]] && eautoreconf
|
|
39 |
}
|
37 |
40 |
|
38 |
41 |
multilib_src_configure() {
|
39 |
|
local mycmakeargs=(
|
40 |
|
-DENABLE_STATIC_LIB=$(usex static-libs)
|
41 |
|
-DENABLE_GNUTLS=$(usex gnutls)
|
42 |
|
-DENABLE_OPENSSL=$(usex openssl)
|
43 |
|
-DENABLE_BORINGSSL=OFF
|
44 |
|
-DENABLE_PICOTLS=OFF
|
45 |
|
-DENABLE_WOLFSSL=OFF
|
46 |
|
-DCMAKE_DISABLE_FIND_PACKAGE_Libev=ON
|
47 |
|
-DCMAKE_DISABLE_FIND_PACKAGE_Libnghttp3=ON
|
48 |
|
-DBUILD_TESTING=$(usex test)
|
|
42 |
local myeconfargs=(
|
|
43 |
--disable-werror
|
|
44 |
--enable-lib-only
|
|
45 |
$(use_with openssl)
|
|
46 |
$(use_with gnutls)
|
|
47 |
--without-boringssl
|
|
48 |
--without-picotls
|
|
49 |
--without-wolfssl
|
|
50 |
--without-libev
|
|
51 |
--without-libnghttp3
|
|
52 |
--without-jemalloc
|
49 |
53 |
)
|
50 |
|
cmake_src_configure
|
|
54 |
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
|
51 |
55 |
}
|
52 |
56 |
|
53 |
|
multilib_src_test() {
|
54 |
|
cmake_build check
|
|
57 |
multilib_src_install_all() {
|
|
58 |
einstalldocs
|
|
59 |
find "${ED}"/usr -type f -name '*.la' -delete || die
|
55 |
60 |
}
|