<pre style='margin:0'>
Ryan Schmidt (ryandesign) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/2be97f5d359234f8a68cc9fd9401c6c82bc6a6e5">https://github.com/macports/macports-ports/commit/2be97f5d359234f8a68cc9fd9401c6c82bc6a6e5</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 2be97f5d359 curl: add http3 variant
</span>2be97f5d359 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 2be97f5d359234f8a68cc9fd9401c6c82bc6a6e5
</span>Author: Marius Schamschula <mschamschula@gmail.com>
AuthorDate: Sun Jun 11 10:32:58 2023 -0500
<span style='display:block; white-space:pre;color:#404040;'> curl: add http3 variant
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Note: Currently MacPorts ngtcp2 only supports gnutls
</span><span style='display:block; white-space:pre;color:#404040;'> See: https://curl.se/docs/http3.html
</span>---
net/curl/Portfile | 9 +++
net/curl/files/patch-lib-vquic-curl_ngtcp2.c.diff | 67 +++++++++++++++++++++++
2 files changed, 76 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/net/curl/Portfile b/net/curl/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 9646fa4765d..6ccee67c6b3 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/net/curl/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/net/curl/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -209,6 +209,15 @@ if {${name} eq ${subport}} {
</span> default_variants-append +http2
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ variant http3 requires gnutls description {Support HTTP/3 with nghttp3 and ngtcp2} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append port:nghttp3 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:ngtcp2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append --with-nghttp3=${prefix} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --with-ngtcp2=${prefix}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append patch-lib-vquic-curl_ngtcp2.c.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> variant openldap description {Support performing Lightweight Directory Access Protocol queries with OpenLDAP} {
depends_lib-append path:lib/libldap.dylib:openldap
configure.args-replace --disable-ldap --enable-ldap
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/net/curl/files/patch-lib-vquic-curl_ngtcp2.c.diff b/net/curl/files/patch-lib-vquic-curl_ngtcp2.c.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..d7dbc4b49bb
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/net/curl/files/patch-lib-vquic-curl_ngtcp2.c.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,67 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git livquic/curl_ngtcp2.c livquic/curl_ngtcp2.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 7627940ff516b..4f097e3b18b24 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- lib/vquic/curl_ngtcp2.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ lib/vquic/curl_ngtcp2.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -327,7 +327,7 @@ static void quic_settings(struct cf_ngtcp2_ctx *ctx,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ t->initial_max_streams_uni = QUIC_MAX_STREAMS;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ t->max_idle_timeout = QUIC_IDLE_TIMEOUT;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if(ctx->qlogfd != -1) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- s->qlog.write = qlog_callback;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ s->qlog_write = qlog_callback;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -902,13 +902,13 @@ static int cb_get_new_connection_id(ngtcp2_conn *tconn, ngtcp2_cid *cid,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static int cb_recv_rx_key(ngtcp2_conn *tconn, ngtcp2_crypto_level level,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static int cb_recv_rx_key(ngtcp2_conn *tconn, ngtcp2_encryption_level level,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void *user_data)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ struct Curl_cfilter *cf = user_data;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (void)tconn;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if(level != NGTCP2_CRYPTO_LEVEL_APPLICATION) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if(level != NGTCP2_ENCRYPTION_LEVEL_1RTT) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1207,7 +1207,8 @@ static int cb_h3_stop_sending(nghttp3_conn *conn, int64_t stream_id,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (void)conn;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (void)stream_user_data;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- rv = ngtcp2_conn_shutdown_stream_read(ctx->qconn, stream_id, app_error_code);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ rv = ngtcp2_conn_shutdown_stream_read(ctx->qconn, 0, stream_id,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ app_error_code);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if(rv && rv != NGTCP2_ERR_STREAM_NOT_FOUND) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return NGTCP2_ERR_CALLBACK_FAILURE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1225,7 +1226,7 @@ static int cb_h3_reset_stream(nghttp3_conn *conn, int64_t stream_id,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (void)conn;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (void)data;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- rv = ngtcp2_conn_shutdown_stream_write(ctx->qconn, stream_id,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ rv = ngtcp2_conn_shutdown_stream_write(ctx->qconn, 0, stream_id,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ app_error_code);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ DEBUGF(LOG_CF(data, cf, "[h3sid=%" PRId64 "] reset -> %d", stream_id, rv));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if(rv && rv != NGTCP2_ERR_STREAM_NOT_FOUND) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1249,7 +1250,8 @@ static nghttp3_callbacks ngh3_callbacks = {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cb_h3_stop_sending,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ NULL, /* end_stream */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cb_h3_reset_stream,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- NULL /* shutdown */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ NULL, /* shutdown */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ NULL /* recv_settings */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ };
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static int init_ngh3_conn(struct Curl_cfilter *cf)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2402,7 +2404,7 @@ static CURLcode cf_ngtcp2_connect(struct Curl_cfilter *cf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ out:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if(result == CURLE_RECV_ERROR && ctx->qconn &&
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ngtcp2_conn_is_in_draining_period(ctx->qconn)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ngtcp2_conn_in_draining_period(ctx->qconn)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* When a QUIC server instance is shutting down, it may send us a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * CONNECTION_CLOSE right away. Our connection then enters the DRAINING
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * state.
</span></pre><pre style='margin:0'>
</pre>