aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorGuillaume Le Vaillant <glv@posteo.net>2024-01-10 13:27:11 +0100
committerGuillaume Le Vaillant <glv@posteo.net>2024-01-10 14:04:40 +0100
commit749c3e016a4297d2794cbebac0e07297d19b4ffd (patch)
tree59b0c93bcaa9ad6d53fd73d2627231e5f0cf9320 /gnu/packages/patches
parentea832b44b79fb06bac88679029773006fea15827 (diff)
parent537768018ee03a6a9a5562022a16b47ac287d131 (diff)
downloadguix-749c3e016a4297d2794cbebac0e07297d19b4ffd.tar.gz
guix-749c3e016a4297d2794cbebac0e07297d19b4ffd.zip
Merge branch 'master' into lisp-team
Change-Id: I6c2ce53e782a00861c3adf01c2505099daef7728
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/curl-use-ssl-cert-env.patch26
-rw-r--r--gnu/packages/patches/dtc-meson-cell-overflow.patch32
-rw-r--r--gnu/packages/patches/emacs-ess-fix-obsolete-function-alias.patch23
-rw-r--r--gnu/packages/patches/ffmpeg-jami-change-RTCP-ratio.patch27
-rw-r--r--gnu/packages/patches/ffmpeg-jami-libopusdec-enable-FEC.patch127
-rw-r--r--gnu/packages/patches/ffmpeg-jami-libopusenc-enable-FEC.patch50
-rw-r--r--gnu/packages/patches/ffmpeg-jami-libopusenc-reload-packet-loss-at-encode.patch44
-rw-r--r--gnu/packages/patches/ffmpeg-jami-remove-mjpeg-log.patch26
-rw-r--r--gnu/packages/patches/ffmpeg-jami-rtp_ext_abs_send_time.patch71
-rw-r--r--gnu/packages/patches/ffmpeg-jami-screen-sharing-x11-fix.patch302
-rw-r--r--gnu/packages/patches/guile-fibers-libevent-timeout.patch61
-rw-r--r--gnu/packages/patches/jami-disable-integration-tests.patch10
-rw-r--r--gnu/packages/patches/jami-libjami-headers-search.patch5
-rw-r--r--gnu/packages/patches/jami-qml-tests-discovery.patch15
-rw-r--r--gnu/packages/patches/jami-skip-tests-requiring-internet.patch51
-rw-r--r--gnu/packages/patches/jami-unbundle-dependencies.patch71
-rw-r--r--gnu/packages/patches/libjami-ac-config-files.patch52
-rw-r--r--gnu/packages/patches/python-pyreadstat-link-libiconv.patch15
-rw-r--r--gnu/packages/patches/python-uqbar-python3.10.patch23
19 files changed, 990 insertions, 41 deletions
diff --git a/gnu/packages/patches/curl-use-ssl-cert-env.patch b/gnu/packages/patches/curl-use-ssl-cert-env.patch
index 24be6e31d9..c39c1f7e98 100644
--- a/gnu/packages/patches/curl-use-ssl-cert-env.patch
+++ b/gnu/packages/patches/curl-use-ssl-cert-env.patch
@@ -5,37 +5,37 @@ must be called when no other threads exist).
This fixes network functionality in rust:cargo, and probably removes the need
for other future workarounds.
===================================================================
---- curl-7.66.0.orig/lib/easy.c 2020-01-02 15:43:11.883921171 +0100
-+++ curl-7.66.0/lib/easy.c 2020-01-02 16:18:54.691882797 +0100
-@@ -134,6 +134,9 @@
- # pragma warning(default:4232) /* MSVC extension, dllimport identity */
+--- curl-8.5.0.orig/lib/easy.c 2023-12-17 00:36:32.400468561 -0500
++++ curl-8.5.0/lib/easy.c 2023-12-17 00:39:08.898612331 -0500
+@@ -137,6 +137,9 @@
+ static char *leakpointer;
#endif
-
+
+char * Curl_ssl_cert_dir = NULL;
+char * Curl_ssl_cert_file = NULL;
+
/**
* curl_global_init() globally initializes curl given a bitwise set of the
* different features of what to initialize.
-@@ -155,6 +158,9 @@
- #endif
+@@ -163,6 +166,9 @@
+ goto fail;
}
-
+
+ Curl_ssl_cert_dir = curl_getenv("SSL_CERT_DIR");
+ Curl_ssl_cert_file = curl_getenv("SSL_CERT_FILE");
+
if(!Curl_ssl_init()) {
DEBUGF(fprintf(stderr, "Error: Curl_ssl_init failed\n"));
- return CURLE_FAILED_INIT;
-@@ -260,6 +266,9 @@
+ goto fail;
+@@ -287,6 +293,9 @@
Curl_ssl_cleanup();
Curl_resolver_global_cleanup();
-
+
+ free(Curl_ssl_cert_dir);
+ free(Curl_ssl_cert_file);
+
- #ifdef WIN32
- Curl_win32_cleanup(init_flags);
+ #ifdef _WIN32
+ Curl_win32_cleanup(easy_init_flags);
#endif
diff -ur curl-7.66.0.orig/lib/url.c curl-7.66.0/lib/url.c
--- curl-7.66.0.orig/lib/url.c 2020-01-02 15:43:11.883921171 +0100
diff --git a/gnu/packages/patches/dtc-meson-cell-overflow.patch b/gnu/packages/patches/dtc-meson-cell-overflow.patch
new file mode 100644
index 0000000000..1c319312f7
--- /dev/null
+++ b/gnu/packages/patches/dtc-meson-cell-overflow.patch
@@ -0,0 +1,32 @@
+Taken from upstream:
+https://git.kernel.org/pub/scm/utils/dtc/dtc.git/commit/?id=32174a66efa4ad19fc6a2a6422e4af2ae4f055cb
+
+From 32174a66efa4ad19fc6a2a6422e4af2ae4f055cb Mon Sep 17 00:00:00 2001
+From: David Gibson <david@gibson.dropbear.id.au>
+Date: Tue, 28 Feb 2023 10:33:58 +1100
+Subject: [PATCH] meson: Fix cell overflow tests when running from meson
+
+Because meson always builds out-of-tree we need to reference things in the
+original source tree via $SRCDIR from run_tests.sh. We forgot a couple of
+cases for the cell overflow tests. Fix them.
+
+Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
+---
+ tests/run_tests.sh | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/run_tests.sh b/tests/run_tests.sh
+index 91350ad3..f899d8cb 100755
+--- a/tests/run_tests.sh
++++ b/tests/run_tests.sh
+@@ -519,8 +519,8 @@ libfdt_tests () {
+ check_tests "$SRCDIR/phandle-args-overflow.dts" clocks_property
+
+ ## https://github.com/dgibson/dtc/issues/74
+- run_dtc_test -I dts -O dtb -o cell-overflow-results.test.dtb cell-overflow-results.dts
+- run_dtc_test -I dts -O dtb -o cell-overflow.test.dtb cell-overflow.dts
++ run_dtc_test -I dts -O dtb -o cell-overflow-results.test.dtb "$SRCDIR/cell-overflow-results.dts"
++ run_dtc_test -I dts -O dtb -o cell-overflow.test.dtb "$SRCDIR/cell-overflow.dts"
+ run_test dtbs_equal_ordered cell-overflow.test.dtb cell-overflow-results.test.dtb
+
+ # check full tests
diff --git a/gnu/packages/patches/emacs-ess-fix-obsolete-function-alias.patch b/gnu/packages/patches/emacs-ess-fix-obsolete-function-alias.patch
deleted file mode 100644
index f7b61391c3..0000000000
--- a/gnu/packages/patches/emacs-ess-fix-obsolete-function-alias.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 9cc5520e1998d03f5dec0fbb1fe71b7cdec38b65 Mon Sep 17 00:00:00 2001
-From: Alex Branham <alex.branham@gmail.com>
-Date: Wed, 6 Jan 2021 06:41:20 -0500
-Subject: [PATCH] Add required when to obsolete function alias
-
-Closes #1085
----
- lisp/ess-r-package.el | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lisp/ess-r-package.el b/lisp/ess-r-package.el
-index 260959955..397ce14e6 100644
---- a/lisp/ess-r-package.el
-+++ b/lisp/ess-r-package.el
-@@ -577,7 +577,7 @@ package mode. Use this function if state of the buffer such as
- (error "As of ESS 16.04, `ess-developer' is deprecated. Use `ess-r-set-evaluation-env' instead"))
-
- (defalias 'ess-toggle-developer 'ess-developer)
--(define-obsolete-function-alias 'ess-r-devtools-check-package-buildwin 'ess-r-devtools-check-with-winbuilder)
-+(define-obsolete-function-alias 'ess-r-devtools-check-package-buildwin 'ess-r-devtools-check-with-winbuilder "18.04")
- (define-obsolete-function-alias 'ess-r-devtools-ask 'ess-r-devtools-execute-command "18.04")
-
- (make-obsolete-variable 'ess-developer "Please use `ess-developer-select-package' and `ess-r-set-evaluation-env' instead." "16.04")
diff --git a/gnu/packages/patches/ffmpeg-jami-change-RTCP-ratio.patch b/gnu/packages/patches/ffmpeg-jami-change-RTCP-ratio.patch
new file mode 100644
index 0000000000..6248165d8c
--- /dev/null
+++ b/gnu/packages/patches/ffmpeg-jami-change-RTCP-ratio.patch
@@ -0,0 +1,27 @@
+From a884b62c9e6f23b9f4369d724e25db2f42dad28d Mon Sep 17 00:00:00 2001
+From: Pierre LESPAGNOL <pierre.lespagnol@savoirfairelinux.com>
+Date: Tue, 28 May 2019 16:18:20 -0400
+Subject: [PATCH] Changement du ratio de 0.5% a 5%
+
+---
+ libavformat/rtp.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libavformat/rtp.h b/libavformat/rtp.h
+index 54512c6f71..16916ff86a 100644
+--- a/libavformat/rtp.h
++++ b/libavformat/rtp.h
+@@ -78,8 +78,8 @@ enum AVCodecID ff_rtp_codec_id(const char *buf, enum AVMediaType codec_type);
+ #define RTP_VERSION 2
+ #define RTP_MAX_SDES 256 /**< maximum text length for SDES */
+
+-/* RTCP packets use 0.5% of the bandwidth */
+-#define RTCP_TX_RATIO_NUM 5
++/* RTCP packets use 2.5% of the bandwidth */
++#define RTCP_TX_RATIO_NUM 25
+ #define RTCP_TX_RATIO_DEN 1000
+
+ /* An arbitrary id value for RTP Xiph streams - only relevant to indicate
+--
+2.17.1
+
diff --git a/gnu/packages/patches/ffmpeg-jami-libopusdec-enable-FEC.patch b/gnu/packages/patches/ffmpeg-jami-libopusdec-enable-FEC.patch
new file mode 100644
index 0000000000..fb9466a4fc
--- /dev/null
+++ b/gnu/packages/patches/ffmpeg-jami-libopusdec-enable-FEC.patch
@@ -0,0 +1,127 @@
+diff --git a/libavcodec/libopusdec.c b/libavcodec/libopusdec.c
+index 9b9a610343..8ec5bfc1ad 100644
+--- a/libavcodec/libopusdec.c
++++ b/libavcodec/libopusdec.c
+@@ -45,6 +45,8 @@ struct libopus_context {
+ #ifdef OPUS_SET_PHASE_INVERSION_DISABLED_REQUEST
+ int apply_phase_inv;
+ #endif
++ int decode_fec;
++ int64_t expected_next_pts;
+ };
+
+ #define OPUS_HEAD_SIZE 19
+@@ -141,6 +143,8 @@ static av_cold int libopus_decode_init(AVCodecContext *avc)
+ /* Decoder delay (in samples) at 48kHz */
+ avc->delay = avc->internal->skip_samples = opus->pre_skip;
+
++ opus->expected_next_pts = AV_NOPTS_VALUE;
++
+ return 0;
+ }
+
+@@ -161,27 +165,82 @@ static int libopus_decode(AVCodecContext *avc, AVFrame *frame,
+ int *got_frame_ptr, AVPacket *pkt)
+ {
+ struct libopus_context *opus = avc->priv_data;
+- int ret, nb_samples;
++ uint8_t *outptr;
++ int ret, nb_samples = 0, nb_lost_samples = 0, nb_samples_left;
++
++ // If FEC is enabled, calculate number of lost samples
++ if (opus->decode_fec &&
++ opus->expected_next_pts != AV_NOPTS_VALUE &&
++ pkt->pts != AV_NOPTS_VALUE &&
++ pkt->pts != opus->expected_next_pts) {
++ // Cap at recovering 120 ms of lost audio.
++ nb_lost_samples = pkt->pts - opus->expected_next_pts;
++ nb_lost_samples = FFMIN(nb_lost_samples, MAX_FRAME_SIZE);
++ }
+
+- frame->nb_samples = MAX_FRAME_SIZE;
++ frame->nb_samples = MAX_FRAME_SIZE + nb_lost_samples;
+ if ((ret = ff_get_buffer(avc, frame, 0)) < 0)
+ return ret;
+
++ outptr = frame->data[0];
++ nb_samples_left = frame->nb_samples;
++
++ if (opus->decode_fec && nb_lost_samples) {
++ // Try to recover the lost samples with FEC data from this one.
++ // If there's no FEC data, the decoder will do loss concealment instead.
++ if (avc->sample_fmt == AV_SAMPLE_FMT_S16)
++ nb_samples = opus_multistream_decode(opus->dec, pkt->data, pkt->size,
++ (opus_int16 *)outptr,
++ nb_lost_samples, 1);
++ else
++ nb_samples = opus_multistream_decode_float(opus->dec, pkt->data, pkt->size,
++ (float *)outptr,
++ nb_lost_samples, 1);
++
++ if (nb_samples < 0) {
++ av_log(avc, AV_LOG_ERROR, "Decoding error: %s\n",
++ opus_strerror(nb_samples));
++ return ff_opus_error_to_averror(nb_samples);
++ }
++
++ av_log(avc, AV_LOG_WARNING, "Recovered %d samples with FEC/PLC\n",
++ nb_samples);
++
++ outptr += nb_samples * avc->channels * av_get_bytes_per_sample(avc->sample_fmt);
++ nb_samples_left -= nb_samples;
++ if (pkt->pts != AV_NOPTS_VALUE) {
++ pkt->pts -= nb_samples;
++ frame->pts = pkt->pts;
++ }
++ }
++
++ // Decode the actual, non-lost data.
+ if (avc->sample_fmt == AV_SAMPLE_FMT_S16)
+- nb_samples = opus_multistream_decode(opus->dec, pkt->data, pkt->size,
+- (opus_int16 *)frame->data[0],
+- frame->nb_samples, 0);
++ ret = opus_multistream_decode(opus->dec, pkt->data, pkt->size,
++ (opus_int16 *)outptr,
++ nb_samples_left, 0);
+ else
+- nb_samples = opus_multistream_decode_float(opus->dec, pkt->data, pkt->size,
+- (float *)frame->data[0],
+- frame->nb_samples, 0);
++ ret = opus_multistream_decode_float(opus->dec, pkt->data, pkt->size,
++ (float *)outptr,
++ nb_samples_left, 0);
+
+- if (nb_samples < 0) {
++ if (ret < 0) {
+ av_log(avc, AV_LOG_ERROR, "Decoding error: %s\n",
+- opus_strerror(nb_samples));
+- return ff_opus_error_to_averror(nb_samples);
++ opus_strerror(ret));
++ return ff_opus_error_to_averror(ret);
+ }
+
++ nb_samples += ret;
++
++ if (opus->decode_fec)
++ {
++ // Calculate the next expected pts
++ if (pkt->pts == AV_NOPTS_VALUE) {
++ opus->expected_next_pts = AV_NOPTS_VALUE;
++ } else {
++ opus->expected_next_pts = pkt->pts + nb_samples;
++ }
++ }
+ #ifndef OPUS_SET_GAIN
+ {
+ int i = avc->ch_layout.nb_channels * nb_samples;
+@@ -220,6 +279,7 @@ static const AVOption libopusdec_options[] = {
+ #ifdef OPUS_SET_PHASE_INVERSION_DISABLED_REQUEST
+ { "apply_phase_inv", "Apply intensity stereo phase inversion", OFFSET(apply_phase_inv), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, FLAGS },
+ #endif
++ { "decode_fec", "Decode FEC data or use PLC", OFFSET(decode_fec), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, FLAGS },
+ { NULL },
+ };
+
+--
+2.34.1
+
diff --git a/gnu/packages/patches/ffmpeg-jami-libopusenc-enable-FEC.patch b/gnu/packages/patches/ffmpeg-jami-libopusenc-enable-FEC.patch
new file mode 100644
index 0000000000..43b786c567
--- /dev/null
+++ b/gnu/packages/patches/ffmpeg-jami-libopusenc-enable-FEC.patch
@@ -0,0 +1,50 @@
+diff --git a/libavcodec/libopusencc.c b/libavcodec/libopusencc.c
+index 2a97811d18..40ee7b8fec 100644
+--- a/libavcodec/libopusenc.c
++++ b/libavcodec/libopusenc.c
+@@ -33,6 +33,7 @@
+ typedef struct LibopusEncOpts {
+ int vbr;
+ int application;
++ int enable_fec;
+ int packet_loss;
+ int complexity;
+ float frame_duration;
+@@ -143,6 +144,13 @@
+ "Unable to set constrained VBR: %s\n", opus_strerror(ret));
+
+ ret = opus_multistream_encoder_ctl(enc,
++ OPUS_SET_INBAND_FEC(opts->enable_fec));
++ if (ret != OPUS_OK)
++ av_log(avctx, AV_LOG_WARNING,
++ "Unable to set enable FEC flag percentage: %s\n",
++ opus_strerror(ret));
++
++ ret = opus_multistream_encoder_ctl(enc,
+ OPUS_SET_PACKET_LOSS_PERC(opts->packet_loss));
+ if (ret != OPUS_OK)
+ av_log(avctx, AV_LOG_WARNING,
+@@ -452,6 +460,15 @@
+ int ret;
+ int discard_padding;
+
++ // Reload packet loss setting
++ ret = opus_multistream_encoder_ctl(opus->enc,
++ OPUS_SET_PACKET_LOSS_PERC(opus->opts.packet_loss));
++ if (ret != OPUS_OK)
++ av_log(avctx, AV_LOG_WARNING,
++ "Unable to set expected packet loss percentage: %s\n",
++ opus_strerror(ret));
++
++
+ if (frame) {
+ ret = ff_af_queue_add(&opus->afq, frame);
+ if (ret < 0)
+@@ -543,6 +560,7 @@
+ { "audio", "Favor faithfulness to the input", 0, AV_OPT_TYPE_CONST, { .i64 = OPUS_APPLICATION_AUDIO }, 0, 0, FLAGS, "application" },
+ { "lowdelay", "Restrict to only the lowest delay modes", 0, AV_OPT_TYPE_CONST, { .i64 = OPUS_APPLICATION_RESTRICTED_LOWDELAY }, 0, 0, FLAGS, "application" },
+ { "frame_duration", "Duration of a frame in milliseconds", OFFSET(frame_duration), AV_OPT_TYPE_FLOAT, { .dbl = 20.0 }, 2.5, 120.0, FLAGS },
++ { "enable_fec", "Enable forward error correction", OFFSET(enable_fec), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, FLAGS },
+ { "packet_loss", "Expected packet loss percentage", OFFSET(packet_loss), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 100, FLAGS },
+ { "vbr", "Variable bit rate mode", OFFSET(vbr), AV_OPT_TYPE_INT, { .i64 = 1 }, 0, 2, FLAGS, "vbr" },
+ { "off", "Use constant bit rate", 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, 0, 0, FLAGS, "vbr" },
diff --git a/gnu/packages/patches/ffmpeg-jami-libopusenc-reload-packet-loss-at-encode.patch b/gnu/packages/patches/ffmpeg-jami-libopusenc-reload-packet-loss-at-encode.patch
new file mode 100644
index 0000000000..5c4bd4d3eb
--- /dev/null
+++ b/gnu/packages/patches/ffmpeg-jami-libopusenc-reload-packet-loss-at-encode.patch
@@ -0,0 +1,44 @@
+From dba13d03bc8e827fededc20b0ab1f574a1500f2a Mon Sep 17 00:00:00 2001
+From: Philip-Dylan Gleonec <philip-dylan.gleonec@savoirfairelinux.com>
+Date: Thu, 11 Feb 2021 12:25:14 +0100
+Subject: [PATCH 2/2] avcodec/libopusenc: reload packet loss at encode
+
+An estimation of packet loss is required by libopus to compute its FEC
+data. Currently, this estimation is constant, and can not be changed
+after configuration. This means an application using libopus through
+ffmpeg can not adapt the packet loss estimation when the network
+quality degrades.
+
+This patch makes the encoder reload the packet_loss AVOption before
+encoding samples, if fec is enabled. This way an application can modify
+the packet loss estimation by changing the AVOption. Typical use-case
+is a RTP stream, where packet loss can be estimated from RTCP packets.
+
+Signed-off-by: Philip-Dylan Gleonec <philip-dylan.gleonec@savoirfairelinux.com>
+---
+ libavcodec/libopusenc.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/libavcodec/libopusenc.c b/libavcodec/libopusenc.c
+index 70d17f802b..c18e8ae7fa 100644
+--- a/libavcodec/libopusenc.c
++++ b/libavcodec/libopusenc.c
+@@ -460,6 +460,15 @@ static int libopus_encode(AVCodecContext *avctx, AVPacket *avpkt,
+ int ret;
+ int discard_padding;
+
++ if (opus->opts.fec) {
++ ret = opus_multistream_encoder_ctl(opus->enc,
++ OPUS_SET_PACKET_LOSS_PERC(opus->opts.packet_loss));
++ if (ret != OPUS_OK)
++ av_log(avctx, AV_LOG_WARNING,
++ "Unable to set expected packet loss percentage: %s\n",
++ opus_strerror(ret));
++ }
++
+ if (frame) {
+ ret = ff_af_queue_add(&opus->afq, frame);
+ if (ret < 0)
+--
+2.25.1
+
diff --git a/gnu/packages/patches/ffmpeg-jami-remove-mjpeg-log.patch b/gnu/packages/patches/ffmpeg-jami-remove-mjpeg-log.patch
new file mode 100644
index 0000000000..595baea9c9
--- /dev/null
+++ b/gnu/packages/patches/ffmpeg-jami-remove-mjpeg-log.patch
@@ -0,0 +1,26 @@
+From c557a6211f5a29d89fc2ab561e0fb3d8878fb6ad Mon Sep 17 00:00:00 2001
+From: philippegorley <gorley.philippe@gmail.com>
+Date: Mon, 17 Dec 2018 15:27:57 -0500
+Subject: [PATCH] remove mjpeg log
+
+---
+ libavcodec/mjpegdec.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
+index d1dca84d36..4a26c23cd4 100644
+--- a/libavcodec/mjpegdec.c
++++ b/libavcodec/mjpegdec.c
+@@ -2294,9 +2294,7 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
+ "restart marker: %d\n", start_code & 0x0f);
+ /* APP fields */
+ } else if (start_code >= APP0 && start_code <= APP15) {
+- if ((ret = mjpeg_decode_app(s)) < 0)
+- av_log(avctx, AV_LOG_ERROR, "unable to decode APP fields: %s\n",
+- av_err2str(ret));
++ ret = mjpeg_decode_app(s);
+ /* Comment */
+ } else if (start_code == COM) {
+ ret = mjpeg_decode_com(s);
+--
+2.17.1
diff --git a/gnu/packages/patches/ffmpeg-jami-rtp_ext_abs_send_time.patch b/gnu/packages/patches/ffmpeg-jami-rtp_ext_abs_send_time.patch
new file mode 100644
index 0000000000..cf52cf972a
--- /dev/null
+++ b/gnu/packages/patches/ffmpeg-jami-rtp_ext_abs_send_time.patch
@@ -0,0 +1,71 @@
+diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
+index 63047beccc..d59ec3dc8c 100644
+--- a/libavformat/rtpenc.c
++++ b/libavformat/rtpenc.c
+@@ -28,6 +28,8 @@
+
+ #include "rtpenc.h"
+
++#define EXT_ABS_SEND_TIME
++
+ static const AVOption options[] = {
+ FF_RTP_FLAG_OPTS(RTPMuxContext, flags),
+ { "payload_type", "Specify RTP payload type", offsetof(RTPMuxContext, payload_type), AV_OPT_TYPE_INT, {.i64 = -1 }, -1, 127, AV_OPT_FLAG_ENCODING_PARAM },
+@@ -146,7 +148,11 @@ static int rtp_write_header(AVFormatContext *s1)
+ s1->pb->max_packet_size);
+ } else
+ s1->packet_size = s1->pb->max_packet_size;
++#ifdef EXT_ABS_SEND_TIME
++ if (s1->packet_size <= 20) {
++#else
+ if (s1->packet_size <= 12) {
++#endif
+ av_log(s1, AV_LOG_ERROR, "Max packet size %u too low\n", s1->packet_size);
+ return AVERROR(EIO);
+ }
+@@ -154,7 +160,11 @@ static int rtp_write_header(AVFormatContext *s1)
+ if (!s->buf) {
+ return AVERROR(ENOMEM);
+ }
++#ifdef EXT_ABS_SEND_TIME
++ s->max_payload_size = s1->packet_size - 20;
++#else
+ s->max_payload_size = s1->packet_size - 12;
++#endif
+
+ if (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
+ avpriv_set_pts_info(st, 32, 1, st->codecpar->sample_rate);
+@@ -332,16 +342,34 @@ static void rtcp_send_sr(AVFormatContext *s1, int64_t ntp_time, int bye)
+ void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m)
+ {
+ RTPMuxContext *s = s1->priv_data;
++ uint64_t ntp64_time;
++ uint32_t absoluteSendTime;
+
+ av_log(s1, AV_LOG_TRACE, "rtp_send_data size=%d\n", len);
+
+ /* build the RTP header */
++#ifdef EXT_ABS_SEND_TIME
++ avio_w8(s1->pb, RTP_VERSION << 6 | 0x10); // extention bit
++#else
+ avio_w8(s1->pb, RTP_VERSION << 6);
++#endif
+ avio_w8(s1->pb, (s->payload_type & 0x7f) | ((m & 0x01) << 7));
+ avio_wb16(s1->pb, s->seq);
+ avio_wb32(s1->pb, s->timestamp);
+ avio_wb32(s1->pb, s->ssrc);
+
++#ifdef EXT_ABS_SEND_TIME
++ avio_wb16(s1->pb, 0xBEDE); // magic word
++ avio_wb16(s1->pb, 0x0001); // length=1
++ avio_w8(s1->pb, 0x32); // ID=3 and lenght=2
++ ntp64_time = ff_get_formatted_ntp_time(ff_ntp_time());
++ absoluteSendTime = (uint32_t)((ntp64_time>> 14) & 0x00ffffff);
++ av_log(s1, AV_LOG_TRACE, "ntp64:%lu, abs_time:%u\n", ntp64_time, absoluteSendTime);
++ avio_w8(s1->pb, (uint8_t)(absoluteSendTime >> 16));
++ avio_w8(s1->pb, (uint8_t)(absoluteSendTime >> 8 & 0xff));
++ avio_w8(s1->pb, (uint8_t)(absoluteSendTime & 0xff));
++#endif
++
+ avio_write(s1->pb, buf1, len);
+ avio_flush(s1->pb);
diff --git a/gnu/packages/patches/ffmpeg-jami-screen-sharing-x11-fix.patch b/gnu/packages/patches/ffmpeg-jami-screen-sharing-x11-fix.patch
new file mode 100644
index 0000000000..e54a346706
--- /dev/null
+++ b/gnu/packages/patches/ffmpeg-jami-screen-sharing-x11-fix.patch
@@ -0,0 +1,302 @@
+From c1b210534b15188c964b31dc47e172f8ed4aca55 Mon Sep 17 00:00:00 2001
+From: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com>
+Date: Tue, 19 Jul 2022 13:35:19 -0300
+Subject: [PATCH] Screen sharing x11 fixes
+
++ We can now have a single stream in the x11grab, which can be updated to follow window resizing
++ Due to stream reinit, shm may cause memory issues and was removed
++ Adds one option (is_area) that defines if we are grabing a region of the display/window or the hole screen/window.
+
+note: This is a custom patch for later rebase
+---
+ libavdevice/xcbgrab.c | 186 ++++++++++--------------------------------
+ 1 file changed, 45 insertions(+), 141 deletions(-)
+
+diff --git a/libavdevice/xcbgrab.c b/libavdevice/xcbgrab.c
+index 64a68ba497..76e654b424 100644
+--- a/libavdevice/xcbgrab.c
++++ b/libavdevice/xcbgrab.c
+@@ -29,11 +29,6 @@
+ #include <xcb/xfixes.h>
+ #endif
+
+-#if CONFIG_LIBXCB_SHM
+-#include <sys/shm.h>
+-#include <xcb/shm.h>
+-#endif
+-
+ #if CONFIG_LIBXCB_SHAPE
+ #include <xcb/shape.h>
+ #endif
+@@ -53,9 +48,6 @@ typedef struct XCBGrabContext {
+ xcb_connection_t *conn;
+ xcb_screen_t *screen;
+ xcb_window_t window;
+-#if CONFIG_LIBXCB_SHM
+- AVBufferPool *shm_pool;
+-#endif
+ int64_t time_frame;
+ AVRational time_base;
+ int64_t frame_duration;
+@@ -72,10 +64,9 @@ typedef struct XCBGrabContext {
+ int region_border;
+ int centered;
+ int select_region;
++ int is_area;
+
+ const char *framerate;
+-
+- int has_shm;
+ } XCBGrabContext;
+
+ #define FOLLOW_CENTER -1
+@@ -97,6 +88,7 @@ static const AVOption options[] = {
+ { "show_region", "Show the grabbing region.", OFFSET(show_region), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, D },
+ { "region_border", "Set the region border thickness.", OFFSET(region_border), AV_OPT_TYPE_INT, { .i64 = 3 }, 1, 128, D },
+ { "select_region", "Select the grabbing region graphically using the pointer.", OFFSET(select_region), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, D },
++ { "is_area", "Define if we are grabing a region of the display/window.", OFFSET(is_area), AV_OPT_TYPE_INT, { .i64 = 1 }, 0, 1, D },
+ { NULL },
+ };
+
+@@ -216,99 +208,6 @@ static int64_t wait_frame(AVFormatContext *s, AVPacket *pkt)
+ return curtime;
+ }
+
+-#if CONFIG_LIBXCB_SHM
+-static int check_shm(xcb_connection_t *conn)
+-{
+- xcb_shm_query_version_cookie_t cookie = xcb_shm_query_version(conn);
+- xcb_shm_query_version_reply_t *reply;
+-
+- reply = xcb_shm_query_version_reply(conn, cookie, NULL);
+- if (reply) {
+- free(reply);
+- return 1;
+- }
+-
+- return 0;
+-}
+-
+-static void free_shm_buffer(void *opaque, uint8_t *data)
+-{
+- shmdt(data);
+-}
+-
+-static AVBufferRef *allocate_shm_buffer(void *opaque, size_t size)
+-{
+- xcb_connection_t *conn = opaque;
+- xcb_shm_seg_t segment;
+- AVBufferRef *ref;
+- uint8_t *data;
+- int id;
+-
+- id = shmget(IPC_PRIVATE, size, IPC_CREAT | 0777);
+- if (id == -1)
+- return NULL;
+-
+- segment = xcb_generate_id(conn);
+- xcb_shm_attach(conn, segment, id, 0);
+- data = shmat(id, NULL, 0);
+- shmctl(id, IPC_RMID, 0);
+- if ((intptr_t)data == -1 || !data)
+- return NULL;
+-
+- ref = av_buffer_create(data, size, free_shm_buffer, (void *)(ptrdiff_t)segment, 0);
+- if (!ref)
+- shmdt(data);
+-
+- return ref;
+-}
+-
+-static int xcbgrab_frame_shm(AVFormatContext *s, AVPacket *pkt)
+-{
+- XCBGrabContext *c = s->priv_data;
+- xcb_shm_get_image_cookie_t iq;
+- xcb_shm_get_image_reply_t *img;
+- xcb_drawable_t drawable = c->window_id;
+- xcb_generic_error_t *e = NULL;
+- AVBufferRef *buf;
+- xcb_shm_seg_t segment;
+-
+- buf = av_buffer_pool_get(c->shm_pool);
+- if (!buf) {
+- av_log(s, AV_LOG_ERROR, "Could not get shared memory buffer.\n");
+- return AVERROR(ENOMEM);
+- }
+- segment = (xcb_shm_seg_t)(uintptr_t)av_buffer_pool_buffer_get_opaque(buf);
+-
+- iq = xcb_shm_get_image(c->conn, drawable,
+- c->x, c->y, c->width, c->height, ~0,
+- XCB_IMAGE_FORMAT_Z_PIXMAP, segment, 0);
+- img = xcb_shm_get_image_reply(c->conn, iq, &e);
+-
+- xcb_flush(c->conn);
+-
+- if (e) {
+- av_log(s, AV_LOG_ERROR,
+- "Cannot get the image data "
+- "event_error: response_type:%u error_code:%u "
+- "sequence:%u resource_id:%u minor_code:%u major_code:%u.\n",
+- e->response_type, e->error_code,
+- e->sequence, e->resource_id, e->minor_code, e->major_code);
+-
+- free(e);
+- av_buffer_unref(&buf);
+- return AVERROR(EACCES);
+- }
+-
+- free(img);
+-
+- pkt->buf = buf;
+- pkt->data = buf->data;
+- pkt->size = c->frame_size;
+-
+- return 0;
+-}
+-#endif /* CONFIG_LIBXCB_SHM */
+-
+ #if CONFIG_LIBXCB_XFIXES
+ static int check_xfixes(xcb_connection_t *conn)
+ {
+@@ -462,14 +361,7 @@ static int xcbgrab_read_packet(AVFormatContext *s, AVPacket *pkt)
+ if (c->show_region)
+ xcbgrab_update_region(s, win_x, win_y);
+
+-#if CONFIG_LIBXCB_SHM
+- if (c->has_shm && xcbgrab_frame_shm(s, pkt) < 0) {
+- av_log(s, AV_LOG_WARNING, "Continuing without shared memory.\n");
+- c->has_shm = 0;
+- }
+-#endif
+- if (!c->has_shm)
+- ret = xcbgrab_frame(s, pkt);
++ ret = xcbgrab_frame(s, pkt);
+ pkt->dts = pkt->pts = pts;
+ pkt->duration = c->frame_duration;
+
+@@ -488,11 +380,8 @@ static av_cold int xcbgrab_read_close(AVFormatContext *s)
+ {
+ XCBGrabContext *ctx = s->priv_data;
+
+-#if CONFIG_LIBXCB_SHM
+- av_buffer_pool_uninit(&ctx->shm_pool);
+-#endif
+-
+ xcb_disconnect(ctx->conn);
++ ctx->conn = NULL;
+
+ return 0;
+ }
+@@ -572,7 +461,15 @@ static int pixfmt_from_pixmap_format(AVFormatContext *s, int depth,
+ static int create_stream(AVFormatContext *s)
+ {
+ XCBGrabContext *c = s->priv_data;
+- AVStream *st = avformat_new_stream(s, NULL);
++
++ // If we try to open another stream to x11grab, there is no reason
++ // to keep more than one stream in the context.
++ AVStream *st;
++ if (!s->nb_streams) {
++ st = avformat_new_stream(s, NULL);
++ } else {
++ st = s->streams[0];
++ }
+ xcb_get_geometry_cookie_t gc;
+ xcb_get_geometry_reply_t *geo;
+ int64_t frame_size_bits;
+@@ -594,11 +491,26 @@ static int create_stream(AVFormatContext *s)
+ return AVERROR_EXTERNAL;
+ }
+
++ // av_log(s, AV_LOG_ERROR, "Capture is_area %d\n", c->is_area);
++ // Width and Height are not 0 only when we set a window area to share
++ // This if may be valid only in the first call to create_stream
+ if (!c->width || !c->height) {
++ // av_log(s, AV_LOG_ERROR, "Capture area!\n");
++ c->is_area = 0;
++ c->width = geo->width;
++ c->height = geo->height;
++ }
++ // If not a predefined area, then we should follow geometry changes
++ // This can be valid only on the second call onwards
++ if (!c->is_area && (c->width != geo->width || c->height != geo->height)) {
+ c->width = geo->width;
+ c->height = geo->height;
+ }
+
++ // av_log(s, AV_LOG_ERROR, "Capture area %dx%d at position %d.%d\n",
++ // c->width, c->height,
++ // c->x, c->y);
++
+ if (c->x + c->width > geo->width ||
+ c->y + c->height > geo->height) {
+ av_log(s, AV_LOG_ERROR,
+@@ -628,13 +540,6 @@ static int create_stream(AVFormatContext *s)
+ }
+ c->frame_size = frame_size_bits / 8;
+
+-#if CONFIG_LIBXCB_SHM
+- c->shm_pool = av_buffer_pool_init2(c->frame_size + AV_INPUT_BUFFER_PADDING_SIZE,
+- c->conn, allocate_shm_buffer, NULL);
+- if (!c->shm_pool)
+- return AVERROR(ENOMEM);
+-#endif
+-
+ st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
+ st->codecpar->codec_id = AV_CODEC_ID_RAWVIDEO;
+ st->codecpar->width = c->width;
+@@ -829,23 +734,26 @@ static av_cold int xcbgrab_read_header(AVFormatContext *s)
+ sscanf(s->url, "+%d,%d", &c->x, &c->y);
+ }
+
+- c->conn = xcb_connect(display_name[0] ? display_name : NULL, &screen_num);
+- av_freep(&display_name);
++ if (!c->conn || !c->screen) {
++ xcbgrab_read_close(s);
++ c->conn = xcb_connect(display_name[0] ? display_name : NULL, &screen_num);
++ av_freep(&display_name);
+
+- if ((ret = xcb_connection_has_error(c->conn))) {
+- av_log(s, AV_LOG_ERROR, "Cannot open display %s, error %d.\n",
+- s->url[0] ? s->url : "default", ret);
+- return AVERROR(EIO);
+- }
++ if ((ret = xcb_connection_has_error(c->conn))) {
++ av_log(s, AV_LOG_ERROR, "Cannot open display %s, error %d.\n",
++ s->url[0] ? s->url : "default", ret);
++ return AVERROR(EIO);
++ }
+
+- setup = xcb_get_setup(c->conn);
++ setup = xcb_get_setup(c->conn);
+
+- c->screen = get_screen(setup, screen_num);
+- if (!c->screen) {
+- av_log(s, AV_LOG_ERROR, "The screen %d does not exist.\n",
+- screen_num);
+- xcbgrab_read_close(s);
+- return AVERROR(EIO);
++ c->screen = get_screen(setup, screen_num);
++ if (!c->screen) {
++ av_log(s, AV_LOG_ERROR, "The screen %d does not exist.\n",
++ screen_num);
++ xcbgrab_read_close(s);
++ return AVERROR(EIO);
++ }
+ }
+
+ if (c->window_id == XCB_NONE)
+@@ -876,10 +784,6 @@ static av_cold int xcbgrab_read_header(AVFormatContext *s)
+ return ret;
+ }
+
+-#if CONFIG_LIBXCB_SHM
+- c->has_shm = check_shm(c->conn);
+-#endif
+-
+ #if CONFIG_LIBXCB_XFIXES
+ if (c->draw_mouse) {
+ if (!(c->draw_mouse = check_xfixes(c->conn))) {
+--
+2.34.1
+
diff --git a/gnu/packages/patches/guile-fibers-libevent-timeout.patch b/gnu/packages/patches/guile-fibers-libevent-timeout.patch
new file mode 100644
index 0000000000..c33678eea3
--- /dev/null
+++ b/gnu/packages/patches/guile-fibers-libevent-timeout.patch
@@ -0,0 +1,61 @@
+commit 2ca397bfcca94c106380368b5b0ce920b0a62a95
+Author: Ludovic Courtès <ludo@gnu.org>
+Date: Sat Jan 6 16:22:45 2024 +0100
+
+ libevent: Fix computation of the timeout value.
+
+diff --git a/extensions/libevent.c b/extensions/libevent.c
+index 134460a..62e50a3 100644
+--- a/extensions/libevent.c
++++ b/extensions/libevent.c
+@@ -192,30 +192,27 @@ scm_primitive_resize (SCM lst, SCM eventsv)
+ }
+ #undef FUNC_NAME
+
+-static uint64_t time_units_per_microsec;
++static uint64_t time_units_per_microsec, microsec_per_time_units;
+
+ static void*
+ run_event_loop (void *p)
+ #define FUNC_NAME "primitive-event-loop"
+ {
+- int ret = 0;
+- int microsec = 0;
+- struct timeval tv;
+-
++ int ret;
+ struct loop_data *data = p;
+
+- if (data->timeout < 0)
+- microsec = -1;
+- else if (data->timeout >= 0)
++ if (data->timeout >= 0)
+ {
+- microsec = (time_units_per_microsec == 0)
+- ? 0 : data->timeout / time_units_per_microsec;
+- tv.tv_sec = 0;
+- tv.tv_usec = microsec;
+- }
++ struct timeval tv;
++
++ tv.tv_sec = data->timeout / scm_c_time_units_per_second;
++ tv.tv_usec =
++ time_units_per_microsec > 0
++ ? ((data->timeout % scm_c_time_units_per_second)
++ / time_units_per_microsec)
++ : ((data->timeout % scm_c_time_units_per_second)
++ * microsec_per_time_units);
+
+- if (microsec >= 0)
+- {
+ ret = event_base_loopexit (data->base, &tv);
+ if (ret == -1)
+ SCM_MISC_ERROR ("event loop exit failed", SCM_EOL);
+@@ -307,6 +304,7 @@ void
+ init_fibers_libevt (void)
+ {
+ time_units_per_microsec = scm_c_time_units_per_second / 1000000;
++ microsec_per_time_units = 1000000 / scm_c_time_units_per_second;
+
+ scm_c_define_gsubr ("primitive-event-wake", 1, 0, 0,
+ scm_primitive_event_wake);
diff --git a/gnu/packages/patches/jami-disable-integration-tests.patch b/gnu/packages/patches/jami-disable-integration-tests.patch
index 1efb7d552e..18f13800ac 100644
--- a/gnu/packages/patches/jami-disable-integration-tests.patch
+++ b/gnu/packages/patches/jami-disable-integration-tests.patch
@@ -1,3 +1,5 @@
+This issue is tracked at https://git.jami.net/savoirfairelinux/jami-daemon/-/issues/824.
+
From 3fd7acc6e5a8c316c366827956d7c06affdc9685 Mon Sep 17 00:00:00 2001
From: Olivier Dion <olivier.dion@savoirfairelinux.com>
Date: Fri, 7 Oct 2022 15:20:37 -0400
@@ -17,8 +19,8 @@ With file names adjusted for the source tarball.
diff --git a/configure.ac b/configure.ac
index 27215d044..aaeef1c1b 100644
---- a/daemon/configure.ac
-+++ b/daemon/configure.ac
+--- a/configure.ac
++++ b/configure.ac
@@ -40,6 +40,11 @@ AS_IF([test "x$enable_debug" = "xyes"],
[DAEMONCFLAGS+=" -DNDEBUG=1 -O3"
DAEMONCXXFLAGS+=" -DNDEBUG=1 -O3 -Wno-deprecated"])
@@ -33,8 +35,8 @@ index 27215d044..aaeef1c1b 100644
[Build fuzzing tools]))
diff --git a/test/unitTest/Makefile.am b/test/unitTest/Makefile.am
index f2b0fd994..ab232ddb7 100644
---- a/daemon/test/unitTest/Makefile.am
-+++ b/daemon/test/unitTest/Makefile.am
+--- a/test/unitTest/Makefile.am
++++ b/test/unitTest/Makefile.am
@@ -13,30 +13,6 @@ check_PROGRAMS =
####### Unit Test ########
diff --git a/gnu/packages/patches/jami-libjami-headers-search.patch b/gnu/packages/patches/jami-libjami-headers-search.patch
index 92cc92a4a6..3e7e19d703 100644
--- a/gnu/packages/patches/jami-libjami-headers-search.patch
+++ b/gnu/packages/patches/jami-libjami-headers-search.patch
@@ -1,4 +1,7 @@
-Upstream status: https://review.jami.net/c/jami-client-qt/+/24273.
+It was applied, then reverted (by mistake?) in 4d2c55348bc014.
+
+It's been resubmitted here:
+https://lists.gnu.org/archive/html/jami/2024-01/msg00005.html
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8d71b84b..36729698 100644
diff --git a/gnu/packages/patches/jami-qml-tests-discovery.patch b/gnu/packages/patches/jami-qml-tests-discovery.patch
new file mode 100644
index 0000000000..11fd69571c
--- /dev/null
+++ b/gnu/packages/patches/jami-qml-tests-discovery.patch
@@ -0,0 +1,15 @@
+Upstream status: https://review.jami.net/c/jami-client-qt/+/25640
+
+diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
+index d50908cf..587c9d15 100644
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -73,6 +73,8 @@ endif()
+
+ string(TOUPPER ${CMAKE_BUILD_TYPE} BUILD_TYPE)
+
++set(QUICK_TEST_SOURCE_DIR "${CMAKE_SOURCE_DIR}tests/qml/src")
++
+ set(QML_TESTS_SOURCE_FILES
+ ${CMAKE_SOURCE_DIR}/tests/qml/main.cpp
+ ${TEST_QML_RESOURCES}
diff --git a/gnu/packages/patches/jami-skip-tests-requiring-internet.patch b/gnu/packages/patches/jami-skip-tests-requiring-internet.patch
new file mode 100644
index 0000000000..1abc0e80cb
--- /dev/null
+++ b/gnu/packages/patches/jami-skip-tests-requiring-internet.patch
@@ -0,0 +1,51 @@
+Forwarded upstream: https://lists.gnu.org/archive/html/jami/2024-01/msg00010.html
+
+From 1d3b044c85c32341cca392254fe8bbf34a4639e1 Mon Sep 17 00:00:00 2001
+From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
+Date: Tue, 9 Jan 2024 11:14:04 -0500
+Subject: [PATCH] tests: Skip tests that need Internet when there's none.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+* tests/unittests/messageparser_unittest.cpp (ALinkIsParsedCorrectly)
+(YoutubeLinkIsParsedCorrectly): Skip when there is no Internet.
+
+Series-to: jami@gnu.org
+Series-cc: Sébastien Blin <sebastien.blin@savoirfairelinux.com>
+Fixes: <https://git.jami.net/savoirfairelinux/jami-client-qt/-/issues/1507>
+Change-Id: I0a5b57cd82f93fd7edf3fbeb73fb3db5a04c628c
+---
+ tests/unittests/messageparser_unittest.cpp | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/tests/unittests/messageparser_unittest.cpp b/tests/unittests/messageparser_unittest.cpp
+index c10b0d0b..df7a0692 100644
+--- a/tests/unittests/messageparser_unittest.cpp
++++ b/tests/unittests/messageparser_unittest.cpp
+@@ -69,6 +69,9 @@ TEST_F(MessageParserFixture, TextIsParsedCorrectly)
+ */
+ TEST_F(MessageParserFixture, ALinkIsParsedCorrectly)
+ {
++ if (!globalEnv.connectivityMonitor->isOnline())
++ GTEST_SKIP() << "ALinkIsParsedCorrectly requires Internet connectivity";
++
+ auto linkColor = QColor::fromRgb(0, 0, 255);
+ auto backgroundColor = QColor::fromRgb(0, 0, 255);
+
+@@ -174,6 +177,9 @@ TEST_F(MessageParserFixture, FencedCodeIsParsedCorrectly)
+ */
+ TEST_F(MessageParserFixture, YoutubeLinkIsParsedCorrectly)
+ {
++ if (!globalEnv.connectivityMonitor->isOnline())
++ GTEST_SKIP() << "YoutubeLinkIsParsedCorrectly requires Internet connectivity";
++
+ auto url = "https://www.youtube.com/watch?v=1234567890";
+ auto msg = "blah blah " + QString(url) + " blah blah";
+
+
+base-commit: a4300308dc8d03d59f620bb5fed753df5cf31ed9
+prerequisite-patch-id: 90a419e7de1f4fa5bb68bc58ad0da2817ed268e0
+--
+2.41.0
+
diff --git a/gnu/packages/patches/jami-unbundle-dependencies.patch b/gnu/packages/patches/jami-unbundle-dependencies.patch
new file mode 100644
index 0000000000..dab82b26cb
--- /dev/null
+++ b/gnu/packages/patches/jami-unbundle-dependencies.patch
@@ -0,0 +1,71 @@
+Forwarded here: https://lists.gnu.org/archive/html/jami/2024-01/msg00007.html
+
+From a302dc0a0faf2778331745a1d01bc3071e182d4d Mon Sep 17 00:00:00 2001
+From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
+Date: Mon, 8 Jan 2024 16:07:05 -0500
+Subject: [PATCH] build: Allow using system-provided md4c and tidy libraries.
+
+* CMakeLists.txt <md4c, tidy>: Search for libraries in the system
+first, falling back to bundled copies in case they aren't found.
+
+Series-to: jami@gnu.org
+Fixes: <https://git.jami.net/savoirfairelinux/jami-client-qt/-/issues/1506>
+Change-Id: I637959fefce6a21b0ee73a793acb6c3c42dcdce0
+---
+ CMakeLists.txt | 36 +++++++++++++++++++++++++-----------
+ 1 file changed, 25 insertions(+), 11 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 38e7a4e2..3f1bd599 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -545,19 +545,33 @@ add_subdirectory(3rdparty/SortFilterProxyModel)
+ set(SFPM_OBJECTS $<TARGET_OBJECTS:SortFilterProxyModel>)
+
+ # md4c
+-set(BUILD_SHARED_LIBS OFF CACHE BOOL "Don't build shared md4c library" FORCE)
+-add_subdirectory(3rdparty/md4c EXCLUDE_FROM_ALL)
+-list(APPEND CLIENT_LINK_DIRS ${MD4C_BINARY_DIR}/src)
+-list(APPEND CLIENT_INCLUDE_DIRS ${MD4C_SOURCE_DIR}/src)
+-list(APPEND CLIENT_LIBS md4c-html)
++find_package(md4c)
++if(md4c_FOUND)
++ message(STATUS "Using system-provided md4c-html")
++ list(APPEND CLIENT_LIBS md4c::md4c-html)
++else()
++ message("Using bundled md4c-html library")
++ set(BUILD_SHARED_LIBS OFF CACHE BOOL "Don't build shared md4c library" FORCE)
++ add_subdirectory(3rdparty/md4c EXCLUDE_FROM_ALL)
++ list(APPEND CLIENT_LINK_DIRS ${MD4C_BINARY_DIR}/src)
++ list(APPEND CLIENT_INCLUDE_DIRS ${MD4C_SOURCE_DIR}/src)
++ list(APPEND CLIENT_LIBS md4c-html)
++endif()
+
+ # tidy-html5
+-set(BUILD_SHARED_LIB OFF CACHE BOOL "Don't build shared tidy library" FORCE)
+-set(SUPPORT_CONSOLE_APP OFF CACHE BOOL "Don't build tidy console app" FORCE)
+-add_subdirectory(3rdparty/tidy-html5 EXCLUDE_FROM_ALL)
+-list(APPEND CLIENT_LINK_DIRS ${tidy_BINARY_DIR}/Release)
+-list(APPEND CLIENT_INCLUDE_DIRS ${tidy_SOURCE_DIR}/include)
+-list(APPEND CLIENT_LIBS tidy-static)
++pkg_check_modules(tidy IMPORTED_TARGET tidy)
++if(tidy_FOUND)
++ message(STATUS "Using system-provided tidy")
++ list(APPEND CLIENT_LIBS PkgConfig::tidy)
++else()
++ message("Using bundled tidy library")
++ set(BUILD_SHARED_LIB OFF CACHE BOOL "Don't build shared tidy library" FORCE)
++ set(SUPPORT_CONSOLE_APP OFF CACHE BOOL "Don't build tidy console app" FORCE)
++ add_subdirectory(3rdparty/tidy-html5 EXCLUDE_FROM_ALL)
++ list(APPEND CLIENT_LINK_DIRS ${tidy_BINARY_DIR}/Release)
++ list(APPEND CLIENT_INCLUDE_DIRS ${tidy_SOURCE_DIR}/include)
++ list(APPEND CLIENT_LIBS tidy-static)
++endif()
+
+ # common executable sources
+ qt_add_executable(
+
+base-commit: a4300308dc8d03d59f620bb5fed753df5cf31ed9
+--
+2.41.0
+
diff --git a/gnu/packages/patches/libjami-ac-config-files.patch b/gnu/packages/patches/libjami-ac-config-files.patch
new file mode 100644
index 0000000000..8508d55ee1
--- /dev/null
+++ b/gnu/packages/patches/libjami-ac-config-files.patch
@@ -0,0 +1,52 @@
+Forwarded here: https://lists.gnu.org/archive/html/jami/2024-01/msg00003.html
+
+From 20a1702d881b381979d31c456f1b8cf5e0f728ad Mon Sep 17 00:00:00 2001
+From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
+Date: Sun, 7 Jan 2024 16:40:41 -0500
+Subject: [PATCH] configure.ac: Expand AC_CONFIG_FILES to fix a race.
+
+The commands apparently run for each file listed, or something
+similar, leading to:
+
+ configure: creating ./config.status
+ config.status: creating test/agent/Makefile
+ chmod: cannot access 'test/agent/pre-inst-env': No such file or directory
+ chmod: cannot access 'test/agent/scenarios/bulk-calls/run-scenario': No such file or directory
+ config.status: creating test/agent/pre-inst-env
+ chmod: cannot access 'test/agent/scenarios/bulk-calls/run-scenario': No such file or directory
+
+* configure.ac [ENABLE_AGENT]: Separate AC_CONFIG_FILES uses per file.
+
+Series-to: jami@gnu.org
+Series-postfix: daemon
+Change-Id: Ib283955b73540248e09bf31ef44ef3d178b216fa
+---
+ configure.ac | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index cdea5ff1c..2ab96d817 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -61,11 +61,11 @@ AC_ARG_ENABLE([agent],
+ [Build agent]))
+ AM_CONDITIONAL([ENABLE_AGENT], [test "x$enable_agent" = "xyes"])
+ AM_COND_IF([ENABLE_AGENT],
+- [AC_CONFIG_FILES([test/agent/Makefile
+- test/agent/pre-inst-env:test/agent/build-aux/pre-inst-env.in
+- test/agent/scenarios/bulk-calls/run-scenario],
+- [chmod +x test/agent/pre-inst-env
+- chmod +x test/agent/scenarios/bulk-calls/run-scenario])])
++ [AC_CONFIG_FILES([test/agent/Makefile])
++ AC_CONFIG_FILES([test/agent/pre-inst-env:test/agent/build-aux/pre-inst-env.in],
++ [chmod +x test/agent/pre-inst-env])
++ AC_CONFIG_FILES([test/agent/scenarios/bulk-calls/run-scenario],
++ [chmod +x test/agent/scenarios/bulk-calls/run-scenario])])
+
+ AC_ARG_ENABLE([tracepoints], AS_HELP_STRING([--enable-tracepoints], [Enable tracepoints]))
+
+
+base-commit: e246fb2e090c9b3de55e2d455eee5a6f05a5b286
+--
+2.41.0
+
diff --git a/gnu/packages/patches/python-pyreadstat-link-libiconv.patch b/gnu/packages/patches/python-pyreadstat-link-libiconv.patch
new file mode 100644
index 0000000000..7efd71faeb
--- /dev/null
+++ b/gnu/packages/patches/python-pyreadstat-link-libiconv.patch
@@ -0,0 +1,15 @@
+To ensure libiconv can be found by Guix, we need to link the library.
+
+--- a/setup.py
++++ b/setup.py
+@@ -81,8 +81,7 @@ else:
+ libraries.extend(["m", "z"])
+ _platform = sys.platform
+ # Mac: iconv needs to be linked statically
+- if _platform.lower().startswith("darwin"):
+- libraries.append("iconv")
++ libraries.append("iconv")
+
+ # Extensions
+ sources.sort()
+
diff --git a/gnu/packages/patches/python-uqbar-python3.10.patch b/gnu/packages/patches/python-uqbar-python3.10.patch
new file mode 100644
index 0000000000..164f0c0c64
--- /dev/null
+++ b/gnu/packages/patches/python-uqbar-python3.10.patch
@@ -0,0 +1,23 @@
+Since Python 3.10 the output of a CLI program created with argparse
+uses "options" instead of "optional arguments". This behaviour breaks
+the tests in python-uqbar.
+
+--- a/tests/test_cli.py
++++ b/tests/test_cli.py
+@@ -84,7 +84,7 @@ def test_call_help():
+
+ speak like a cat
+
+- optional arguments:
++ options:
+ -h, --help show this help message and exit
+ --version show program's version number and exit
+ --loud be adamant
+@@ -101,6 +101,6 @@ def test_help():
+ """
+ usage: vox-aggregator [-h] [--version] {help,list,birds,mammals} ...
+
+- optional arguments:
++ options:
+ -h, --help show this help message and exit
+ --version show program's version number and exit