Tuesday, November 08, 2022

Re: Add QUIC support for curl

Theo Buehler:

> Attached are two ports, net/ngtcp2 and www/nghttp2 which in combination
> with a couple of configure flags add QUIC support to curl. This is all
> work by jsing, somewhat cleaned up by me.

In principle, I'm fine with adding QUIC support to curl, and the
new dependencies don't seem that onerous.

nghttp3 needs --disable-examples, otherwise it tries to build
something with C++17, which I expect to prove problematic on our
remaining supported gcc4 arch.

> The cunit handling in the two new ports is taken from nghttp2, which may
> or may not be needed anymore.

That can be cleaned up in all three ports. For one, it doesn't
work. cunit needs to be around at configure time. If you add it
later, it won't be used and you will very successfully run a total
of 0 tests. Also, cunit itself doesn't seem restricted to particular
archs; there is a sparc64 package.

> It is hopefully acceptable to add two small dependencies to curl, but I
> assume we need to do some testing first to make sure we don't
> accidentally cripple an arch by breaking curl.

Indeed, all of this needs to be tested on sparc64.

> --- Makefile 7 Nov 2022 14:37:00 -0000 1.175
> +++ Makefile 8 Nov 2022 16:06:14 -0000
> @@ -14,14 +14,16 @@ PERMIT_PACKAGE= Yes
> MASTER_SITES= https://curl.se/download/
> EXTRACT_SUFX= .tar.xz
>
> -LIB_DEPENDS= www/nghttp2
> -WANTLIB= c crypto pthread nghttp2 ssl z
> +LIB_DEPENDS= www/nghttp2 www/nghttp3 net/ngtcp2
> +WANTLIB= c crypto pthread nghttp2 nghttp3 ngtcp2 ssl z

port-lib-depends-check complains about a missing ngtcp2_crypto_openssl
in WANTLIB.

> AUTOCONF_VERSION=2.71
> CONFIGURE_STYLE=autoconf
> # Beware of circular dependency curl -> brotli -> cmake -> curl
> CONFIGURE_ARGS= --with-openssl \
> --with-ca-bundle=/etc/ssl/cert.pem \
> + --with-nghttp3 \
> + --with-ngtcp2 \
> --without-brotli \
> --without-hyper \
> --without-libgsasl \

--with-ngtcp2 is enough, and please insert it alphabetically, i.e.,
after --without-libssh2.

--
Christian "naddy" Weisgerber naddy@mips.inka.de

No comments:

Post a Comment