aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorJohn Kehayias <john.kehayias@protonmail.com>2023-12-16 23:14:56 -0500
committerJohn Kehayias <john.kehayias@protonmail.com>2023-12-16 23:14:56 -0500
commit17c3a3bfff150a42c904233fa39818d73c9f68f3 (patch)
treea7614b7cd9a7106ea59f5ac1caad0c2c496b3a45 /gnu/packages/patches
parentf5493629e2650c0d30caf0f01f76b2383f78b9de (diff)
parentfe86819d8bde674766659c22b215d3a689a8026e (diff)
downloadguix-17c3a3bfff150a42c904233fa39818d73c9f68f3.tar
guix-17c3a3bfff150a42c904233fa39818d73c9f68f3.tar.gz
Merge branch 'master' into mesa-updates
Change-Id: I0c6e2410c51335c68634738be030e374f5b492e9
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/fpc-glibc-2.34-compat.patch190
-rw-r--r--gnu/packages/patches/igraph-fix-varargs-integer-size.patch39
-rw-r--r--gnu/packages/patches/igt-gpu-tools-Use-libproc2.patch505
-rw-r--r--gnu/packages/patches/openmw-assume-nonconst-SIGSTKSZ.patch39
-rw-r--r--gnu/packages/patches/plasp-fix-normalization.patch51
-rw-r--r--gnu/packages/patches/plasp-include-iostream.patch26
-rw-r--r--gnu/packages/patches/python-accupy-fix-use-of-perfplot.patch48
-rw-r--r--gnu/packages/patches/python-accupy-use-matplotx.patch113
-rw-r--r--gnu/packages/patches/python-sphinx-prompt-docutils-0.19.patch35
-rw-r--r--gnu/packages/patches/racket-backport-8.10-rktboot.patch130
-rw-r--r--gnu/packages/patches/racket-backport-8.11-layered-docs.patch36
-rw-r--r--gnu/packages/patches/zig-use-baseline-cpu-by-default.patch36
12 files changed, 574 insertions, 674 deletions
diff --git a/gnu/packages/patches/fpc-glibc-2.34-compat.patch b/gnu/packages/patches/fpc-glibc-2.34-compat.patch
new file mode 100644
index 0000000000..4d78d6e028
--- /dev/null
+++ b/gnu/packages/patches/fpc-glibc-2.34-compat.patch
@@ -0,0 +1,190 @@
+https://sources.debian.org/data/main/f/fpc/3.2.2%2Bdfsg-22/debian/patches/glibc2.34.patch
+
+Description: Adjust startup code for glibc 2.34
+ Based on the corresponding changes made in glibc:
+ https://sourceware.org/git/?p=glibc.git;a=commit;h=035c012e32c11e84d64905efaf55e74f704d3668
+Bug: https://gitlab.com/freepascal.org/fpc/source/-/issues/39295
+Author: Graham Inggs <ginggs@debian.org>
+Last-Update: 2022-08-12
+
+--- a/fpcsrc/rtl/linux/powerpc64/cprt0.as
++++ b/fpcsrc/rtl/linux/powerpc64/cprt0.as
+@@ -351,8 +351,8 @@
+ start_addresses:
+ .quad 0 /* was _SDA_BASE_ but not in 64-bit ABI*/
+ .quad main_stub
+- .quad __libc_csu_init
+- .quad __libc_csu_fini
++ .quad 0
++ .quad 0
+ .size start_adresses, .-start_addresses
+
+ /*
+--- a/fpcsrc/rtl/linux/powerpc64/gprt0.as
++++ b/fpcsrc/rtl/linux/powerpc64/gprt0.as
+@@ -351,8 +351,8 @@
+ start_addresses:
+ .quad 0 /* was _SDA_BASE_ but not in 64-bit ABI*/
+ .quad main_stub
+- .quad __libc_csu_init
+- .quad __libc_csu_fini
++ .quad 0
++ .quad 0
+ .size start_adresses, .-start_addresses
+
+ /*
+--- a/fpcsrc/rtl/linux/aarch64/cprt0.as
++++ b/fpcsrc/rtl/linux/aarch64/cprt0.as
+@@ -41,10 +41,8 @@
+ init, fini, rtld_fini, stack_end) */
+ adrp x0,:got:PASCALMAIN
+ ldr x0,[x0,#:got_lo12:PASCALMAIN]
+- adrp x3,:got:__libc_csu_init
+- ldr x3,[x3,#:got_lo12:__libc_csu_init]
+- adrp x4,:got:__libc_csu_fini
+- ldr x4,[x4,#:got_lo12:__libc_csu_fini]
++ mov x3, #0
++ mov x4, #0
+ bl __libc_start_main
+
+ /* This should never happen */
+--- a/fpcsrc/rtl/linux/i386/si_c21.inc
++++ b/fpcsrc/rtl/linux/i386/si_c21.inc
+@@ -35,8 +35,6 @@
+
+ {$asmmode att}
+
+-procedure __libc_csu_init; cdecl; external;
+-procedure __libc_csu_fini; cdecl; external;
+ procedure libc_start_main; external name '__libc_start_main';
+ procedure libc_exit(code: longint); cdecl; external name 'exit';
+
+@@ -93,8 +91,8 @@
+ pushl %esp { stack_end }
+ pushl %edx { function to be registered with
+ atexit(), passed by loader }
+- pushl $__libc_csu_fini
+- pushl $__libc_csu_init
++ pushl $0
++ pushl $0
+ pushl %esi { Push second argument: argv. }
+ pushl %ecx { Push first argument: argc. }
+
+--- a/fpcsrc/rtl/linux/x86_64/cprt0.as
++++ b/fpcsrc/rtl/linux/x86_64/cprt0.as
+@@ -61,9 +61,8 @@
+ which grow downwards). */
+ pushq %rsp
+
+- /* Pass address of our own entry points to .fini and .init. */
+- movq __libc_csu_init@GOTPCREL(%rip), %rcx
+- movq __libc_csu_fini@GOTPCREL(%rip), %r8
++ xorl %r8d, %r8d
++ xorl %ecx, %ecx
+
+ movq main_stub@GOTPCREL(%rip), %rdi
+
+--- a/fpcsrc/rtl/linux/arm/cprt0.as
++++ b/fpcsrc/rtl/linux/arm/cprt0.as
+@@ -82,10 +82,10 @@
+
+ /* Set up the other arguments in registers */
+ ldr a1, =PASCALMAIN
+- ldr a4, =_init
++ ldr a4, = #0
+
+ /* Push fini */
+- str ip, [sp, #-4]!
++ str a4, [sp, #-4]!
+
+ /* __libc_start_main (main, argc, argv, init, fini, rtld_fini, stack_end) */
+
+--- a/fpcsrc/rtl/linux/powerpc64/si_g.inc
++++ b/fpcsrc/rtl/linux/powerpc64/si_g.inc
+@@ -657,9 +657,6 @@
+ Process start/halt
+ ******************************************************************************}
+
+-procedure __libc_csu_init; cdecl; external;
+-procedure __libc_csu_fini; cdecl; external;
+-
+ procedure __libc_start_main(r3,r4,r5,r6,r7,r8,r9: pointer); cdecl; external;
+
+ type
+@@ -745,8 +742,8 @@
+ end
+ = (sda_base: nil; {* was _SDA_BASE_ but not in 64-bit ABI }
+ main: @main_stub;
+- libc_csu_init: @__libc_csu_init;
+- libc_csu_fini: @__libc_csu_fini
++ libc_csu_init: pointer(0);
++ libc_csu_fini: pointer(0)
+ );
+
+ procedure call_libc_start_main(r3,r4,r5,r6,r7,r8,r9: pointer); cdecl;
+--- a/fpcsrc/rtl/linux/powerpc64/si_c.inc
++++ b/fpcsrc/rtl/linux/powerpc64/si_c.inc
+@@ -657,9 +657,6 @@
+ Process start/halt
+ ******************************************************************************}
+
+-procedure __libc_csu_init; cdecl; external;
+-procedure __libc_csu_fini; cdecl; external;
+-
+ procedure __libc_start_main(r3,r4,r5,r6,r7,r8,r9: pointer); cdecl; external;
+
+ var
+@@ -724,8 +721,8 @@
+ end
+ = (sda_base: nil; {* was _SDA_BASE_ but not in 64-bit ABI }
+ main: @main_stub;
+- libc_csu_init: @__libc_csu_init;
+- libc_csu_fini: @__libc_csu_fini
++ libc_csu_init: pointer(0);
++ libc_csu_fini: pointer(0)
+ );
+
+
+--- a/fpcsrc/rtl/linux/powerpc/cprt0.as
++++ b/fpcsrc/rtl/linux/powerpc/cprt0.as
+@@ -35,8 +35,8 @@
+ start_addresses:
+ .long _SDA_BASE_
+ .long main_stub
+- .long __libc_csu_init
+- .long __libc_csu_fini
++ .long 0
++ .long 0
+ .size start_adresses, .-start_addresses
+
+ .section ".text"
+--- a/fpcsrc/rtl/linux/mips/cprt0.as
++++ b/fpcsrc/rtl/linux/mips/cprt0.as
+@@ -113,10 +113,9 @@
+ and $29, -2 * 4
+ subu $29, 32
+
+- lw $7,%got(__libc_csu_init)($gp) /* init */
+- lw $8,%got(__libc_csu_fini)($gp) /* fini */
++ move $7, $0
+
+- sw $8, 16($29) /* fini */
++ sw $0, 16($29)
+ sw $2, 20($29) /* rtld_fini */
+ sw $29, 24($29) /* stack_end */
+
+--- a/fpcsrc/rtl/linux/m68k/cprt0.as
++++ b/fpcsrc/rtl/linux/m68k/cprt0.as
+@@ -41,8 +41,10 @@
+
+ pea (%sp) /* highest available stack address */
+ pea (%a1) /* termination function provided by kernel */
+- pea __libc_csu_fini
+- pea __libc_csu_init
++
++ clr.l -(%sp)
++ clr.l -(%sp)
++
+ pea (%a0) /* argv */
+ move.l %d0,-(%sp) /* argc */
+ pea PASCALMAIN
diff --git a/gnu/packages/patches/igraph-fix-varargs-integer-size.patch b/gnu/packages/patches/igraph-fix-varargs-integer-size.patch
new file mode 100644
index 0000000000..2d7ffd7e68
--- /dev/null
+++ b/gnu/packages/patches/igraph-fix-varargs-integer-size.patch
@@ -0,0 +1,39 @@
+If the size of int is different from IGRAPH_INTEGER_SIZE, the integer size
+passed to these vararg arguments is different from the assumed one,
+leading to undefined behavior.
+Submitted upstream: https://github.com/igraph/igraph/pull/2423
+
+
+diff -ur a/examples/simple/igraph_union.c b/examples/simple/igraph_union.c
+--- a/examples/simple/igraph_union.c
++++ b/examples/simple/igraph_union.c
+@@ -103,7 +103,7 @@
+ igraph_vector_ptr_init(&glist, 10);
+ for (i = 0; i < igraph_vector_ptr_size(&glist); i++) {
+ VECTOR(glist)[i] = calloc(1, sizeof(igraph_t));
+- igraph_vector_int_init_int_end(&v, -1, i, i + 1, 1, 0, -1);
++ igraph_vector_int_init_int_end(&v, -1, (int) i, (int) i + 1, 1, 0, -1);
+ igraph_create(VECTOR(glist)[i], &v, 0, IGRAPH_DIRECTED);
+ igraph_vector_int_destroy(&v);
+ }
+@@ -123,7 +123,7 @@
+ igraph_vector_ptr_init(&glist, 10);
+ for (i = 0; i < igraph_vector_ptr_size(&glist); i++) {
+ VECTOR(glist)[i] = calloc(1, sizeof(igraph_t));
+- igraph_vector_int_init_int_end(&v, -1, i, i + 1, 1, 0, -1);
++ igraph_vector_int_init_int_end(&v, -1, (int) i, (int) i + 1, 1, 0, -1);
+ igraph_create(VECTOR(glist)[i], &v, 0, IGRAPH_UNDIRECTED);
+ igraph_vector_int_destroy(&v);
+ }
+diff -ur a/src/core/matrix.pmt b/src/core/matrix.pmt
+--- a/src/core/matrix.pmt
++++ b/src/core/matrix.pmt
+@@ -1863,7 +1863,7 @@
+ #ifdef FPRINTFUNC_ALIGNED
+ FPRINTFUNC_ALIGNED(file, VECTOR(column_width)[j], MATRIX(*m, i, j));
+ #else
+- fprintf(file, format, VECTOR(column_width)[j], MATRIX(*m, i, j));
++ fprintf(file, format, (int) VECTOR(column_width)[j], MATRIX(*m, i, j));
+ #endif
+ }
+ fprintf(file, "\n");
diff --git a/gnu/packages/patches/igt-gpu-tools-Use-libproc2.patch b/gnu/packages/patches/igt-gpu-tools-Use-libproc2.patch
deleted file mode 100644
index 131fea28fc..0000000000
--- a/gnu/packages/patches/igt-gpu-tools-Use-libproc2.patch
+++ /dev/null
@@ -1,505 +0,0 @@
-diff --git a/lib/igt_aux.c b/lib/igt_aux.c
-index 672d7d4b0..4c24b0928 100644
---- a/lib/igt_aux.c
-+++ b/lib/igt_aux.c
-@@ -52,8 +52,16 @@
- #include <assert.h>
- #include <grp.h>
-
--#include <proc/readproc.h>
--#include <libudev.h>
-+#ifdef HAVE_LIBPROCPS
-+# include <proc/readproc.h>
-+#else
-+# include <libproc2/pids.h>
-+#endif
-+
-+#include <dirent.h>
-+#ifdef __linux__
-+# include <libudev.h>
-+#endif
-
- #include "drmtest.h"
- #include "i915_drm.h"
-@@ -1217,6 +1225,7 @@ void igt_unlock_mem(void)
- */
- int igt_is_process_running(const char *comm)
- {
-+#if HAVE_LIBPROCPS
- PROCTAB *proc;
- proc_t *proc_info;
- bool found = false;
-@@ -1235,6 +1244,26 @@ int igt_is_process_running(const char *comm)
-
- closeproc(proc);
- return found;
-+#else
-+ enum pids_item Item[] = { PIDS_CMD };
-+ struct pids_info *info = NULL;
-+ struct pids_stack *stack;
-+ char *pid_comm;
-+ bool found = false;
-+
-+ if (procps_pids_new(&info, Item, 1) < 0)
-+ return false;
-+ while ((stack = procps_pids_get(info, PIDS_FETCH_TASKS_ONLY))) {
-+ pid_comm = PIDS_VAL(0, str, stack, info);
-+ if (!strncasecmp(pid_comm, comm, strlen(pid_comm))) {
-+ found = true;
-+ break;
-+ }
-+ }
-+
-+ procps_pids_unref(&info);
-+ return found;
-+#endif
- }
-
- /**
-@@ -1251,6 +1280,7 @@ int igt_is_process_running(const char *comm)
- */
- int igt_terminate_process(int sig, const char *comm)
- {
-+#if HAVE_LIBPROCPS
- PROCTAB *proc;
- proc_t *proc_info;
- int err = 0;
-@@ -1272,6 +1302,28 @@ int igt_terminate_process(int sig, const char *comm)
-
- closeproc(proc);
- return err;
-+#else
-+ enum pids_item Items[] = { PIDS_ID_PID, PIDS_CMD };
-+ struct pids_info *info = NULL;
-+ struct pids_stack *stack;
-+ char *pid_comm;
-+ int pid;
-+ int err = 0;
-+
-+ if (procps_pids_new(&info, Items, 2) < 0)
-+ return -errno;
-+ while ((stack = procps_pids_get(info, PIDS_FETCH_TASKS_ONLY))) {
-+ pid = PIDS_VAL(0, s_int, stack, info);
-+ pid_comm = PIDS_VAL(1, str, stack, info);
-+ if (!strncasecmp(pid_comm, comm, strlen(pid_comm))) {
-+ if (kill(pid, sig) < 0)
-+ err = -errno;
-+ break;
-+ }
-+ }
-+ procps_pids_unref(&info);
-+ return err;
-+#endif
- }
-
- struct pinfo {
-@@ -1341,9 +1393,9 @@ igt_show_stat_header(void)
- }
-
- static void
--igt_show_stat(proc_t *info, int *state, const char *fn)
-+igt_show_stat(const pid_t tid, const char *cmd, int *state, const char *fn)
- {
-- struct pinfo p = { .pid = info->tid, .comm = info->cmd, .fn = fn };
-+ struct pinfo p = { .pid = tid, .comm = cmd, .fn = fn };
-
- if (!*state)
- igt_show_stat_header();
-@@ -1353,7 +1405,7 @@ igt_show_stat(proc_t *info, int *state, const char *fn)
- }
-
- static void
--__igt_lsof_fds(proc_t *proc_info, int *state, char *proc_path, const char *dir)
-+__igt_lsof_fds(const pid_t tid, const char *cmd, int *state, char *proc_path, const char *dir)
- {
- struct dirent *d;
- struct stat st;
-@@ -1400,7 +1452,7 @@ again:
- dirn = dirname(copy_fd_lnk);
-
- if (!strncmp(dir, dirn, strlen(dir)))
-- igt_show_stat(proc_info, state, fd_lnk);
-+ igt_show_stat(tid, cmd, state, fd_lnk);
-
- free(copy_fd_lnk);
- free(fd_lnk);
-@@ -1416,13 +1468,13 @@ again:
- static void
- __igt_lsof(const char *dir)
- {
-- PROCTAB *proc;
-- proc_t *proc_info;
--
- char path[30];
- char *name_lnk;
- struct stat st;
- int state = 0;
-+#ifdef HAVE_LIBPROCPS
-+ PROCTAB *proc;
-+ proc_t *proc_info;
-
- proc = openproc(PROC_FILLCOM | PROC_FILLSTAT | PROC_FILLARG);
- igt_assert(proc != NULL);
-@@ -1443,19 +1495,56 @@ __igt_lsof(const char *dir)
- name_lnk[read] = '\0';
-
- if (!strncmp(dir, name_lnk, strlen(dir)))
-- igt_show_stat(proc_info, &state, name_lnk);
-+ igt_show_stat(proc_info->tid, proc_info->cmd, &state, name_lnk);
-
- /* check also fd, seems that lsof(8) doesn't look here */
- memset(path, 0, sizeof(path));
- snprintf(path, sizeof(path), "/proc/%d/fd", proc_info->tid);
-
-- __igt_lsof_fds(proc_info, &state, path, dir);
-+ __igt_lsof_fds(proc_info->tid, proc_info->cmd, &state, path, dir);
-
- free(name_lnk);
- freeproc(proc_info);
- }
-
- closeproc(proc);
-+#else
-+ enum pids_item Items[] = { PIDS_ID_PID, PIDS_CMD };
-+ struct pids_info *info = NULL;
-+ struct pids_stack *stack;
-+
-+ if (procps_pids_new(&info, Items, 2) < 0)
-+ return;
-+ while ((stack = procps_pids_get(info, PIDS_FETCH_TASKS_ONLY))) {
-+ ssize_t read;
-+ int tid = PIDS_VAL(0, s_int, stack, info);
-+ char *pid_comm = PIDS_VAL(1, str, stack, info);
-+
-+ /* check current working directory */
-+ memset(path, 0, sizeof(path));
-+ snprintf(path, sizeof(path), "/proc/%d/cwd", tid);
-+
-+ if (stat(path, &st) == -1)
-+ continue;
-+
-+ name_lnk = malloc(st.st_size + 1);
-+
-+ igt_assert((read = readlink(path, name_lnk, st.st_size + 1)));
-+ name_lnk[read] = '\0';
-+
-+ if (!strncmp(dir, name_lnk, strlen(dir)))
-+ igt_show_stat(tid, pid_comm, &state, name_lnk);
-+
-+ /* check also fd, seems that lsof(8) doesn't look here */
-+ memset(path, 0, sizeof(path));
-+ snprintf(path, sizeof(path), "/proc/%d/fd", tid);
-+
-+ __igt_lsof_fds(tid, pid_comm, &state, path, dir);
-+
-+ free(name_lnk);
-+ }
-+ procps_pids_unref(&info);
-+#endif
- }
-
- /**
-@@ -1490,7 +1579,7 @@ igt_lsof(const char *dpath)
- free(sanitized);
- }
-
--static void pulseaudio_unload_module(proc_t *proc_info)
-+static void pulseaudio_unload_module(const uid_t euid, const gid_t egid)
- {
- struct igt_helper_process pa_proc = {};
- char xdg_dir[PATH_MAX];
-@@ -1498,14 +1587,14 @@ static void pulseaudio_unload_module(proc_t *proc_info)
- struct passwd *pw;
-
- igt_fork_helper(&pa_proc) {
-- pw = getpwuid(proc_info->euid);
-+ pw = getpwuid(euid);
- homedir = pw->pw_dir;
-- snprintf(xdg_dir, sizeof(xdg_dir), "/run/user/%d", proc_info->euid);
-+ snprintf(xdg_dir, sizeof(xdg_dir), "/run/user/%d", euid);
-
- igt_info("Request pulseaudio to stop using audio device\n");
-
-- setgid(proc_info->egid);
-- setuid(proc_info->euid);
-+ setgid(egid);
-+ setuid(euid);
- clearenv();
- setenv("HOME", homedir, 1);
- setenv("XDG_RUNTIME_DIR",xdg_dir, 1);
-@@ -1524,10 +1613,13 @@ static void pipewire_reserve_wait(void)
- char xdg_dir[PATH_MAX];
- const char *homedir;
- struct passwd *pw;
-- proc_t *proc_info;
-- PROCTAB *proc;
-+ int tid = 0, euid, egid;
-
-+#ifdef HAVE_LIBPROCPS
- igt_fork_helper(&pw_reserve_proc) {
-+ proc_t *proc_info;
-+ PROCTAB *proc;
-+
- igt_info("Preventing pipewire-pulse to use the audio drivers\n");
-
- proc = openproc(PROC_FILLCOM | PROC_FILLSTAT | PROC_FILLARG);
-@@ -1540,19 +1632,45 @@ static void pipewire_reserve_wait(void)
- }
- closeproc(proc);
-
-+ tid = proc_info->tid;
-+ euid = proc_info->euid;
-+ egid = proc_info->egid;
-+ freeproc(proc_info);
-+#else
-+ igt_fork_helper(&pw_reserve_proc) {
-+ enum pids_item Items[] = { PIDS_ID_PID, PIDS_ID_EUID, PIDS_ID_EGID };
-+ enum rel_items { EU_PID, EU_EUID, EU_EGID };
-+ struct pids_info *info = NULL;
-+ struct pids_stack *stack;
-+
-+ igt_info("Preventing pipewire-pulse to use the audio drivers\n");
-+
-+ if (procps_pids_new(&info, Items, 3) < 0) {
-+ igt_info("error getting pids: %d\n", errno);
-+ exit(errno);
-+ }
-+ while ((stack = procps_pids_get(info, PIDS_FETCH_TASKS_ONLY))) {
-+ tid = PIDS_VAL(EU_PID, s_int, stack, info);
-+ if (pipewire_pulse_pid == tid)
-+ break;
-+ }
-+ euid = PIDS_VAL(EU_EUID, s_int, stack, info);
-+ egid = PIDS_VAL(EU_EGID, s_int, stack, info);
-+ procps_pids_unref(&info);
-+#endif
-+
- /* Sanity check: if it can't find the process, it means it has gone */
-- if (pipewire_pulse_pid != proc_info->tid)
-+ if (pipewire_pulse_pid != tid)
- exit(0);
-
-- pw = getpwuid(proc_info->euid);
-+ pw = getpwuid(euid);
- homedir = pw->pw_dir;
-- snprintf(xdg_dir, sizeof(xdg_dir), "/run/user/%d", proc_info->euid);
-- setgid(proc_info->egid);
-- setuid(proc_info->euid);
-+ snprintf(xdg_dir, sizeof(xdg_dir), "/run/user/%d", euid);
-+ setgid(egid);
-+ setuid(euid);
- clearenv();
- setenv("HOME", homedir, 1);
- setenv("XDG_RUNTIME_DIR",xdg_dir, 1);
-- freeproc(proc_info);
-
- /*
- * pw-reserve will run in background. It will only exit when
-@@ -1570,9 +1688,7 @@ static void pipewire_reserve_wait(void)
- int pipewire_pulse_start_reserve(void)
- {
- bool is_pw_reserve_running = false;
-- proc_t *proc_info;
- int attempts = 0;
-- PROCTAB *proc;
-
- if (!pipewire_pulse_pid)
- return 0;
-@@ -1584,6 +1700,10 @@ int pipewire_pulse_start_reserve(void)
- * pipewire version 0.3.50 or upper.
- */
- for (attempts = 0; attempts < PIPEWIRE_RESERVE_MAX_TIME; attempts++) {
-+#ifdef HAVE_LIBPROCPS
-+ PROCTAB *proc;
-+ proc_t *proc_info;
-+
- usleep(1000);
- proc = openproc(PROC_FILLCOM | PROC_FILLSTAT | PROC_FILLARG);
- igt_assert(proc != NULL);
-@@ -1598,6 +1718,24 @@ int pipewire_pulse_start_reserve(void)
- freeproc(proc_info);
- }
- closeproc(proc);
-+#else
-+ enum pids_item Items[] = { PIDS_ID_PID, PIDS_CMD };
-+ struct pids_info *info = NULL;
-+ struct pids_stack *stack;
-+
-+ usleep(1000);
-+
-+ if (procps_pids_new(&info, Items, 2) < 0)
-+ return 1;
-+ while ((stack = procps_pids_get(info, PIDS_FETCH_TASKS_ONLY))) {
-+ if (!strcmp(PIDS_VAL(1, str, stack, info), "pw-reserve")) {
-+ is_pw_reserve_running = true;
-+ pipewire_pw_reserve_pid = PIDS_VAL(0, s_int, stack, info);
-+ break;
-+ }
-+ }
-+ procps_pids_unref(&info);
-+#endif
- if (is_pw_reserve_running)
- break;
- }
-@@ -1645,7 +1783,7 @@ void pipewire_pulse_stop_reserve(void)
- * If the check fails, it means that the process can simply be killed.
- */
- static int
--__igt_lsof_audio_and_kill_proc(proc_t *proc_info, char *proc_path)
-+__igt_lsof_audio_and_kill_proc(const pid_t tid, const char *cmd, const uid_t euid, const gid_t egid, char *proc_path)
- {
- const char *audio_dev = "/dev/snd/";
- char path[PATH_MAX * 2];
-@@ -1670,10 +1808,10 @@ __igt_lsof_audio_and_kill_proc(proc_t *proc_info, char *proc_path)
- * 2) unload/unbind the the audio driver(s);
- * 3) stop the pw-reserve thread.
- */
-- if (!strcmp(proc_info->cmd, "pipewire-pulse")) {
-+ if (!strcmp(cmd, "pipewire-pulse")) {
- igt_info("process %d (%s) is using audio device. Should be requested to stop using them.\n",
-- proc_info->tid, proc_info->cmd);
-- pipewire_pulse_pid = proc_info->tid;
-+ tid, cmd);
-+ pipewire_pulse_pid = tid;
- return 0;
- }
- /*
-@@ -1685,9 +1823,9 @@ __igt_lsof_audio_and_kill_proc(proc_t *proc_info, char *proc_path)
- * will respawn them. So, just ignore here, they'll honor pw-reserve,
- * when the time comes.
- */
-- if (!strcmp(proc_info->cmd, "pipewire-media-session"))
-+ if (!strcmp(cmd, "pipewire-media-session"))
- return 0;
-- if (!strcmp(proc_info->cmd, "wireplumber"))
-+ if (!strcmp(cmd, "wireplumber"))
- return 0;
-
- dp = opendir(proc_path);
-@@ -1723,22 +1861,22 @@ __igt_lsof_audio_and_kill_proc(proc_t *proc_info, char *proc_path)
- * enough to unbind audio modules and won't cause race issues
- * with systemd trying to reload it.
- */
-- if (!strcmp(proc_info->cmd, "pulseaudio")) {
-- pulseaudio_unload_module(proc_info);
-+ if (!strcmp(cmd, "pulseaudio")) {
-+ pulseaudio_unload_module(euid, egid);
- break;
- }
-
- /* For all other processes, just kill them */
- igt_info("process %d (%s) is using audio device. Should be terminated.\n",
-- proc_info->tid, proc_info->cmd);
-+ tid, cmd);
-
-- if (kill(proc_info->tid, SIGTERM) < 0) {
-+ if (kill(tid, SIGTERM) < 0) {
- igt_info("Fail to terminate %s (pid: %d) with SIGTERM\n",
-- proc_info->cmd, proc_info->tid);
-- if (kill(proc_info->tid, SIGABRT) < 0) {
-+ cmd, tid);
-+ if (kill(tid, SIGABRT) < 0) {
- fail++;
- igt_info("Fail to terminate %s (pid: %d) with SIGABRT\n",
-- proc_info->cmd, proc_info->tid);
-+ cmd, tid);
- }
- }
-
-@@ -1760,23 +1898,47 @@ int
- igt_lsof_kill_audio_processes(void)
- {
- char path[PATH_MAX];
-+ int fail = 0;
-+
-+#ifdef HAVE_LIBPROCPS
- proc_t *proc_info;
- PROCTAB *proc;
-- int fail = 0;
-
- proc = openproc(PROC_FILLCOM | PROC_FILLSTAT | PROC_FILLARG);
- igt_assert(proc != NULL);
- pipewire_pulse_pid = 0;
--
- while ((proc_info = readproc(proc, NULL))) {
- if (snprintf(path, sizeof(path), "/proc/%d/fd", proc_info->tid) < 1)
- fail++;
- else
-- fail += __igt_lsof_audio_and_kill_proc(proc_info, path);
-+ fail += __igt_lsof_audio_and_kill_proc(proc_info->tid, proc_info->cmd, proc_info->euid, proc_info->egid, path);
-
- freeproc(proc_info);
- }
- closeproc(proc);
-+#else
-+ enum pids_item Items[] = { PIDS_ID_PID, PIDS_CMD, PIDS_ID_EUID, PIDS_ID_EGID };
-+ enum rel_items { EU_PID, EU_CMD, EU_EUID, EU_EGID };
-+ struct pids_info *info = NULL;
-+ struct pids_stack *stack;
-+ pid_t tid;
-+
-+ if (procps_pids_new(&info, Items, 4) < 0)
-+ return 1;
-+ while ((stack = procps_pids_get(info, PIDS_FETCH_TASKS_ONLY))) {
-+ tid = PIDS_VAL(EU_PID, s_int, stack, info);
-+
-+ if (snprintf(path, sizeof(path), "/proc/%d/fd", tid) < 1)
-+ fail++;
-+ else
-+ fail += __igt_lsof_audio_and_kill_proc(tid,
-+ PIDS_VAL(EU_CMD, str, stack, info),
-+ PIDS_VAL(EU_EUID, s_int, stack, info),
-+ PIDS_VAL(EU_EGID, s_int, stack, info),
-+ path);
-+ }
-+ procps_pids_unref(&info);
-+#endif
-
- return fail;
- }
-diff --git a/lib/meson.build b/lib/meson.build
-index 85f100f75..55efdc83b 100644
---- a/lib/meson.build
-+++ b/lib/meson.build
-@@ -114,7 +114,6 @@ lib_deps = [
- libdrm,
- libdw,
- libkmod,
-- libprocps,
- libudev,
- math,
- pciaccess,
-@@ -178,6 +177,12 @@ if chamelium.found()
- lib_sources += 'monitor_edids/monitor_edids_helper.c'
- endif
-
-+if libprocps.found()
-+ lib_deps += libprocps
-+else
-+ lib_deps += libproc2
-+endif
-+
- if get_option('srcdir') != ''
- srcdir = join_paths(get_option('srcdir'), 'tests')
- else
-diff --git a/meson.build b/meson.build
-index 1c872cc9c..0487158dc 100644
---- a/meson.build
-+++ b/meson.build
-@@ -125,7 +125,15 @@ build_info += 'With libdrm: ' + ','.join(libdrm_info)
-
- pciaccess = dependency('pciaccess', version : '>=0.10')
- libkmod = dependency('libkmod')
--libprocps = dependency('libprocps', required : true)
-+libprocps = dependency('libprocps', required : false)
-+libproc2 = dependency('libproc2', required : false)
-+if libprocps.found()
-+ config.set('HAVE_LIBPROCPS', 1)
-+elif libproc2.found()
-+ config.set('HAVE_LIBPROC2', 1)
-+else
-+ error('Either libprocps or libproc2 is required')
-+endif
-
- libunwind = dependency('libunwind', required : get_option('libunwind'))
- build_info += 'With libunwind: @0@'.format(libunwind.found())
diff --git a/gnu/packages/patches/openmw-assume-nonconst-SIGSTKSZ.patch b/gnu/packages/patches/openmw-assume-nonconst-SIGSTKSZ.patch
deleted file mode 100644
index ed35563c2c..0000000000
--- a/gnu/packages/patches/openmw-assume-nonconst-SIGSTKSZ.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 98a7d90ee258ceef9c70b0b2955d0458ec46f048 Mon Sep 17 00:00:00 2001
-From: elsid <elsid.mail@gmail.com>
-Date: Fri, 24 Sep 2021 19:40:29 +0200
-Subject: [PATCH] Assume SIGSTKSZ is not a constant
-
-SIGSTKSZ is not defined as constant since glibc 2.34:
-https://sourceware.org/git/?p=glibc.git;a=commit;h=6c57d320484988e87e446e2e60ce42816bf51d53
----
- components/crashcatcher/crashcatcher.cpp | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/components/crashcatcher/crashcatcher.cpp b/components/crashcatcher/crashcatcher.cpp
-index 86571e1e3a..c828e1ca81 100644
---- a/components/crashcatcher/crashcatcher.cpp
-+++ b/components/crashcatcher/crashcatcher.cpp
-@@ -56,8 +56,6 @@ static const char exec_err[] = "!!! Failed to exec debug process\n";
-
- static char argv0[PATH_MAX];
-
--static char altstack[SIGSTKSZ];
--
-
- static struct {
- int signum;
-@@ -475,9 +473,10 @@ int crashCatcherInstallHandlers(int argc, char **argv, int num_signals, int *sig
-
- /* Set an alternate signal stack so SIGSEGVs caused by stack overflows
- * still run */
-+ static char* altstack = new char [SIGSTKSZ];
- altss.ss_sp = altstack;
- altss.ss_flags = 0;
-- altss.ss_size = sizeof(altstack);
-+ altss.ss_size = SIGSTKSZ;
- sigaltstack(&altss, nullptr);
-
- memset(&sa, 0, sizeof(sa));
---
-GitLab
-
diff --git a/gnu/packages/patches/plasp-fix-normalization.patch b/gnu/packages/patches/plasp-fix-normalization.patch
new file mode 100644
index 0000000000..dc2d3e4b98
--- /dev/null
+++ b/gnu/packages/patches/plasp-fix-normalization.patch
@@ -0,0 +1,51 @@
+From cddbfa3ade23695dd9996f6e208615702a3a42e1 Mon Sep 17 00:00:00 2001
+From: Liliana Marie Prikler <liliana.prikler@ist.tugraz.at>
+Date: Thu, 23 Nov 2023 09:53:38 +0100
+Subject: [PATCH 1/2] normalization: No longer work around compiler bugs in
+ Precondition.
+To: Patrick Lühne <patrick-github@luehne.de>
+Cc: Martin Gebser <martin.gebser@aau.at>
+
+Newer versions of GCC (such as GCC 11) point out that std::move is meaningless
+in this position, so remove it.
+---
+ lib/pddl/src/pddl/detail/normalization/Precondition.cpp | 9 +++------
+ 1 file changed, 3 insertions(+), 6 deletions(-)
+
+diff --git a/lib/pddl/src/pddl/detail/normalization/Precondition.cpp b/lib/pddl/src/pddl/detail/normalization/Precondition.cpp
+index 4eebfee..4297e52 100644
+--- a/lib/pddl/src/pddl/detail/normalization/Precondition.cpp
++++ b/lib/pddl/src/pddl/detail/normalization/Precondition.cpp
+@@ -83,8 +83,7 @@ normalizedAST::Literal normalizeNested(ast::AndPointer<ast::Precondition> &and_,
+
+ derivedPredicate->declaration->precondition = std::make_unique<normalizedAST::And<normalizedAST::Literal>>(std::move(normalizedArguments));
+
+- // TODO: investigate, could be a compiler bug
+- return std::move(derivedPredicate);
++ return derivedPredicate;
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+@@ -112,8 +111,7 @@ normalizedAST::Literal normalizeNested(ast::ExistsPointer<ast::Precondition> &ex
+ return normalizeTopLevel(x, normalizationContext);
+ });
+
+- // TODO: investigate, could be a compiler bug
+- return std::move(derivedPredicate);
++ return derivedPredicate;
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+@@ -174,8 +172,7 @@ normalizedAST::Literal normalizeNested(ast::OrPointer<ast::Precondition> &or_, d
+
+ derivedPredicate->declaration->precondition = std::make_unique<normalizedAST::Or<normalizedAST::Literal>>(std::move(normalizedArguments));
+
+- // TODO: investigate, could be a compiler bug
+- return std::move(derivedPredicate);
++ return derivedPredicate;
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+--
+2.41.0
+
diff --git a/gnu/packages/patches/plasp-include-iostream.patch b/gnu/packages/patches/plasp-include-iostream.patch
new file mode 100644
index 0000000000..9722e6fc03
--- /dev/null
+++ b/gnu/packages/patches/plasp-include-iostream.patch
@@ -0,0 +1,26 @@
+From 95c6a506e14cf248e2a3cae2ed3f41ed1eedf278 Mon Sep 17 00:00:00 2001
+From: Liliana Marie Prikler <liliana.prikler@ist.tugraz.at>
+Date: Thu, 23 Nov 2023 09:53:38 +0100
+Subject: [PATCH 2/2] app: Add missing #include <iostream>.
+To: Patrick Lühne <patrick-github@luehne.de>
+Cc: Martin Gebser <martin.gebser@aau.at>
+
+---
+ app/include/plasp-app/Command.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/app/include/plasp-app/Command.h b/app/include/plasp-app/Command.h
+index 5755ee3..671804b 100644
+--- a/app/include/plasp-app/Command.h
++++ b/app/include/plasp-app/Command.h
+@@ -1,6 +1,7 @@
+ #ifndef __PLASP_APP__COMMAND_H
+ #define __PLASP_APP__COMMAND_H
+
++#include <iostream> // std::cout, std::endl
+ #include <tuple>
+
+ #include <cxxopts.hpp>
+--
+2.41.0
+
diff --git a/gnu/packages/patches/python-accupy-fix-use-of-perfplot.patch b/gnu/packages/patches/python-accupy-fix-use-of-perfplot.patch
new file mode 100644
index 0000000000..5b874e0056
--- /dev/null
+++ b/gnu/packages/patches/python-accupy-fix-use-of-perfplot.patch
@@ -0,0 +1,48 @@
+From 567558a4eb9b73ab30f9e469b36091eccf445f80 Mon Sep 17 00:00:00 2001
+From: Felix Gruber <felgru@posteo.net>
+Date: Sun, 23 Apr 2023 16:48:59 +0200
+Subject: [PATCH] Fix use of perfplot.
+
+data tuples are unpacked by perfplot before it calls the kernel
+functions.
+---
+ tests/test_dot.py | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/tests/test_dot.py b/tests/test_dot.py
+index a8160fe..51307ad 100644
+--- a/tests/test_dot.py
++++ b/tests/test_dot.py
+@@ -76,10 +76,10 @@ def test_speed_comparison1(n_range=None):
+ perfplot.plot(
+ setup=lambda n: (np.random.rand(n, 100), np.random.rand(100, n)),
+ kernels=[
+- lambda xy: np.dot(*xy),
+- lambda xy: accupy.kdot(*xy, K=2),
+- lambda xy: accupy.kdot(*xy, K=3),
+- lambda xy: accupy.fdot(*xy),
++ lambda x, y: np.dot(x, y),
++ lambda x, y: accupy.kdot(x, y, K=2),
++ lambda x, y: accupy.kdot(x, y, K=3),
++ lambda x, y: accupy.fdot(x, y),
+ ],
+ labels=["np.dot", "accupy.kdot[2]", "accupy.kdot[3]", "accupy.fdot"],
+ n_range=n_range,
+@@ -96,10 +96,10 @@ def test_speed_comparison2(n_range=None):
+ perfplot.plot(
+ setup=lambda n: (np.random.rand(100, n), np.random.rand(n, 100)),
+ kernels=[
+- lambda xy: np.dot(*xy),
+- lambda xy: accupy.kdot(*xy, K=2),
+- lambda xy: accupy.kdot(*xy, K=3),
+- lambda xy: accupy.fdot(*xy),
++ lambda x, y: np.dot(x, y),
++ lambda x, y: accupy.kdot(x, y, K=2),
++ lambda x, y: accupy.kdot(x, y, K=3),
++ lambda x, y: accupy.fdot(x, y),
+ ],
+ labels=["np.dot", "accupy.kdot[2]", "accupy.kdot[3]", "accupy.fdot"],
+ n_range=n_range,
+--
+2.39.2
+
diff --git a/gnu/packages/patches/python-accupy-use-matplotx.patch b/gnu/packages/patches/python-accupy-use-matplotx.patch
new file mode 100644
index 0000000000..f3dd17da22
--- /dev/null
+++ b/gnu/packages/patches/python-accupy-use-matplotx.patch
@@ -0,0 +1,113 @@
+From 1da1ed24cfba8a051b6c2f452a67ebfee77ca040 Mon Sep 17 00:00:00 2001
+From: Felix Gruber <felgru@posteo.net>
+Date: Sun, 23 Apr 2023 15:42:19 +0200
+Subject: [PATCH] Use dufte style from matplotx.
+
+The stand-alone dufte package has been deprecated in favor of the dufte
+style that has been integrated into matplotx.
+---
+ tests/test_dot.py | 10 +++++-----
+ tests/test_sums.py | 12 ++++++------
+ tox.ini | 2 +-
+ 3 files changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/tests/test_dot.py b/tests/test_dot.py
+index 0a40a0c..a8160fe 100644
+--- a/tests/test_dot.py
++++ b/tests/test_dot.py
+@@ -1,5 +1,5 @@
+-import dufte
+ import matplotlib.pyplot as plt
++import matplotx
+ import numpy as np
+ import perfplot
+ import pytest
+@@ -33,7 +33,7 @@ def test_fdot(cond):
+
+
+ def test_accuracy_comparison_illcond(target_cond=None):
+- plt.style.use(dufte.style)
++ plt.style.use(matplotx.styles.dufte)
+
+ if target_cond is None:
+ target_cond = [10 ** k for k in range(2)]
+@@ -61,13 +61,13 @@ def test_accuracy_comparison_illcond(target_cond=None):
+ for label, d in zip(labels, data.T):
+ plt.loglog(condition_numbers, d, label=label)
+
+- dufte.legend()
++ matplotx.line_labels()
+ plt.xlabel("condition number")
+- dufte.ylabel("relative error")
++ matplotx.ylabel_top("relative error")
+
+
+ def test_speed_comparison1(n_range=None):
+- plt.style.use(dufte.style)
++ plt.style.use(matplotx.styles.dufte)
+
+ if n_range is None:
+ n_range = [2 ** k for k in range(2)]
+diff --git a/tests/test_sums.py b/tests/test_sums.py
+index 1c0f6b0..8cd9ddb 100644
+--- a/tests/test_sums.py
++++ b/tests/test_sums.py
+@@ -1,5 +1,5 @@
+-import dufte
+ import matplotlib.pyplot as plt
++import matplotx
+ import numpy as np
+ import perfplot
+ import pytest
+@@ -32,7 +32,7 @@ def test_fsum(cond):
+
+
+ def test_accuracy_comparison_illcond(target_conds=None):
+- plt.style.use(dufte.style)
++ plt.style.use(matplotx.styles.dufte)
+
+ if target_conds is None:
+ target_conds = [10 ** k for k in range(1, 2)]
+@@ -71,14 +71,14 @@ def test_accuracy_comparison_illcond(target_conds=None):
+ for label, color, d in zip(labels, colors, data.T):
+ plt.loglog(condition_numbers, d, label=label, color=color)
+
+- dufte.legend()
++ matplotx.line_labels()
+ plt.xlabel("condition number")
+- dufte.ylabel("relative error")
++ matplotx.ylabel_top("relative error")
+ # plt.gca().set_aspect(1.3)
+
+
+ def test_speed_comparison1(n_range=None):
+- plt.style.use(dufte.style)
++ plt.style.use(matplotx.styles.dufte)
+
+ if n_range is None:
+ n_range = [2 ** k for k in range(2)]
+@@ -109,7 +109,7 @@ def test_speed_comparison1(n_range=None):
+
+
+ def test_speed_comparison2(n_range=None):
+- plt.style.use(dufte.style)
++ plt.style.use(matplotx.styles.dufte)
+
+ if n_range is None:
+ n_range = [2 ** k for k in range(2)]
+diff --git a/tox.ini b/tox.ini
+index 79a53ec..524b3bc 100644
+--- a/tox.ini
++++ b/tox.ini
+@@ -4,7 +4,7 @@ isolated_build = True
+
+ [testenv]
+ deps =
+- dufte
++ matplotx
+ perfplot
+ pytest
+ pytest-cov
+--
+2.39.2
+
diff --git a/gnu/packages/patches/python-sphinx-prompt-docutils-0.19.patch b/gnu/packages/patches/python-sphinx-prompt-docutils-0.19.patch
new file mode 100644
index 0000000000..01c1879f1c
--- /dev/null
+++ b/gnu/packages/patches/python-sphinx-prompt-docutils-0.19.patch
@@ -0,0 +1,35 @@
+From a885c54d54e71a089b916502f1c222ef14a07a93 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?St=C3=A9phane=20Brunner?= <stephane.brunner@camptocamp.com>
+Date: Mon, 15 Aug 2022 10:41:40 +0200
+Subject: [PATCH] Fix the tests
+
+---
+ tests/test_sphinx_prompt.py | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/tests/test_sphinx_prompt.py b/tests/test_sphinx_prompt.py
+index 47d16c5..6a31798 100644
+--- a/tests/test_sphinx_prompt.py
++++ b/tests/test_sphinx_prompt.py
+@@ -1,3 +1,7 @@
++from io import StringIO
++
++import docutils.statemachine
++import docutils.utils
+ import pytest
+
+ sphinx_prompt = __import__("sphinx_prompt")
+@@ -150,6 +154,12 @@
+ def test(arguments, options, content, expected):
+ sphinx_prompt._cache.next_index = 1
+ sphinx_prompt._cache.prompts.clear()
+- directive = sphinx_prompt.PromptDirective("prompt", arguments, options, content, 0, 0, "", None, None)
++ stream = StringIO()
++ reporter = docutils.utils.Reporter("test data", 2, 4, stream, 1)
++ statemachine = docutils.statemachine.StateMachine([], None)
++ setattr(statemachine, "reporter", reporter)
++ directive = sphinx_prompt.PromptDirective(
++ "prompt", arguments, options, content, 0, 0, "", None, statemachine
++ )
+ result = directive.run()
+ assert result[0].astext() == expected
diff --git a/gnu/packages/patches/racket-backport-8.10-rktboot.patch b/gnu/packages/patches/racket-backport-8.10-rktboot.patch
deleted file mode 100644
index 834001bd83..0000000000
--- a/gnu/packages/patches/racket-backport-8.10-rktboot.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-From 5446e36e0685ec5c7b4f812dec5bf7959db4f906 Mon Sep 17 00:00:00 2001
-From: Efraim Flashner <efraim@flashner.co.il>
-Date: Thu, 20 Jul 2023 15:56:21 +0300
-Subject: [PATCH 1/2] rktboot: Add support for riscv64.
-
-(cherry picked from commit f80c5d001d5235556ae9cde617b1e3a1322d0505)
----
- racket/src/rktboot/machine-def.rkt | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/racket/src/rktboot/machine-def.rkt b/racket/src/rktboot/machine-def.rkt
-index 8ff0688652..59ebfc88d8 100644
---- a/racket/src/rktboot/machine-def.rkt
-+++ b/racket/src/rktboot/machine-def.rkt
-@@ -25,6 +25,7 @@
- [(regexp-match? #rx"^t?arm32" target-machine) "arm32"]
- [(regexp-match? #rx"^t?arm64" target-machine) "arm64"]
- [(regexp-match? #rx"^t?ppc32" target-machine) "ppc32"]
-+ [(regexp-match? #rx"^t?rv64" target-machine) "rv64"]
- [(regexp-match? #rx"^t?pb" target-machine) "pb"]
- [else (error "machine.def: cannot infer architecture")]))]
- [s (regexp-replace* #rx"[$][(]Mend[)]" s
-
-base-commit: b10ecfb8311fca2d42636eea2ca12aff0b76b208
---
-2.41.0
-
-
-From 6261c3582c386e770d654ca6a36f112834f35aef Mon Sep 17 00:00:00 2001
-From: Philip McGrath <philip@philipmcgrath.com>
-Date: Sun, 16 Jul 2023 15:47:14 -0400
-Subject: [PATCH 2/2] rktboot: improve machene type inference
-
-Related to https://issues.guix.gnu.org/62231
-Related to https://github.com/racket/racket/issues/3948
-
-(cherry picked from commit 005488491cee89e7db38109de4c9dcf2d8d5aef0)
----
- racket/src/rktboot/config.rkt | 73 +++++++++++++++++++++++++++++------
- 1 file changed, 61 insertions(+), 12 deletions(-)
-
-diff --git a/racket/src/rktboot/config.rkt b/racket/src/rktboot/config.rkt
-index 7a969017ed..2b411e002c 100644
---- a/racket/src/rktboot/config.rkt
-+++ b/racket/src/rktboot/config.rkt
-@@ -15,20 +15,69 @@
- (path->complete-path scheme-dir))))))
- (hash-set! ht 'make-boot-scheme-dir scheme-dir)
-
-+(define (infer-target-machine)
-+ ;; Compute a native or pbarch machine string for the current platform.
-+ ;; Some caveats:
-+ ;; 1. A pbarch Racket will always infer a pbarch machine,
-+ ;; even if a native machine exists. Hopefully this is an
-+ ;; unlikely scenario: if you're running Racket CS, you've
-+ ;; bootstrapped Chez somehow, so you could use `re.boot`.
-+ ;; 2. A `tpb` or `pb` Racket on a 32-bit platform would still return
-+ ;; 64 from `(system-type 'word)`, but, in addition to the above,
-+ ;; it is not currently possible or desired to build Racket as
-+ ;; `tpb` or `pb` (as opposed to pbarch variants):
-+ ;; see <https://github.com/racket/racket/issues/4692>.
-+ ;; 3. On a hypothetical platform where Chez supported both the
-+ ;; architecture and the OS, but not the combination of the two,
-+ ;; (e.g. riscv64 Windows) this code would currently return a
-+ ;; non-existent native machine (e.g. trv64nt) instead of a
-+ ;; working pbarch machine. Presumably this could be fixed if
-+ ;; such a platform came into existence.
-+ (define s (path->string (system-library-subpath #f)))
-+ (define arch+os
-+ (cond
-+ [(regexp-match #rx"^([^\\]+)\\\\([^\\]+)$" s)
-+ => (λ (m)
-+ (reverse (cdr m)))]
-+ [(regexp-match #rx"^([^-]+)-(.+)$" s)
-+ => cdr]
-+ [else
-+ (error 'infer-target-machine "unknown format for system library subpath"
-+ "produced" (system-library-subpath #f))]))
-+ (define arch
-+ (case (car arch+os)
-+ [("x86_64" "amd64") "a6"] ; https://github.com/racket/racket/issues/4691
-+ [("i386") "i3"]
-+ [("aarch64") "arm64"]
-+ [("arm") "arm32"]
-+ [("ppc") "ppc32"]
-+ [("riscv64") "rv64"]
-+ [("unknown") #f] ; pb machine types
-+ [else #f]))
-+ (define os
-+ (case (cadr arch+os)
-+ [("macosx" "darwin" "ios") "osx"]
-+ [("win32" "cygwin") "nt"]
-+ [("linux" "android") "le"]
-+ [("gnu-hurd") "gnu"]
-+ [("freebsd") "fb"]
-+ [("openbsd") "ob"]
-+ [("netbsd") "nb"]
-+ [("solaris") "s2"] ; NOT "sunos4" (I think)
-+ [("qnx") "qnx"]
-+ [("unknown") #f] ; pb machine types
-+ [else #f]))
-+ (if (and arch os)
-+ (string-append "t" arch os)
-+ (format "tpb~a~a"
-+ (system-type 'word)
-+ (if (system-big-endian?)
-+ "b"
-+ "l"))))
-+
- (define target-machine (or (hash-ref ht 'make-boot-targate-machine #f)
- (getenv "MACH")
-- (case (system-type)
-- [(macosx) (if (eqv? 64 (system-type 'word))
-- "ta6osx"
-- "ti3osx")]
-- [(windows) (if (eqv? 64 (system-type 'word))
-- "ta6nt"
-- "ti3nt")]
-- [else
-- (case (path->string (system-library-subpath #f))
-- [("x86_64-linux") "ta6le"]
-- [("i386-linux") "ti3le"]
-- [else #f])])))
-+ (infer-target-machine)))
- (hash-set! ht 'make-boot-targate-machine target-machine)
-
- (define optimize-level-init 3)
---
-2.41.0
-
diff --git a/gnu/packages/patches/racket-backport-8.11-layered-docs.patch b/gnu/packages/patches/racket-backport-8.11-layered-docs.patch
new file mode 100644
index 0000000000..07f105bb24
--- /dev/null
+++ b/gnu/packages/patches/racket-backport-8.11-layered-docs.patch
@@ -0,0 +1,36 @@
+From 1d8dbdf408db9e99f1382323477561d5148cd451 Mon Sep 17 00:00:00 2001
+From: Philip McGrath <philip@philipmcgrath.com>
+Date: Fri, 20 Oct 2023 17:19:50 -0400
+Subject: [PATCH] racket-index: fix release.scrbl for layered installations
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Configure the release notes page to be rendered separately at every
+installation layer. Otherwise, rendering documentation for packages
+installed in a new layer might try to write to `release/in.sxref`
+in the parent layer’s docs directory.
+
+Related to https://github.com/videolang/video/issues/67
+Related to https://issues.guix.gnu.org/56534
+
+(cherry picked from commit 85f21854c0a41564b755fbe180fe6b85de6c4730)
+---
+ pkgs/racket-index/scribblings/main/info.rkt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pkgs/racket-index/scribblings/main/info.rkt b/pkgs/racket-index/scribblings/main/info.rkt
+index 75c507848a..a6a3798f7c 100644
+--- a/pkgs/racket-index/scribblings/main/info.rkt
++++ b/pkgs/racket-index/scribblings/main/info.rkt
+@@ -6,4 +6,4 @@
+ ("local-redirect.scrbl" (depends-all-main no-depend-on every-main-layer) (omit) "local-redirect" 1 10)
+ ("license.scrbl" () (omit))
+ ("acks.scrbl" () (omit))
+- ("release.scrbl" (depends-all-main no-depend-on) (omit))))
++ ("release.scrbl" (depends-all-main no-depend-on every-main-layer) (omit))))
+
+base-commit: c3a502c0ae9f4d615bfd85fc7d88b781826bbb09
+--
+2.41.0
+
diff --git a/gnu/packages/patches/zig-use-baseline-cpu-by-default.patch b/gnu/packages/patches/zig-use-baseline-cpu-by-default.patch
new file mode 100644
index 0000000000..be78d9c6c7
--- /dev/null
+++ b/gnu/packages/patches/zig-use-baseline-cpu-by-default.patch
@@ -0,0 +1,36 @@
+From 1dc188129950031243c5a0c80ec2562fab8ec549 Mon Sep 17 00:00:00 2001
+From: Ekaitz Zarraga <ekaitz@elenq.tech>
+Date: Sat, 18 Nov 2023 15:04:16 +0100
+Subject: [PATCH] Use `baseline` cpu by default.
+
+This helps Guix tune the package later. Tunning will only add
+`-Dcpu=whatever` which should override the standard behaviour.
+
+Zig by default uses `native`, which interferes with our build process.
+In our previous zig-build-system we chose to add `-Dcpu=baseline` flag
+in each `zig build` execution, but that doesn't allow us to tune the
+package later. Tunning is only designed to add extra flags in the
+command line call, and we already had one set for the baseline case.
+With this patch we set the standard behavior to `baseline` so we don't
+need to add the `-Dcpu=baseline` flag in the zig-build-system and we can
+tune with no issues.
+---
+ lib/std/zig/CrossTarget.zig | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/std/zig/CrossTarget.zig b/lib/std/zig/CrossTarget.zig
+index 6c59a4a3a..f5ec065fe 100644
+--- a/lib/std/zig/CrossTarget.zig
++++ b/lib/std/zig/CrossTarget.zig
+@@ -12,7 +12,7 @@ const mem = std.mem;
+ /// `null` means native.
+ cpu_arch: ?Target.Cpu.Arch = null,
+
+-cpu_model: CpuModel = CpuModel.determined_by_cpu_arch,
++cpu_model: CpuModel = CpuModel.baseline,
+
+ /// Sparse set of CPU features to add to the set from `cpu_model`.
+ cpu_features_add: Target.Cpu.Feature.Set = Target.Cpu.Feature.Set.empty,
+--
+2.41.0
+