1SUMMARY="HTTP/3 C Library"
2DESCRIPTION="nghttp3 is an implementation of HTTP/3 in C."
3HOMEPAGE="https://nghttp3.org/"
4COPYRIGHT="2019-2024 nghttp3 contributors"
5LICENSE="MIT"
6REVISION="1"
7SOURCE_URI="https://github.com/ngtcp2/nghttp3/releases/download/v$portVersion/nghttp3-$portVersion.tar.xz"
8CHECKSUM_SHA256="d2e216bae7bd7362f850922e4237a5caa204853b3594b22adccab4c1e1c1d1aa"
9
10ARCHITECTURES="all !x86_gcc2"
11SECONDARY_ARCHITECTURES="x86"
12
13libVersion="9.2.0"
14libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
15
16PROVIDES="
17	nghttp3$secondaryArchSuffix = $portVersion
18	lib:libnghttp3$secondaryArchSuffix = $libVersionCompat
19	"
20REQUIRES="
21	haiku$secondaryArchSuffix
22	"
23
24PROVIDES_devel="
25	nghttp3${secondaryArchSuffix}_devel = $portVersion
26	devel:libnghttp3$secondaryArchSuffix = $libVersionCompat
27	"
28REQUIRES_devel="
29	nghttp3$secondaryArchSuffix == $portVersion base
30	"
31
32BUILD_REQUIRES="
33	haiku${secondaryArchSuffix}_devel
34	"
35BUILD_PREREQUIRES="
36	cmd:aclocal
37	cmd:autoconf
38	cmd:automake
39	cmd:gcc$secondaryArchSuffix
40	cmd:make
41	cmd:pkg_config$secondaryArchSuffix
42	"
43
44defineDebugInfoPackage nghttp3$secondaryArchSuffix \
45	"$libDir"/libnghttp3.so.$libVersion
46
47BUILD()
48{
49	runConfigure ./configure
50
51	make $jobArgs
52}
53
54INSTALL()
55{
56	make install
57
58	rm -f "$libDir"/libnghttp3.la "$libDir"/libnghttp3.a
59
60	rm -rf "$manDir"/man1
61
62	prepareInstalledDevelLib libnghttp3
63	fixPkgconfig
64
65	packageEntries devel \
66		"$developDir"
67}
68
69TEST()
70{
71	make check
72}
73