1 |
1 |
# Copyright 1999-2023 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
|
# TODO: Add python support.
|
5 |
|
|
6 |
4 |
EAPI=8
|
7 |
5 |
|
8 |
|
inherit autotools multilib-minimal
|
|
6 |
inherit cmake-multilib
|
9 |
7 |
|
10 |
8 |
DESCRIPTION="HTTP/2 C Library"
|
11 |
9 |
HOMEPAGE="https://nghttp2.org/"
|
12 |
|
SRC_URI="https://github.com/nghttp2/nghttp2/releases/download/v${PV}/${P}.tar.xz
|
13 |
|
https://dev.gentoo.org/~voyageur/distfiles/${PN}-1.51.0-pthread.patch"
|
|
10 |
SRC_URI="https://github.com/nghttp2/nghttp2/releases/download/v${PV}/${P}.tar.xz"
|
14 |
11 |
|
15 |
12 |
LICENSE="MIT"
|
16 |
|
SLOT="0/1.14" # <C++>.<C> SONAMEs
|
17 |
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x64-solaris"
|
18 |
|
IUSE="cxx debug hpack-tools jemalloc static-libs systemd test utils xml"
|
|
13 |
SLOT="0/1.14" # 1.<SONAME>
|
|
14 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
|
15 |
IUSE="debug hpack-tools jemalloc static-libs systemd test utils xml"
|
19 |
16 |
|
20 |
17 |
RESTRICT="!test? ( test )"
|
21 |
18 |
|
... | ... | |
23 |
20 |
>=dev-libs/openssl-1.0.2:0=[-bindist(-),${MULTILIB_USEDEP}]
|
24 |
21 |
"
|
25 |
22 |
RDEPEND="
|
26 |
|
cxx? (
|
27 |
|
${SSL_DEPEND}
|
28 |
|
dev-libs/boost:=[${MULTILIB_USEDEP}]
|
29 |
|
)
|
30 |
23 |
hpack-tools? ( >=dev-libs/jansson-2.5:= )
|
31 |
24 |
jemalloc? ( dev-libs/jemalloc:=[${MULTILIB_USEDEP}] )
|
32 |
25 |
utils? (
|
... | ... | |
35 |
28 |
>=sys-libs/zlib-1.2.3[${MULTILIB_USEDEP}]
|
36 |
29 |
net-dns/c-ares:=[${MULTILIB_USEDEP}]
|
37 |
30 |
)
|
38 |
|
systemd? ( sys-apps/systemd )
|
|
31 |
systemd? ( >=sys-apps/systemd-209 )
|
39 |
32 |
xml? ( >=dev-libs/libxml2-2.7.7:2[${MULTILIB_USEDEP}] )"
|
40 |
33 |
DEPEND="${RDEPEND}
|
41 |
34 |
test? ( >=dev-util/cunit-2.1[${MULTILIB_USEDEP}] )"
|
42 |
35 |
BDEPEND="virtual/pkgconfig"
|
43 |
36 |
|
44 |
|
PATCHES=(
|
45 |
|
"${DISTDIR}"/${PN}-1.51.0-pthread.patch
|
46 |
|
)
|
47 |
|
|
48 |
|
src_prepare() {
|
49 |
|
default
|
50 |
|
eautoreconf
|
51 |
|
}
|
52 |
|
|
53 |
37 |
multilib_src_configure() {
|
54 |
|
local myeconfargs=(
|
55 |
|
--disable-examples
|
56 |
|
--disable-failmalloc
|
57 |
|
--disable-python-bindings
|
58 |
|
--disable-werror
|
59 |
|
--enable-threads
|
60 |
|
--without-cython
|
61 |
|
$(use_enable cxx asio-lib)
|
62 |
|
$(use_enable debug)
|
63 |
|
$(multilib_native_use_enable hpack-tools)
|
64 |
|
$(multilib_native_use_with hpack-tools jansson)
|
65 |
|
$(multilib_native_use_with jemalloc)
|
66 |
|
$(use_enable static-libs static)
|
67 |
|
$(multilib_native_use_with systemd)
|
68 |
|
$(use_with test cunit)
|
69 |
|
$(multilib_native_use_enable utils app)
|
70 |
|
$(multilib_native_use_with xml libxml2)
|
|
38 |
local mycmakeargs=(
|
|
39 |
-DENABLE_EXAMPLES=OFF
|
|
40 |
-DENABLE_FAILMALLOC=OFF
|
|
41 |
-DENABLE_WERROR=OFF
|
|
42 |
-DENABLE_THREADS=ON
|
|
43 |
-DENABLE_DEBUG=$(usex debug)
|
|
44 |
-DENABLE_HPACK_TOOLS=$(multilib_native_usex hpack-tools)
|
|
45 |
$(cmake_use_find_package hpack-tools Jansson)
|
|
46 |
-DWITH_JEMALLOC=$(multilib_native_usex jemalloc)
|
|
47 |
-DENABLE_STATIC_LIB=$(usex static-libs)
|
|
48 |
$(cmake_use_find_package systemd Systemd)
|
|
49 |
$(cmake_use_find_package test CUnit)
|
|
50 |
-DENABLE_APP=$(multilib_native_usex utils)
|
|
51 |
-DWITH_LIBXML2=$(multilib_native_usex xml)
|
71 |
52 |
)
|
72 |
|
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
|
|
53 |
cmake_src_configure
|
73 |
54 |
}
|
74 |
55 |
|
75 |
|
multilib_src_install_all() {
|
76 |
|
if ! use static-libs ; then
|
77 |
|
find "${ED}"/usr -type f -name '*.la' -delete || die
|
78 |
|
fi
|
|
56 |
multilib_src_test() {
|
|
57 |
eninja check
|
79 |
58 |
}
|