summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-03-21 21:38:19 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-03-21 21:38:19 -0400
commit49b350fafc2c3ea1db66461b73d4e304cd13ec92 (patch)
tree9b9b1a4a383b5175241ae6b91b83de0590f13983 /gnu/packages/patches
parent03b5668a035ba96c9690476078c5ee1d5793f3e2 (diff)
parente584a093f943be216fdc93895281fde835836b8d (diff)
downloadguix-patches-49b350fafc2c3ea1db66461b73d4e304cd13ec92.tar
guix-patches-49b350fafc2c3ea1db66461b73d4e304cd13ec92.tar.gz
Merge branch 'master' into staging.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/bash-reproducible-linux-pgrp-pipe.patch34
-rw-r--r--gnu/packages/patches/calibre-fix-zeroconf.patch38
-rw-r--r--gnu/packages/patches/dunst-1.7.3-fix-crash.patch21
-rw-r--r--gnu/packages/patches/efivar-gcc-compat.patch177
-rw-r--r--gnu/packages/patches/evilwm-lost-focus-bug.patch18
-rw-r--r--gnu/packages/patches/freecad-boost-serialization.patch27
-rw-r--r--gnu/packages/patches/freecad-vtk9.patch827
-rw-r--r--gnu/packages/patches/ghc-monad-par-fix-tests.patch45
-rw-r--r--gnu/packages/patches/glibc-CVE-2018-11236.patch149
-rw-r--r--gnu/packages/patches/glibc-CVE-2018-11237.patch55
-rw-r--r--gnu/packages/patches/glibc-hurd-magic-pid.patch190
-rw-r--r--gnu/packages/patches/grocsvs-dont-use-admiral.patch69
-rw-r--r--gnu/packages/patches/guile-cross-compilation.patch55
-rw-r--r--gnu/packages/patches/guile-ssh-fix-test-suite.patch217
-rw-r--r--gnu/packages/patches/guile-ssh-read-error.patch18
-rw-r--r--gnu/packages/patches/hydra-disable-darcs-test.patch25
-rw-r--r--gnu/packages/patches/inkscape-poppler-0.76.patch36
-rw-r--r--gnu/packages/patches/libvirt-create-machine-cgroup.patch48
-rw-r--r--gnu/packages/patches/linux-libre-arm64-generic-pinebook-lcd.patch40
-rw-r--r--gnu/packages/patches/marble-qt-add-qt-headers.patch189
-rw-r--r--gnu/packages/patches/mariadb-link-libatomic.patch83
-rw-r--r--gnu/packages/patches/maven-enforcer-api-fix-old-dependencies.patch177
-rw-r--r--gnu/packages/patches/mescc-tools-boot.patch222
-rw-r--r--gnu/packages/patches/nettle-3.5-CVE-2021-3580-pt1.patch276
-rw-r--r--gnu/packages/patches/nettle-3.5-CVE-2021-3580-pt2.patch163
-rw-r--r--gnu/packages/patches/nettle-3.5-check-_pkcs1_sec_decrypt-msg-len.patch78
-rw-r--r--gnu/packages/patches/nhc98-c-update.patch42
-rw-r--r--gnu/packages/patches/ocaml-Add-a-.file-directive.patch96
-rw-r--r--gnu/packages/patches/ocaml-CVE-2015-8869.patch72
-rw-r--r--gnu/packages/patches/ocaml-bitstring-fix-configure.patch53
-rw-r--r--gnu/packages/patches/ocaml-enable-ocamldoc-reproducibility.patch149
-rw-r--r--gnu/packages/patches/openbabel-fix-crash-on-nwchem-output.patch34
-rw-r--r--gnu/packages/patches/openboardview-use-system-imgui.patch170
-rw-r--r--gnu/packages/patches/openjdk-14-builtins.patch11
-rw-r--r--gnu/packages/patches/openssl-c-rehash-in.patch17
-rw-r--r--gnu/packages/patches/openssl-runpath.patch15
-rw-r--r--gnu/packages/patches/passwordsafe-meson-remove-extra-argument.patch20
-rw-r--r--gnu/packages/patches/patchutils-test-perms.patch14
-rw-r--r--gnu/packages/patches/postgresql-riscv-spinlocks.patch41
-rw-r--r--gnu/packages/patches/python-CVE-2018-14647.patch61
-rw-r--r--gnu/packages/patches/python-CVE-2020-26116.patch47
-rw-r--r--gnu/packages/patches/python-axolotl-AES-fix.patch24
-rw-r--r--gnu/packages/patches/python-babel-fix-parse-future-test.patch68
-rw-r--r--gnu/packages/patches/python-matplotlib-run-under-wayland-gtk3.patch31
-rw-r--r--gnu/packages/patches/python-mypy-12332.patch68
-rw-r--r--gnu/packages/patches/python-pytest-asyncio-python-3.8.patch238
-rw-r--r--gnu/packages/patches/python-robotframework-source-date-epoch.patch104
-rw-r--r--gnu/packages/patches/python-robotframework-sshlibrary-rf5-compat.patch19
-rw-r--r--gnu/packages/patches/python-robotframework-ug2html.patch57
-rw-r--r--gnu/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch29
-rw-r--r--gnu/packages/patches/qt4-ldflags.patch18
-rw-r--r--gnu/packages/patches/racket-enable-scheme-backport.patch465
-rw-r--r--gnu/packages/patches/racket-gui-tethered-launcher-backport.patch26
-rw-r--r--gnu/packages/patches/rust-coresimd-doctest.patch21
-rw-r--r--gnu/packages/patches/screen-CVE-2021-26937.patch66
-rw-r--r--gnu/packages/patches/sdcc-disable-non-free-code.patch363
-rw-r--r--gnu/packages/patches/streamlink-update-test.patch70
-rw-r--r--gnu/packages/patches/tcc-boot-0.9.27.patch26
-rw-r--r--gnu/packages/patches/transfig-gcc10-fno-common.patch33
-rw-r--r--gnu/packages/patches/upower-builddir.patch34
-rw-r--r--gnu/packages/patches/vtk-8-fix-freetypetools-build-failure.patch36
-rw-r--r--gnu/packages/patches/webkitgtk-adjust-bubblewrap-paths.patch38
-rw-r--r--gnu/packages/patches/webkitgtk-bind-all-fonts.patch17
-rw-r--r--gnu/packages/patches/webkitgtk-canonicalize-paths.patch66
-rw-r--r--gnu/packages/patches/webkitgtk-share-store.patch19
65 files changed, 1414 insertions, 4641 deletions
diff --git a/gnu/packages/patches/bash-reproducible-linux-pgrp-pipe.patch b/gnu/packages/patches/bash-reproducible-linux-pgrp-pipe.patch
deleted file mode 100644
index 8a03c4d982..0000000000
--- a/gnu/packages/patches/bash-reproducible-linux-pgrp-pipe.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Unconditionally enable PGRP_PIPE on Linux (the kernel), regardless of
-the kernel version in use on the build machine.
-
-diff -purN bash-5.0-orig/configure bash-5.0/configure
---- configure 1970-01-01 01:00:00.000000000 +0100
-+++ configure 2019-09-29 11:51:42.664518665 +0200
-@@ -16312,11 +16312,7 @@ solaris2.10*) LOCAL_CFLAGS=-DSOLARIS ;;
- solaris2*) LOCAL_CFLAGS=-DSOLARIS ;;
- lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
- linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
-- case "`uname -r`" in
-- 1.*|2.[0123]*) : ;;
-- *) $as_echo "#define PGRP_PIPE 1" >>confdefs.h
-- ;;
-- esac ;;
-+ $as_echo "#define PGRP_PIPE 1" >>confdefs.h ;;
- netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;;
- *qnx[67]*) LOCAL_LIBS="-lncurses" ;;
- *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;;
-diff -purN bash-5.0-orig/configure.ac bash-5.0/configure.ac
---- configure.ac 1970-01-01 01:00:00.000000000 +0100
-+++ configure.ac 2019-09-29 11:51:10.692026225 +0200
-@@ -1108,10 +1108,7 @@ solaris2.10*) LOCAL_CFLAGS=-DSOLARIS ;;
- solaris2*) LOCAL_CFLAGS=-DSOLARIS ;;
- lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
- linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
-- case "`uname -r`" in
-- 1.*|2.[[0123]]*) : ;;
-- *) AC_DEFINE(PGRP_PIPE) ;;
-- esac ;;
-+ AC_DEFINE(PGRP_PIPE) ;;
- netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;;
- *qnx[[67]]*) LOCAL_LIBS="-lncurses" ;;
- *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;;
diff --git a/gnu/packages/patches/calibre-fix-zeroconf.patch b/gnu/packages/patches/calibre-fix-zeroconf.patch
deleted file mode 100644
index d7d0f18667..0000000000
--- a/gnu/packages/patches/calibre-fix-zeroconf.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-Fix a build failure when upgrading zeroconf from 0.28.8 to 0.38.1:
-
-https://issues.guix.gnu.org/53247
-
-Patch copied from Gentoo:
-
-https://bugs.gentoo.org/800233#c5
-
-diff --color -Naru a/src/calibre/devices/smart_device_app/driver.py b/src/calibre/devices/smart_device_app/driver.py
---- a/src/calibre/devices/smart_device_app/driver.py 2021-08-08 08:32:03.104016444 +0200
-+++ b/src/calibre/devices/smart_device_app/driver.py 2021-08-08 08:33:30.699018403 +0200
-@@ -2040,13 +2040,6 @@
- # Function to monkeypatch zeroconf to remove the 15 character name length restriction.
- # Copied from https://github.com/jstasiak/python-zeroconf version 0.28.1
-
--
--from zeroconf import (BadTypeInNameException, _HAS_A_TO_Z,
-- _HAS_ONLY_A_TO_Z_NUM_HYPHEN_UNDERSCORE,
-- _HAS_ASCII_CONTROL_CHARS,
-- _HAS_ONLY_A_TO_Z_NUM_HYPHEN)
--
--
- def service_type_name(type_: str, *, allow_underscores: bool = False) -> str:
- """
- Validate a fully qualified service name, instance or subtype. [rfc6763]
-@@ -2087,6 +2080,12 @@
- :param type_: Type, SubType or service name to validate
- :return: fully qualified service name (eg: _http._tcp.local.)
- """
-+
-+ from zeroconf import (BadTypeInNameException, _HAS_A_TO_Z,
-+ _HAS_ONLY_A_TO_Z_NUM_HYPHEN_UNDERSCORE,
-+ _HAS_ASCII_CONTROL_CHARS,
-+ _HAS_ONLY_A_TO_Z_NUM_HYPHEN)
-+
- if not (type_.endswith('._tcp.local.') or type_.endswith('._udp.local.')):
- raise BadTypeInNameException("Type '%s' must end with '._tcp.local.' or '._udp.local.'" % type_)
-
diff --git a/gnu/packages/patches/dunst-1.7.3-fix-crash.patch b/gnu/packages/patches/dunst-1.7.3-fix-crash.patch
deleted file mode 100644
index 8b51d820a4..0000000000
--- a/gnu/packages/patches/dunst-1.7.3-fix-crash.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Author: Danny Milosavljevic <dannym@scratchpost.org>
-Date: 2022-02-04 21:52:05 CET
-
-Fix crash if notification contains invalid pixbuf data.
-
-diff -ru /gnu/store/5885czxhmhkckjqj939b0hd6b6czizwb-dunst-1.7.3-checkout/src/notification.c 5885czxhmhkckjqj939b0hd6b6czizwb-dunst-1.7.3-checkout/src/notification.c
---- /gnu/store/5885czxhmhkckjqj939b0hd6b6czizwb-dunst-1.7.3-checkout/src/notification.c 1970-01-01 01:00:01.000000000 +0100
-+++ 5885czxhmhkckjqj939b0hd6b6czizwb-dunst-1.7.3-checkout/src/notification.c 2022-02-04 19:05:57.534906600 +0100
-@@ -359,8 +359,10 @@
- g_clear_pointer(&n->icon_id, g_free);
-
- GdkPixbuf *icon = icon_get_for_data(new_icon, &n->icon_id, draw_get_scale());
-- n->icon = gdk_pixbuf_to_cairo_surface(icon);
-- g_object_unref(icon);
-+ if (icon) {
-+ n->icon = gdk_pixbuf_to_cairo_surface(icon);
-+ g_object_unref(icon);
-+ }
- }
-
- /* see notification.h */
diff --git a/gnu/packages/patches/efivar-gcc-compat.patch b/gnu/packages/patches/efivar-gcc-compat.patch
deleted file mode 100644
index fd1a3dc90a..0000000000
--- a/gnu/packages/patches/efivar-gcc-compat.patch
+++ /dev/null
@@ -1,177 +0,0 @@
-Fix build with -Werror=address-of-packed-member, which is default since
-GCC 9.
-
-This is a combination of three upstream commits:
-
- https://github.com/rhboot/efivar/commit/b98ba8921010d03f46704a476c69861515deb1ca
- https://github.com/rhboot/efivar/commit/c3c553db85ff10890209d0fe48fb4856ad68e4e0
- https://github.com/rhboot/efivar/commit/0dad6d78a7fb5f6c5fb4a1d646040539db6cf865
-
-diff --git a/src/dp-media.c b/src/dp-media.c
-index 96a576f..be691c4 100644
---- a/src/dp-media.c
-+++ b/src/dp-media.c
-@@ -46,8 +46,7 @@ _format_media_dn(char *buf, size_t size, const_efidp dp)
- break;
- case EFIDP_HD_SIGNATURE_GUID:
- format(buf, size, off, "HD", "GPT,");
-- format_guid(buf, size, off, "HD",
-- (efi_guid_t *)dp->hd.signature);
-+ format_guid(buf, size, off, "HD", dp->hd.signature);
- format(buf, size, off, "HD",
- ",0x%"PRIx64",0x%"PRIx64")",
- dp->hd.start, dp->hd.size);
-diff --git a/src/dp-message.c b/src/dp-message.c
-index 3724e5f..6b8e907 100644
---- a/src/dp-message.c
-+++ b/src/dp-message.c
-@@ -364,7 +364,7 @@ _format_message_dn(char *buf, size_t size, const_efidp dp)
- dp->infiniband.port_gid[1],
- dp->infiniband.port_gid[0]);
- format_guid(buf, size, off, "Infiniband",
-- (efi_guid_t *)&dp->infiniband.ioc_guid);
-+ &dp->infiniband.ioc_guid);
- format(buf, size, off, "Infiniband",
- ",%"PRIu64",%"PRIu64")",
- dp->infiniband.target_port_id,
-@@ -620,11 +620,13 @@ _format_message_dn(char *buf, size_t size, const_efidp dp)
- ) / sizeof(efi_ip_addr_t);
- format(buf, size, off, "Dns", "Dns(");
- for (int i=0; i < end; i++) {
-- const efi_ip_addr_t *addr = &dp->dns.addrs[i];
-+ efi_ip_addr_t addr;
-+
-+ memcpy(&addr, &dp->dns.addrs[i], sizeof(addr));
- if (i != 0)
- format(buf, size, off, "Dns", ",");
- format_ip_addr(buf, size, off, "Dns",
-- dp->dns.is_ipv6, addr);
-+ dp->dns.is_ipv6, &addr);
- }
- format(buf, size, off, "Dns", ")");
- break;
-diff --git a/src/dp.h b/src/dp.h
-index aa4e390..1f921d5 100644
---- a/src/dp.h
-+++ b/src/dp.h
-@@ -70,8 +70,11 @@
- #define format_guid(buf, size, off, dp_type, guid) ({ \
- int _rc; \
- char *_guidstr = NULL; \
-+ efi_guid_t _guid; \
-+ const efi_guid_t * const _guid_p = &_guid; \
- \
-- _rc = efi_guid_to_str(guid, &_guidstr); \
-+ memmove(&_guid, guid, sizeof(_guid)); \
-+ _rc = efi_guid_to_str(_guid_p, &_guidstr); \
- if (_rc < 0) { \
- efi_error("could not build %s GUID DP string", \
- dp_type); \
-@@ -79,7 +82,7 @@
- _guidstr = onstack(_guidstr, \
- strlen(_guidstr)+1); \
- _rc = format(buf, size, off, dp_type, "%s", \
-- _guidstr); \
-+ _guidstr); \
- } \
- _rc; \
- })
-diff --git a/src/guid.c b/src/guid.c
-index 306c9ff..3156b3b 100644
---- a/src/guid.c
-+++ b/src/guid.c
-@@ -31,7 +31,7 @@
- extern const efi_guid_t efi_guid_zero;
-
- int NONNULL(1, 2) PUBLIC
--efi_guid_cmp(const efi_guid_t *a, const efi_guid_t *b)
-+efi_guid_cmp(const void * const a, const void * const b)
- {
- return memcmp(a, b, sizeof (efi_guid_t));
- }
-diff --git a/src/include/efivar/efivar.h b/src/include/efivar/efivar.h
-index 316891c..ad6449d 100644
---- a/src/include/efivar/efivar.h
-+++ b/src/include/efivar/efivar.h
-@@ -128,7 +128,7 @@ extern int efi_symbol_to_guid(const char *symbol, efi_guid_t *guid)
-
- extern int efi_guid_is_zero(const efi_guid_t *guid);
- extern int efi_guid_is_empty(const efi_guid_t *guid);
--extern int efi_guid_cmp(const efi_guid_t *a, const efi_guid_t *b);
-+extern int efi_guid_cmp(const void * const a, const void * const b);
-
- /* import / export functions */
- typedef struct efi_variable efi_variable_t;
-diff --git a/src/ucs2.h b/src/ucs2.h
-index dbb5900..edd8367 100644
---- a/src/ucs2.h
-+++ b/src/ucs2.h
-@@ -23,16 +23,21 @@
- (((val) & ((mask) << (shift))) >> (shift))
-
- static inline size_t UNUSED
--ucs2len(const uint16_t * const s, ssize_t limit)
-+ucs2len(const void *vs, ssize_t limit)
- {
- ssize_t i;
-- for (i = 0; i < (limit >= 0 ? limit : i+1) && s[i] != (uint16_t)0; i++)
-+ const uint16_t *s = vs;
-+ const uint8_t *s8 = vs;
-+
-+ for (i = 0;
-+ i < (limit >= 0 ? limit : i+1) && s8[0] != 0 && s8[1] != 0;
-+ i++, s8 += 2, s++)
- ;
- return i;
- }
-
- static inline size_t UNUSED
--ucs2size(const uint16_t * const s, ssize_t limit)
-+ucs2size(const void *s, ssize_t limit)
- {
- size_t rc = ucs2len(s, limit);
- rc *= sizeof (uint16_t);
-@@ -69,10 +74,11 @@ utf8size(uint8_t *s, ssize_t limit)
- }
-
- static inline unsigned char * UNUSED
--ucs2_to_utf8(const uint16_t * const chars, ssize_t limit)
-+ucs2_to_utf8(const void * const voidchars, ssize_t limit)
- {
- ssize_t i, j;
- unsigned char *ret;
-+ const uint16_t * const chars = voidchars;
-
- if (limit < 0)
- limit = ucs2len(chars, -1);
-@@ -124,10 +130,12 @@ ucs2_to_utf8(const uint16_t * const chars, ssize_t limit)
- }
-
- static inline ssize_t UNUSED NONNULL(4)
--utf8_to_ucs2(uint16_t *ucs2, ssize_t size, int terminate, uint8_t *utf8)
-+utf8_to_ucs2(void *ucs2void, ssize_t size, int terminate, uint8_t *utf8)
- {
- ssize_t req;
- ssize_t i, j;
-+ uint16_t *ucs2 = ucs2void;
-+ uint16_t val16;
-
- if (!ucs2 && size > 0) {
- errno = EINVAL;
-@@ -162,10 +170,13 @@ utf8_to_ucs2(uint16_t *ucs2, ssize_t size, int terminate, uint8_t *utf8)
- val = utf8[i] & 0x7f;
- i += 1;
- }
-- ucs2[j] = val;
-+ val16 = val;
-+ ucs2[j] = val16;
-+ }
-+ if (terminate) {
-+ val16 = 0;
-+ ucs2[j++] = val16;
- }
-- if (terminate)
-- ucs2[j++] = (uint16_t)0;
- return j;
- };
-
diff --git a/gnu/packages/patches/evilwm-lost-focus-bug.patch b/gnu/packages/patches/evilwm-lost-focus-bug.patch
deleted file mode 100644
index af24af8fe9..0000000000
--- a/gnu/packages/patches/evilwm-lost-focus-bug.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-evilwm may sometimes lose focus after closing a window. This means that
-evilwm stops responding to keyboard shortcuts, and if no other window is open
-which the mouse can be moved over to regain focus evilwm becomes unusable and
-has to be restarted.
-
-Patch derived from discussion at
-https://wiki.archlinux.org/index.php/Evilwm#Lost_focus_bug_fix
-
---- evilwm-1.1.1/client.c
-+++ evilwm-1.1.1/client.c
-@@ -172,6 +172,7 @@
- * _NET_WM_STATE) */
- if (c->remove) {
- LOG_DEBUG("setting WithdrawnState\n");
-+ XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);
- set_wm_state(c, WithdrawnState);
- ewmh_withdraw_client(c);
- } else {
diff --git a/gnu/packages/patches/freecad-boost-serialization.patch b/gnu/packages/patches/freecad-boost-serialization.patch
deleted file mode 100644
index 374eabc966..0000000000
--- a/gnu/packages/patches/freecad-boost-serialization.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Taken from: https://github.com/archlinux/svntogit-community/blob/packages/freecad/trunk/freecad-boost.patch.
-
-Index: FreeCAD-0.19.2/CMakeLists.txt
-===================================================================
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -46,6 +46,7 @@ if(NOT FREECAD_LIBPACK_USE OR FREECAD_LI
- SetupPCL()
- SetupPybind11()
- SetupBoost()
-+ set(Boost_LIBRARIES_App ${Boost_LIBRARIES})
- SetupXercesC()
- find_package(ZLIB REQUIRED)
- find_package(PyCXX REQUIRED)
-Index: FreeCAD-0.19.2/src/App/CMakeLists.txt
-===================================================================
---- a/src/App/CMakeLists.txt
-+++ b/src/App/CMakeLists.txt
-@@ -59,7 +59,7 @@ include_directories(
-
- set(FreeCADApp_LIBS
- FreeCADBase
-- ${Boost_LIBRARIES}
-+ ${Boost_LIBRARIES_App}
- )
-
- if (BUILD_QT5)
diff --git a/gnu/packages/patches/freecad-vtk9.patch b/gnu/packages/patches/freecad-vtk9.patch
deleted file mode 100644
index 74568f4318..0000000000
--- a/gnu/packages/patches/freecad-vtk9.patch
+++ /dev/null
@@ -1,827 +0,0 @@
-From bb9bcbd51df7c3cb76c5823038e4ea0f7e25a9ff Mon Sep 17 00:00:00 2001
-From: wmayer <wmayer@users.sourceforge.net>
-Date: Mon, 12 Oct 2020 17:56:03 +0200
-Subject: [PATCH] Make smesh compile with vtk9
-
----
- .../salomesmesh/inc/SMDS_MeshElement.hxx | 9 +++-
- .../salomesmesh/inc/SMDS_UnstructuredGrid.hxx | 4 ++
- .../salomesmesh/src/SMDS/SMDS_BallElement.cpp | 9 +++-
- .../salomesmesh/src/SMDS/SMDS_Downward.cpp | 44 +++++++++----------
- .../salomesmesh/src/SMDS/SMDS_Mesh.cpp | 6 ++-
- .../src/SMDS/SMDS_Mesh0DElement.cpp | 12 +++++
- .../salomesmesh/src/SMDS/SMDS_MeshNode.cpp | 10 ++---
- .../src/SMDS/SMDS_UnstructuredGrid.cpp | 35 +++++++++++++--
- .../src/SMDS/SMDS_VtkCellIterator.cpp | 7 +--
- .../salomesmesh/src/SMDS/SMDS_VtkEdge.cpp | 19 +++++++-
- .../salomesmesh/src/SMDS/SMDS_VtkFace.cpp | 29 ++++++++++--
- .../salomesmesh/src/SMDS/SMDS_VtkVolume.cpp | 38 +++++++++++-----
- .../src/SMESH/SMESH_MeshEditor.cpp | 8 ++--
- src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp | 7 ++-
- 14 files changed, 179 insertions(+), 58 deletions(-)
-
-Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx
-===================================================================
---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx
-+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx
-@@ -40,11 +40,16 @@
-
- #include <vtkType.h>
- #include <vtkCellType.h>
-+#include <vtkCellArray.h>
-
- //typedef unsigned short UShortType;
- typedef short ShortType;
- typedef int LongType;
--
-+#ifdef VTK_CELL_ARRAY_V2
-+typedef const vtkIdType* vtkIdTypePtr;
-+#else
-+typedef vtkIdType* vtkIdTypePtr;
-+#endif
- class SMDS_MeshNode;
- class SMDS_MeshEdge;
- class SMDS_MeshFace;
-@@ -192,7 +197,7 @@ protected:
- //! Element index in vector SMDS_Mesh::myNodes or SMDS_Mesh::myCells
- int myID;
- //! index in vtkUnstructuredGrid
-- int myVtkID;
-+ vtkIdType myVtkID;
- //! SMDS_Mesh identification in SMESH
- ShortType myMeshId;
- //! SubShape and SubMesh identification in SMESHDS
-Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx
-===================================================================
---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx
-+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx
-@@ -95,7 +95,11 @@ public:
- std::map<int, std::map<long,int> >& nodeQuadDomains);
- vtkCellLinks* GetLinks()
- {
-+#ifdef VTK_CELL_ARRAY_V2
-+ return static_cast<vtkCellLinks*>(GetCellLinks());
-+#else
- return Links;
-+#endif
- }
- SMDS_Downward* getDownArray(unsigned char vtkType)
- {
-Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp
-===================================================================
---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp
-+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp
-@@ -67,10 +67,16 @@ void SMDS_BallElement::SetDiameter(doubl
- bool SMDS_BallElement::ChangeNode (const SMDS_MeshNode * node)
- {
- vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
-+#ifdef VTK_CELL_ARRAY_V2
-+ vtkNew<vtkIdList> cellPoints;
-+ grid->GetCellPoints(myVtkID, cellPoints.GetPointer());
-+ cellPoints->SetId(0, node->getVtkId());
-+#else
- vtkIdType npts = 0;
- vtkIdType* pts = 0;
- grid->GetCellPoints(myVtkID, npts, pts);
- pts[0] = node->getVtkId();
-+#endif
- SMDS_Mesh::_meshList[myMeshId]->setMyModified();
- return true;
- }
-@@ -83,7 +89,8 @@ void SMDS_BallElement::Print (std::ostre
- const SMDS_MeshNode* SMDS_BallElement::GetNode (const int ind) const
- {
- vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
-- vtkIdType npts, *pts;
-+ vtkIdType npts;
-+ vtkIdTypePtr pts;
- grid->GetCellPoints( myVtkID, npts, pts );
- return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ 0 ]);
- }
-Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp
-===================================================================
---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp
-+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp
-@@ -303,7 +303,7 @@ int SMDS_Down1D::getNodeSet(int cellId,
- void SMDS_Down1D::setNodes(int cellId, int vtkId)
- {
- vtkIdType npts = 0;
-- vtkIdType *pts; // will refer to the point id's of the face
-+ vtkIdTypePtr pts; // will refer to the point id's of the face
- _grid->GetCellPoints(vtkId, npts, pts);
- // MESSAGE(vtkId << " " << npts << " " << _nbDownCells);
- //ASSERT(npts == _nbDownCells);
-@@ -357,7 +357,7 @@ int SMDS_Down1D::computeVtkCells(int *pt
- {
- vtkIdType point = pts[i];
- int numCells = _grid->GetLinks()->GetNcells(point);
-- vtkIdType *cells = _grid->GetLinks()->GetCells(point);
-+ vtkIdTypePtr cells = _grid->GetLinks()->GetCells(point);
- for (int j = 0; j < numCells; j++)
- {
- int vtkCellId = cells[j];
-@@ -532,7 +532,7 @@ int SMDS_Down2D::computeVolumeIds(int ce
- // --- find point id's of the face
-
- vtkIdType npts = 0;
-- vtkIdType *pts; // will refer to the point id's of the face
-+ vtkIdTypePtr pts; // will refer to the point id's of the face
- _grid->GetCellPoints(cellId, npts, pts);
- vector<int> nodes;
- for (int i = 0; i < npts; i++)
-@@ -577,7 +577,7 @@ int SMDS_Down2D::computeVolumeIdsFromNod
- vtkIdType point = pts[i];
- int numCells = _grid->GetLinks()->GetNcells(point);
- //MESSAGE("cells pour " << i << " " << numCells);
-- vtkIdType *cells = _grid->GetLinks()->GetCells(point);
-+ vtkIdTypePtr cells = _grid->GetLinks()->GetCells(point);
- for (int j = 0; j < numCells; j++)
- {
- int vtkCellId = cells[j];
-@@ -627,7 +627,7 @@ int SMDS_Down2D::computeVolumeIdsFromNod
- void SMDS_Down2D::setTempNodes(int cellId, int vtkId)
- {
- vtkIdType npts = 0;
-- vtkIdType *pts; // will refer to the point id's of the face
-+ vtkIdTypePtr pts; // will refer to the point id's of the face
- _grid->GetCellPoints(vtkId, npts, pts);
- // MESSAGE(vtkId << " " << npts << " " << _nbNodes);
- //ASSERT(npts == _nbNodes);
-@@ -795,7 +795,7 @@ void SMDS_Down3D::getNodeIds(int cellId,
- {
- int vtkId = this->_vtkCellIds[cellId];
- vtkIdType npts = 0;
-- vtkIdType *nodes; // will refer to the point id's of the volume
-+ vtkIdTypePtr nodes; // will refer to the point id's of the volume
- _grid->GetCellPoints(vtkId, npts, nodes);
- for (int i = 0; i < npts; i++)
- nodeSet.insert(nodes[i]);
-@@ -1126,7 +1126,7 @@ void SMDS_DownTetra::getOrderedNodesOfFa
- //MESSAGE("cellId = " << cellId);
-
- vtkIdType npts = 0;
-- vtkIdType *nodes; // will refer to the point id's of the volume
-+ vtkIdTypePtr nodes; // will refer to the point id's of the volume
- _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
-
- set<int> tofind;
-@@ -1178,7 +1178,7 @@ void SMDS_DownTetra::computeFacesWithNod
- // --- find point id's of the volume
-
- vtkIdType npts = 0;
-- vtkIdType *nodes; // will refer to the point id's of the volume
-+ vtkIdTypePtr nodes; // will refer to the point id's of the volume
- _grid->GetCellPoints(cellId, npts, nodes);
-
- // --- create all the ordered list of node id's for each face
-@@ -1234,7 +1234,7 @@ void SMDS_DownQuadTetra::getOrderedNodes
- //MESSAGE("cellId = " << cellId);
-
- vtkIdType npts = 0;
-- vtkIdType *nodes; // will refer to the point id's of the volume
-+ vtkIdTypePtr nodes; // will refer to the point id's of the volume
- _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
-
- set<int> tofind;
-@@ -1288,7 +1288,7 @@ void SMDS_DownQuadTetra::computeFacesWit
- // --- find point id's of the volume
-
- vtkIdType npts = 0;
-- vtkIdType *nodes; // will refer to the point id's of the volume
-+ vtkIdTypePtr nodes; // will refer to the point id's of the volume
- _grid->GetCellPoints(cellId, npts, nodes);
-
- // --- create all the ordered list of node id's for each face
-@@ -1357,7 +1357,7 @@ void SMDS_DownPyramid::getOrderedNodesOf
- //MESSAGE("cellId = " << cellId);
-
- vtkIdType npts = 0;
-- vtkIdType *nodes; // will refer to the point id's of the volume
-+ vtkIdTypePtr nodes; // will refer to the point id's of the volume
- _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
-
- set<int> tofind;
-@@ -1435,7 +1435,7 @@ void SMDS_DownPyramid::computeFacesWithN
- // --- find point id's of the volume
-
- vtkIdType npts = 0;
-- vtkIdType *nodes; // will refer to the point id's of the volume
-+ vtkIdTypePtr nodes; // will refer to the point id's of the volume
- _grid->GetCellPoints(cellId, npts, nodes);
-
- // --- create all the ordered list of node id's for each face
-@@ -1500,7 +1500,7 @@ void SMDS_DownQuadPyramid::getOrderedNod
- //MESSAGE("cellId = " << cellId);
-
- vtkIdType npts = 0;
-- vtkIdType *nodes; // will refer to the point id's of the volume
-+ vtkIdTypePtr nodes; // will refer to the point id's of the volume
- _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
-
- set<int> tofind;
-@@ -1580,7 +1580,7 @@ void SMDS_DownQuadPyramid::computeFacesW
- // --- find point id's of the volume
-
- vtkIdType npts = 0;
-- vtkIdType *nodes; // will refer to the point id's of the volume
-+ vtkIdTypePtr nodes; // will refer to the point id's of the volume
- _grid->GetCellPoints(cellId, npts, nodes);
-
- // --- create all the ordered list of node id's for each face
-@@ -1660,7 +1660,7 @@ void SMDS_DownPenta::getOrderedNodesOfFa
- //MESSAGE("cellId = " << cellId);
-
- vtkIdType npts = 0;
-- vtkIdType *nodes; // will refer to the point id's of the volume
-+ vtkIdTypePtr nodes; // will refer to the point id's of the volume
- _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
-
- set<int> tofind;
-@@ -1744,7 +1744,7 @@ void SMDS_DownPenta::computeFacesWithNod
- // --- find point id's of the volume
-
- vtkIdType npts = 0;
-- vtkIdType *nodes; // will refer to the point id's of the volume
-+ vtkIdTypePtr nodes; // will refer to the point id's of the volume
- _grid->GetCellPoints(cellId, npts, nodes);
-
- // --- create all the ordered list of node id's for each face
-@@ -1810,7 +1810,7 @@ void SMDS_DownQuadPenta::getOrderedNodes
- //MESSAGE("cellId = " << cellId);
-
- vtkIdType npts = 0;
-- vtkIdType *nodes; // will refer to the point id's of the volume
-+ vtkIdTypePtr nodes; // will refer to the point id's of the volume
- _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
-
- set<int> tofind;
-@@ -1896,7 +1896,7 @@ void SMDS_DownQuadPenta::computeFacesWit
- // --- find point id's of the volume
-
- vtkIdType npts = 0;
-- vtkIdType *nodes; // will refer to the point id's of the volume
-+ vtkIdTypePtr nodes; // will refer to the point id's of the volume
- _grid->GetCellPoints(cellId, npts, nodes);
-
- // --- create all the ordered list of node id's for each face
-@@ -1981,7 +1981,7 @@ void SMDS_DownHexa::getOrderedNodesOfFac
- //MESSAGE("cellId = " << cellId);
-
- vtkIdType npts = 0;
-- vtkIdType *nodes; // will refer to the point id's of the volume
-+ vtkIdTypePtr nodes; // will refer to the point id's of the volume
- _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
-
- set<int> tofind;
-@@ -2036,7 +2036,7 @@ void SMDS_DownHexa::computeFacesWithNode
- // --- find point id's of the volume
-
- vtkIdType npts = 0;
-- vtkIdType *nodes; // will refer to the point id's of the volume
-+ vtkIdTypePtr nodes; // will refer to the point id's of the volume
- _grid->GetCellPoints(cellId, npts, nodes);
-
- // --- create all the ordered list of node id's for each face
-@@ -2112,7 +2112,7 @@ void SMDS_DownQuadHexa::getOrderedNodesO
- //MESSAGE("cellId = " << cellId);
-
- vtkIdType npts = 0;
-- vtkIdType *nodes; // will refer to the point id's of the volume
-+ vtkIdTypePtr nodes; // will refer to the point id's of the volume
- _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
-
- set<int> tofind;
-@@ -2167,7 +2167,7 @@ void SMDS_DownQuadHexa::computeFacesWith
- // --- find point id's of the volume
-
- vtkIdType npts = 0;
-- vtkIdType *nodes; // will refer to the point id's of the volume
-+ vtkIdTypePtr nodes; // will refer to the point id's of the volume
- _grid->GetCellPoints(cellId, npts, nodes);
-
- // --- create all the ordered list of node id's for each face
-Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp
-===================================================================
---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp
-+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp
-@@ -4768,7 +4768,11 @@ void SMDS_Mesh::dumpGrid(string ficdump)
- ficcon << endl;
- }
- ficcon << "-------------------------------- connectivity " << nbPoints << endl;
-- vtkCellLinks *links = myGrid->GetCellLinks();
-+#ifdef VTK_CELL_ARRAY_V2
-+ vtkCellLinks *links = static_cast<vtkCellLinks*>(myGrid->GetCellLinks());
-+#else
-+ vtkCellLinks *links = myGrid->GetCellLinks();
-+#endif
- for (int i=0; i<nbPoints; i++)
- {
- int ncells = links->GetNcells(i);
-Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp
-===================================================================
---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp
-+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp
-@@ -146,6 +146,17 @@ bool SMDS_Mesh0DElement::ChangeNodes(con
- if ( nbNodes == 1 )
- {
- vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
-+#ifdef VTK_CELL_ARRAY_V2
-+ vtkNew<vtkIdList> cellPoints;
-+ grid->GetCellPoints(myVtkID, cellPoints.GetPointer());
-+ if (nbNodes != cellPoints->GetNumberOfIds())
-+ {
-+ MESSAGE("ChangeNodes problem: not the same number of nodes " << cellPoints->GetNumberOfIds() << " -> " << nbNodes);
-+ return false;
-+ }
-+ myNode = nodes[0];
-+ cellPoints->SetId(0, myNode->getVtkId());
-+#else
- vtkIdType npts = 0;
- vtkIdType* pts = 0;
- grid->GetCellPoints(myVtkID, npts, pts);
-@@ -156,6 +167,7 @@ bool SMDS_Mesh0DElement::ChangeNodes(con
- }
- myNode = nodes[0];
- pts[0] = myNode->getVtkId();
-+#endif
-
- SMDS_Mesh::_meshList[myMeshId]->setMyModified();
- return true;
-Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp
-===================================================================
---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp
-+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp
-@@ -191,7 +191,7 @@ public:
- SMDS_ElemIteratorPtr SMDS_MeshNode::
- GetInverseElementIterator(SMDSAbs_ElementType type) const
- {
-- vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myVtkID);
-+ vtkCellLinks::Link l = static_cast<vtkCellLinks*>(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID);
- //MESSAGE("myID " << myID << " ncells " << l.ncells);
- return SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyInvIterator(SMDS_Mesh::_meshList[myMeshId], l.cells, l.ncells, type));
- }
-@@ -251,7 +251,7 @@ elementsIterator(SMDSAbs_ElementType typ
- return SMDS_MeshElement::elementsIterator(SMDSAbs_Node);
- else
- {
-- vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myVtkID);
-+ vtkCellLinks::Link l = static_cast<vtkCellLinks*>(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID);
- return SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyIterator(SMDS_Mesh::_meshList[myMeshId], l.cells, l.ncells, type));
- }
- }
-@@ -350,7 +350,7 @@ void SMDS_MeshNode::AddInverseElement(co
- const SMDS_MeshCell *cell = dynamic_cast<const SMDS_MeshCell*> (ME);
- assert(cell);
- SMDS_UnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
-- vtkCellLinks *Links = grid->GetCellLinks();
-+ vtkCellLinks *Links = static_cast<vtkCellLinks*>(grid->GetCellLinks());
- Links->ResizeCellList(myVtkID, 1);
- Links->AddCellReference(cell->getVtkId(), myVtkID);
- }
-@@ -366,7 +366,7 @@ void SMDS_MeshNode::ClearInverseElements
-
- bool SMDS_MeshNode::emptyInverseElements()
- {
-- vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myVtkID);
-+ vtkCellLinks::Link l = static_cast<vtkCellLinks*>(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID);
- return (l.ncells == 0);
- }
-
-@@ -378,7 +378,7 @@ bool SMDS_MeshNode::emptyInverseElements
-
- int SMDS_MeshNode::NbInverseElements(SMDSAbs_ElementType type) const
- {
-- vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myVtkID);
-+ vtkCellLinks::Link l = static_cast<vtkCellLinks*>(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID);
-
- if ( type == SMDSAbs_All )
- return l.ncells;
-Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
-===================================================================
---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
-+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
-@@ -139,8 +139,8 @@ int SMDS_UnstructuredGrid::InsertNextLin
- for (; it != setOfNodes.end(); ++it)
- {
- //MESSAGE("reverse link for node " << *it << " cell " << cellid);
-- this->Links->ResizeCellList(*it, 1);
-- this->Links->AddCellReference(cellid, *it);
-+ this->GetLinks()->ResizeCellList(*it, 1);
-+ this->GetLinks()->AddCellReference(cellid, *it);
- }
-
- return cellid;
-@@ -332,9 +332,13 @@ void SMDS_UnstructuredGrid::copyBloc(vtk
- {
- newTypes->SetValue(alreadyCopied, this->Types->GetValue(j));
- idCellsOldToNew[j] = alreadyCopied; // old vtkId --> new vtkId
-+#ifdef VTK_CELL_ARRAY_V2
-+ vtkIdType oldLoc = this->GetCellLocationsArray()->GetValue(j);
-+#else
- vtkIdType oldLoc = this->Locations->GetValue(j);
-+#endif
- vtkIdType nbpts;
-- vtkIdType *oldPtsCell = 0;
-+ vtkIdTypePtr oldPtsCell = 0;
- this->Connectivity->GetCell(oldLoc, nbpts, oldPtsCell);
- assert(nbpts < NBMAXNODESINCELL);
- //MESSAGE(j << " " << alreadyCopied << " " << (int)this->Types->GetValue(j) << " " << oldLoc << " " << nbpts );
-@@ -952,6 +956,21 @@ void SMDS_UnstructuredGrid::GetNodeIds(s
- */
- void SMDS_UnstructuredGrid::ModifyCellNodes(int vtkVolId, std::map<int, int> localClonedNodeIds)
- {
-+#ifdef VTK_CELL_ARRAY_V2
-+ vtkNew<vtkIdList> cellPoints;
-+ this->GetCellPoints(vtkVolId, cellPoints.GetPointer());
-+ for (vtkIdType i = 0; i < cellPoints->GetNumberOfIds(); i++)
-+ {
-+ if (localClonedNodeIds.count(cellPoints->GetId(i)))
-+ {
-+ vtkIdType oldpt = cellPoints->GetId(i);
-+ cellPoints->SetId(i, localClonedNodeIds[oldpt]);
-+ //MESSAGE(oldpt << " --> " << pts[i]);
-+ //this->RemoveReferenceToCell(oldpt, vtkVolId);
-+ //this->AddReferenceToCell(pts[i], vtkVolId);
-+ }
-+ }
-+#else
- vtkIdType npts = 0;
- vtkIdType *pts; // will refer to the point id's of the face
- this->GetCellPoints(vtkVolId, npts, pts);
-@@ -966,6 +985,7 @@ void SMDS_UnstructuredGrid::ModifyCellNo
- //this->AddReferenceToCell(pts[i], vtkVolId);
- }
- }
-+#endif
- }
-
- /*! reorder the nodes of a face
-@@ -995,11 +1015,20 @@ void SMDS_UnstructuredGrid::BuildLinks()
- this->Links->UnRegister(this);
- }
-
-+#ifdef VTK_CELL_ARRAY_V2
-+ this->Links = SMDS_CellLinks::New();
-+ GetLinks()->Allocate(this->GetNumberOfPoints());
-+ GetLinks()->Register(this);
-+//FIXME: vtk9
-+ GetLinks()->BuildLinks(this);
-+ GetLinks()->Delete();
-+#else
- this->Links = SMDS_CellLinks::New();
- this->Links->Allocate(this->GetNumberOfPoints());
- this->Links->Register(this);
- this->Links->BuildLinks(this, this->Connectivity);
- this->Links->Delete();
-+#endif
- }
-
- /*! Create a volume (prism or hexahedron) by duplication of a face.
-Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp
-===================================================================
---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp
-+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp
-@@ -33,7 +33,8 @@ SMDS_VtkCellIterator::SMDS_VtkCellIterat
- }
- else
- {
-- vtkIdType npts, *pts;
-+ vtkIdType npts;
-+ vtkIdTypePtr pts;
- grid->GetCellPoints( _cellId, npts, pts );
- _vtkIdList->SetNumberOfIds( _nbNodes = npts );
- for (int i = 0; i < _nbNodes; i++)
-@@ -67,7 +68,7 @@ SMDS_VtkCellIteratorToUNV::SMDS_VtkCellI
- //MESSAGE("SMDS_VtkCellInterlacedIterator (UNV)" << _type);
-
- _vtkIdList = vtkIdList::New();
-- vtkIdType* pts;
-+ vtkIdTypePtr pts;
- vtkIdType npts;
- vtkUnstructuredGrid* grid = _mesh->getGrid();
- grid->GetCellPoints((vtkIdType)_cellId, npts, pts);
-@@ -182,7 +183,7 @@ SMDS_VtkCellIteratorPolyH::SMDS_VtkCellI
- {
- //MESSAGE("SMDS_VtkCellIterator Polyhedra");
- vtkIdType nFaces = 0;
-- vtkIdType* ptIds = 0;
-+ vtkIdTypePtr ptIds = 0;
- grid->GetFaceStream(_cellId, nFaces, ptIds);
- int id = 0;
- _nbNodesInFaces = 0;
-Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp
-===================================================================
---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp
-+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp
-@@ -67,6 +67,19 @@ bool SMDS_VtkEdge::ChangeNodes(const SMD
- bool SMDS_VtkEdge::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
- {
- vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
-+#ifdef VTK_CELL_ARRAY_V2
-+ vtkNew<vtkIdList> cellPoints;
-+ grid->GetCellPoints(myVtkID, cellPoints.GetPointer());
-+ if (nbNodes != cellPoints->GetNumberOfIds())
-+ {
-+ MESSAGE("ChangeNodes problem: not the same number of nodes " << cellPoints->GetNumberOfIds() << " -> " << nbNodes);
-+ return false;
-+ }
-+ for (int i = 0; i < nbNodes; i++)
-+ {
-+ cellPoints->SetId(i, nodes[i]->getVtkId());
-+ }
-+#else
- vtkIdType npts = 0;
- vtkIdType* pts = 0;
- grid->GetCellPoints(myVtkID, npts, pts);
-@@ -79,6 +92,7 @@ bool SMDS_VtkEdge::ChangeNodes(const SMD
- {
- pts[i] = nodes[i]->getVtkId();
- }
-+#endif
- SMDS_Mesh::_meshList[myMeshId]->setMyModified();
- return true;
- }
-@@ -87,7 +101,7 @@ bool SMDS_VtkEdge::IsMediumNode(const SM
- {
- vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
- vtkIdType npts = 0;
-- vtkIdType* pts = 0;
-+ vtkIdTypePtr pts = 0;
- grid->GetCellPoints(myVtkID, npts, pts);
- //MESSAGE("IsMediumNode " << npts << " " << (node->getVtkId() == pts[npts-1]));
- return ((npts == 3) && (node->getVtkId() == pts[2]));
-@@ -137,7 +151,8 @@ const SMDS_MeshNode*
- SMDS_VtkEdge::GetNode(const int ind) const
- {
- vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
-- vtkIdType npts, *pts;
-+ vtkIdType npts;
-+ vtkIdTypePtr pts;
- grid->GetCellPoints( this->myVtkID, npts, pts );
- return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ ind ]);
- }
-Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp
-===================================================================
---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp
-+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp
-@@ -101,6 +101,19 @@ void SMDS_VtkFace::initQuadPoly(const st
- bool SMDS_VtkFace::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
- {
- vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
-+#ifdef VTK_CELL_ARRAY_V2
-+ vtkNew<vtkIdList> cellPoints;
-+ grid->GetCellPoints(myVtkID, cellPoints.GetPointer());
-+ if (nbNodes != cellPoints->GetNumberOfIds())
-+ {
-+ MESSAGE("ChangeNodes problem: not the same number of nodes " << cellPoints->GetNumberOfIds() << " -> " << nbNodes);
-+ return false;
-+ }
-+ for (int i = 0; i < nbNodes; i++)
-+ {
-+ cellPoints->SetId(i, nodes[i]->getVtkId());
-+ }
-+#else
- vtkIdType npts = 0;
- vtkIdType* pts = 0;
- grid->GetCellPoints(myVtkID, npts, pts);
-@@ -113,6 +126,7 @@ bool SMDS_VtkFace::ChangeNodes(const SMD
- {
- pts[i] = nodes[i]->getVtkId();
- }
-+#endif
- SMDS_Mesh::_meshList[myMeshId]->setMyModified();
- return true;
- }
-@@ -173,7 +187,8 @@ const SMDS_MeshNode*
- SMDS_VtkFace::GetNode(const int ind) const
- {
- vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
-- vtkIdType npts, *pts;
-+ vtkIdType npts;
-+ vtkIdTypePtr pts;
- grid->GetCellPoints( this->myVtkID, npts, pts );
- return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ ind ]);
- }
-@@ -186,7 +201,8 @@ SMDS_VtkFace::GetNode(const int ind) con
- int SMDS_VtkFace::GetNodeIndex( const SMDS_MeshNode* node ) const
- {
- vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
-- vtkIdType npts, *pts;
-+ vtkIdType npts;
-+ vtkIdTypePtr pts;
- grid->GetCellPoints( this->myVtkID, npts, pts );
- for ( vtkIdType i = 0; i < npts; ++i )
- if ( pts[i] == node->getVtkId() )
-@@ -251,7 +267,7 @@ bool SMDS_VtkFace::IsMediumNode(const SM
- return false;
- }
- vtkIdType npts = 0;
-- vtkIdType* pts = 0;
-+ vtkIdTypePtr pts = 0;
- grid->GetCellPoints(myVtkID, npts, pts);
- vtkIdType nodeId = node->getVtkId();
- for (int rank = 0; rank < npts; rank++)
-@@ -356,11 +372,18 @@ SMDS_NodeIteratorPtr SMDS_VtkFace::inter
- void SMDS_VtkFace::ChangeApex(SMDS_MeshNode* node)
- {
- vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
-+#ifdef VTK_CELL_ARRAY_V2
-+ vtkNew<vtkIdList> cellPoints;
-+ grid->GetCellPoints(myVtkID, cellPoints.GetPointer());
-+ grid->RemoveReferenceToCell(cellPoints->GetId(0), myVtkID);
-+ cellPoints->SetId(0, node->getVtkId());
-+#else
- vtkIdType npts = 0;
- vtkIdType* pts = 0;
- grid->GetCellPoints(myVtkID, npts, pts);
- grid->RemoveReferenceToCell(pts[0], myVtkID);
- pts[0] = node->getVtkId();
-+#endif
- node->AddInverseElement(this),
- SMDS_Mesh::_meshList[myMeshId]->setMyModified();
- }
-Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp
-===================================================================
---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp
-+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp
-@@ -133,6 +133,19 @@ void SMDS_VtkVolume::initPoly(const std:
- bool SMDS_VtkVolume::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
- {
- vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
-+#ifdef VTK_CELL_ARRAY_V2
-+ vtkNew<vtkIdList> cellPoints;
-+ grid->GetCellPoints(myVtkID, cellPoints.GetPointer());
-+ if (nbNodes != cellPoints->GetNumberOfIds())
-+ {
-+ MESSAGE("ChangeNodes problem: not the same number of nodes " << cellPoints->GetNumberOfIds() << " -> " << nbNodes);
-+ return false;
-+ }
-+ for (int i = 0; i < nbNodes; i++)
-+ {
-+ cellPoints->SetId(i, nodes[i]->getVtkId());
-+ }
-+#else
- vtkIdType npts = 0;
- vtkIdType* pts = 0;
- grid->GetCellPoints(myVtkID, npts, pts);
-@@ -145,6 +158,7 @@ bool SMDS_VtkVolume::ChangeNodes(const S
- {
- pts[i] = nodes[i]->getVtkId();
- }
-+#endif
- SMDS_Mesh::_meshList[myMeshId]->setMyModified();
- return true;
- }
-@@ -207,7 +221,7 @@ int SMDS_VtkVolume::NbFaces() const
- case VTK_POLYHEDRON:
- {
- vtkIdType nFaces = 0;
-- vtkIdType* ptIds = 0;
-+ vtkIdTypePtr ptIds = 0;
- grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
- nbFaces = nFaces;
- break;
-@@ -236,7 +250,7 @@ int SMDS_VtkVolume::NbNodes() const
- else
- {
- vtkIdType nFaces = 0;
-- vtkIdType* ptIds = 0;
-+ vtkIdTypePtr ptIds = 0;
- grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
- int id = 0;
- for (int i = 0; i < nFaces; i++)
-@@ -276,7 +290,7 @@ int SMDS_VtkVolume::NbEdges() const
- case VTK_POLYHEDRON:
- {
- vtkIdType nFaces = 0;
-- vtkIdType* ptIds = 0;
-+ vtkIdTypePtr ptIds = 0;
- grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
- nbEdges = 0;
- int id = 0;
-@@ -312,7 +326,7 @@ int SMDS_VtkVolume::NbFaceNodes(const in
- if (aVtkType == VTK_POLYHEDRON)
- {
- vtkIdType nFaces = 0;
-- vtkIdType* ptIds = 0;
-+ vtkIdTypePtr ptIds = 0;
- grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
- int id = 0;
- for (int i = 0; i < nFaces; i++)
-@@ -342,7 +356,7 @@ const SMDS_MeshNode* SMDS_VtkVolume::Get
- if (aVtkType == VTK_POLYHEDRON)
- {
- vtkIdType nFaces = 0;
-- vtkIdType* ptIds = 0;
-+ vtkIdTypePtr ptIds = 0;
- grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
- int id = 0;
- for (int i = 0; i < nFaces; i++)
-@@ -372,7 +386,7 @@ std::vector<int> SMDS_VtkVolume::GetQuan
- if (aVtkType == VTK_POLYHEDRON)
- {
- vtkIdType nFaces = 0;
-- vtkIdType* ptIds = 0;
-+ vtkIdTypePtr ptIds = 0;
- grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
- int id = 0;
- for (int i = 0; i < nFaces; i++)
-@@ -430,7 +444,7 @@ const SMDS_MeshNode* SMDS_VtkVolume::Get
- if ( aVtkType == VTK_POLYHEDRON)
- {
- vtkIdType nFaces = 0;
-- vtkIdType* ptIds = 0;
-+ vtkIdTypePtr ptIds = 0;
- grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
- int id = 0, nbPoints = 0;
- for (int i = 0; i < nFaces; i++)
-@@ -443,7 +457,8 @@ const SMDS_MeshNode* SMDS_VtkVolume::Get
- }
- return 0;
- }
-- vtkIdType npts, *pts;
-+ vtkIdType npts;
-+ vtkIdTypePtr pts;
- grid->GetCellPoints( this->myVtkID, npts, pts );
- const std::vector<int>& interlace = SMDS_MeshCell::fromVtkOrder( VTKCellType( aVtkType ));
- return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ interlace.empty() ? ind : interlace[ind]] );
-@@ -460,7 +475,7 @@ int SMDS_VtkVolume::GetNodeIndex( const
- if ( aVtkType == VTK_POLYHEDRON)
- {
- vtkIdType nFaces = 0;
-- vtkIdType* ptIds = 0;
-+ vtkIdTypePtr ptIds = 0;
- grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
- int id = 0;
- for (int iF = 0; iF < nFaces; iF++)
-@@ -473,7 +488,8 @@ int SMDS_VtkVolume::GetNodeIndex( const
- }
- return -1;
- }
-- vtkIdType npts, *pts;
-+ vtkIdType npts;
-+ vtkIdTypePtr pts;
- grid->GetCellPoints( this->myVtkID, npts, pts );
- for ( vtkIdType i = 0; i < npts; ++i )
- if ( pts[i] == node->getVtkId() )
-@@ -534,7 +550,7 @@ bool SMDS_VtkVolume::IsMediumNode(const
- return false;
- }
- vtkIdType npts = 0;
-- vtkIdType* pts = 0;
-+ vtkIdTypePtr pts = 0;
- grid->GetCellPoints(myVtkID, npts, pts);
- vtkIdType nodeId = node->getVtkId();
- for (int rank = 0; rank < npts; rank++)
-Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp
-===================================================================
---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp
-+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp
-@@ -11348,7 +11348,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGrou
- {
- int oldId = *itn;
- //MESSAGE(" node " << oldId);
-- vtkCellLinks::Link l = grid->GetCellLinks()->GetLink(oldId);
-+ vtkCellLinks::Link l = static_cast<vtkCellLinks*>(grid->GetCellLinks())->GetLink(oldId);
- for (int i=0; i<l.ncells; i++)
- {
- int vtkId = l.cells[i];
-@@ -11527,7 +11527,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGrou
- //MESSAGE(" domain " << idom << " volume " << elem->GetID());
- double values[3];
- vtkIdType npts = 0;
-- vtkIdType* pts = 0;
-+ vtkIdTypePtr pts = 0;
- grid->GetCellPoints(vtkVolIds[ivol], npts, pts);
- SMDS_VtkVolume::gravityCenter(grid, pts, npts, values);
- if (id ==0)
-@@ -11708,7 +11708,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGrou
- {
- int oldId = itnod->first;
- //MESSAGE(" node " << oldId);
-- vtkCellLinks::Link l = grid->GetCellLinks()->GetLink(oldId);
-+ vtkCellLinks::Link l = static_cast<vtkCellLinks*>(grid->GetCellLinks())->GetLink(oldId);
- for (int i = 0; i < l.ncells; i++)
- {
- int vtkId = l.cells[i];
-@@ -12165,7 +12165,7 @@ void SMESH_MeshEditor::CreateHoleSkin(do
- MESSAGE("volume to check, vtkId " << vtkId << " smdsId " << meshDS->fromVtkToSmds(vtkId));
- bool volInside = false;
- vtkIdType npts = 0;
-- vtkIdType* pts = 0;
-+ vtkIdTypePtr pts = 0;
- grid->GetCellPoints(vtkId, npts, pts);
- for (int i=0; i<npts; i++)
- {
-Index: FreeCAD-0.19.2/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp
-===================================================================
---- FreeCAD-0.19.2.orig/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp
-+++ FreeCAD-0.19.2/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp
-@@ -20,7 +20,6 @@
- * *
- ***************************************************************************/
-
--
- #include "PreCompiled.h"
-
- #ifndef _PreComp_
diff --git a/gnu/packages/patches/ghc-monad-par-fix-tests.patch b/gnu/packages/patches/ghc-monad-par-fix-tests.patch
deleted file mode 100644
index d21a1e485c..0000000000
--- a/gnu/packages/patches/ghc-monad-par-fix-tests.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-This patch is taken from upstream. It fixes a test to work with GHC 8.6.
-The paths have been slightly altered to work with the release tarball.
-
-See <https://github.com/simonmar/monad-par/issues/66>.
-
-From e20f81c8060208e4fb038e8f0e0668b41d72a6fb Mon Sep 17 00:00:00 2001
-From: Clint Adams <clint@debian.org>
-Date: Sat, 31 Aug 2019 14:12:34 -0400
-Subject: [PATCH] Use a case statement instead of pattern-matching in
- case_test_diamond
-
-This avoids the need for a MonadFail instance. Closes #66
----
- monad-par/tests/ParTests_shared.hs | 15 +++++++++------
- 1 file changed, 9 insertions(+), 6 deletions(-)
-
-diff --git a/tests/ParTests_shared.hs b/tests/ParTests_shared.hs
-index 31f438d..b2de50c 100644
---- a/tests/ParTests_shared.hs
-+++ b/tests/ParTests_shared.hs
-@@ -109,12 +109,15 @@ case_test_diamond :: Assertion
- case_test_diamond = 9 @=? (m :: Int)
- where
- m = runPar $ do
-- [a,b,c,d] <- sequence [new,new,new,new]
-- fork $ do x <- get a; put b (x+1)
-- fork $ do x <- get a; put c (x+2)
-- fork $ do x <- get b; y <- get c; put d (x+y)
-- fork $ do put a 3
-- get d
-+ abcd <- sequence [new,new,new,new]
-+ case abcd of
-+ [a,b,c,d] -> do
-+ fork $ do x <- get a; put b (x+1)
-+ fork $ do x <- get a; put c (x+2)
-+ fork $ do x <- get b; y <- get c; put d (x+y)
-+ fork $ do put a 3
-+ get d
-+ _ -> error "Oops"
-
- -- | Violate IVar single-assignment:
- --
---
-2.23.0
-
diff --git a/gnu/packages/patches/glibc-CVE-2018-11236.patch b/gnu/packages/patches/glibc-CVE-2018-11236.patch
deleted file mode 100644
index 4f8a72943c..0000000000
--- a/gnu/packages/patches/glibc-CVE-2018-11236.patch
+++ /dev/null
@@ -1,149 +0,0 @@
-https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=patch;h=5460617d1567657621107d895ee2dd83bc1f88f2
-with ChangeLog removed
-
-From 5460617d1567657621107d895ee2dd83bc1f88f2 Mon Sep 17 00:00:00 2001
-From: Paul Pluzhnikov <ppluzhnikov@google.com>
-Date: Tue, 8 May 2018 18:12:41 -0700
-Subject: [PATCH] Fix BZ 22786: integer addition overflow may cause stack
- buffer overflow when realpath() input length is close to SSIZE_MAX.
-
-2018-05-09 Paul Pluzhnikov <ppluzhnikov@google.com>
-
- [BZ #22786]
- * stdlib/canonicalize.c (__realpath): Fix overflow in path length
- computation.
- * stdlib/Makefile (test-bz22786): New test.
- * stdlib/test-bz22786.c: New test.
----
- ChangeLog | 8 +++++
- stdlib/Makefile | 2 +-
- stdlib/canonicalize.c | 2 +-
- stdlib/test-bz22786.c | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++
- 4 files changed, 100 insertions(+), 2 deletions(-)
- create mode 100644 stdlib/test-bz22786.c
-
-diff --git a/stdlib/Makefile b/stdlib/Makefile
-index af1643c..1ddb1f9 100644
---- a/stdlib/Makefile
-+++ b/stdlib/Makefile
-@@ -84,7 +84,7 @@ tests := tst-strtol tst-strtod testmb testrand testsort testdiv \
- tst-cxa_atexit tst-on_exit test-atexit-race \
- test-at_quick_exit-race test-cxa_atexit-race \
- test-on_exit-race test-dlclose-exit-race \
-- tst-makecontext-align
-+ tst-makecontext-align test-bz22786
-
- tests-internal := tst-strtod1i tst-strtod3 tst-strtod4 tst-strtod5i \
- tst-tls-atexit tst-tls-atexit-nodelete
-diff --git a/stdlib/canonicalize.c b/stdlib/canonicalize.c
-index 4135f3f..390fb43 100644
---- a/stdlib/canonicalize.c
-+++ b/stdlib/canonicalize.c
-@@ -181,7 +181,7 @@ __realpath (const char *name, char *resolved)
- extra_buf = __alloca (path_max);
-
- len = strlen (end);
-- if ((long int) (n + len) >= path_max)
-+ if (path_max - n <= len)
- {
- __set_errno (ENAMETOOLONG);
- goto error;
-diff --git a/stdlib/test-bz22786.c b/stdlib/test-bz22786.c
-new file mode 100644
-index 0000000..e7837f9
---- /dev/null
-+++ b/stdlib/test-bz22786.c
-@@ -0,0 +1,90 @@
-+/* Bug 22786: test for buffer overflow in realpath.
-+ Copyright (C) 2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+/* This file must be run from within a directory called "stdlib". */
-+
-+#include <errno.h>
-+#include <limits.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <unistd.h>
-+#include <sys/stat.h>
-+#include <sys/types.h>
-+#include <support/test-driver.h>
-+#include <libc-diag.h>
-+
-+static int
-+do_test (void)
-+{
-+ const char dir[] = "bz22786";
-+ const char lnk[] = "bz22786/symlink";
-+
-+ rmdir (dir);
-+ if (mkdir (dir, 0755) != 0 && errno != EEXIST)
-+ {
-+ printf ("mkdir %s: %m\n", dir);
-+ return EXIT_FAILURE;
-+ }
-+ if (symlink (".", lnk) != 0 && errno != EEXIST)
-+ {
-+ printf ("symlink (%s, %s): %m\n", dir, lnk);
-+ return EXIT_FAILURE;
-+ }
-+
-+ const size_t path_len = (size_t) INT_MAX + 1;
-+
-+ DIAG_PUSH_NEEDS_COMMENT;
-+#if __GNUC_PREREQ (7, 0)
-+ /* GCC 7 warns about too-large allocations; here we need such
-+ allocation to succeed for the test to work. */
-+ DIAG_IGNORE_NEEDS_COMMENT (7, "-Walloc-size-larger-than=");
-+#endif
-+ char *path = malloc (path_len);
-+ DIAG_POP_NEEDS_COMMENT;
-+
-+ if (path == NULL)
-+ {
-+ printf ("malloc (%zu): %m\n", path_len);
-+ return EXIT_UNSUPPORTED;
-+ }
-+
-+ /* Construct very long path = "bz22786/symlink/aaaa....." */
-+ char *p = mempcpy (path, lnk, sizeof (lnk) - 1);
-+ *(p++) = '/';
-+ memset (p, 'a', path_len - (path - p) - 2);
-+ p[path_len - (path - p) - 1] = '\0';
-+
-+ /* This call crashes before the fix for bz22786 on 32-bit platforms. */
-+ p = realpath (path, NULL);
-+
-+ if (p != NULL || errno != ENAMETOOLONG)
-+ {
-+ printf ("realpath: %s (%m)", p);
-+ return EXIT_FAILURE;
-+ }
-+
-+ /* Cleanup. */
-+ unlink (lnk);
-+ rmdir (dir);
-+
-+ return 0;
-+}
-+
-+#define TEST_FUNCTION do_test
-+#include <support/test-driver.c>
---
-2.9.3
-
diff --git a/gnu/packages/patches/glibc-CVE-2018-11237.patch b/gnu/packages/patches/glibc-CVE-2018-11237.patch
deleted file mode 100644
index 8a7c604ecd..0000000000
--- a/gnu/packages/patches/glibc-CVE-2018-11237.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=patch;h=9aaaab7c6e4176e61c59b0a63c6ba906d875dc0e
-with the ChangeLog removed
-
-From 9aaaab7c6e4176e61c59b0a63c6ba906d875dc0e Mon Sep 17 00:00:00 2001
-From: Andreas Schwab <schwab@suse.de>
-Date: Tue, 22 May 2018 10:37:59 +0200
-Subject: [PATCH] Don't write beyond destination in
- __mempcpy_avx512_no_vzeroupper (bug 23196)
-
-When compiled as mempcpy, the return value is the end of the destination
-buffer, thus it cannot be used to refer to the start of it.
----
- ChangeLog | 9 +++++++++
- string/test-mempcpy.c | 1 +
- sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S | 5 +++--
- 3 files changed, 13 insertions(+), 2 deletions(-)
-
-diff --git a/string/test-mempcpy.c b/string/test-mempcpy.c
-index c08fba8..d98ecdd 100644
---- a/string/test-mempcpy.c
-+++ b/string/test-mempcpy.c
-@@ -18,6 +18,7 @@
- <http://www.gnu.org/licenses/>. */
-
- #define MEMCPY_RESULT(dst, len) (dst) + (len)
-+#define MIN_PAGE_SIZE 131072
- #define TEST_MAIN
- #define TEST_NAME "mempcpy"
- #include "test-string.h"
-diff --git a/sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S b/sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S
-index 23c0f7a..effc3ac 100644
---- a/sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S
-+++ b/sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S
-@@ -336,6 +336,7 @@ L(preloop_large):
- vmovups (%rsi), %zmm4
- vmovups 0x40(%rsi), %zmm5
-
-+ mov %rdi, %r11
- /* Align destination for access with non-temporal stores in the loop. */
- mov %rdi, %r8
- and $-0x80, %rdi
-@@ -366,8 +367,8 @@ L(gobble_256bytes_nt_loop):
- cmp $256, %rdx
- ja L(gobble_256bytes_nt_loop)
- sfence
-- vmovups %zmm4, (%rax)
-- vmovups %zmm5, 0x40(%rax)
-+ vmovups %zmm4, (%r11)
-+ vmovups %zmm5, 0x40(%r11)
- jmp L(check)
-
- L(preloop_large_bkw):
---
-2.9.3
-
diff --git a/gnu/packages/patches/glibc-hurd-magic-pid.patch b/gnu/packages/patches/glibc-hurd-magic-pid.patch
deleted file mode 100644
index a6849f7d35..0000000000
--- a/gnu/packages/patches/glibc-hurd-magic-pid.patch
+++ /dev/null
@@ -1,190 +0,0 @@
-This patch implements "magic" lookup for "pid/…", as used when looking up
-/proc/self.
-
-The patch comes from the 't/magic-pid' branch
-at <https://git.savannah.gnu.org/cgit/hurd/glibc.git>. It squashes
-commit 392e52286a302ca6157fbd221295e64ab6b6d8ba (by Justus Winter)
-and commit 392e52286a302ca6157fbd221295e64ab6b6d8ba (a subsequent fix by
-Samuel Thibault).
-
-From: Justus Winter <4winter@informatik.uni-hamburg.de>
-Subject: [PATCH] hurd: Handle `pid' magical lookup retry
-
- * hurd/lookup-retry.c: Handle `pid' magical lookup
- retry.
-
-diff --git a/hurd/lookup-retry.c b/hurd/lookup-retry.c
-index aee2ba8f93..6ed8de1653 100644
---- a/hurd/lookup-retry.c
-+++ b/hurd/lookup-retry.c
-@@ -25,6 +25,7 @@
- #include <string.h>
- #include <_itoa.h>
- #include <eloop-threshold.h>
-+#include <unistd.h>
-
- /* Translate the error from dir_lookup into the error the user sees. */
- static inline error_t
-@@ -59,6 +60,7 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port)
- error_t err;
- char *file_name;
- int nloops;
-+ file_t lastdir = MACH_PORT_NULL;
-
- error_t lookup_op (file_t startdir)
- {
-@@ -107,14 +109,15 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port)
- {
- case FS_RETRY_REAUTH:
- if (err = reauthenticate (*result))
-- return err;
-+ goto out;
- /* Fall through. */
-
- case FS_RETRY_NORMAL:
- if (nloops++ >= __eloop_threshold ())
- {
- __mach_port_deallocate (__mach_task_self (), *result);
-- return ELOOP;
-+ err = ELOOP;
-+ goto out;
- }
-
- /* An empty RETRYNAME indicates we have the final port. */
-@@ -174,7 +177,7 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port)
-
- if (err)
- __mach_port_deallocate (__mach_task_self (), *result);
-- return err;
-+ goto out;
- }
-
- startdir = *result;
-@@ -189,7 +192,10 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port)
- if (*result != MACH_PORT_NULL)
- __mach_port_deallocate (__mach_task_self (), *result);
- if (nloops++ >= __eloop_threshold ())
-- return ELOOP;
-+ {
-+ err = ELOOP;
-+ goto out;
-+ }
- file_name = &retryname[1];
- break;
-
-@@ -208,7 +214,8 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port)
- (*end != '/' && *end != '\0'))
- {
- errno = save;
-- return ENOENT;
-+ err = ENOENT;
-+ goto out;
- }
- if (! get_dtable_port)
- err = EGRATUITOUS;
-@@ -226,9 +233,12 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port)
- }
- errno = save;
- if (err)
-- return err;
-+ goto out;
- if (*end == '\0')
-- return 0;
-+ {
-+ err = 0;
-+ goto out;
-+ }
- else
- {
- /* Do a normal retry on the remaining components. */
-@@ -255,9 +265,12 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port)
- if (err = __host_info (__mach_host_self (), HOST_BASIC_INFO,
- (integer_t *) &hostinfo,
- &hostinfocnt))
-- return err;
-+ goto out;
- if (hostinfocnt != HOST_BASIC_INFO_COUNT)
-- return EGRATUITOUS;
-+ {
-+ err = EGRATUITOUS;
-+ goto out;
-+ }
- p = _itoa (hostinfo.cpu_subtype, &retryname[8], 10, 0);
- *--p = '/';
- p = _itoa (hostinfo.cpu_type, &retryname[8], 10, 0);
-@@ -293,10 +306,11 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port)
- }
-
- case '\0':
-- return opentty (result);
-+ err = opentty (result);
-+ goto out;
- case '/':
- if (err = opentty (&startdir))
-- return err;
-+ goto out;
- strcpy (retryname, &retryname[4]);
- break;
- default:
-@@ -306,14 +320,48 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port)
- goto bad_magic;
- break;
-
-+ case 'p':
-+ if (retryname[1] == 'i' && retryname[2] == 'd' &&
-+ (retryname[3] == '/' || retryname[3] == 0))
-+ {
-+ char *p, buf[1024]; /* XXX */
-+ size_t len;
-+ p = _itoa (__getpid (), &buf[sizeof buf], 10, 0);
-+ len = &buf[sizeof buf] - p;
-+ memcpy (buf, p, len);
-+ strcpy (buf + len, &retryname[3]);
-+ strcpy (retryname, buf);
-+
-+ /* Do a normal retry on the remaining components. */
-+ __mach_port_mod_refs (__mach_task_self (), lastdir,
-+ MACH_PORT_RIGHT_SEND, 1);
-+ startdir = lastdir;
-+ file_name = retryname;
-+ }
-+ else
-+ goto bad_magic;
-+ break;
-+
- default:
- bad_magic:
-- return EGRATUITOUS;
-+ err = EGRATUITOUS;
-+ goto out;
- }
- break;
-
- default:
-- return EGRATUITOUS;
-+ err = EGRATUITOUS;
-+ goto out;
-+ }
-+
-+ if (MACH_PORT_VALID (*result) && *result != lastdir)
-+ {
-+ if (MACH_PORT_VALID (lastdir))
-+ __mach_port_deallocate (__mach_task_self (), lastdir);
-+
-+ lastdir = *result;
-+ __mach_port_mod_refs (__mach_task_self (), lastdir,
-+ MACH_PORT_RIGHT_SEND, 1);
- }
-
- if (startdir != MACH_PORT_NULL)
-@@ -326,6 +374,10 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port)
- err = (*use_init_port) (dirport, &lookup_op);
- } while (! err);
-
-+out:
-+ if (MACH_PORT_VALID (lastdir))
-+ __mach_port_deallocate (__mach_task_self (), lastdir);
-+
- return err;
- }
- weak_alias (__hurd_file_name_lookup_retry, hurd_file_name_lookup_retry)
diff --git a/gnu/packages/patches/grocsvs-dont-use-admiral.patch b/gnu/packages/patches/grocsvs-dont-use-admiral.patch
deleted file mode 100644
index cb976e19b0..0000000000
--- a/gnu/packages/patches/grocsvs-dont-use-admiral.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-python-admiral doesn't have a license
-https://github.com/nspies/admiral/issues/3
-
-diff --git a/setup.py b/setup.py
-index 692b6a0..568f381 100755
---- a/setup.py
-+++ b/setup.py
-@@ -20,7 +20,7 @@ setup(
- 'console_scripts' : ["grocsvs = grocsvs.main:main"]
- },
-
-- install_requires = ["admiral", "h5py", "networkx>=2.0", "pandas", "pybedtools",
-+ install_requires = ["h5py", "networkx>=2.0", "pandas", "pybedtools",
- "pyfaidx", "pysam>=0.10.0", "scipy", "ipython-cluster-helper",
- "pygraphviz", "psutil"],
-
-diff --git a/src/grocsvs/jobmanagers.py b/src/grocsvs/jobmanagers.py
-index 6da0b58..112d7ff 100755
---- a/src/grocsvs/jobmanagers.py
-+++ b/src/grocsvs/jobmanagers.py
-@@ -41,34 +41,3 @@ class MultiprocessingCluster(Cluster):
- pool = multiprocessing.Pool(processes=self.processes)
- return pool.map_async(fn, args).get(999999)
-
--
--class AdmiralCluster(Cluster):
-- def map(self, fn, args):
-- from admiral import jobmanagers, remote
--
-- cluster_options = self.cluster_settings.cluster_options.copy()
--
-- scheduler = cluster_options.pop("scheduler")
--
-- jobmanager_class = jobmanagers.get_jobmanager(scheduler)
-- jobmanager = jobmanager_class(
-- batch_dir=self.batch_dir, log_dir=self.batch_dir)
--
--
-- if not "mem" in cluster_options:
-- cluster_options["mem"] = "16g"
-- if not "time" in cluster_options:
-- cluster_options["time"] = "12h"
--
-- jobs = []
-- #for i, arg in enumerate(args):
--
-- job_name = args[0].__class__.__name__
-- args = [[arg] for arg in args]
-- job = remote.run_remote(fn, jobmanager, job_name, args=args,
-- array=True, overwrite=True, **cluster_options)
--
-- result = jobmanagers.wait_for_jobs([job], wait=5, progress=True)
--
-- if not result:
-- raise Exception("Some chunks failed to complete")
-diff --git a/src/grocsvs/pipeline.py b/src/grocsvs/pipeline.py
-index ab1bb2d..350976f 100755
---- a/src/grocsvs/pipeline.py
-+++ b/src/grocsvs/pipeline.py
-@@ -8,8 +8,7 @@ from grocsvs import utilities
- def make_jobmanager(jobmanager_settings, processes, batch_dir):
- jobmanager_classes = {"IPCluster":jobmanagers.IPCluster,
- "local": jobmanagers.LocalCluster,
-- "multiprocessing": jobmanagers.MultiprocessingCluster,
-- "admiral": jobmanagers.AdmiralCluster}
-+ "multiprocessing": jobmanagers.MultiprocessingCluster}
-
- cls = jobmanager_classes[jobmanager_settings.cluster_type]
- return cls(processes, jobmanager_settings, batch_dir)
diff --git a/gnu/packages/patches/guile-cross-compilation.patch b/gnu/packages/patches/guile-cross-compilation.patch
new file mode 100644
index 0000000000..a594cb9421
--- /dev/null
+++ b/gnu/packages/patches/guile-cross-compilation.patch
@@ -0,0 +1,55 @@
+When cross-compiling, get type sizes of the host system, not the build system.
+
+This is Guile commit 24b30130ca75653bdbacea84ce0443608379d630, which
+fixes <https://issues.guix.gnu.org/54198>, with one difference: it uses
+8 instead of SIZEOF_INTMAX_T, such that we do not need to modify
+'configure.ac' to check for the size of 'intmax_t' and to run 'autoreconf'
+(libguile/numbers.c expects SCM_SIZEOF_INTMAX_T = 8).
+
+diff --git a/libguile/gen-scmconfig.c b/libguile/gen-scmconfig.c
+index 01b14f14d..691ebd0af 100644
+--- a/libguile/gen-scmconfig.c
++++ b/libguile/gen-scmconfig.c
+@@ -1,4 +1,4 @@
+-/* Copyright 2003-2013,2018,2020,2021
++/* Copyright 2003-2013, 2018, 2020-2022
+ Free Software Foundation, Inc.
+
+ This file is part of Guile.
+@@ -238,21 +238,21 @@ main (int argc, char *argv[])
+ pf ("\n");
+ pf ("/* Standard types. */\n");
+
+- pf ("#define SCM_SIZEOF_CHAR %zu\n", sizeof (char));
+- pf ("#define SCM_SIZEOF_UNSIGNED_CHAR %zu\n", sizeof (unsigned char));
+- pf ("#define SCM_SIZEOF_SHORT %zu\n", sizeof (short));
+- pf ("#define SCM_SIZEOF_UNSIGNED_SHORT %zu\n", sizeof (unsigned short));
+- pf ("#define SCM_SIZEOF_LONG %zu\n", sizeof (long));
+- pf ("#define SCM_SIZEOF_UNSIGNED_LONG %zu\n", sizeof (unsigned long));
+- pf ("#define SCM_SIZEOF_INT %zu\n", sizeof (int));
+- pf ("#define SCM_SIZEOF_UNSIGNED_INT %zu\n", sizeof (unsigned int));
+- pf ("#define SCM_SIZEOF_SIZE_T %zu\n", sizeof (size_t));
+- pf ("#define SCM_SIZEOF_LONG_LONG %zu\n", sizeof (long long));
+- pf ("#define SCM_SIZEOF_UNSIGNED_LONG_LONG %zu\n", sizeof (unsigned long long));
+- pf ("#define SCM_SIZEOF_INTMAX %zu\n", sizeof (intmax_t));
+- pf ("#define SCM_SIZEOF_SCM_T_PTRDIFF %zu\n", sizeof (ptrdiff_t));
+- pf ("#define SCM_SIZEOF_INTPTR_T %zu\n", sizeof (intptr_t));
+- pf ("#define SCM_SIZEOF_UINTPTR_T %zu\n", sizeof (uintptr_t));
++ pf ("#define SCM_SIZEOF_CHAR %d\n", SIZEOF_CHAR);
++ pf ("#define SCM_SIZEOF_UNSIGNED_CHAR %d\n", SIZEOF_UNSIGNED_CHAR);
++ pf ("#define SCM_SIZEOF_SHORT %d\n", SIZEOF_SHORT);
++ pf ("#define SCM_SIZEOF_UNSIGNED_SHORT %d\n", SIZEOF_UNSIGNED_SHORT);
++ pf ("#define SCM_SIZEOF_LONG %d\n", SIZEOF_LONG);
++ pf ("#define SCM_SIZEOF_UNSIGNED_LONG %d\n", SIZEOF_UNSIGNED_LONG);
++ pf ("#define SCM_SIZEOF_INT %d\n", SIZEOF_INT);
++ pf ("#define SCM_SIZEOF_UNSIGNED_INT %d\n", SIZEOF_UNSIGNED_INT);
++ pf ("#define SCM_SIZEOF_SIZE_T %d\n", SIZEOF_SIZE_T);
++ pf ("#define SCM_SIZEOF_LONG_LONG %d\n", SIZEOF_LONG_LONG);
++ pf ("#define SCM_SIZEOF_UNSIGNED_LONG_LONG %d\n", SIZEOF_UNSIGNED_LONG_LONG);
++ pf ("#define SCM_SIZEOF_INTMAX %d\n", 8); /* like SIZEOF_INTMAX_T */
++ pf ("#define SCM_SIZEOF_SCM_T_PTRDIFF %d\n", SIZEOF_PTRDIFF_T);
++ pf ("#define SCM_SIZEOF_INTPTR_T %d\n", SIZEOF_INTPTR_T);
++ pf ("#define SCM_SIZEOF_UINTPTR_T %d\n", SIZEOF_UINTPTR_T);
+
+ pf ("\n");
+ pf ("/* same as POSIX \"struct timespec\" -- always defined */\n");
diff --git a/gnu/packages/patches/guile-ssh-fix-test-suite.patch b/gnu/packages/patches/guile-ssh-fix-test-suite.patch
deleted file mode 100644
index dc10e08b0f..0000000000
--- a/gnu/packages/patches/guile-ssh-fix-test-suite.patch
+++ /dev/null
@@ -1,217 +0,0 @@
-From f7942cded8b65341916a555186e2219efe174cd0 Mon Sep 17 00:00:00 2001
-From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
-Date: Thu, 4 Feb 2021 14:38:25 -0500
-Subject: [PATCH] tests: Fix test suite for Guile 3.0.5.
-
-The test-runner object is now reset to #f when calling the 'test-end'
-procedure. See the commit de5d1a7f99b8e952b115237ebc29633062f99bb9 in
-Guile (srfi-64: Reset test-runner-current if done) which introduced this
-change.
-
-* tests/client-server.scm (exit-status): New variable. Use it when calling
-exit.
-* tests/dist.scm: Likewise.
-* tests/key.scm: Likewise.
-* tests/log.scm: Likewise.
-* tests/popen.scm: Likewise.
-* tests/server-client.scm: Likewise.
-* tests/server.scm: Likewise.
-* tests/session.scm: Likewise.
-* tests/shell.scm: Likewise.
-* tests/sssh-ssshd.scm: Likewise.
-* tests/tunnel.scm: Likewise.
----
- tests/client-server.scm | 4 +++-
- tests/dist.scm | 4 +++-
- tests/key.scm | 3 ++-
- tests/log.scm | 5 ++++-
- tests/popen.scm | 4 +++-
- tests/server-client.scm | 4 +++-
- tests/server.scm | 4 +++-
- tests/session.scm | 4 +++-
- tests/shell.scm | 3 ++-
- tests/sssh-ssshd.scm | 4 +++-
- tests/tunnel.scm | 4 +++-
- 11 files changed, 32 insertions(+), 11 deletions(-)
-
-diff --git a/tests/client-server.scm b/tests/client-server.scm
-index 432a48c..fc46140 100644
---- a/tests/client-server.scm
-+++ b/tests/client-server.scm
-@@ -743,8 +743,10 @@
-
- ;;;
-
-+(define exit-status (test-runner-fail-count (test-runner-current)))
-+
- (test-end "client-server")
-
--(exit (= (test-runner-fail-count (test-runner-current)) 0))
-+(exit (= 0 exit-status))
-
- ;;; client-server.scm ends here.
-diff --git a/tests/dist.scm b/tests/dist.scm
-index 2a3a75f..79f9e23 100644
---- a/tests/dist.scm
-+++ b/tests/dist.scm
-@@ -269,8 +269,10 @@ $4 = #<session #<undefined>@#<undefined>:22 (disconnected) 453fff>"
- ;;;
-
-
-+(define exit-status (test-runner-fail-count (test-runner-current)))
-+
- (test-end "dist")
-
--(exit (= (test-runner-fail-count (test-runner-current)) 0))
-+(exit (= 0 exit-status))
-
- ;;; dist.scm ends here.
-diff --git a/tests/key.scm b/tests/key.scm
-index be31378..e1678f4 100644
---- a/tests/key.scm
-+++ b/tests/key.scm
-@@ -170,9 +170,10 @@
- (eq? (get-key-type key) 'ecdsa-p256)))))))
-
- ;;;
-+(define exit-status (test-runner-fail-count (test-runner-current)))
-
- (test-end "key")
-
--(exit (= (test-runner-fail-count (test-runner-current)) 0))
-+(exit (= 0 exit-status))
-
- ;;; key.scm ends here.
-diff --git a/tests/log.scm b/tests/log.scm
-index f547202..d528251 100644
---- a/tests/log.scm
-+++ b/tests/log.scm
-@@ -64,8 +64,11 @@
- (get-log-verbosity))
-
-
-+(define exit-status (test-runner-fail-count (test-runner-current)))
-+
- (test-end "log")
-
--(exit (= (test-runner-fail-count (test-runner-current)) 0))
-+(exit (= 0 exit-status))
-+
-
- ;;; log.scm ends here
-diff --git a/tests/popen.scm b/tests/popen.scm
-index e063e0b..fe77108 100644
---- a/tests/popen.scm
-+++ b/tests/popen.scm
-@@ -129,8 +129,10 @@
- (format-log/scm 'nolog "open-remote-output-pipe" "channel: ~A" channel)
- (output-only? channel)))))))
-
-+(define exit-status (test-runner-fail-count (test-runner-current)))
-+
- (test-end "popen")
-
--(exit (= (test-runner-fail-count (test-runner-current)) 0))
-+(exit (= 0 exit-status))
-
- ;;; popen.scm ends here.
-diff --git a/tests/server-client.scm b/tests/server-client.scm
-index 920aa22..b6ed3eb 100644
---- a/tests/server-client.scm
-+++ b/tests/server-client.scm
-@@ -148,8 +148,10 @@
- (equal? x session))))))
-
-
-+(define exit-status (test-runner-fail-count (test-runner-current)))
-+
- (test-end "server-client")
-
--(exit (= (test-runner-fail-count (test-runner-current)) 0))
-+(exit (= 0 exit-status))
-
- ;;; server-client.scm ends here.
-diff --git a/tests/server.scm b/tests/server.scm
-index c7f8b6c..1a6daea 100644
---- a/tests/server.scm
-+++ b/tests/server.scm
-@@ -157,9 +157,11 @@
- (server-listen server)
- #t))
-
-+(define exit-status (test-runner-fail-count (test-runner-current)))
-+
- (test-end "server")
-
--(exit (= (test-runner-fail-count (test-runner-current)) 0))
-+(exit (= 0 exit-status))
-
- ;;; server.scm ends here.
-
-diff --git a/tests/session.scm b/tests/session.scm
-index 8caa039..7310647 100644
---- a/tests/session.scm
-+++ b/tests/session.scm
-@@ -210,8 +210,10 @@
- (let ((session (%make-session)))
- (not (connected? session))))
-
-+(define exit-status (test-runner-fail-count (test-runner-current)))
-+
- (test-end "session")
-
--(exit (= (test-runner-fail-count (test-runner-current)) 0))
-+(exit (= 0 exit-status))
-
- ;;; session.scm ends here.
-diff --git a/tests/shell.scm b/tests/shell.scm
-index 7d613fb..e36e661 100644
---- a/tests/shell.scm
-+++ b/tests/shell.scm
-@@ -113,9 +113,10 @@
-
-
- ;;;
-+(define exit-status (test-runner-fail-count (test-runner-current)))
-
- (test-end "shell")
-
--(exit (= (test-runner-fail-count (test-runner-current)) 0))
-+(exit (= 0 exit-status))
-
- ;;; shell.scm ends here.
-diff --git a/tests/sssh-ssshd.scm b/tests/sssh-ssshd.scm
-index 2fe23db..edb53fc 100644
---- a/tests/sssh-ssshd.scm
-+++ b/tests/sssh-ssshd.scm
-@@ -118,8 +118,10 @@
- result)))
-
-
-+(define exit-status (test-runner-fail-count (test-runner-current)))
-+
- (test-end "sssh-ssshd")
-
--(exit (= (test-runner-fail-count (test-runner-current)) 0))
-+(exit (= 0 exit-status))
-
- ;;; sssh-ssshd.scm ends here.
-diff --git a/tests/tunnel.scm b/tests/tunnel.scm
-index ef5a568..d6453b7 100644
---- a/tests/tunnel.scm
-+++ b/tests/tunnel.scm
-@@ -191,8 +191,10 @@
- (= pnum portnum)))
- (eq? (channel-cancel-forward session "localhost" portnum) 'ok))))))))
-
-+(define exit-status (test-runner-fail-count (test-runner-current)))
-+
- (test-end "tunnel")
-
--(exit (= (test-runner-fail-count (test-runner-current)) 0))
-+(exit (= 0 exit-status))
-
- ;;; tunnel.scm ends here.
---
-2.30.0
-
diff --git a/gnu/packages/patches/guile-ssh-read-error.patch b/gnu/packages/patches/guile-ssh-read-error.patch
deleted file mode 100644
index 9cc6b048a0..0000000000
--- a/gnu/packages/patches/guile-ssh-read-error.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-This patch adjusts to slightly different 'read-error' in Guile 3.0.6
-compared to earlier versions:
-
- https://github.com/artyom-poptsov/guile-ssh/issues/28
-
---- a/tests/dist.scm
-+++ b/tests/dist.scm
-@@ -183,8 +183,8 @@ Unbound variable: e"
- rrepl-get-result))
-
- (test-error-with-log/= "rrepl-get-result, unknown # object error"
-- 'node-repl-error "Reader error: scm_lreadr: #<unknown port>:1:3: \
--Unknown # object: (#\\<): scheme@(guile-user)> \
-+ 'node-repl-error "Reader error: #f: #<unknown port>:1:3: \
-+Unknown # object: (\"#<\"): scheme@(guile-user)> \
- $4 = #<session #<undefined>@#<undefined>:22 (disconnected) 453fff>"
- (call-with-input-string
- (string-append "scheme@(guile-user)> $4 = "
diff --git a/gnu/packages/patches/hydra-disable-darcs-test.patch b/gnu/packages/patches/hydra-disable-darcs-test.patch
deleted file mode 100644
index 5d8e015b08..0000000000
--- a/gnu/packages/patches/hydra-disable-darcs-test.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- hydra-20150407.4c0e3e4/tests/evaluation-tests.pl 2015-04-15 12:00:19.000000000 -0500
-+++ hydra-20150407.4c0e3e4/tests/evaluation-tests.pl 2015-04-17 08:53:04.940301471 -0500
-@@ -7,7 +7,7 @@
-
- my $db = Hydra::Model::DB->new;
-
--use Test::Simple tests => 72;
-+use Test::Simple tests => 68;
-
- hydra_setup($db);
-
-@@ -103,13 +103,6 @@
- uri => "$jobsBaseUri/hg-repo",
- update => getcwd . "/jobs/hg-update.sh"
- },
-- {
-- name => "darcs",
-- nixexpr => "darcs-input.nix",
-- type => "darcs",
-- uri => "$jobsBaseUri/darcs-repo",
-- update => getcwd . "/jobs/darcs-update.sh"
-- }
- );
-
- foreach my $scm ( @scminputs ) {
diff --git a/gnu/packages/patches/inkscape-poppler-0.76.patch b/gnu/packages/patches/inkscape-poppler-0.76.patch
deleted file mode 100644
index 08e8303892..0000000000
--- a/gnu/packages/patches/inkscape-poppler-0.76.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-This patch adds support for Poppler 0.76 and later.
-
-Taken from upstream:
-<https://gitlab.com/inkscape/inkscape/commit/e831b034746f8dc3c3c1b88372751f6dcb974831>
-
-diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extension/internal/pdfinput/pdf-parser.cpp
-index 8484984bdf..4f798e35bf 100644
---- a/src/extension/internal/pdfinput/pdf-parser.cpp
-+++ b/src/extension/internal/pdfinput/pdf-parser.cpp
-@@ -421,7 +421,7 @@ void PdfParser::parse(Object *obj, GBool topLevel) {
- error(errInternal, -1, "Weird page contents");
- return;
- }
-- parser = new Parser(xref, new Lexer(xref, obj), gFalse);
-+ parser = new _POPPLER_NEW_PARSER(xref, obj);
- go(topLevel);
- delete parser;
- parser = nullptr;
-diff --git a/src/extension/internal/pdfinput/poppler-transition-api.h b/src/extension/internal/pdfinput/poppler-transition-api.h
-index 61a15083a0..5e8bc4ae90 100644
---- a/src/extension/internal/pdfinput/poppler-transition-api.h
-+++ b/src/extension/internal/pdfinput/poppler-transition-api.h
-@@ -14,6 +14,13 @@
-
- #include <glib/poppler-features.h>
-
-+#if POPPLER_CHECK_VERSION(0, 76, 0)
-+#define _POPPLER_NEW_PARSER(xref, obj) Parser(xref, obj, gFalse)
-+#else
-+#define _POPPLER_NEW_PARSER(xref, obj) Parser(xref, new Lexer(xref, obj), gFalse)
-+#endif
-+
-+
- #if POPPLER_CHECK_VERSION(0, 72, 0)
- #define getCString c_str
- #endif
diff --git a/gnu/packages/patches/libvirt-create-machine-cgroup.patch b/gnu/packages/patches/libvirt-create-machine-cgroup.patch
deleted file mode 100644
index 585ac237e1..0000000000
--- a/gnu/packages/patches/libvirt-create-machine-cgroup.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 9ca0b2955edea162b255b428e493cd8ffac52167 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?=
- <rosen644835@gmail.com>
-Date: Fri, 1 Nov 2019 17:29:00 +0100
-Subject: [PATCH] vircgroup: Ensure /machine group is associated with its
- parent.
-
-Call first virCgroupNew on the parent group virCgroupNewPartition if
-it is available on before the creation of the child group. This
-ensures that the creation of a first level group on the unified
-architecture, as the check at virCgroupV2ParseControllersFile as the
-parent file is there.
-
-Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1760233
----
- src/util/vircgroup.c | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
-index b46f20abfd..33c61f2d45 100644
---- a/src/util/vircgroup.c
-+++ b/src/util/vircgroup.c
-@@ -855,9 +855,6 @@ virCgroupNewPartition(const char *path,
- if (virCgroupSetPartitionSuffix(path, &newPath) < 0)
- goto cleanup;
-
-- if (virCgroupNew(-1, newPath, NULL, controllers, group) < 0)
-- goto cleanup;
--
- if (STRNEQ(newPath, "/")) {
- char *tmp;
- parentPath = g_strdup(newPath);
-@@ -868,7 +865,12 @@ virCgroupNewPartition(const char *path,
-
- if (virCgroupNew(-1, parentPath, NULL, controllers, &parent) < 0)
- goto cleanup;
-+ }
-
-+ if (virCgroupNew(-1, newPath, parent, controllers, group) < 0)
-+ goto cleanup;
-+
-+ if (parent) {
- if (virCgroupMakeGroup(parent, *group, create, VIR_CGROUP_NONE) < 0)
- goto cleanup;
- }
---
-2.23.0
-
diff --git a/gnu/packages/patches/linux-libre-arm64-generic-pinebook-lcd.patch b/gnu/packages/patches/linux-libre-arm64-generic-pinebook-lcd.patch
deleted file mode 100644
index 51ab544d5e..0000000000
--- a/gnu/packages/patches/linux-libre-arm64-generic-pinebook-lcd.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 3a75704e99a118f2d8a4d70f07781558bde85770 Mon Sep 17 00:00:00 2001
-From: Jian-Hong Pan <jhp@endlessos.org>
-Date: Thu, 24 Sep 2020 14:30:43 +0800
-Subject: [PATCH] arm64: dts: rockchip: disable USB type-c DisplayPort
-
-The cdn-dp sub driver probes the device failed on PINEBOOK Pro.
-
-kernel: cdn-dp fec00000.dp: [drm:cdn_dp_probe [rockchipdrm]] *ERROR* missing extcon or phy
-kernel: cdn-dp: probe of fec00000.dp failed with error -22
-
-Then, the device halts all of the DRM related device jobs. For example,
-the operations: vop_component_ops, vop_component_ops and
-rockchip_dp_component_ops cannot be bound to corresponding devices. So,
-Xorg cannot find the correct DRM device.
-
-The USB type-C DisplayPort does not work for now. So, disable the
-DisplayPort node until the type-C phy work has been done.
-
-Link: https://patchwork.kernel.org/patch/11794141/#23639877
-Signed-off-by: Jian-Hong Pan <jhp@endlessos.org>
----
- arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
-index 219b7507a10f..45769764425d 100644
---- a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
-@@ -380,7 +380,7 @@
- };
-
- &cdn_dp {
-- status = "okay";
-+ status = "disabled";
- };
-
- &cpu_b0 {
---
-2.30.2
-
diff --git a/gnu/packages/patches/marble-qt-add-qt-headers.patch b/gnu/packages/patches/marble-qt-add-qt-headers.patch
deleted file mode 100644
index 77c58317ad..0000000000
--- a/gnu/packages/patches/marble-qt-add-qt-headers.patch
+++ /dev/null
@@ -1,189 +0,0 @@
-Adapted from Debian: https://salsa.debian.org/qt-kde-team/kde/marble/-/blob/debian/4%2517.08.3-3.1/debian/patches/qt5.11.patch
-Upstream status: Probably irrelevant, as this is an old version of this software.
-
-diff --git a/src/lib/marble/MergedLayerDecorator.cpp b/src/lib/marble/MergedLayerDecorator.cpp
-index 40f3ddb..bafff50 100644
---- a/src/lib/marble/MergedLayerDecorator.cpp
-+++ b/src/lib/marble/MergedLayerDecorator.cpp
-@@ -36,6 +36,7 @@
-
- #include <QPointer>
- #include <QPainter>
-+#include <QPainterPath>
-
- using namespace Marble;
-
-diff --git a/src/lib/marble/VisiblePlacemark.cpp b/src/lib/marble/VisiblePlacemark.cpp
-index cfe08af..1a84006 100644
---- a/src/lib/marble/VisiblePlacemark.cpp
-+++ b/src/lib/marble/VisiblePlacemark.cpp
-@@ -22,6 +22,7 @@
-
- #include <QApplication>
- #include <QPainter>
-+#include <QPainterPath>
- #include <QPalette>
- #include <QPixmapCache>
-
-diff --git a/src/lib/marble/graphicsview/FrameGraphicsItem.cpp b/src/lib/marble/graphicsview/FrameGraphicsItem.cpp
-index 8a90526..065f245 100644
---- a/src/lib/marble/graphicsview/FrameGraphicsItem.cpp
-+++ b/src/lib/marble/graphicsview/FrameGraphicsItem.cpp
-@@ -18,6 +18,7 @@
- // Qt
- #include <QSizeF>
- #include <QPainter>
-+#include <QPainterPath>
- #include <QPixmapCache>
- #include <QMargins>
- #include <qdrawutil.h>
-diff --git a/src/lib/marble/layers/GroundLayer.cpp b/src/lib/marble/layers/GroundLayer.cpp
-index 58d409f..df6d226 100644
---- a/src/lib/marble/layers/GroundLayer.cpp
-+++ b/src/lib/marble/layers/GroundLayer.cpp
-@@ -14,6 +14,9 @@
- #include "ViewportParams.h"
- #include "RenderState.h"
-
-+#include <QPainter>
-+#include <QPainterPath>
-+
- namespace Marble
- {
-
-diff --git a/src/plugins/render/compass/CompassFloatItem.cpp b/src/plugins/render/compass/CompassFloatItem.cpp
-index d8dc021..66095cc 100644
---- a/src/plugins/render/compass/CompassFloatItem.cpp
-+++ b/src/plugins/render/compass/CompassFloatItem.cpp
-@@ -19,6 +19,7 @@
- #include <QRect>
- #include <QColor>
- #include <QPainter>
-+#include <QPainterPath>
- #include <QPushButton>
- #include <QSvgRenderer>
-
-diff --git a/src/plugins/render/elevationprofilefloatitem/ElevationProfileFloatItem.cpp b/src/plugins/render/elevationprofilefloatitem/ElevationProfileFloatItem.cpp
-index a790c16..96f5bed 100644
---- a/src/plugins/render/elevationprofilefloatitem/ElevationProfileFloatItem.cpp
-+++ b/src/plugins/render/elevationprofilefloatitem/ElevationProfileFloatItem.cpp
-@@ -31,6 +31,7 @@
- #include <QContextMenuEvent>
- #include <QRect>
- #include <QPainter>
-+#include <QPainterPath>
- #include <QPushButton>
- #include <QMenu>
- #include <QMouseEvent>
-diff --git a/src/plugins/render/foursquare/FoursquareItem.cpp b/src/plugins/render/foursquare/FoursquareItem.cpp
-index d9e1f57..ef80472 100644
---- a/src/plugins/render/foursquare/FoursquareItem.cpp
-+++ b/src/plugins/render/foursquare/FoursquareItem.cpp
-@@ -13,6 +13,8 @@
- #include "ViewportParams.h"
-
- #include <QFontMetrics>
-+#include <QPainter>
-+#include <QPainterPath>
-
- namespace Marble
- {
-diff --git a/src/plugins/render/gpsinfo/GpsInfo.cpp b/src/plugins/render/gpsinfo/GpsInfo.cpp
-index 522e907..20fd75a 100644
---- a/src/plugins/render/gpsinfo/GpsInfo.cpp
-+++ b/src/plugins/render/gpsinfo/GpsInfo.cpp
-@@ -21,6 +21,8 @@
- #include "ViewportParams.h"
- #include "GeoDataAccuracy.h"
-
-+#include <QIcon>
-+
- namespace Marble
- {
-
-diff --git a/src/plugins/render/license/License.cpp b/src/plugins/render/license/License.cpp
-index 511dfc0..9436083 100644
---- a/src/plugins/render/license/License.cpp
-+++ b/src/plugins/render/license/License.cpp
-@@ -23,6 +23,7 @@
- #include <QCommonStyle>
- #include <QContextMenuEvent>
- #include <QPainter>
-+#include <QPainterPath>
- #include <QLabel>
- #include <QMenu>
- #include <QMouseEvent>
-diff --git a/src/plugins/render/notes/NotesItem.cpp b/src/plugins/render/notes/NotesItem.cpp
-index 9d0961f..0c9fe99 100644
---- a/src/plugins/render/notes/NotesItem.cpp
-+++ b/src/plugins/render/notes/NotesItem.cpp
-@@ -9,6 +9,7 @@
- #include "MarbleDirs.h"
-
- #include <QPainter>
-+#include <QPainterPath>
- #include <QRect>
-
- using namespace Marble;
-diff --git a/src/plugins/render/postalcode/PostalCodeItem.cpp b/src/plugins/render/postalcode/PostalCodeItem.cpp
-index 772c0b2..0ff7957 100644
---- a/src/plugins/render/postalcode/PostalCodeItem.cpp
-+++ b/src/plugins/render/postalcode/PostalCodeItem.cpp
-@@ -17,6 +17,7 @@
- // Qt
- #include <QFontMetrics>
- #include <QPainter>
-+#include <QPainterPath>
-
- using namespace Marble;
-
-diff --git a/src/plugins/render/progress/ProgressFloatItem.cpp b/src/plugins/render/progress/ProgressFloatItem.cpp
-index a465857..6e2452c 100644
---- a/src/plugins/render/progress/ProgressFloatItem.cpp
-+++ b/src/plugins/render/progress/ProgressFloatItem.cpp
-@@ -22,6 +22,7 @@
- #include <QColor>
- #include <QPaintDevice>
- #include <QPainter>
-+#include <QPainterPath>
-
- namespace Marble
- {
-diff --git a/src/plugins/render/satellites/SatellitesPlugin.cpp b/src/plugins/render/satellites/SatellitesPlugin.cpp
-index 04d8321..0a43d24 100644
---- a/src/plugins/render/satellites/SatellitesPlugin.cpp
-+++ b/src/plugins/render/satellites/SatellitesPlugin.cpp
-@@ -25,6 +25,7 @@
-
- #include "ui_SatellitesConfigDialog.h"
-
-+#include <QAction>
- #include <QUrl>
- #include <QMouseEvent>
-
-diff --git a/src/plugins/render/speedometer/Speedometer.cpp b/src/plugins/render/speedometer/Speedometer.cpp
-index 6e9c532..f40a174 100644
---- a/src/plugins/render/speedometer/Speedometer.cpp
-+++ b/src/plugins/render/speedometer/Speedometer.cpp
-@@ -19,6 +19,8 @@
- #include "MarbleGraphicsGridLayout.h"
- #include "ViewportParams.h"
-
-+#include <QIcon>
-+
- namespace Marble
- {
-
-diff --git a/src/plugins/render/stars/StarsPlugin.cpp b/src/plugins/render/stars/StarsPlugin.cpp
-index 6599545..482680f 100644
---- a/src/plugins/render/stars/StarsPlugin.cpp
-+++ b/src/plugins/render/stars/StarsPlugin.cpp
-@@ -19,6 +19,8 @@
- #include <QContextMenuEvent>
- #include <QMenu>
- #include <QColorDialog>
-+#include <QPainter>
-+#include <QPainterPath>
- #include <qmath.h>
-
- #include "MarbleClock.h"
diff --git a/gnu/packages/patches/mariadb-link-libatomic.patch b/gnu/packages/patches/mariadb-link-libatomic.patch
new file mode 100644
index 0000000000..f331067b6e
--- /dev/null
+++ b/gnu/packages/patches/mariadb-link-libatomic.patch
@@ -0,0 +1,83 @@
+https://github.com/MariaDB/server/commit/f502ccbcb5dfce29067434885a23db8d1bd5f134.patch
+This was apparently merged in 10.8.2.
+
+From f502ccbcb5dfce29067434885a23db8d1bd5f134 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Vicen=C8=9Biu=20Ciorbaru?= <cvicentiu@gmail.com>
+Date: Fri, 15 Oct 2021 16:51:05 +0300
+Subject: [PATCH] Link with libatomic to enable C11 atomics support
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Some architectures (mips) require libatomic to support proper
+atomic operations. Check first if support is available without
+linking, otherwise use the library.
+
+Contributors:
+James Cowgill <jcowgill@debian.org>
+Jessica Clarke <jrtc27@debian.org>
+Vicențiu Ciorbaru <vicentiu@mariadb.org>
+---
+ configure.cmake | 20 +++++++++++++++++++-
+ mysys/CMakeLists.txt | 4 ++++
+ sql/CMakeLists.txt | 1 -
+ 3 files changed, 23 insertions(+), 2 deletions(-)
+
+diff --git a/configure.cmake b/configure.cmake
+index 7a1369d77703f..db8742bb93b5a 100644
+--- a/configure.cmake
++++ b/configure.cmake
+@@ -895,7 +895,25 @@ int main()
+ long long int *ptr= &var;
+ return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST);
+ }"
+-HAVE_GCC_C11_ATOMICS)
++HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC)
++IF (HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC)
++ SET(HAVE_GCC_C11_ATOMICS True)
++ELSE()
++ SET(OLD_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
++ LIST(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
++ CHECK_CXX_SOURCE_COMPILES("
++ int main()
++ {
++ long long int var= 1;
++ long long int *ptr= &var;
++ return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST);
++ }"
++ HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
++ IF(HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
++ SET(HAVE_GCC_C11_ATOMICS True)
++ ENDIF()
++ SET(CMAKE_REQUIRED_LIBRARIES ${OLD_CMAKE_REQUIRED_LIBRARIES})
++ENDIF()
+
+ IF(WITH_VALGRIND)
+ SET(HAVE_valgrind 1)
+diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt
+index f97e3b4d3904c..09d3f726ffc74 100644
+--- a/mysys/CMakeLists.txt
++++ b/mysys/CMakeLists.txt
+@@ -78,6 +78,10 @@ TARGET_LINK_LIBRARIES(mysys dbug strings ${ZLIB_LIBRARY}
+ ${LIBNSL} ${LIBM} ${LIBRT} ${CMAKE_DL_LIBS} ${LIBSOCKET} ${LIBEXECINFO} ${CRC32_LIBRARY})
+ DTRACE_INSTRUMENT(mysys)
+
++IF (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
++ TARGET_LINK_LIBRARIES(mysys atomic)
++ENDIF()
++
+ IF(HAVE_BFD_H)
+ TARGET_LINK_LIBRARIES(mysys bfd)
+ ENDIF(HAVE_BFD_H)
+diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
+index 5f5d7daf1a5bc..f574f1f20295d 100644
+--- a/sql/CMakeLists.txt
++++ b/sql/CMakeLists.txt
+@@ -307,7 +307,6 @@ IF(WITH_MYSQLD_LDFLAGS)
+ "${MYSQLD_LINK_FLAGS} ${WITH_MYSQLD_LDFLAGS}")
+ ENDIF()
+
+-
+ FIND_PACKAGE(BISON 2.0)
+
+
diff --git a/gnu/packages/patches/maven-enforcer-api-fix-old-dependencies.patch b/gnu/packages/patches/maven-enforcer-api-fix-old-dependencies.patch
deleted file mode 100644
index 98a0c8a395..0000000000
--- a/gnu/packages/patches/maven-enforcer-api-fix-old-dependencies.patch
+++ /dev/null
@@ -1,177 +0,0 @@
-From eccc46eaf7903a8e837813795498b12c078faaea Mon Sep 17 00:00:00 2001
-From: Julien Lepiller <julien@lepiller.eu>
-Date: Wed, 11 Mar 2020 21:53:32 +0100
-Subject: [PATCH] Fix old dependencies
-
----
- .../enforcer/AbstractBanDependencies.java | 2 +-
- .../enforcer/BanTransitiveDependencies.java | 2 +-
- .../enforcer/DependencyConvergence.java | 17 ++++++++---------
- .../enforcer/RequireUpperBoundDeps.java | 19 +++++++++----------
- .../enforcer/utils/DependencyVersionMap.java | 6 +++---
- 5 files changed, 22 insertions(+), 24 deletions(-)
-
-diff --git a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractBanDependencies.java b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractBanDependencies.java
-index 2888a61..2b944b7 100644
---- a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractBanDependencies.java
-+++ b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractBanDependencies.java
-@@ -119,7 +119,7 @@ public abstract class AbstractBanDependencies
- Set<Artifact> dependencies = null;
- try
- {
-- DependencyNode node = graphBuilder.buildDependencyGraph( project, null );
-+ DependencyNode node = graphBuilder.buildDependencyGraph( project.getProjectBuildingRequest(), null );
- if ( searchTransitive )
- {
- dependencies = ArtifactUtils.getAllDescendants( node );
-diff --git a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/BanTransitiveDependencies.java b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/BanTransitiveDependencies.java
-index 6e1dcd4..1b964ba 100644
---- a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/BanTransitiveDependencies.java
-+++ b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/BanTransitiveDependencies.java
-@@ -158,7 +158,7 @@ public class BanTransitiveDependencies
- try
- {
- MavenProject project = (MavenProject) helper.evaluate( "${project}" );
-- rootNode = createDependencyGraphBuilder().buildDependencyGraph( project, null );
-+ rootNode = createDependencyGraphBuilder().buildDependencyGraph( project.getProjectBuildingRequest(), null );
- }
- catch ( Exception e )
- {
-diff --git a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/DependencyConvergence.java b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/DependencyConvergence.java
-index 684f984..ca7ad3a 100644
---- a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/DependencyConvergence.java
-+++ b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/DependencyConvergence.java
-@@ -35,9 +35,9 @@ import org.apache.maven.enforcer.rule.api.EnforcerRuleHelper;
- import org.apache.maven.plugin.logging.Log;
- import org.apache.maven.plugins.enforcer.utils.DependencyVersionMap;
- import org.apache.maven.project.MavenProject;
--import org.apache.maven.shared.dependency.tree.DependencyNode;
--import org.apache.maven.shared.dependency.tree.DependencyTreeBuilder;
--import org.apache.maven.shared.dependency.tree.DependencyTreeBuilderException;
-+import org.apache.maven.shared.dependency.graph.DependencyNode;
-+import org.apache.maven.shared.dependency.graph.DependencyGraphBuilder;
-+import org.apache.maven.shared.dependency.graph.DependencyGraphBuilderException;
- import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException;
- import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
-
-@@ -60,7 +60,7 @@ public class DependencyConvergence
- // CHECKSTYLE_OFF: LineLength
- /**
- * Uses the {@link EnforcerRuleHelper} to populate the values of the
-- * {@link DependencyTreeBuilder#buildDependencyTree(MavenProject, ArtifactRepository, ArtifactFactory, ArtifactMetadataSource, ArtifactFilter, ArtifactCollector)}
-+ * {@link DependencyGraphBuilder#buildDependencyTree(MavenProject, ArtifactRepository, ArtifactFactory, ArtifactMetadataSource, ArtifactFilter, ArtifactCollector)}
- * factory method. <br/>
- * This method simply exists to hide all the ugly lookup that the {@link EnforcerRuleHelper} has to do.
- *
-@@ -75,16 +75,15 @@ public class DependencyConvergence
- try
- {
- MavenProject project = (MavenProject) helper.evaluate( "${project}" );
-- DependencyTreeBuilder dependencyTreeBuilder =
-- (DependencyTreeBuilder) helper.getComponent( DependencyTreeBuilder.class );
-+ DependencyGraphBuilder dependencyTreeBuilder =
-+ (DependencyGraphBuilder) helper.getComponent( DependencyGraphBuilder.class );
- ArtifactRepository repository = (ArtifactRepository) helper.evaluate( "${localRepository}" );
- ArtifactFactory factory = (ArtifactFactory) helper.getComponent( ArtifactFactory.class );
- ArtifactMetadataSource metadataSource =
- (ArtifactMetadataSource) helper.getComponent( ArtifactMetadataSource.class );
- ArtifactCollector collector = (ArtifactCollector) helper.getComponent( ArtifactCollector.class );
- ArtifactFilter filter = null; // we need to evaluate all scopes
-- DependencyNode node = dependencyTreeBuilder.buildDependencyTree( project, repository, factory,
-- metadataSource, filter, collector );
-+ DependencyNode node = dependencyTreeBuilder.buildDependencyGraph( project.getProjectBuildingRequest(), filter);
- return node;
- }
- catch ( ExpressionEvaluationException e )
-@@ -95,7 +94,7 @@ public class DependencyConvergence
- {
- throw new EnforcerRuleException( "Unable to lookup a component " + e.getLocalizedMessage(), e );
- }
-- catch ( DependencyTreeBuilderException e )
-+ catch ( DependencyGraphBuilderException e )
- {
- throw new EnforcerRuleException( "Could not build dependency tree " + e.getLocalizedMessage(), e );
- }
-diff --git a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireUpperBoundDeps.java b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireUpperBoundDeps.java
-index 458554a..2de9870 100644
---- a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireUpperBoundDeps.java
-+++ b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireUpperBoundDeps.java
-@@ -38,10 +38,10 @@ import org.apache.maven.enforcer.rule.api.EnforcerRuleException;
- import org.apache.maven.enforcer.rule.api.EnforcerRuleHelper;
- import org.apache.maven.plugin.logging.Log;
- import org.apache.maven.project.MavenProject;
--import org.apache.maven.shared.dependency.tree.DependencyNode;
--import org.apache.maven.shared.dependency.tree.DependencyTreeBuilder;
--import org.apache.maven.shared.dependency.tree.DependencyTreeBuilderException;
--import org.apache.maven.shared.dependency.tree.traversal.DependencyNodeVisitor;
-+import org.apache.maven.shared.dependency.graph.DependencyNode;
-+import org.apache.maven.shared.dependency.graph.DependencyGraphBuilder;
-+import org.apache.maven.shared.dependency.graph.DependencyGraphBuilderException;
-+import org.apache.maven.shared.dependency.graph.traversal.DependencyNodeVisitor;
- import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException;
- import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
-
-@@ -91,7 +91,7 @@ public class RequireUpperBoundDeps
- // CHECKSTYLE_OFF: LineLength
- /**
- * Uses the {@link EnforcerRuleHelper} to populate the values of the
-- * {@link DependencyTreeBuilder#buildDependencyTree(MavenProject, ArtifactRepository, ArtifactFactory, ArtifactMetadataSource, ArtifactFilter, ArtifactCollector)}
-+ * {@link DependencyGraphBuilder#buildDependencyTree(MavenProject, ArtifactRepository, ArtifactFactory, ArtifactMetadataSource, ArtifactFilter, ArtifactCollector)}
- * factory method. <br/>
- * This method simply exists to hide all the ugly lookup that the {@link EnforcerRuleHelper} has to do.
- *
-@@ -106,8 +106,8 @@ public class RequireUpperBoundDeps
- try
- {
- MavenProject project = (MavenProject) helper.evaluate( "${project}" );
-- DependencyTreeBuilder dependencyTreeBuilder =
-- (DependencyTreeBuilder) helper.getComponent( DependencyTreeBuilder.class );
-+ DependencyGraphBuilder dependencyTreeBuilder =
-+ (DependencyGraphBuilder) helper.getComponent( DependencyGraphBuilder.class );
- ArtifactRepository repository = (ArtifactRepository) helper.evaluate( "${localRepository}" );
- ArtifactFactory factory = (ArtifactFactory) helper.getComponent( ArtifactFactory.class );
- ArtifactMetadataSource metadataSource =
-@@ -115,8 +115,7 @@ public class RequireUpperBoundDeps
- ArtifactCollector collector = (ArtifactCollector) helper.getComponent( ArtifactCollector.class );
- ArtifactFilter filter = null; // we need to evaluate all scopes
- DependencyNode node =
-- dependencyTreeBuilder.buildDependencyTree( project, repository, factory, metadataSource, filter,
-- collector );
-+ dependencyTreeBuilder.buildDependencyGraph( project.getProjectBuildingRequest(), filter);
- return node;
- }
- catch ( ExpressionEvaluationException e )
-@@ -127,7 +126,7 @@ public class RequireUpperBoundDeps
- {
- throw new EnforcerRuleException( "Unable to lookup a component " + e.getLocalizedMessage(), e );
- }
-- catch ( DependencyTreeBuilderException e )
-+ catch ( DependencyGraphBuilderException e )
- {
- throw new EnforcerRuleException( "Could not build dependency tree " + e.getLocalizedMessage(), e );
- }
-diff --git a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/utils/DependencyVersionMap.java b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/utils/DependencyVersionMap.java
-index b6213fa..2c2a645 100644
---- a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/utils/DependencyVersionMap.java
-+++ b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/utils/DependencyVersionMap.java
-@@ -26,8 +26,8 @@ import java.util.Map;
-
- import org.apache.maven.artifact.Artifact;
- import org.apache.maven.plugin.logging.Log;
--import org.apache.maven.shared.dependency.tree.DependencyNode;
--import org.apache.maven.shared.dependency.tree.traversal.DependencyNodeVisitor;
-+import org.apache.maven.shared.dependency.graph.DependencyNode;
-+import org.apache.maven.shared.dependency.graph.traversal.DependencyNodeVisitor;
-
- /**
- * @author Brian Fox
-@@ -132,4 +132,4 @@ public class DependencyVersionMap
- }
- return output;
- }
--}
-\ No newline at end of file
-+}
---
-2.24.1
-
diff --git a/gnu/packages/patches/mescc-tools-boot.patch b/gnu/packages/patches/mescc-tools-boot.patch
deleted file mode 100644
index 2bce8a49c2..0000000000
--- a/gnu/packages/patches/mescc-tools-boot.patch
+++ /dev/null
@@ -1,222 +0,0 @@
-From c184e95096881a13f29ebd7fc507fe305d3d8de5 Mon Sep 17 00:00:00 2001
-From: Jan Nieuwenhuizen <janneke@gnu.org>
-Date: Thu, 4 Oct 2018 22:03:31 +0200
-Subject: [PATCH] build.sh: Update for mes 0.18.
-
----
- build.sh | 92 +++++++++++++++++++++++++++++++++++++-----------------
- install.sh | 6 ++--
- 2 files changed, 66 insertions(+), 32 deletions(-)
-
-diff --git a/build.sh b/build.sh
-index 335a7bb..19a0029 100755
---- a/build.sh
-+++ b/build.sh
-@@ -18,7 +18,8 @@
- # along with mescc-tools. If not, see <http://www.gnu.org/licenses/>.
-
- set -eux
--MES_SEED=${MES_SEED-../mescc-tools-seed/libs}
-+MES_PREFIX=${MES_PREFIX-../mes}
-+MES_SEED=${MES_SEED-../mes-seed}
- MESCC_TOOLS_SEED=${MESCC_TOOLS_SEED-../mescc-tools-seed}
-
- #########################################
-@@ -32,15 +33,23 @@ MESCC_TOOLS_SEED=${MESCC_TOOLS_SEED-../mescc-tools-seed}
- # blood-elf
- # Create proper debug segment
- $MESCC_TOOLS_SEED/blood-elf\
-+ -f $MESCC_TOOLS_SEED/file_print.M1\
-+ -f $MESCC_TOOLS_SEED/match.M1\
-+ -f $MESCC_TOOLS_SEED/numerate_number.M1\
-+ -f $MESCC_TOOLS_SEED/string.M1\
- -f $MESCC_TOOLS_SEED/blood-elf.M1\
- -o blood-elf-blood-elf-footer.M1
-
- # Build
- # M1-macro phase
- $MESCC_TOOLS_SEED/M1 --LittleEndian --Architecture 1\
-- -f $MES_SEED/x86.M1\
-- -f $MES_SEED/crt1.M1\
-- -f $MES_SEED/libc+tcc-mes.M1\
-+ -f $MES_PREFIX/lib/x86-mes/x86.M1\
-+ -f $MES_SEED/x86-mes/crt1.S\
-+ -f $MES_SEED/x86-mes/libc+tcc.S\
-+ -f $MESCC_TOOLS_SEED/file_print.M1\
-+ -f $MESCC_TOOLS_SEED/match.M1\
-+ -f $MESCC_TOOLS_SEED/numerate_number.M1\
-+ -f $MESCC_TOOLS_SEED/string.M1\
- -f $MESCC_TOOLS_SEED/blood-elf.M1\
- -f blood-elf-blood-elf-footer.M1\
- -o blood-elf.hex2
-@@ -49,7 +58,7 @@ $MESCC_TOOLS_SEED/hex2\
- --LittleEndian\
- --Architecture 1\
- --BaseAddress 0x1000000\
-- -f $MES_SEED/elf32-header.hex2\
-+ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\
- -f blood-elf.hex2\
- --exec_enable\
- -o bin/blood-elf
-@@ -65,9 +74,13 @@ $MESCC_TOOLS_SEED/hex2\
- $MESCC_TOOLS_SEED/M1 \
- --LittleEndian\
- --Architecture 1\
-- -f $MES_SEED/x86.M1\
-- -f $MES_SEED/crt1.M1\
-- -f $MES_SEED/libc+tcc-mes.M1\
-+ -f $MES_PREFIX/lib/x86-mes/x86.M1\
-+ -f $MES_SEED/x86-mes/crt1.S\
-+ -f $MES_SEED/x86-mes/libc+tcc.S\
-+ -f $MESCC_TOOLS_SEED/file_print.M1\
-+ -f $MESCC_TOOLS_SEED/match.M1\
-+ -f $MESCC_TOOLS_SEED/numerate_number.M1\
-+ -f $MESCC_TOOLS_SEED/string.M1\
- -f $MESCC_TOOLS_SEED/M1.M1\
- -f M1-footer.M1\
- -o M1.hex2
-@@ -76,7 +89,7 @@ $MESCC_TOOLS_SEED/hex2 \
- --LittleEndian\
- --Architecture 1\
- --BaseAddress 0x1000000\
-- -f $MES_SEED/elf32-header.hex2\
-+ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\
- -f M1.hex2\
- --exec_enable\
- -o bin/M1
-@@ -92,9 +105,13 @@ $MESCC_TOOLS_SEED/hex2 \
- ./bin/M1 \
- --LittleEndian\
- --Architecture 1\
-- -f $MES_SEED/x86.M1\
-- -f $MES_SEED/crt1.M1\
-- -f $MES_SEED/libc+tcc-mes.M1\
-+ -f $MES_PREFIX/lib/x86-mes/x86.M1\
-+ -f $MES_SEED/x86-mes/crt1.S\
-+ -f $MES_SEED/x86-mes/libc+tcc.S\
-+ -f $MESCC_TOOLS_SEED/file_print.M1\
-+ -f $MESCC_TOOLS_SEED/match.M1\
-+ -f $MESCC_TOOLS_SEED/numerate_number.M1\
-+ -f $MESCC_TOOLS_SEED/string.M1\
- -f $MESCC_TOOLS_SEED/hex2.M1\
- -f hex2-footer.M1\
- -o hex2.hex2
-@@ -103,10 +120,10 @@ $MESCC_TOOLS_SEED/hex2 \
- --LittleEndian\
- --Architecture 1\
- --BaseAddress 0x1000000\
-- -f $MES_SEED/elf32-header.hex2\
-+ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\
- -f hex2.hex2\
- --exec_enable\
-- -o bin/hex2
-+ -o bin/hex2-0
-
- #########################
- # Phase-1 Self-host #
-@@ -123,18 +140,22 @@ $MESCC_TOOLS_SEED/hex2 \
- ./bin/M1 \
- --LittleEndian\
- --Architecture 1\
-- -f $MES_SEED/x86.M1\
-- -f $MES_SEED/crt1.M1\
-- -f $MES_SEED/libc+tcc-mes.M1\
-+ -f $MES_PREFIX/lib/x86-mes/x86.M1\
-+ -f $MES_SEED/x86-mes/crt1.S\
-+ -f $MES_SEED/x86-mes/libc+tcc.S\
-+ -f $MESCC_TOOLS_SEED/file_print.M1\
-+ -f $MESCC_TOOLS_SEED/match.M1\
-+ -f $MESCC_TOOLS_SEED/numerate_number.M1\
-+ -f $MESCC_TOOLS_SEED/string.M1\
- -f $MESCC_TOOLS_SEED/blood-elf.M1\
- -f blood-elf-blood-elf-footer.M1\
- -o blood-elf.hex2
- # Hex2-linker phase
--./bin/hex2 \
-+./bin/hex2-0 \
- --LittleEndian\
- --Architecture 1\
- --BaseAddress 0x1000000\
-- -f $MES_SEED/elf32-header.hex2\
-+ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\
- -f blood-elf.hex2\
- --exec_enable\
- -o blood-elf
-@@ -150,18 +171,22 @@ $MESCC_TOOLS_SEED/hex2 \
- ./bin/M1 \
- --LittleEndian\
- --Architecture 1\
-- -f $MES_SEED/x86.M1\
-- -f $MES_SEED/crt1.M1\
-- -f $MES_SEED/libc+tcc-mes.M1\
-+ -f $MES_PREFIX/lib/x86-mes/x86.M1\
-+ -f $MES_SEED/x86-mes/crt1.S\
-+ -f $MES_SEED/x86-mes/libc+tcc.S\
-+ -f $MESCC_TOOLS_SEED/file_print.M1\
-+ -f $MESCC_TOOLS_SEED/match.M1\
-+ -f $MESCC_TOOLS_SEED/numerate_number.M1\
-+ -f $MESCC_TOOLS_SEED/string.M1\
- -f $MESCC_TOOLS_SEED/M1.M1\
- -f M1-footer.M1\
- -o M1.hex2
- # Hex2-linker phase
--./bin/hex2 \
-+./bin/hex2-0 \
- --LittleEndian\
- --Architecture 1\
- --BaseAddress 0x1000000\
-- -f $MES_SEED/elf32-header.hex2\
-+ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\
- -f M1.hex2\
- --exec_enable\
- -o bin/M1
-@@ -177,18 +202,27 @@ $MESCC_TOOLS_SEED/hex2 \
- ./bin/M1 \
- --LittleEndian\
- --Architecture 1\
-- -f $MES_SEED/x86.M1\
-- -f $MES_SEED/crt1.M1\
-- -f $MES_SEED/libc+tcc-mes.M1\
-+ -f $MES_PREFIX/lib/x86-mes/x86.M1\
-+ -f $MES_SEED/x86-mes/crt1.S\
-+ -f $MES_SEED/x86-mes/libc+tcc.S\
-+ -f $MESCC_TOOLS_SEED/file_print.M1\
-+ -f $MESCC_TOOLS_SEED/match.M1\
-+ -f $MESCC_TOOLS_SEED/numerate_number.M1\
-+ -f $MESCC_TOOLS_SEED/string.M1\
- -f $MESCC_TOOLS_SEED/hex2.M1\
- -f hex2-footer.M1\
- -o hex2.hex2
- # Hex2-linker phase
--./bin/hex2 \
-+./bin/hex2-0 \
- --LittleEndian\
- --Architecture 1\
- --BaseAddress 0x1000000\
-- -f $MES_SEED/elf32-header.hex2\
-+ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\
- -f hex2.hex2\
- --exec_enable\
- -o bin/hex2
-+
-+# TODO
-+touch bin/exec_enable
-+touch bin/get_machine
-+touch bin/kaem
-diff --git a/install.sh b/install.sh
-index e4dccff..29e58d6 100644
---- a/install.sh
-+++ b/install.sh
-@@ -18,6 +18,6 @@
- PREFIX=${PREFIX-usr}
-
- mkdir -p "$PREFIX/bin"
--cp blood-elf "$PREFIX/bin/blood-elf"
--cp hex2 "$PREFIX/bin/hex2"
--cp M1 "$PREFIX/bin/M1"
-+cp bin/blood-elf "$PREFIX/bin/blood-elf"
-+cp bin/hex2 "$PREFIX/bin/hex2"
-+cp bin/M1 "$PREFIX/bin/M1"
---
-2.18.0
-
diff --git a/gnu/packages/patches/nettle-3.5-CVE-2021-3580-pt1.patch b/gnu/packages/patches/nettle-3.5-CVE-2021-3580-pt1.patch
deleted file mode 100644
index 4343c87795..0000000000
--- a/gnu/packages/patches/nettle-3.5-CVE-2021-3580-pt1.patch
+++ /dev/null
@@ -1,276 +0,0 @@
-Copied from upstream nettle git repository.
-Removed changes to ChangeLog, to allow this patch to apply to nettle-3.5.
-
-From 485b5e2820a057e873b1ba812fdb39cae4adf98c Mon Sep 17 00:00:00 2001
-From: Niels Möller <nisse@lysator.liu.se>
-Date: Mon, 17 May 2021 20:55:26 +0200
-Subject: [PATCH 1/2] Change _rsa_sec_compute_root_tr to take a fix input size.
-
-Improves consistency with _rsa_sec_compute_root, and fixes zero-input bug.
----
- ChangeLog | 15 +++++++++
- rsa-decrypt-tr.c | 7 ++---
- rsa-internal.h | 4 +--
- rsa-sec-decrypt.c | 9 ++++--
- rsa-sign-tr.c | 61 +++++++++++++++++-------------------
- testsuite/rsa-encrypt-test.c | 14 ++++++++-
- 6 files changed, 68 insertions(+), 42 deletions(-)
-
-diff --git a/rsa-decrypt-tr.c b/rsa-decrypt-tr.c
-index 0224c0b7..927a8915 100644
---- a/rsa-decrypt-tr.c
-+++ b/rsa-decrypt-tr.c
-@@ -52,14 +52,13 @@ rsa_decrypt_tr(const struct rsa_public_key *pub,
- mp_size_t key_limb_size;
- int res;
-
-- key_limb_size = NETTLE_OCTET_SIZE_TO_LIMB_SIZE(key->size);
-+ key_limb_size = mpz_size(pub->n);
-
- TMP_GMP_ALLOC (m, key_limb_size);
- TMP_GMP_ALLOC (em, key->size);
-+ mpz_limbs_copy(m, gibberish, key_limb_size);
-
-- res = _rsa_sec_compute_root_tr (pub, key, random_ctx, random, m,
-- mpz_limbs_read(gibberish),
-- mpz_size(gibberish));
-+ res = _rsa_sec_compute_root_tr (pub, key, random_ctx, random, m, m);
-
- mpn_get_base256 (em, key->size, m, key_limb_size);
-
-diff --git a/rsa-internal.h b/rsa-internal.h
-index b828e451..f66a7df0 100644
---- a/rsa-internal.h
-+++ b/rsa-internal.h
-@@ -78,11 +78,11 @@ _rsa_sec_compute_root(const struct rsa_private_key *key,
- mp_limb_t *scratch);
-
- /* Safe side-channel silent variant, using RSA blinding, and checking the
-- * result after CRT. */
-+ * result after CRT. In-place calls, with x == m, is allowed. */
- int
- _rsa_sec_compute_root_tr(const struct rsa_public_key *pub,
- const struct rsa_private_key *key,
- void *random_ctx, nettle_random_func *random,
-- mp_limb_t *x, const mp_limb_t *m, size_t mn);
-+ mp_limb_t *x, const mp_limb_t *m);
-
- #endif /* NETTLE_RSA_INTERNAL_H_INCLUDED */
-diff --git a/rsa-sec-decrypt.c b/rsa-sec-decrypt.c
-index 6866e7c8..fc4757a0 100644
---- a/rsa-sec-decrypt.c
-+++ b/rsa-sec-decrypt.c
-@@ -58,9 +58,12 @@ rsa_sec_decrypt(const struct rsa_public_key *pub,
- TMP_GMP_ALLOC (m, mpz_size(pub->n));
- TMP_GMP_ALLOC (em, key->size);
-
-- res = _rsa_sec_compute_root_tr (pub, key, random_ctx, random, m,
-- mpz_limbs_read(gibberish),
-- mpz_size(gibberish));
-+ /* We need a copy because m can be shorter than key_size,
-+ * but _rsa_sec_compute_root_tr expect all inputs to be
-+ * normalized to a key_size long buffer length */
-+ mpz_limbs_copy(m, gibberish, mpz_size(pub->n));
-+
-+ res = _rsa_sec_compute_root_tr (pub, key, random_ctx, random, m, m);
-
- mpn_get_base256 (em, key->size, m, mpz_size(pub->n));
-
-diff --git a/rsa-sign-tr.c b/rsa-sign-tr.c
-index f824c4ca..9e137c7a 100644
---- a/rsa-sign-tr.c
-+++ b/rsa-sign-tr.c
-@@ -131,35 +131,34 @@ int
- _rsa_sec_compute_root_tr(const struct rsa_public_key *pub,
- const struct rsa_private_key *key,
- void *random_ctx, nettle_random_func *random,
-- mp_limb_t *x, const mp_limb_t *m, size_t mn)
-+ mp_limb_t *x, const mp_limb_t *m)
- {
-+ mp_size_t nn;
- mpz_t mz;
- mpz_t xz;
- int res;
-
-- mpz_init(mz);
- mpz_init(xz);
-
-- mpn_copyi(mpz_limbs_write(mz, mn), m, mn);
-- mpz_limbs_finish(mz, mn);
-+ nn = mpz_size (pub->n);
-
-- res = rsa_compute_root_tr(pub, key, random_ctx, random, xz, mz);
-+ res = rsa_compute_root_tr(pub, key, random_ctx, random, xz,
-+ mpz_roinit_n(mz, m, nn));
-
- if (res)
-- mpz_limbs_copy(x, xz, mpz_size(pub->n));
-+ mpz_limbs_copy(x, xz, nn);
-
-- mpz_clear(mz);
- mpz_clear(xz);
- return res;
- }
- #else
- /* Blinds m, by computing c = m r^e (mod n), for a random r. Also
-- returns the inverse (ri), for use by rsa_unblind. */
-+ returns the inverse (ri), for use by rsa_unblind. Must have c != m,
-+ no in-place operation.*/
- static void
- rsa_sec_blind (const struct rsa_public_key *pub,
- void *random_ctx, nettle_random_func *random,
-- mp_limb_t *c, mp_limb_t *ri, const mp_limb_t *m,
-- mp_size_t mn)
-+ mp_limb_t *c, mp_limb_t *ri, const mp_limb_t *m)
- {
- const mp_limb_t *ep = mpz_limbs_read (pub->e);
- const mp_limb_t *np = mpz_limbs_read (pub->n);
-@@ -177,15 +176,15 @@ rsa_sec_blind (const struct rsa_public_key *pub,
-
- /* c = m*(r^e) mod n */
- itch = mpn_sec_powm_itch(nn, ebn, nn);
-- i2 = mpn_sec_mul_itch(nn, mn);
-+ i2 = mpn_sec_mul_itch(nn, nn);
- itch = MAX(itch, i2);
-- i2 = mpn_sec_div_r_itch(nn + mn, nn);
-+ i2 = mpn_sec_div_r_itch(2*nn, nn);
- itch = MAX(itch, i2);
- i2 = mpn_sec_invert_itch(nn);
- itch = MAX(itch, i2);
-
-- TMP_GMP_ALLOC (tp, nn + mn + itch);
-- scratch = tp + nn + mn;
-+ TMP_GMP_ALLOC (tp, 2*nn + itch);
-+ scratch = tp + 2*nn;
-
- /* ri = r^(-1) */
- do
-@@ -198,9 +197,8 @@ rsa_sec_blind (const struct rsa_public_key *pub,
- while (!mpn_sec_invert (ri, tp, np, nn, 2 * nn * GMP_NUMB_BITS, scratch));
-
- mpn_sec_powm (c, rp, nn, ep, ebn, np, nn, scratch);
-- /* normally mn == nn, but m can be smaller in some cases */
-- mpn_sec_mul (tp, c, nn, m, mn, scratch);
-- mpn_sec_div_r (tp, nn + mn, np, nn, scratch);
-+ mpn_sec_mul (tp, c, nn, m, nn, scratch);
-+ mpn_sec_div_r (tp, 2*nn, np, nn, scratch);
- mpn_copyi(c, tp, nn);
-
- TMP_GMP_FREE (r);
-@@ -208,7 +206,7 @@ rsa_sec_blind (const struct rsa_public_key *pub,
- TMP_GMP_FREE (tp);
- }
-
--/* m = c ri mod n */
-+/* m = c ri mod n. Allows x == c. */
- static void
- rsa_sec_unblind (const struct rsa_public_key *pub,
- mp_limb_t *x, mp_limb_t *ri, const mp_limb_t *c)
-@@ -299,7 +297,7 @@ int
- _rsa_sec_compute_root_tr(const struct rsa_public_key *pub,
- const struct rsa_private_key *key,
- void *random_ctx, nettle_random_func *random,
-- mp_limb_t *x, const mp_limb_t *m, size_t mn)
-+ mp_limb_t *x, const mp_limb_t *m)
- {
- TMP_GMP_DECL (c, mp_limb_t);
- TMP_GMP_DECL (ri, mp_limb_t);
-@@ -307,7 +305,7 @@ _rsa_sec_compute_root_tr(const struct rsa_public_key *pub,
- size_t key_limb_size;
- int ret;
-
-- key_limb_size = NETTLE_OCTET_SIZE_TO_LIMB_SIZE(key->size);
-+ key_limb_size = mpz_size(pub->n);
-
- /* mpz_powm_sec handles only odd moduli. If p, q or n is even, the
- key is invalid and rejected by rsa_private_key_prepare. However,
-@@ -321,19 +319,18 @@ _rsa_sec_compute_root_tr(const struct rsa_public_key *pub,
- }
-
- assert(mpz_size(pub->n) == key_limb_size);
-- assert(mn <= key_limb_size);
-
- TMP_GMP_ALLOC (c, key_limb_size);
- TMP_GMP_ALLOC (ri, key_limb_size);
- TMP_GMP_ALLOC (scratch, _rsa_sec_compute_root_itch(key));
-
-- rsa_sec_blind (pub, random_ctx, random, x, ri, m, mn);
-+ rsa_sec_blind (pub, random_ctx, random, c, ri, m);
-
-- _rsa_sec_compute_root(key, c, x, scratch);
-+ _rsa_sec_compute_root(key, x, c, scratch);
-
-- ret = rsa_sec_check_root(pub, c, x);
-+ ret = rsa_sec_check_root(pub, x, c);
-
-- rsa_sec_unblind(pub, x, ri, c);
-+ rsa_sec_unblind(pub, x, ri, x);
-
- cnd_mpn_zero(1 - ret, x, key_limb_size);
-
-@@ -357,17 +354,17 @@ rsa_compute_root_tr(const struct rsa_public_key *pub,
- mpz_t x, const mpz_t m)
- {
- TMP_GMP_DECL (l, mp_limb_t);
-+ mp_size_t nn = mpz_size(pub->n);
- int res;
-
-- mp_size_t l_size = NETTLE_OCTET_SIZE_TO_LIMB_SIZE(key->size);
-- TMP_GMP_ALLOC (l, l_size);
-+ TMP_GMP_ALLOC (l, nn);
-+ mpz_limbs_copy(l, m, nn);
-
-- res = _rsa_sec_compute_root_tr (pub, key, random_ctx, random, l,
-- mpz_limbs_read(m), mpz_size(m));
-+ res = _rsa_sec_compute_root_tr (pub, key, random_ctx, random, l, l);
- if (res) {
-- mp_limb_t *xp = mpz_limbs_write (x, l_size);
-- mpn_copyi (xp, l, l_size);
-- mpz_limbs_finish (x, l_size);
-+ mp_limb_t *xp = mpz_limbs_write (x, nn);
-+ mpn_copyi (xp, l, nn);
-+ mpz_limbs_finish (x, nn);
- }
-
- TMP_GMP_FREE (l);
-diff --git a/testsuite/rsa-encrypt-test.c b/testsuite/rsa-encrypt-test.c
-index 87525f78..d3bc374b 100644
---- a/testsuite/rsa-encrypt-test.c
-+++ b/testsuite/rsa-encrypt-test.c
-@@ -19,6 +19,7 @@ test_main(void)
- uint8_t after;
-
- mpz_t gibberish;
-+ mpz_t zero;
-
- rsa_private_key_init(&key);
- rsa_public_key_init(&pub);
-@@ -101,6 +102,17 @@ test_main(void)
- ASSERT(decrypted[decrypted_length] == after);
- ASSERT(decrypted[0] == 'A');
-
-+ /* Test zero input. */
-+ mpz_init_set_ui (zero, 0);
-+ decrypted_length = msg_length;
-+ ASSERT(!rsa_decrypt(&key, &decrypted_length, decrypted, zero));
-+ ASSERT(!rsa_decrypt_tr(&pub, &key,
-+ &lfib, (nettle_random_func *) knuth_lfib_random,
-+ &decrypted_length, decrypted, zero));
-+ ASSERT(!rsa_sec_decrypt(&pub, &key,
-+ &lfib, (nettle_random_func *) knuth_lfib_random,
-+ decrypted_length, decrypted, zero));
-+ ASSERT(decrypted_length == msg_length);
-
- /* Test invalid key. */
- mpz_add_ui (key.q, key.q, 2);
-@@ -112,6 +124,6 @@ test_main(void)
- rsa_private_key_clear(&key);
- rsa_public_key_clear(&pub);
- mpz_clear(gibberish);
-+ mpz_clear(zero);
- free(decrypted);
- }
--
---
-2.31.1
-
diff --git a/gnu/packages/patches/nettle-3.5-CVE-2021-3580-pt2.patch b/gnu/packages/patches/nettle-3.5-CVE-2021-3580-pt2.patch
deleted file mode 100644
index 5f19bd80d3..0000000000
--- a/gnu/packages/patches/nettle-3.5-CVE-2021-3580-pt2.patch
+++ /dev/null
@@ -1,163 +0,0 @@
-Copied from upstream nettle git repository.
-Removed changes to ChangeLog, to allow this patch to apply to nettle-3.5.
-
-From 0ad0b5df315665250dfdaa4a1e087f4799edaefe Mon Sep 17 00:00:00 2001
-From: Niels Möller <nisse@lysator.liu.se>
-Date: Mon, 17 May 2021 22:02:47 +0200
-Subject: [PATCH 2/2] Add input check to rsa_decrypt family of functions.
-
----
- ChangeLog | 8 ++++++++
- rsa-decrypt-tr.c | 4 ++++
- rsa-decrypt.c | 10 ++++++++++
- rsa-sec-decrypt.c | 4 ++++
- rsa.h | 5 +++--
- testsuite/rsa-encrypt-test.c | 38 ++++++++++++++++++++++++++++++------
- 6 files changed, 61 insertions(+), 8 deletions(-)
-
-diff --git a/rsa-decrypt-tr.c b/rsa-decrypt-tr.c
-index 927a8915..4a9e9d74 100644
---- a/rsa-decrypt-tr.c
-+++ b/rsa-decrypt-tr.c
-@@ -52,6 +52,10 @@ rsa_decrypt_tr(const struct rsa_public_key *pub,
- mp_size_t key_limb_size;
- int res;
-
-+ /* First check that input is in range. */
-+ if (mpz_sgn (gibberish) < 0 || mpz_cmp (gibberish, pub->n) >= 0)
-+ return 0;
-+
- key_limb_size = mpz_size(pub->n);
-
- TMP_GMP_ALLOC (m, key_limb_size);
-diff --git a/rsa-decrypt.c b/rsa-decrypt.c
-index 7681439d..540d8baa 100644
---- a/rsa-decrypt.c
-+++ b/rsa-decrypt.c
-@@ -48,6 +48,16 @@ rsa_decrypt(const struct rsa_private_key *key,
- int res;
-
- mpz_init(m);
-+
-+ /* First check that input is in range. Since we don't have the
-+ public key available here, we need to reconstruct n. */
-+ mpz_mul (m, key->p, key->q);
-+ if (mpz_sgn (gibberish) < 0 || mpz_cmp (gibberish, m) >= 0)
-+ {
-+ mpz_clear (m);
-+ return 0;
-+ }
-+
- rsa_compute_root(key, m, gibberish);
-
- res = pkcs1_decrypt (key->size, m, length, message);
-diff --git a/rsa-sec-decrypt.c b/rsa-sec-decrypt.c
-index fc4757a0..4c98958d 100644
---- a/rsa-sec-decrypt.c
-+++ b/rsa-sec-decrypt.c
-@@ -55,6 +55,10 @@ rsa_sec_decrypt(const struct rsa_public_key *pub,
- TMP_GMP_DECL (em, uint8_t);
- int res;
-
-+ /* First check that input is in range. */
-+ if (mpz_sgn (gibberish) < 0 || mpz_cmp (gibberish, pub->n) >= 0)
-+ return 0;
-+
- TMP_GMP_ALLOC (m, mpz_size(pub->n));
- TMP_GMP_ALLOC (em, key->size);
-
-diff --git a/rsa.h b/rsa.h
-index 3b10155f..2dd35a2d 100644
---- a/rsa.h
-+++ b/rsa.h
-@@ -428,13 +428,14 @@ rsa_sec_decrypt(const struct rsa_public_key *pub,
- size_t length, uint8_t *message,
- const mpz_t gibberish);
-
--/* Compute x, the e:th root of m. Calling it with x == m is allowed. */
-+/* Compute x, the e:th root of m. Calling it with x == m is allowed.
-+ It is required that 0 <= m < n. */
- void
- rsa_compute_root(const struct rsa_private_key *key,
- mpz_t x, const mpz_t m);
-
- /* Safer variant, using RSA blinding, and checking the result after
-- CRT. */
-+ CRT. It is required that 0 <= m < n. */
- int
- rsa_compute_root_tr(const struct rsa_public_key *pub,
- const struct rsa_private_key *key,
-diff --git a/testsuite/rsa-encrypt-test.c b/testsuite/rsa-encrypt-test.c
-index d3bc374b..d1a440f6 100644
---- a/testsuite/rsa-encrypt-test.c
-+++ b/testsuite/rsa-encrypt-test.c
-@@ -19,11 +19,12 @@ test_main(void)
- uint8_t after;
-
- mpz_t gibberish;
-- mpz_t zero;
-+ mpz_t bad_input;
-
- rsa_private_key_init(&key);
- rsa_public_key_init(&pub);
- mpz_init(gibberish);
-+ mpz_init(bad_input);
-
- knuth_lfib_init(&lfib, 17);
-
-@@ -103,15 +104,40 @@ test_main(void)
- ASSERT(decrypted[0] == 'A');
-
- /* Test zero input. */
-- mpz_init_set_ui (zero, 0);
-+ mpz_set_ui (bad_input, 0);
- decrypted_length = msg_length;
-- ASSERT(!rsa_decrypt(&key, &decrypted_length, decrypted, zero));
-+ ASSERT(!rsa_decrypt(&key, &decrypted_length, decrypted, bad_input));
- ASSERT(!rsa_decrypt_tr(&pub, &key,
- &lfib, (nettle_random_func *) knuth_lfib_random,
-- &decrypted_length, decrypted, zero));
-+ &decrypted_length, decrypted, bad_input));
- ASSERT(!rsa_sec_decrypt(&pub, &key,
- &lfib, (nettle_random_func *) knuth_lfib_random,
-- decrypted_length, decrypted, zero));
-+ decrypted_length, decrypted, bad_input));
-+ ASSERT(decrypted_length == msg_length);
-+
-+ /* Test input that is slightly larger than n */
-+ mpz_add(bad_input, gibberish, pub.n);
-+ decrypted_length = msg_length;
-+ ASSERT(!rsa_decrypt(&key, &decrypted_length, decrypted, bad_input));
-+ ASSERT(!rsa_decrypt_tr(&pub, &key,
-+ &lfib, (nettle_random_func *) knuth_lfib_random,
-+ &decrypted_length, decrypted, bad_input));
-+ ASSERT(!rsa_sec_decrypt(&pub, &key,
-+ &lfib, (nettle_random_func *) knuth_lfib_random,
-+ decrypted_length, decrypted, bad_input));
-+ ASSERT(decrypted_length == msg_length);
-+
-+ /* Test input that is considerably larger than n */
-+ mpz_mul_2exp (bad_input, pub.n, 100);
-+ mpz_add (bad_input, bad_input, gibberish);
-+ decrypted_length = msg_length;
-+ ASSERT(!rsa_decrypt(&key, &decrypted_length, decrypted, bad_input));
-+ ASSERT(!rsa_decrypt_tr(&pub, &key,
-+ &lfib, (nettle_random_func *) knuth_lfib_random,
-+ &decrypted_length, decrypted, bad_input));
-+ ASSERT(!rsa_sec_decrypt(&pub, &key,
-+ &lfib, (nettle_random_func *) knuth_lfib_random,
-+ decrypted_length, decrypted, bad_input));
- ASSERT(decrypted_length == msg_length);
-
- /* Test invalid key. */
-@@ -124,6 +150,6 @@ test_main(void)
- rsa_private_key_clear(&key);
- rsa_public_key_clear(&pub);
- mpz_clear(gibberish);
-- mpz_clear(zero);
-+ mpz_clear(bad_input);
- free(decrypted);
- }
---
-2.31.1
-
diff --git a/gnu/packages/patches/nettle-3.5-check-_pkcs1_sec_decrypt-msg-len.patch b/gnu/packages/patches/nettle-3.5-check-_pkcs1_sec_decrypt-msg-len.patch
deleted file mode 100644
index 297816e698..0000000000
--- a/gnu/packages/patches/nettle-3.5-check-_pkcs1_sec_decrypt-msg-len.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-Copied from upstream nettle git repository.
-Removed changes to ChangeLog, to allow this patch to apply to nettle-3.5.
-
-From 7616541e6eff73353bf682c62e3a68e4fe696707 Mon Sep 17 00:00:00 2001
-From: Niels Möller <nisse@lysator.liu.se>
-Date: Thu, 6 May 2021 21:29:56 +0200
-Subject: [PATCH] Add check that message length to _pkcs1_sec_decrypt is valid.
-
-* pkcs1-sec-decrypt.c (_pkcs1_sec_decrypt): Check that message
-length is valid, for given key size.
-* testsuite/rsa-sec-decrypt-test.c (test_main): Add test cases for
-calls to rsa_sec_decrypt specifying a too large message length.
----
- ChangeLog | 7 +++++++
- pkcs1-sec-decrypt.c | 4 +++-
- testsuite/rsa-sec-decrypt-test.c | 17 ++++++++++++++++-
- 3 files changed, 26 insertions(+), 2 deletions(-)
-
-diff --git a/pkcs1-sec-decrypt.c b/pkcs1-sec-decrypt.c
-index 4f13080e..16833691 100644
---- a/pkcs1-sec-decrypt.c
-+++ b/pkcs1-sec-decrypt.c
-@@ -63,7 +63,9 @@ _pkcs1_sec_decrypt (size_t length, uint8_t *message,
- volatile int ok;
- size_t i, t;
-
-- assert (padded_message_length >= length);
-+ /* Message independent branch */
-+ if (length + 11 > padded_message_length)
-+ return 0;
-
- t = padded_message_length - length - 1;
-
-diff --git a/testsuite/rsa-sec-decrypt-test.c b/testsuite/rsa-sec-decrypt-test.c
-index fb0ed3a1..3419322e 100644
---- a/testsuite/rsa-sec-decrypt-test.c
-+++ b/testsuite/rsa-sec-decrypt-test.c
-@@ -55,6 +55,7 @@ rsa_decrypt_for_test(const struct rsa_public_key *pub,
- #endif
-
- #define PAYLOAD_SIZE 50
-+#define DECRYPTED_SIZE 256
- void
- test_main(void)
- {
-@@ -63,7 +64,7 @@ test_main(void)
- struct knuth_lfib_ctx random_ctx;
-
- uint8_t plaintext[PAYLOAD_SIZE];
-- uint8_t decrypted[PAYLOAD_SIZE];
-+ uint8_t decrypted[DECRYPTED_SIZE];
- uint8_t verifybad[PAYLOAD_SIZE];
- unsigned n_size = 1024;
- mpz_t gibberish;
-@@ -99,6 +100,20 @@ test_main(void)
- PAYLOAD_SIZE, decrypted, gibberish) == 1);
- ASSERT (MEMEQ (PAYLOAD_SIZE, plaintext, decrypted));
-
-+ ASSERT (pub.size > 10);
-+ ASSERT (pub.size <= DECRYPTED_SIZE);
-+
-+ /* Check that too large message length is rejected, largest
-+ valid size is pub.size - 11. */
-+ ASSERT (!rsa_decrypt_for_test (&pub, &key, &random_ctx,
-+ (nettle_random_func *) knuth_lfib_random,
-+ pub.size - 10, decrypted, gibberish));
-+
-+ /* This case used to result in arithmetic underflow and a crash. */
-+ ASSERT (!rsa_decrypt_for_test (&pub, &key, &random_ctx,
-+ (nettle_random_func *) knuth_lfib_random,
-+ pub.size, decrypted, gibberish));
-+
- /* bad one */
- memcpy(decrypted, verifybad, PAYLOAD_SIZE);
- nettle_mpz_random_size(garbage, &random_ctx,
---
-2.31.1
-
diff --git a/gnu/packages/patches/nhc98-c-update.patch b/gnu/packages/patches/nhc98-c-update.patch
new file mode 100644
index 0000000000..06e6928d14
--- /dev/null
+++ b/gnu/packages/patches/nhc98-c-update.patch
@@ -0,0 +1,42 @@
+This patch provides an update so that nhc98 can be built and works with
+a modern C compiler (GCC 11) and libc (glibc 2.33).
+
+diff --git a/Makefile.inc b/Makefile.inc
+index 4fbd47a..5bce5c9 100644
+--- a/Makefile.inc
++++ b/Makefile.inc
+@@ -1,6 +1,10 @@
+ ### Configurable variables:
+
+-OPT = -O3
++# We want C89 semantics plus C++-style comments and things like the
++# 'setjmp_buf' and 'u_short' types. More importantly, build with '-O1'
++# only to avoid modern optimizations that break the code.
++OPT = -O1 -std=gnu89 -D_GNU_SOURCE=1
++
+ #ARCH = -m32
+ ARCH =
+
+diff --git a/script/nhc98heap.c b/script/nhc98heap.c
+index 534010e..a30d5cd 100644
+--- a/script/nhc98heap.c
++++ b/script/nhc98heap.c
+@@ -1,5 +1,6 @@
+ #include <stdlib.h>
+ #include <stdio.h>
++#include <ctype.h>
+ main(int argc, char **argv)
+ {
+ int prefix = 1;
+diff --git a/src/runtime/Kernel/collector.c b/src/runtime/Kernel/collector.c
+index b95a273..1f879c5 100644
+--- a/src/runtime/Kernel/collector.c
++++ b/src/runtime/Kernel/collector.c
+@@ -2,6 +2,7 @@
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
++#include <unistd.h>
+ #include "node.h"
+ /*#include "newmacros.h" -- already included in node.h */
+ /*#include "runtime.h" -- already included in node.h */
diff --git a/gnu/packages/patches/ocaml-Add-a-.file-directive.patch b/gnu/packages/patches/ocaml-Add-a-.file-directive.patch
deleted file mode 100644
index 07842e9c32..0000000000
--- a/gnu/packages/patches/ocaml-Add-a-.file-directive.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From: Stephane Glondu <steph@glondu.net>
-Date: Sun, 16 Aug 2015 20:59:14 +0200
-Subject: Add a .file directive to generated .s files
-
-When no .file directive is given, the toolchain records the filename
-of the .o file, which is sometimes random, making generated objects
-non-deterministic.
-
-We use Location.input_name for adding .file directives to assembly
-files. Note: when the file is preprocessed, this reference holds the
-name of the temporary file. Hence, files compiled with -pp are still
-not deterministic.
-
-Bug-Debian: https://bugs.debian.org/795784
-Bug-Debian: https://bugs.debian.org/796336
----
- asmcomp/amd64/emit.mlp | 1 +
- asmcomp/arm/emit.mlp | 1 +
- asmcomp/arm64/emit.mlp | 1 +
- asmcomp/i386/emit.mlp | 1 +
- asmcomp/power/emit.mlp | 1 +
- asmcomp/sparc/emit.mlp | 1 +
- 6 files changed, 6 insertions(+)
-
-diff --git a/asmcomp/amd64/emit.mlp b/asmcomp/amd64/emit.mlp
-index d56d0f5..4d7aa30 100644
---- a/asmcomp/amd64/emit.mlp
-+++ b/asmcomp/amd64/emit.mlp
-@@ -794,6 +794,7 @@ let data l =
- let begin_assembly() =
- reset_debug_info(); (* PR#5603 *)
- float_constants := [];
-+ ` .file \"{emit_string (String.escaped !Location.input_name)}\"\n`;
- if !Clflags.dlcode then begin
- (* from amd64.S; could emit these constants on demand *)
- if macosx then
-diff --git a/asmcomp/arm/emit.mlp b/asmcomp/arm/emit.mlp
-index 4948fb2..6f30fba 100644
---- a/asmcomp/arm/emit.mlp
-+++ b/asmcomp/arm/emit.mlp
-@@ -892,6 +892,7 @@ let data l =
-
- let begin_assembly() =
- reset_debug_info();
-+ ` .file \"{emit_string (String.escaped !Location.input_name)}\"\n`;
- ` .syntax unified\n`;
- begin match !arch with
- | ARMv4 -> ` .arch armv4t\n`
-diff --git a/asmcomp/arm64/emit.mlp b/asmcomp/arm64/emit.mlp
-index 750c2b2..5afbb8a 100644
---- a/asmcomp/arm64/emit.mlp
-+++ b/asmcomp/arm64/emit.mlp
-@@ -942,6 +942,7 @@ let data l =
-
- let begin_assembly() =
- reset_debug_info();
-+ ` .file \"{emit_string (String.escaped !Location.input_name)}\"\n`;
- let lbl_begin = Compilenv.make_symbol (Some "data_begin") in
- ` .data\n`;
- ` .globl {emit_symbol lbl_begin}\n`;
-diff --git a/asmcomp/i386/emit.mlp b/asmcomp/i386/emit.mlp
-index 98df5f9..531150f 100644
---- a/asmcomp/i386/emit.mlp
-+++ b/asmcomp/i386/emit.mlp
-@@ -986,6 +986,7 @@ let data l =
- let begin_assembly() =
- reset_debug_info(); (* PR#5603 *)
- float_constants := [];
-+ ` .file \"{emit_string (String.escaped !Location.input_name)}\"\n`;
- let lbl_begin = Compilenv.make_symbol (Some "data_begin") in
- ` .data\n`;
- ` .globl {emit_symbol lbl_begin}\n`;
-diff --git a/asmcomp/power/emit.mlp b/asmcomp/power/emit.mlp
-index 4344085..343132b 100644
---- a/asmcomp/power/emit.mlp
-+++ b/asmcomp/power/emit.mlp
-@@ -887,6 +887,7 @@ let data l =
- let begin_assembly() =
- defined_functions := StringSet.empty;
- external_functions := StringSet.empty;
-+ ` .file \"{emit_string (String.escaped !Location.input_name)}\"\n`;
- (* Emit the beginning of the segments *)
- let lbl_begin = Compilenv.make_symbol (Some "data_begin") in
- emit_string data_space;
-diff --git a/asmcomp/sparc/emit.mlp b/asmcomp/sparc/emit.mlp
-index 877a3d5..7b041e9 100644
---- a/asmcomp/sparc/emit.mlp
-+++ b/asmcomp/sparc/emit.mlp
-@@ -727,6 +727,7 @@ let data l =
- (* Beginning / end of an assembly file *)
-
- let begin_assembly() =
-+ ` .file \"{emit_string (String.escaped !Location.input_name)}\"\n`;
- let lbl_begin = Compilenv.make_symbol (Some "data_begin") in
- ` .data\n`;
- ` .global {emit_symbol lbl_begin}\n`;
diff --git a/gnu/packages/patches/ocaml-CVE-2015-8869.patch b/gnu/packages/patches/ocaml-CVE-2015-8869.patch
deleted file mode 100644
index 0a4cb34d25..0000000000
--- a/gnu/packages/patches/ocaml-CVE-2015-8869.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-Adapted from upstream commit 659615c7b100a89eafe6253e7a5b9d84d0e8df74,
-this patch omits the upstream changes to 'Changes' and 'VERSION'.
-
-http://seclists.org/oss-sec/2016/q2/170
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-8869
-https://github.com/ocaml/ocaml/commit/659615c7b100a89eafe6253e7a5b9d84d0e8df74
----
- byterun/alloc.c | 4 ++--
- byterun/intern.c | 2 +-
- byterun/str.c | 4 ++--
- 3 files changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/byterun/alloc.c b/byterun/alloc.c
-index 96a21bf..0db9947 100644
---- a/byterun/alloc.c
-+++ b/byterun/alloc.c
-@@ -153,7 +153,7 @@ CAMLexport int caml_convert_flag_list(value list, int *flags)
- /* [size] is a [value] representing number of words (fields) */
- CAMLprim value caml_alloc_dummy(value size)
- {
-- mlsize_t wosize = Int_val(size);
-+ mlsize_t wosize = Long_val(size);
-
- if (wosize == 0) return Atom(0);
- return caml_alloc (wosize, 0);
-@@ -169,7 +169,7 @@ CAMLprim value caml_alloc_dummy_function(value size,value arity)
- /* [size] is a [value] representing number of floats. */
- CAMLprim value caml_alloc_dummy_float (value size)
- {
-- mlsize_t wosize = Int_val(size) * Double_wosize;
-+ mlsize_t wosize = Long_val(size) * Double_wosize;
-
- if (wosize == 0) return Atom(0);
- return caml_alloc (wosize, 0);
-diff --git a/byterun/intern.c b/byterun/intern.c
-index 89d13d1..7b8d049 100644
---- a/byterun/intern.c
-+++ b/byterun/intern.c
-@@ -291,7 +291,7 @@ static void intern_rec(value *dest)
- case OFreshOID:
- /* Refresh the object ID */
- /* but do not do it for predefined exception slots */
-- if (Int_val(Field((value)dest, 1)) >= 0)
-+ if (Long_val(Field((value)dest, 1)) >= 0)
- caml_set_oo_id((value)dest);
- /* Pop item and iterate */
- sp--;
-diff --git a/byterun/str.c b/byterun/str.c
-index 5ad4e29..885772f 100644
---- a/byterun/str.c
-+++ b/byterun/str.c
-@@ -266,7 +266,7 @@ CAMLprim value caml_string_greaterequal(value s1, value s2)
- CAMLprim value caml_blit_string(value s1, value ofs1, value s2, value ofs2,
- value n)
- {
-- memmove(&Byte(s2, Long_val(ofs2)), &Byte(s1, Long_val(ofs1)), Int_val(n));
-+ memmove(&Byte(s2, Long_val(ofs2)), &Byte(s1, Long_val(ofs1)), Long_val(n));
- return Val_unit;
- }
-
-@@ -278,7 +278,7 @@ CAMLprim value caml_fill_string(value s, value offset, value len, value init)
-
- CAMLprim value caml_bitvect_test(value bv, value n)
- {
-- int pos = Int_val(n);
-+ intnat pos = Long_val(n);
- return Val_int(Byte_u(bv, pos >> 3) & (1 << (pos & 7)));
- }
-
---
-2.7.4
-
diff --git a/gnu/packages/patches/ocaml-bitstring-fix-configure.patch b/gnu/packages/patches/ocaml-bitstring-fix-configure.patch
deleted file mode 100644
index c358bf3d6b..0000000000
--- a/gnu/packages/patches/ocaml-bitstring-fix-configure.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 0aaddfceeea3e89df196ab1846da54d09713a512 Mon Sep 17 00:00:00 2001
-From: Julien Lepiller <julien@lepiller.eu>
-Date: Thu, 15 Dec 2016 21:17:31 +0100
-Subject: [PATCH] fix configure
-
----
- Makefile.in | 9 +++++----
- 1 file changed, 5 insertions(+), 4 deletions(-)
-
-diff --git a/Makefile.in b/Makefile.in
-index d040f4c..85e0b38 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -32,6 +32,7 @@ BISECT_REPORT = @BISECT_REPORT@
- BYTESWAP_H = @BYTESWAP_H@
-
- OCAMLLIB = @OCAMLLIB@
-+BISECTLIB = $(shell if test -z $${BISECTLIB}; then echo $(OCAMLLIB); else echo $${BISECTLIB}; fi)
- top_srcdir = @top_srcdir@
-
- pkg_cil = @OCAML_PKG_cil@
-@@ -47,9 +48,9 @@ OCAMLOPTPACKAGES = $(OCAMLCPACKAGES)
- OCAMLOPTLIBS = -linkpkg
-
- ifneq ($(enable_coverage),no)
--OCAMLCFLAGS += -I +bisect -pp 'camlp4o $(OCAMLLIB)/bisect/instrument.cma'
-+OCAMLCFLAGS += -I +bisect -pp 'camlp4o $(BISECTLIB)/bisect/instrument.cma'
- OCAMLCLIBS += -I +bisect bisect.cma
--OCAMLOPTFLAGS += -I +bisect -pp 'camlp4o $(OCAMLLIB)/bisect/instrument.cma'
-+OCAMLOPTFLAGS += -I +bisect -pp 'camlp4o $(BISECTLIB)/bisect/instrument.cma'
- OCAMLOPTLIBS += -I +bisect bisect.cmxa
- endif
-
-@@ -110,7 +111,7 @@ bitstring_persistent.cmi: bitstring_persistent.mli
- -I +camlp4 -pp camlp4of -c $<
-
- pa_bitstring.cmo: pa_bitstring.ml bitstring.cma bitstring_persistent.cma
-- $(OCAMLFIND) ocamlc bitstring.cma -I +camlp4 dynlink.cma camlp4lib.cma \
-+ $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) bitstring.cma -I +camlp4 dynlink.cma camlp4lib.cma \
- -pp camlp4of -c $< -o $@
-
- bitstring-objinfo: bitstring_objinfo.cmo bitstring.cma bitstring_persistent.cma
-@@ -133,7 +134,7 @@ byteswap.h: byteswap.in.h
- ifeq ($(enable_coverage),no)
- PP = -pp 'camlp4o bitstring.cma bitstring_persistent.cma pa_bitstring.cmo'
- else
--PP = -pp 'camlp4o $(OCAMLLIB)/bisect/bisect.cma bitstring.cma bitstring_persistent.cma pa_bitstring.cmo'
-+PP = -pp 'camlp4o $(BISECTLIB)/bisect/bisect.cma bitstring.cma bitstring_persistent.cma pa_bitstring.cmo'
- endif
-
- check: test
---
-2.11.0
diff --git a/gnu/packages/patches/ocaml-enable-ocamldoc-reproducibility.patch b/gnu/packages/patches/ocaml-enable-ocamldoc-reproducibility.patch
deleted file mode 100644
index 39fb7aa226..0000000000
--- a/gnu/packages/patches/ocaml-enable-ocamldoc-reproducibility.patch
+++ /dev/null
@@ -1,149 +0,0 @@
-From a87c3f20e846c00e53d695497dba7038edbd12f0 Mon Sep 17 00:00:00 2001
-From: Valentin Lorentz <progval@progval.net>
-Date: Thu, 13 Aug 2015 11:59:04 +0200
-Subject: [PATCH] Enable ocamldoc to build reproducible manpages
-
-Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=794586
-Signed-off-by: Stephane Glondu <steph@glondu.net>
----
- ocamldoc/odoc_man.ml | 15 +++++----------
- ocamldoc/odoc_misc.ml | 12 ++++++++++--
- ocamldoc/odoc_misc.mli | 7 ++++++-
- 3 files changed, 21 insertions(+), 13 deletions(-)
-
-diff --git a/ocamldoc/odoc_man.ml b/ocamldoc/odoc_man.ml
-index 615c5e172..3c85aa32a 100644
---- a/ocamldoc/odoc_man.ml
-+++ b/ocamldoc/odoc_man.ml
-@@ -864,14 +864,13 @@ class man =
- (** Generate the man page for the given class.*)
- method generate_for_class cl =
- Odoc_info.reset_type_names () ;
-- let date = Unix.time () in
- let file = self#file_name cl.cl_name in
- try
- let chanout = self#open_out file in
- let b = new_buf () in
- bs b (".TH \""^cl.cl_name^"\" ");
- bs b !man_section ;
-- bs b (" "^(Odoc_misc.string_of_date ~hour: false date)^" ");
-+ bs b (" source: "^Odoc_misc.current_date^" ");
- bs b "OCamldoc ";
- bs b ("\""^(match !Global.title with Some t -> t | None -> "")^"\"\n");
-
-@@ -923,14 +922,13 @@ class man =
- (** Generate the man page for the given class type.*)
- method generate_for_class_type ct =
- Odoc_info.reset_type_names () ;
-- let date = Unix.time () in
- let file = self#file_name ct.clt_name in
- try
- let chanout = self#open_out file in
- let b = new_buf () in
- bs b (".TH \""^ct.clt_name^"\" ");
- bs b !man_section ;
-- bs b (" "^(Odoc_misc.string_of_date ~hour: false date)^" ");
-+ bs b (" source: "^Odoc_misc.current_date^" ");
- bs b "OCamldoc ";
- bs b ("\""^(match !Global.title with Some t -> t | None -> "")^"\"\n");
-
-@@ -1016,14 +1014,13 @@ class man =
- (** Generate the man file for the given module type.
- @raise Failure if an error occurs.*)
- method generate_for_module_type mt =
-- let date = Unix.time () in
- let file = self#file_name mt.mt_name in
- try
- let chanout = self#open_out file in
- let b = new_buf () in
- bs b (".TH \""^mt.mt_name^"\" ");
- bs b !man_section ;
-- bs b (" "^(Odoc_misc.string_of_date ~hour: false date)^" ");
-+ bs b (" source: "^Odoc_misc.current_date^" ");
- bs b "OCamldoc ";
- bs b ("\""^(match !Global.title with Some t -> t | None -> "")^"\"\n");
-
-@@ -1099,14 +1096,13 @@ class man =
- (** Generate the man file for the given module.
- @raise Failure if an error occurs.*)
- method generate_for_module m =
-- let date = Unix.time () in
- let file = self#file_name m.m_name in
- try
- let chanout = self#open_out file in
- let b = new_buf () in
- bs b (".TH \""^m.m_name^"\" ");
- bs b !man_section ;
-- bs b (" "^(Odoc_misc.string_of_date ~hour: false date)^" ");
-+ bs b (" source: "^Odoc_misc.current_date^" ");
- bs b "OCamldoc ";
- bs b ("\""^(match !Global.title with Some t -> t | None -> "")^"\"\n");
-
-@@ -1206,14 +1202,13 @@ class man =
- | Res_const (_,f) -> f.vc_name
- )
- in
-- let date = Unix.time () in
- let file = self#file_name name in
- try
- let chanout = self#open_out file in
- let b = new_buf () in
- bs b (".TH \""^name^"\" ");
- bs b !man_section ;
-- bs b (" "^(Odoc_misc.string_of_date ~hour: false date)^" ");
-+ bs b (" source: "^Odoc_misc.current_date^" ");
- bs b "OCamldoc ";
- bs b ("\""^(match !Global.title with Some t -> t | None -> "")^"\"\n");
- bs b ".SH NAME\n";
-diff --git a/ocamldoc/odoc_misc.ml b/ocamldoc/odoc_misc.ml
-index 4c74476da..456225f62 100644
---- a/ocamldoc/odoc_misc.ml
-+++ b/ocamldoc/odoc_misc.ml
-@@ -223,9 +223,9 @@ let apply_opt f v_opt =
- None -> None
- | Some v -> Some (f v)
-
--let string_of_date ?(hour=true) d =
-+let string_of_date ?(absolute=false) ?(hour=true) d =
- let add_0 s = if String.length s < 2 then "0"^s else s in
-- let t = Unix.localtime d in
-+ let t = (if absolute then Unix.gmtime else Unix.localtime) d in
- (string_of_int (t.Unix.tm_year + 1900))^"-"^
- (add_0 (string_of_int (t.Unix.tm_mon + 1)))^"-"^
- (add_0 (string_of_int t.Unix.tm_mday))^
-@@ -238,6 +238,14 @@ let string_of_date ?(hour=true) d =
- ""
- )
-
-+let current_date =
-+ let time =
-+ try
-+ float_of_string (Sys.getenv "SOURCE_DATE_EPOCH")
-+ with
-+ Not_found -> Unix.time ()
-+ in string_of_date ~absolute: true ~hour: false time
-+
-
- let rec text_list_concat sep l =
- match l with
-diff --git a/ocamldoc/odoc_misc.mli b/ocamldoc/odoc_misc.mli
-index dd5a7fcb9..38ff0612b 100644
---- a/ocamldoc/odoc_misc.mli
-+++ b/ocamldoc/odoc_misc.mli
-@@ -62,7 +62,12 @@ val apply_opt : ('a -> 'b) -> 'a option -> 'b option
-
- (** Return a string representing a date given as a number of seconds
- since 1970. The hour is optionnaly displayed. *)
--val string_of_date : ?hour:bool -> float -> string
-+val string_of_date : ?absolute:bool -> ?hour:bool -> float -> string
-+
-+(* Value returned by string_of_date for current time.
-+ * Uses environment variable SOURCE_DATE_EPOCH if set; falls back to
-+ * current timestamp otherwise. *)
-+val current_date : string
-
- (** Return the first sentence (until the first dot) of a text.
- Don't stop in the middle of [Code], [Verbatim], [List], [Lnum],
---
-2.17.1
-
diff --git a/gnu/packages/patches/openbabel-fix-crash-on-nwchem-output.patch b/gnu/packages/patches/openbabel-fix-crash-on-nwchem-output.patch
deleted file mode 100644
index 879df026a1..0000000000
--- a/gnu/packages/patches/openbabel-fix-crash-on-nwchem-output.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 52cea818bf68f8a2d3c48d55d00c2f8b7da25e4c Mon Sep 17 00:00:00 2001
-From: Daniel Hogan <daniel.hogan@usask.ca>
-Date: Tue, 28 Mar 2017 22:21:18 -0600
-Subject: [PATCH] Remove delete statement.
-
-When from_scratch is true, coordinates is not allocated. A separate if
-statement was added to handle the case when from_scratch is true that
-does not try to free coordinates.
----
- src/formats/nwchemformat.cpp | 9 ++++++---
- 1 file changed, 6 insertions(+), 3 deletions(-)
-
-diff --git a/src/formats/nwchemformat.cpp b/src/formats/nwchemformat.cpp
-index 6f625ad5b..79298555f 100644
---- a/src/formats/nwchemformat.cpp
-+++ b/src/formats/nwchemformat.cpp
-@@ -232,11 +232,14 @@ static const char* OPTIMIZATION_END_PATTERN = " Optimization converged";
- break;
- tokenize(vs,buffer);
- }
-- if ((from_scratch)||(i != natoms))
-- {
-+ if (from_scratch)
-+ {
-+ return;
-+ }
-+ if (i != natoms) {
- delete[] coordinates;
- return;
-- }
-+ }
- molecule->AddConformer(coordinates);
- }
-
diff --git a/gnu/packages/patches/openboardview-use-system-imgui.patch b/gnu/packages/patches/openboardview-use-system-imgui.patch
new file mode 100644
index 0000000000..7345f1fe99
--- /dev/null
+++ b/gnu/packages/patches/openboardview-use-system-imgui.patch
@@ -0,0 +1,170 @@
+Patch submitted upstream: https://github.com/OpenBoardView/OpenBoardView/pull/233
+
+diff --git a/CMakeModules/FindImGui.cmake b/CMakeModules/FindImGui.cmake
+new file mode 100644
+index 0000000..4d1fa42
+--- /dev/null
++++ b/CMakeModules/FindImGui.cmake
+@@ -0,0 +1,36 @@
++# Copyright (C) 2018, 2022 Maxim Cournoyer
++# Redistribution and use of this file is allowed according to the terms of the MIT license.
++# For details see the LICENSE file distributed with OpenBoardView.
++# Note:
++# Searching headers and libraries is very simple and is NOT as powerful as scripts
++# distributed with CMake, because LuaDist defines directories to search for.
++# Everyone is encouraged to contact the author with improvements. Maybe this file
++# becomes part of CMake distribution sometimes.
++
++# - Find ImGui
++# Find the native imgui headers and libraries.
++#
++# IMGUI_INCLUDE_DIRS - where to find imgui/imgui.h, etc.
++# IMGUI_LIBRARIES - List of libraries when using imgui.
++# IMGUI_FOUND - True if imgui is found.
++
++# Look for the header file.
++FIND_PATH(IMGUI_INCLUDE_DIR NAMES imgui.h PATH_SUFFIXES imgui)
++
++# Look for the library.
++FIND_LIBRARY(IMGUI_LIBRARY NAMES ImGui imgui)
++
++# Handle the QUIETLY and REQUIRED arguments and set IMGUI_FOUND to TRUE if all listed variables are TRUE.
++INCLUDE(FindPackageHandleStandardArgs)
++FIND_PACKAGE_HANDLE_STANDARD_ARGS(ImGui DEFAULT_MSG IMGUI_LIBRARY IMGUI_INCLUDE_DIR)
++
++# Copy the results to the output variables.
++IF(IMGUI_FOUND)
++ SET(IMGUI_LIBRARIES ${IMGUI_LIBRARY})
++ SET(IMGUI_INCLUDE_DIRS ${IMGUI_INCLUDE_DIR})
++ELSE()
++ SET(IMGUI_LIBRARIES)
++ SET(IMGUI_INCLUDE_DIRS)
++ENDIF()
++
++MARK_AS_ADVANCED(IMGUI_INCLUDE_DIRS IMGUI_LIBRARIES)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 301f933..24bf263 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -76,28 +76,30 @@ endif()
+ # note: in the future there may be integrated CMake support into imgui
+ # see: https://github.com/ocornut/imgui/pull/1713
+ # for now do it manually, after glad and SDL2 because we use the includes for the sdl_opengl examples
+-execute_process(
++find_package(ImGui) # search ImGui from system
++if(NOT IMGUI_FOUND) # else fallback to bundled copy
++ execute_process(
+ COMMAND git submodule update --init src/imgui
+- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+-)
+-add_definitions("-DImDrawIdx=unsigned int") # short is not enough for us
+-add_definitions("-DIMGUI_IMPL_OPENGL_LOADER_GLAD") # We use glad
+-# Configure GL3 renderer to be GLES2 compatible if GLES2 is enabled
+-if(ENABLE_GLES2)
+- add_definitions("-DIMGUI_IMPL_OPENGL_ES2")
+-endif()
+-
+-# workaround for OpenGL include for OpenGL2, need to be glad rather than gl itself
+-file(READ "${CMAKE_CURRENT_SOURCE_DIR}/imgui/backends/imgui_impl_opengl2.cpp" input)
+-string(REPLACE "OpenGL/gl.h" "glad/glad.h" input "${input}")
+-string(REPLACE "GL/gl.h" "glad/glad.h" input "${input}")
+-file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/imgui/backends/imgui_impl_opengl2.cpp" "${input}")
+-
+-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/imgui
+- ${GLAD_INCLUDE_DIRS}
+-)
+-
+-set(SOURCES
++ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
++ add_definitions("-DImDrawIdx=unsigned int") # short is not enough for us
++ add_definitions("-DIMGUI_IMPL_OPENGL_LOADER_GLAD") # We use glad
++ # Configure GL3 renderer to be GLES2 compatible if GLES2 is enabled
++ if(ENABLE_GLES2)
++ add_definitions("-DIMGUI_IMPL_OPENGL_ES2")
++ endif()
++
++ # workaround for OpenGL include for OpenGL2, need to be glad rather than gl itself
++ file(READ "${CMAKE_CURRENT_SOURCE_DIR}/imgui/backends/imgui_impl_opengl2.cpp" input)
++ string(REPLACE "OpenGL/gl.h" "glad/glad.h" input "${input}")
++ string(REPLACE "GL/gl.h" "glad/glad.h" input "${input}")
++ file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/imgui/backends/imgui_impl_opengl2.cpp" "${input}")
++
++ set(IMGUI_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/imgui
++ ${CMAKE_CURRENT_SOURCE_DIR}/imgui/examples)
++
++ set(IMGUI_LIBRARIES imgui)
++
++ set(SOURCES
+ imgui/imgui.cpp
+ imgui/imgui_draw.cpp
+ imgui/imgui_tables.cpp
+@@ -106,33 +108,35 @@ set(SOURCES
+ imgui/backends/imgui_impl_sdl.cpp)
+
+
+-if(ENABLE_GL1)
++ if(ENABLE_GL1)
+ LIST(APPEND SOURCES
+- imgui/backends/imgui_impl_opengl2.cpp
+- )
+-endif()
+-if(ENABLE_GL3)
++ imgui/backends/imgui_impl_opengl2.cpp
++ )
++ endif()
++ if(ENABLE_GL3)
+ LIST(APPEND SOURCES
+- imgui/backends/imgui_impl_opengl3.cpp
+- )
+-endif()
++ imgui/backends/imgui_impl_opengl3.cpp
++ )
++ endif()
+
+-add_library(imgui STATIC ${SOURCES})
+-target_link_libraries(imgui
++ add_library(imgui STATIC ${SOURCES})
++ target_link_libraries(imgui
+ ${GLAD_LIBRARIES}
+-)
+-if(MINGW)
+-target_link_libraries(imgui
+- SDL2::SDL2-static
+-)
+-else()
+-target_link_libraries(imgui
+- SDL2::SDL2
+-)
++ )
++ if(MINGW)
++ target_link_libraries(imgui
++ SDL2::SDL2-static
++ )
++ else()
++ target_link_libraries(imgui
++ SDL2::SDL2
++ )
++ endif()
+ endif()
+
+-set(IMGUI_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/imgui ${CMAKE_CURRENT_SOURCE_DIR}/imgui/examples)
+-
++include_directories(
++ ${IMGUI_INCLUDE_DIRS}
++ ${GLAD_INCLUDE_DIRS})
+
+ #install(TARGETS imgui DESTINATION ${INSTALL_ARCHIVE_DIR}) # No need to install a static lib
+
+diff --git a/src/openboardview/CMakeLists.txt b/src/openboardview/CMakeLists.txt
+index d049ef9..bb56f70 100644
+--- a/src/openboardview/CMakeLists.txt
++++ b/src/openboardview/CMakeLists.txt
+@@ -129,7 +129,7 @@ elseif(APPLE)
+ endif()
+
+ target_link_libraries(${PROJECT_NAME_LOWER}
+- imgui
++ ${IMGUI_LIBRARIES}
+ SQLite::SQLite3
+ ${GLAD_LIBRARIES}
+ ${COCOA_LIBRARY}
diff --git a/gnu/packages/patches/openjdk-14-builtins.patch b/gnu/packages/patches/openjdk-14-builtins.patch
deleted file mode 100644
index 0e7e3dcaa9..0000000000
--- a/gnu/packages/patches/openjdk-14-builtins.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- jdk14-bc54620a3848/make/autoconf/basics.m4 2020-02-07 04:40:54.000000000 +1030
-+++ jdk14-bc54620a3848-new/make/autoconf/basics.m4 2020-04-24 10:59:33.056098506 +0930
-@@ -583,7 +583,7 @@
- BASIC_SETUP_TOOL($1, [AC_PATH_PROGS($1, $2, , $3)])
- if test "x[$]$1" = x; then
- AC_MSG_NOTICE([Required tool $2 not found in PATH, checking built-in])
-- if help $2 > /dev/null 2>&1; then
-+ if command -v $2 > /dev/null 2>&1; then
- AC_MSG_NOTICE([Found $2 as shell built-in. Using it])
- $1="$2"
- else
diff --git a/gnu/packages/patches/openssl-c-rehash-in.patch b/gnu/packages/patches/openssl-c-rehash-in.patch
deleted file mode 100644
index bd3d3178f1..0000000000
--- a/gnu/packages/patches/openssl-c-rehash-in.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-This patch removes the explicit reference to the 'perl' binary,
-such that OpenSSL does not retain a reference to Perl.
-
-The 'c_rehash' program is seldom used, but it is used nonetheless
-to create symbolic links to certificates, for instance in the 'nss-certs'
-package.
-
---- openssl-1.0.2g/tools/c_rehash.in 2015-09-09 18:36:07.313316482 +0200
-+++ openssl-1.0.2g/tools/c_rehash.in 2015-09-09 18:36:28.965458458 +0200
-@@ -1,4 +1,6 @@
--#!/usr/local/bin/perl
-+eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}'
-+ & eval 'exec perl -wS "$0" $argv:q'
-+ if 0;
-
- # Perl c_rehash script, scan all files in a directory
- # and add symbolic links to their hash values.
diff --git a/gnu/packages/patches/openssl-runpath.patch b/gnu/packages/patches/openssl-runpath.patch
deleted file mode 100644
index fa7c0b9962..0000000000
--- a/gnu/packages/patches/openssl-runpath.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-This patch makes the build system pass -Wl,-rpath=$out/lib even for
-libraries (it already does so for executables, thanks to 'DO_GNU_APP'
-in 'Makefile.shared'.)
-
---- openssl-1.0.2a/Makefile.shared 2015-04-05 01:07:35.357602454 +0200
-+++ openssl-1.0.2a/Makefile.shared 2015-04-05 01:09:50.474513303 +0200
-@@ -106,7 +106,7 @@ LINK_SO= \
- LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \
- LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
- LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
-- $${SHAREDCMD} $${SHAREDFLAGS} \
-+ $${SHAREDCMD} $${SHAREDFLAGS} -Wl,-rpath,$(LIBRPATH) \
- -o $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX \
- $$ALLSYMSFLAGS $$SHOBJECTS $$NOALLSYMSFLAGS $$LIBDEPS \
- ) && $(SYMLINK_SO)
diff --git a/gnu/packages/patches/passwordsafe-meson-remove-extra-argument.patch b/gnu/packages/patches/passwordsafe-meson-remove-extra-argument.patch
deleted file mode 100644
index 3cb61a364a..0000000000
--- a/gnu/packages/patches/passwordsafe-meson-remove-extra-argument.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff --git a/data/meson.build b/data/meson.build
-index 46f6373..26a2c18 100644
---- a/data/meson.build
-+++ b/data/meson.build
-@@ -35,7 +35,6 @@ if get_option('profile') == 'development'
- endif
- desktop_conf.set('ICON', application_id)
- desktop = i18n.merge_file(
-- 'desktop',
- input: configure_file(
- input: files('org.gnome.PasswordSafe.desktop.in.in'),
- output: 'org.gnome.PasswordSafe.desktop.in',
-@@ -65,7 +64,6 @@ if get_option('profile') == 'development'
- endif
- appdata_conf.set('APPID', application_id)
- appdata = i18n.merge_file(
-- 'appdata',
- input: configure_file(
- input: files('org.gnome.PasswordSafe.appdata.xml.in.in'),
- output: 'org.gnome.PasswordSafe.appdata.xml.in',
diff --git a/gnu/packages/patches/patchutils-test-perms.patch b/gnu/packages/patches/patchutils-test-perms.patch
deleted file mode 100644
index c7652b9af2..0000000000
--- a/gnu/packages/patches/patchutils-test-perms.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Need to mark one of the tests as PHONY to get permissions set correctly on
-built scripts.
-
---- a/Makefile.in 2011-02-10 09:44:43.000000000 -0600
-+++ b/Makefile.in 2018-11-29 21:52:05.000000000 -0600
-@@ -1106,5 +1108,6 @@
- rm -f $(DESTDIR)$(bindir)/"`echo lsdiff|sed '$(transform)'`"
- rm -f $(DESTDIR)$(bindir)/"`echo grepdiff|sed '$(transform)'`"
-
-+.PHONY: tests/newline1/run-test
- tests/newline1/run-test: src/combinediff$(EXEEXT) src/flipdiff$(EXEEXT) \
- src/lsdiff$(EXEEXT) src/grepdiff$(EXEEXT) \
- scripts/splitdiff
-
diff --git a/gnu/packages/patches/postgresql-riscv-spinlocks.patch b/gnu/packages/patches/postgresql-riscv-spinlocks.patch
new file mode 100644
index 0000000000..984a573642
--- /dev/null
+++ b/gnu/packages/patches/postgresql-riscv-spinlocks.patch
@@ -0,0 +1,41 @@
+https://www.postgresql.org/message-id/dea97b6d-f55f-1f6d-9109-504aa7dfa421@gentoo.org
+
+The attached patch adds native spinlock support to PostgreSQL on RISC-V
+systems. As suspected by Richard W.M. Jones of Red Hat back in 2016, the
+__sync_lock_test_and_set() approach applied on arm and arm64 works here
+as well.
+
+
+Tested against PostgreSQL 13.3 on a physical rv64gc system (BeagleV
+Starlight beta board) - builds and installs fine, all tests pass. From
+what I can see in gcc documentation this should in theory work on rv32
+(and possibly rv128) as well, therefore the patch as it stands covers
+all RISC-V systems (i.e. doesn't check the value of __risc_xlen) - but I
+haven't confirmed this experimentally.
+
+--- a/src/include/storage/s_lock.h
++++ b/src/include/storage/s_lock.h
+@@ -315,12 +315,12 @@
+ #endif /* __ia64__ || __ia64 */
+
+ /*
+- * On ARM and ARM64, we use __sync_lock_test_and_set(int *, int) if available.
++ * On ARM, ARM64 and RISC-V, we use __sync_lock_test_and_set(int *, int) if available.
+ *
+ * We use the int-width variant of the builtin because it works on more chips
+ * than other widths.
+ */
+-#if defined(__arm__) || defined(__arm) || defined(__aarch64__) || defined(__aarch64)
++#if defined(__arm__) || defined(__arm) || defined(__aarch64__) || defined(__aarch64) || defined(__riscv)
+ #ifdef HAVE_GCC__SYNC_INT32_TAS
+ #define HAS_TEST_AND_SET
+
+@@ -337,7 +337,7 @@
+ #define S_UNLOCK(lock) __sync_lock_release(lock)
+
+ #endif /* HAVE_GCC__SYNC_INT32_TAS */
+-#endif /* __arm__ || __arm || __aarch64__ || __aarch64 */
++#endif /* __arm__ || __arm || __aarch64__ || __aarch64 || __riscv */
+
+
+ /* S/390 and S/390x Linux (32- and 64-bit zSeries) */
diff --git a/gnu/packages/patches/python-CVE-2018-14647.patch b/gnu/packages/patches/python-CVE-2018-14647.patch
deleted file mode 100644
index 24f8d21820..0000000000
--- a/gnu/packages/patches/python-CVE-2018-14647.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-Fix CVE-2018-14647:
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-14647
-https://bugs.python.org/issue34623
-
-Taken from upstream:
-https://github.com/python/cpython/commit/f7666e828cc3d5873136473ea36ba2013d624fa1
-
-diff --git Include/pyexpat.h Include/pyexpat.h
-index 44259bf6d7..07020b5dc9 100644
---- Include/pyexpat.h
-+++ Include/pyexpat.h
-@@ -3,7 +3,7 @@
-
- /* note: you must import expat.h before importing this module! */
-
--#define PyExpat_CAPI_MAGIC "pyexpat.expat_CAPI 1.0"
-+#define PyExpat_CAPI_MAGIC "pyexpat.expat_CAPI 1.1"
- #define PyExpat_CAPSULE_NAME "pyexpat.expat_CAPI"
-
- struct PyExpat_CAPI
-@@ -48,6 +48,8 @@ struct PyExpat_CAPI
- enum XML_Status (*SetEncoding)(XML_Parser parser, const XML_Char *encoding);
- int (*DefaultUnknownEncodingHandler)(
- void *encodingHandlerData, const XML_Char *name, XML_Encoding *info);
-+ /* might be none for expat < 2.1.0 */
-+ int (*SetHashSalt)(XML_Parser parser, unsigned long hash_salt);
- /* always add new stuff to the end! */
- };
-
-diff --git Modules/_elementtree.c Modules/_elementtree.c
-index 707ab2912b..53f05f937f 100644
---- Modules/_elementtree.c
-+++ Modules/_elementtree.c
-@@ -3261,6 +3261,11 @@ _elementtree_XMLParser___init___impl(XMLParserObject *self, PyObject *html,
- PyErr_NoMemory();
- return -1;
- }
-+ /* expat < 2.1.0 has no XML_SetHashSalt() */
-+ if (EXPAT(SetHashSalt) != NULL) {
-+ EXPAT(SetHashSalt)(self->parser,
-+ (unsigned long)_Py_HashSecret.expat.hashsalt);
-+ }
-
- if (target) {
- Py_INCREF(target);
-diff --git Modules/pyexpat.c Modules/pyexpat.c
-index 47c3e86c20..aa21d93c11 100644
---- Modules/pyexpat.c
-+++ Modules/pyexpat.c
-@@ -1887,6 +1887,11 @@ MODULE_INITFUNC(void)
- capi.SetStartDoctypeDeclHandler = XML_SetStartDoctypeDeclHandler;
- capi.SetEncoding = XML_SetEncoding;
- capi.DefaultUnknownEncodingHandler = PyUnknownEncodingHandler;
-+#if XML_COMBINED_VERSION >= 20100
-+ capi.SetHashSalt = XML_SetHashSalt;
-+#else
-+ capi.SetHashSalt = NULL;
-+#endif
-
- /* export using capsule */
- capi_object = PyCapsule_New(&capi, PyExpat_CAPSULE_NAME, NULL);
diff --git a/gnu/packages/patches/python-CVE-2020-26116.patch b/gnu/packages/patches/python-CVE-2020-26116.patch
deleted file mode 100644
index dc0571e964..0000000000
--- a/gnu/packages/patches/python-CVE-2020-26116.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-Fix CVE-2020-26116:
-
-https://cve.circl.lu/cve/CVE-2020-26116
-https://bugs.python.org/issue39603
-
-Taken from upstream (sans test and NEWS update):
-https://github.com/python/cpython/commit/668d321476d974c4f51476b33aaca870272523bf
-
-diff --git a/Lib/http/client.py b/Lib/http/client.py
---- a/Lib/http/client.py
-+++ b/Lib/http/client.py
-@@ -147,6 +147,10 @@
- # _is_allowed_url_pchars_re = re.compile(r"^[/!$&'()*+,;=:@%a-zA-Z0-9._~-]+$")
- # We are more lenient for assumed real world compatibility purposes.
-
-+# These characters are not allowed within HTTP method names
-+# to prevent http header injection.
-+_contains_disallowed_method_pchar_re = re.compile('[\x00-\x1f]')
-+
- # We always set the Content-Length header for these methods because some
- # servers will otherwise respond with a 411
- _METHODS_EXPECTING_BODY = {'PATCH', 'POST', 'PUT'}
-@@ -1087,6 +1091,8 @@ def putrequest(self, method, url, skip_host=False,
- else:
- raise CannotSendRequest(self.__state)
-
-+ self._validate_method(method)
-+
- # Save the method for use later in the response phase
- self._method = method
-
-@@ -1177,6 +1183,15 @@ def _encode_request(self, request):
- # ASCII also helps prevent CVE-2019-9740.
- return request.encode('ascii')
-
-+ def _validate_method(self, method):
-+ """Validate a method name for putrequest."""
-+ # prevent http header injection
-+ match = _contains_disallowed_method_pchar_re.search(method)
-+ if match:
-+ raise ValueError(
-+ f"method can't contain control characters. {method!r} "
-+ f"(found at least {match.group()!r})")
-+
- def _validate_path(self, url):
- """Validate a url for putrequest."""
- # Prevent CVE-2019-9740.
diff --git a/gnu/packages/patches/python-axolotl-AES-fix.patch b/gnu/packages/patches/python-axolotl-AES-fix.patch
deleted file mode 100644
index d34f4855cb..0000000000
--- a/gnu/packages/patches/python-axolotl-AES-fix.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Patch taken from the Debian package for python-axolotl-0.1.39.
-See <https://bugs.gnu.org/29415>.
-
-Description: Removes IV paramenter from AES constructor, since it is not necessary for ctr mode.
-Author: Josue Ortega <josue@debian.org>
-Last-Update: 2017-04-13
-
---- a/axolotl/sessioncipher.py
-+++ b/axolotl/sessioncipher.py
-@@ -228,13 +228,7 @@
- # counterint = struct.unpack(">L", counterbytes)[0]
- # counterint = int.from_bytes(counterbytes, byteorder='big')
- ctr = Counter.new(128, initial_value=counter)
--
-- # cipher = AES.new(key, AES.MODE_CTR, counter=ctr)
-- ivBytes = bytearray(16)
-- ByteUtil.intToByteArray(ivBytes, 0, counter)
--
-- cipher = AES.new(key, AES.MODE_CTR, IV=bytes(ivBytes), counter=ctr)
--
-+ cipher = AES.new(key, AES.MODE_CTR, counter=ctr)
- return cipher
-
-
diff --git a/gnu/packages/patches/python-babel-fix-parse-future-test.patch b/gnu/packages/patches/python-babel-fix-parse-future-test.patch
deleted file mode 100644
index 8a90166ec5..0000000000
--- a/gnu/packages/patches/python-babel-fix-parse-future-test.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From 7bdaa28a55e8d8228d5434effa4b1473ab7b3669 Mon Sep 17 00:00:00 2001
-From: Felix Schwarz <felix.schwarz@oss.schwarz.eu>
-Date: Tue, 5 May 2020 08:05:56 +0000
-Subject: [PATCH] fix tests when using Python 3.9a6
-
-In Python 3.9a6 integer values for future flags were changed to prevent
-collision with compiler flags. We need to retrieve these at runtime so
-the test suite works with Python <= 3.8 as well as Python 3.9.
----
- tests/test_util.py | 17 ++++++++++++-----
- 1 file changed, 12 insertions(+), 5 deletions(-)
-
-diff --git a/tests/test_util.py b/tests/test_util.py
-index a6a4450c..b9343aaa 100644
---- a/tests/test_util.py
-+++ b/tests/test_util.py
-@@ -11,6 +11,7 @@
- # individuals. For the exact contribution history, see the revision
- # history and logs, available at http://babel.edgewall.org/log/.
-
-+import __future__
- import unittest
-
- import pytest
-@@ -20,6 +21,12 @@
- from babel.util import parse_future_flags
-
-
-+class _FF:
-+ division = __future__.division.compiler_flag
-+ print_function = __future__.print_function.compiler_flag
-+ with_statement = __future__.with_statement.compiler_flag
-+ unicode_literals = __future__.unicode_literals.compiler_flag
-+
- def test_distinct():
- assert list(util.distinct([1, 2, 1, 3, 4, 4])) == [1, 2, 3, 4]
- assert list(util.distinct('foobar')) == ['f', 'o', 'b', 'a', 'r']
-@@ -70,25 +77,25 @@ def test_parse_encoding_non_ascii():
- from __future__ import print_function,
- division, with_statement,
- unicode_literals
--''', 0x10000 | 0x2000 | 0x8000 | 0x20000),
-+''', _FF.print_function | _FF.division | _FF.with_statement | _FF.unicode_literals),
- ('''
- from __future__ import print_function, division
- print('hello')
--''', 0x10000 | 0x2000),
-+''', _FF.print_function | _FF.division),
- ('''
- from __future__ import print_function, division, unknown,,,,,
- print 'hello'
--''', 0x10000 | 0x2000),
-+''', _FF.print_function | _FF.division),
- ('''
- from __future__ import (
- print_function,
- division)
--''', 0x10000 | 0x2000),
-+''', _FF.print_function | _FF.division),
- ('''
- from __future__ import \\
- print_function, \\
- division
--''', 0x10000 | 0x2000),
-+''', _FF.print_function | _FF.division),
- ])
- def test_parse_future(source, result):
- fp = BytesIO(source.encode('latin-1'))
diff --git a/gnu/packages/patches/python-matplotlib-run-under-wayland-gtk3.patch b/gnu/packages/patches/python-matplotlib-run-under-wayland-gtk3.patch
deleted file mode 100644
index 6f067763b5..0000000000
--- a/gnu/packages/patches/python-matplotlib-run-under-wayland-gtk3.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From: Tobias Geerinckx-Rice <me@tobias.gr>
-Date: Tue, 02 Mar 2021 18:04:33 +0100
-Subject: [PATCH] gnu: python-matplotlib: Run under Wayland with GTK3.
-
-Adopted from upstream's fix[0] for
-<https://github.com/matplotlib/matplotlib/issues/19405>.
-
-[0]: https://github.com/liuyun88/matplotlib/commit/3d5000463bd23cb046681220f5511f07743f7d82
-
----
-diff -Naur a/lib/matplotlib/backends/backend_gtk3.py b/lib/matplotlib/backends/backend_gtk3.py
---- a/lib/matplotlib/backends/backend_gtk3.py 2019-11-21 23:47:05.000000000 +0100
-+++ b/lib/matplotlib/backends/backend_gtk3.py 2021-03-02 18:00:57.479929766 +0100
-@@ -42,11 +42,12 @@
-
- try:
-+ _display = Gdk.Display.get_default()
- cursord = {
-- cursors.MOVE : Gdk.Cursor.new(Gdk.CursorType.FLEUR),
-- cursors.HAND : Gdk.Cursor.new(Gdk.CursorType.HAND2),
-- cursors.POINTER : Gdk.Cursor.new(Gdk.CursorType.LEFT_PTR),
-- cursors.SELECT_REGION : Gdk.Cursor.new(Gdk.CursorType.TCROSS),
-- cursors.WAIT : Gdk.Cursor.new(Gdk.CursorType.WATCH),
-+ cursors.MOVE : Gdk.Cursor.new_from_name(_display, "move"),
-+ cursors.HAND : Gdk.Cursor.new_from_name(_display, "pointer"),
-+ cursors.POINTER : Gdk.Cursor.new_from_name(_display, "default"),
-+ cursors.SELECT_REGION : Gdk.Cursor.new_from_name(_display, "crosshair"),
-+ cursors.WAIT : Gdk.Cursor.new_from_name(_display, "wait"),
- }
- except TypeError as exc:
- # Happens when running headless. Convert to ImportError to cooperate with
diff --git a/gnu/packages/patches/python-mypy-12332.patch b/gnu/packages/patches/python-mypy-12332.patch
new file mode 100644
index 0000000000..d43cf42ed1
--- /dev/null
+++ b/gnu/packages/patches/python-mypy-12332.patch
@@ -0,0 +1,68 @@
+From 518c864805dd93e62d59439e665a0ce9d6778419 Mon Sep 17 00:00:00 2001
+From: Ekin Dursun <ekindursun@gmail.com>
+Date: Thu, 10 Mar 2022 22:06:48 +0300
+Subject: [PATCH] mypyc: Fix overflow in id function (CPyTagged_Id)
+
+In CPython, the id of an object is its address. It's computed by
+converting the pointer to an unsigned integer (PyLong_FromVoidPtr). A
+similar logic is present here, pointer is converted to a Py_ssize_t and
+CPyTagged_FromSsize_t is called with that integer.
+
+There is a problem with that approach: Py_ssize_t cannot hold every
+pointer value. Sometimes overflow happens and CPyTagged_FromSsize_t is
+called with a negative integer.
+
+With the new approach, the number is checked: If it fits in a
+Py_ssize_t, CPyTagged_FromSsize_t is called. If not, it is directly
+converted to a PyObject using PyLong_FromVoidPtr.
+---
+ mypyc/lib-rt/CPy.h | 1 +
+ mypyc/lib-rt/int_ops.c | 9 +++++++++
+ mypyc/lib-rt/misc_ops.c | 2 +-
+ 3 files changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/mypyc/lib-rt/CPy.h b/mypyc/lib-rt/CPy.h
+index 987819154ab..9f5ae52d4e4 100644
+--- a/mypyc/lib-rt/CPy.h
++++ b/mypyc/lib-rt/CPy.h
+@@ -121,6 +121,7 @@ static inline size_t CPy_FindAttrOffset(PyTypeObject *trait, CPyVTableItem *vtab
+
+
+ CPyTagged CPyTagged_FromSsize_t(Py_ssize_t value);
++CPyTagged CPyTagged_FromVoidPtr(void *ptr);
+ CPyTagged CPyTagged_FromObject(PyObject *object);
+ CPyTagged CPyTagged_StealFromObject(PyObject *object);
+ CPyTagged CPyTagged_BorrowFromObject(PyObject *object);
+diff --git a/mypyc/lib-rt/int_ops.c b/mypyc/lib-rt/int_ops.c
+index 1275f2c1057..edf06314161 100644
+--- a/mypyc/lib-rt/int_ops.c
++++ b/mypyc/lib-rt/int_ops.c
+@@ -26,6 +26,15 @@ CPyTagged CPyTagged_FromSsize_t(Py_ssize_t value) {
+ }
+ }
+
++CPyTagged CPyTagged_FromVoidPtr(void *ptr) {
++ if ((uintptr_t)ptr > PY_SSIZE_T_MAX) {
++ PyObject *object = PyLong_FromVoidPtr(ptr);
++ return ((CPyTagged)object) | CPY_INT_TAG;
++ } else {
++ return CPyTagged_FromSsize_t((Py_ssize_t)ptr);
++ }
++}
++
+ CPyTagged CPyTagged_FromObject(PyObject *object) {
+ int overflow;
+ // The overflow check knows about CPyTagged's width
+diff --git a/mypyc/lib-rt/misc_ops.c b/mypyc/lib-rt/misc_ops.c
+index cebd1cf997f..dcce89d9072 100644
+--- a/mypyc/lib-rt/misc_ops.c
++++ b/mypyc/lib-rt/misc_ops.c
+@@ -437,7 +437,7 @@ CPyPickle_GetState(PyObject *obj)
+ }
+
+ CPyTagged CPyTagged_Id(PyObject *o) {
+- return CPyTagged_FromSsize_t((Py_ssize_t)o);
++ return CPyTagged_FromVoidPtr(o);
+ }
+
+ #define MAX_INT_CHARS 22
diff --git a/gnu/packages/patches/python-pytest-asyncio-python-3.8.patch b/gnu/packages/patches/python-pytest-asyncio-python-3.8.patch
deleted file mode 100644
index 519f92c047..0000000000
--- a/gnu/packages/patches/python-pytest-asyncio-python-3.8.patch
+++ /dev/null
@@ -1,238 +0,0 @@
-# Modified to apply on 0.10.0.
-
-From c7a111180b3f35f2fe5a07ead185e4e792f9dfa0 Mon Sep 17 00:00:00 2001
-From: Andrew Svetlov <andrew.svetlov@gmail.com>
-Date: Thu, 9 Apr 2020 08:44:46 +0200
-Subject: [PATCH] Test on Python 3.8, drop 3.3 and 3.4
-
----
- .travis.yml | 7 +++---
- setup.py | 1 +
- tests/conftest.py | 2 +-
- tests/test_hypothesis_integration.py | 2 +-
- tests/test_simple.py | 32 +++++++++++-----------------
- tests/test_simple_35.py | 17 ++++++---------
- tests/test_subprocess.py | 6 ++----
- tox.ini | 5 +++--
- 8 files changed, 29 insertions(+), 43 deletions(-)
-
-diff --git a/.travis.yml b/.travis.yml
-index fe90234..b93377a 100644
---- a/.travis.yml
-+++ b/.travis.yml
-@@ -1,4 +1,5 @@
- language: python
-+
- matrix:
- include:
- - python: 3.5
-@@ -7,10 +8,8 @@ matrix:
- env: TOX_ENV=py36
- - python: 3.7
- env: TOX_ENV=py37
-- # TODO: the dist and sudo keys are currently needed to use Python 3.7.
-- # They should be removed once Travis-CI supports 3.7 on the default image.
-- dist: xenial
-- sudo: true
-+ - python: 3.8
-+ env: TOX_ENV=py38
-
- install: pip install tox-travis coveralls
-
-diff --git a/setup.py b/setup.py
-index 18566bf..6175711 100644
---- a/setup.py
-+++ b/setup.py
-@@ -36,6 +36,7 @@ def find_version():
- "Programming Language :: Python :: 3.5",
- "Programming Language :: Python :: 3.6",
- "Programming Language :: Python :: 3.7",
-+ "Programming Language :: Python :: 3.8",
- "Topic :: Software Development :: Testing",
- "Framework :: Pytest",
- ],
-diff --git a/tests/conftest.py b/tests/conftest.py
-index 6203cf8..cc2ec16 100644
---- a/tests/conftest.py
-+++ b/tests/conftest.py
-@@ -17,7 +17,7 @@ def dependent_fixture(event_loop):
- async def just_a_sleep():
- """Just sleep a little while."""
- nonlocal event_loop
-- await asyncio.sleep(0.1, loop=event_loop)
-+ await asyncio.sleep(0.1)
- nonlocal counter
- counter += 1
-
-diff --git a/tests/test_simple.py b/tests/test_simple.py
-index 1627139..00c07fc 100644
---- a/tests/test_simple.py
-+++ b/tests/test_simple.py
-@@ -1,28 +1,26 @@
- """Quick'n'dirty unit tests for provided fixtures and markers."""
- import asyncio
--import os
- import pytest
-
- import pytest_asyncio.plugin
-
-
--async def async_coro(loop=None):
-- """A very simple coroutine."""
-- await asyncio.sleep(0, loop=loop)
-+async def async_coro():
-+ await asyncio.sleep(0)
- return 'ok'
-
-
- def test_event_loop_fixture(event_loop):
- """Test the injection of the event_loop fixture."""
- assert event_loop
-- ret = event_loop.run_until_complete(async_coro(event_loop))
-+ ret = event_loop.run_until_complete(async_coro())
- assert ret == 'ok'
-
-
- @pytest.mark.asyncio
--def test_asyncio_marker():
-+async def test_asyncio_marker():
- """Test the asyncio pytest marker."""
-- yield # sleep(0)
-+ await asyncio.sleep(0)
-
-
- @pytest.mark.xfail(reason='need a failure', strict=True)
-@@ -45,13 +43,11 @@ async def closer(_, writer):
- writer.close()
-
- server1 = await asyncio.start_server(closer, host='localhost',
-- port=unused_tcp_port,
-- loop=event_loop)
-+ port=unused_tcp_port)
-
- with pytest.raises(IOError):
- await asyncio.start_server(closer, host='localhost',
-- port=unused_tcp_port,
-- loop=event_loop)
-+ port=unused_tcp_port)
-
- server1.close()
- await server1.wait_closed()
-@@ -68,20 +64,16 @@ async def closer(_, writer):
- unused_tcp_port_factory())
-
- server1 = await asyncio.start_server(closer, host='localhost',
-- port=port1,
-- loop=event_loop)
-+ port=port1)
- server2 = await asyncio.start_server(closer, host='localhost',
-- port=port2,
-- loop=event_loop)
-+ port=port2)
- server3 = await asyncio.start_server(closer, host='localhost',
-- port=port3,
-- loop=event_loop)
-+ port=port3)
-
- for port in port1, port2, port3:
- with pytest.raises(IOError):
- await asyncio.start_server(closer, host='localhost',
-- port=port,
-- loop=event_loop)
-+ port=port)
-
- server1.close()
- await server1.wait_closed()
-@@ -117,7 +109,7 @@ class Test:
- @pytest.mark.asyncio
- async def test_asyncio_marker_method(self, event_loop):
- """Test the asyncio pytest marker in a Test class."""
-- ret = await async_coro(event_loop)
-+ ret = await async_coro()
- assert ret == 'ok'
-
-
-diff --git a/tests/test_simple_35.py b/tests/test_simple_35.py
-index 1e4d697..4141fb0 100644
---- a/tests/test_simple_35.py
-+++ b/tests/test_simple_35.py
-@@ -6,7 +6,7 @@
-
- @pytest.mark.asyncio
- async def async_coro(loop):
-- await asyncio.sleep(0, loop=loop)
-+ await asyncio.sleep(0)
- return 'ok'
-
-
-@@ -27,8 +27,7 @@ async def closer(_, writer):
- writer.close()
-
- server1 = await asyncio.start_server(closer, host='localhost',
-- port=unused_tcp_port,
-- loop=event_loop)
-+ port=unused_tcp_port)
-
- server1.close()
- await server1.wait_closed()
-@@ -45,20 +44,16 @@ async def closer(_, writer):
-
- async def run_test():
- server1 = await asyncio.start_server(closer, host='localhost',
-- port=port1,
-- loop=event_loop)
-+ port=port1)
- server2 = await asyncio.start_server(closer, host='localhost',
-- port=port2,
-- loop=event_loop)
-+ port=port2)
- server3 = await asyncio.start_server(closer, host='localhost',
-- port=port3,
-- loop=event_loop)
-+ port=port3)
-
- for port in port1, port2, port3:
- with pytest.raises(IOError):
- await asyncio.start_server(closer, host='localhost',
-- port=port,
-- loop=event_loop)
-+ port=port)
-
- server1.close()
- await server1.wait_closed()
-diff --git a/tests/test_subprocess.py b/tests/test_subprocess.py
-index 83490e8..069c6c2 100644
---- a/tests/test_subprocess.py
-+++ b/tests/test_subprocess.py
-@@ -21,8 +21,7 @@ def event_loop():
- async def test_subprocess(event_loop):
- """Starting a subprocess should be possible."""
- proc = await asyncio.subprocess.create_subprocess_exec(
-- sys.executable, '--version', stdout=asyncio.subprocess.PIPE,
-- loop=event_loop)
-+ sys.executable, '--version', stdout=asyncio.subprocess.PIPE)
- await proc.communicate()
-
-
-@@ -30,6 +29,5 @@ async def test_subprocess(event_loop):
- async def test_subprocess_forbid(event_loop):
- """Starting a subprocess should be possible."""
- proc = await asyncio.subprocess.create_subprocess_exec(
-- sys.executable, '--version', stdout=asyncio.subprocess.PIPE,
-- loop=event_loop)
-+ sys.executable, '--version', stdout=asyncio.subprocess.PIPE)
- await proc.communicate()
-diff --git a/tox.ini b/tox.ini
-index 13d5155..eed6fb6 100644
---- a/tox.ini
-+++ b/tox.ini
-@@ -1,6 +1,7 @@
- [tox]
--envlist = py35, py36, py37
--minversion = 2.5.0
-+minversion = 3.14.0
-+envlist = py35, py36, py37, py38
-+skip_missing_interpreters = true
-
- [testenv]
- extras = testing
diff --git a/gnu/packages/patches/python-robotframework-source-date-epoch.patch b/gnu/packages/patches/python-robotframework-source-date-epoch.patch
index ccd87911d8..11424bf4db 100644
--- a/gnu/packages/patches/python-robotframework-source-date-epoch.patch
+++ b/gnu/packages/patches/python-robotframework-source-date-epoch.patch
@@ -1,62 +1,64 @@
-From 3cc41c05fad5601c0dd1832f64a6e9efca017727 Mon Sep 17 00:00:00 2001
-From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
-Date: Mon, 1 Apr 2019 11:36:04 -0400
-Subject: [PATCH] robottime: Honor the SOURCE_DATE_EPOCH environment variable.
+Do not embed any timestamp in the built documentation.
-Honoring the SOURCE_DATE_EPOCH environment variable allows building
-the documentation using libdoc reproducibly, by setting the generated
-timestamp to a fixed value.
+Upstream issue: https://github.com/robotframework/robotframework/issues/4262.
-For more background on reproducible builds and the SOURCE_DATE_EPOCH
-environment variable, see:
-https://reproducible-builds.org/specs/source-date-epoch/.
-
-* src/robot/utils/robottime.py: import `os'.
-(TimestampCache._get_epoch): Retrieve date from SOURCE_DATE_EPOCH if
-it is defined, otherwise from time.time().
-* utest/output/test_logger.py (TestLogger.test_write_to_one_logger):
-Check for the existance of a timestamp attribute instead of checking
-for its content as the later is easy to break when using the
-SOURCE_DATE_EPOCH environment variable.
----
- src/robot/utils/robottime.py | 3 +++
- utest/output/test_logger.py | 2 +-
- 2 files changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/src/robot/utils/robottime.py b/src/robot/utils/robottime.py
-index 06432a4a6..91526f826 100644
---- a/src/robot/utils/robottime.py
-+++ b/src/robot/utils/robottime.py
+diff --git a/doc/userguide/ug2html.py b/doc/userguide/ug2html.py
+index 43cdb31bd..550e74a79 100755
+--- a/doc/userguide/ug2html.py
++++ b/doc/userguide/ug2html.py
+@@ -158,8 +158,7 @@ def create_userguide():
+ install_file = _copy_installation_instructions()
+
+ description = 'HTML generator for Robot Framework User Guide.'
+- arguments = ['--time',
+- '--stylesheet-path', ['src/userguide.css'],
++ arguments = ['--stylesheet-path', ['src/userguide.css'],
+ 'src/RobotFrameworkUserGuide.rst',
+ 'RobotFrameworkUserGuide.html']
+ os.chdir(CURDIR)
+diff --git a/src/robot/libdocpkg/model.py b/src/robot/libdocpkg/model.py
+index 4d9ffd70b..5c276d1d6 100644
+--- a/src/robot/libdocpkg/model.py
++++ b/src/robot/libdocpkg/model.py
@@ -14,6 +14,7 @@
# limitations under the License.
- import datetime
+ import json
+import os
- import time
import re
+ from itertools import chain
-@@ -395,6 +396,8 @@ class TimestampCache(object):
+@@ -113,7 +114,8 @@ class LibraryDoc(object):
+ 'name': self.name,
+ 'doc': self.doc,
+ 'version': self.version,
+- 'generated': get_timestamp(daysep='-', millissep=None),
++ 'generated': ('' if os.environ['SOURCE_DATE_EPOCH']
++ else get_timestamp(daysep='-', millissep=None)),
+ 'type': self.type,
+ 'scope': self.scope,
+ 'docFormat': self.doc_format,
+diff --git a/src/robot/libdocpkg/xmlwriter.py b/src/robot/libdocpkg/xmlwriter.py
+index 3882e1219..4a84fb42e 100644
+--- a/src/robot/libdocpkg/xmlwriter.py
++++ b/src/robot/libdocpkg/xmlwriter.py
+@@ -14,6 +14,8 @@
+ # limitations under the License.
- # Seam for mocking
- def _get_epoch(self):
-+ if os.getenv('SOURCE_DATE_EPOCH'):
-+ return float(os.getenv('SOURCE_DATE_EPOCH'))
- return time.time()
+ import os.path
++import os
++
+ from datetime import datetime
- def _use_cache(self, secs, *separators):
-diff --git a/utest/output/test_logger.py b/utest/output/test_logger.py
-index 92fe6d77d..e980227aa 100644
---- a/utest/output/test_logger.py
-+++ b/utest/output/test_logger.py
-@@ -46,7 +46,7 @@ class TestLogger(unittest.TestCase):
- logger = LoggerMock(('Hello, world!', 'INFO'))
- self.logger.register_logger(logger)
- self.logger.write('Hello, world!', 'INFO')
-- assert_true(logger.msg.timestamp.startswith('20'))
-+ assert_true(hasattr(logger.msg, 'timestamp'))
+ from robot.utils import WINDOWS, XmlWriter, unicode
+@@ -30,7 +32,9 @@ class LibdocXmlWriter(object):
+ self._write_end(writer)
- def test_write_to_one_logger_with_trace_level(self):
- logger = LoggerMock(('expected message', 'TRACE'))
---
-2.20.1
-
+ def _write_start(self, libdoc, writer):
+- generated = datetime.utcnow().replace(microsecond=0).isoformat() + 'Z'
++ generated = (
++ '' if os.environ['SOURCE_DATE_EPOCH']
++ else datetime.utcnow().replace(microsecond=0).isoformat() + 'Z')
+ attrs = {'name': libdoc.name,
+ 'type': libdoc.type,
+ 'format': libdoc.doc_format,
diff --git a/gnu/packages/patches/python-robotframework-sshlibrary-rf5-compat.patch b/gnu/packages/patches/python-robotframework-sshlibrary-rf5-compat.patch
new file mode 100644
index 0000000000..d867d4cabb
--- /dev/null
+++ b/gnu/packages/patches/python-robotframework-sshlibrary-rf5-compat.patch
@@ -0,0 +1,19 @@
+This patches add compatibility for the forthcoming RobotFramework 5.
+
+Taken from: https://github.com/robotframework/SSHLibrary/pull/403.
+diff --git a/src/SSHLibrary/pythonforward.py b/src/SSHLibrary/pythonforward.py
+index 8b85997b7..607985cf4 100644
+--- a/src/SSHLibrary/pythonforward.py
++++ b/src/SSHLibrary/pythonforward.py
+@@ -1,9 +1,9 @@
+ import select
+ import socket
+ import threading
+-from robot.utils import platform
++from robot.utils import PY2, WINDOWS
+ from .logger import logger
+-if platform.PY2 and platform.WINDOWS:
++if PY2 and WINDOWS:
+ import win_inet_pton
+ try:
+ import SocketServer
diff --git a/gnu/packages/patches/python-robotframework-ug2html.patch b/gnu/packages/patches/python-robotframework-ug2html.patch
new file mode 100644
index 0000000000..eea88e01f3
--- /dev/null
+++ b/gnu/packages/patches/python-robotframework-ug2html.patch
@@ -0,0 +1,57 @@
+Do not require the obsolete robotframeworklexer.
+
+Submitted upstream at: https://github.com/robotframework/robotframework/pull/4265.
+diff --git a/doc/userguide/ug2html.py b/doc/userguide/ug2html.py
+index 43cdb31bd..033203552 100755
+--- a/doc/userguide/ug2html.py
++++ b/doc/userguide/ug2html.py
+@@ -93,34 +93,26 @@ from docutils.parsers.rst import directives
+ from pygments import highlight, __version__ as pygments_version
+ from pygments.lexers import get_lexer_by_name
+
+-# Use latest version, not version bundled with Pygments
+-import robotframeworklexer
+-
+
+ def too_old(version_string, minimum):
+ version = tuple(int(v) for v in version_string.split('.')[:2])
+ return version < minimum
+
+
+-if too_old(getattr(robotframeworklexer, '__version__', '1.0'), (1, 1)):
+- sys.exit('robotframeworklexer >= 1.1 is required.')
+-if too_old(pygments_version, (2, 1)):
+- sys.exit('Pygments >= 2.1 is required.')
++if too_old(pygments_version, (2, 8)):
++ sys.exit('Pygments >= 2.8 is required.')
+
+
+ def pygments_directive(name, arguments, options, content, lineno,
+ content_offset, block_text, state, state_machine):
+ try:
+- if arguments[0] == 'robotframework':
+- lexer = robotframeworklexer.RobotFrameworkLexer()
+- else:
+- lexer = get_lexer_by_name(arguments[0])
++ lexer = get_lexer_by_name(arguments[0])
+ except ValueError as err:
+ raise ValueError(f'Invalid syntax highlighting language "{arguments[0]}".')
+ # take an arbitrary option if more than one is given
+ formatter = options and VARIANTS[options.keys()[0]] or DEFAULT
+ # possibility to read the content from an external file
+- filtered = [ line for line in content if line.strip() ]
++ filtered = [line for line in content if line.strip()]
+ if len(filtered) == 1:
+ path = filtered[0].replace('/', os.sep)
+ if os.path.isfile(path):
+diff --git a/requirements-build.txt b/requirements-build.txt
+index e0f5e19a2..a2fcdcfd5 100644
+--- a/requirements-build.txt
++++ b/requirements-build.txt
+@@ -5,5 +5,4 @@ rellu >= 0.7
+ twine >= 1.12
+ wheel
+ docutils
+-pygments >= 2.1
+-robotframeworklexer >= 1.1
++pygments >= 2.8
diff --git a/gnu/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch b/gnu/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch
deleted file mode 100644
index f1db5d7c3b..0000000000
--- a/gnu/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From ca548da9ba78ddee90779051210e3e89185e4f7d Mon Sep 17 00:00:00 2001
-From: Michel Alexandre Salim <michel@michel-slm.name>
-Date: Mon, 15 Feb 2016 23:03:42 +0700
-Subject: coverage-4.0a6 compatibility
-
-coverage 4.0a6 no longer generates .coverage file, so use -f when
-deleting .coverage to ensure deletion does not fail.
----
- Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-(limited to 'Makefile')
-
-diff --git a/Makefile b/Makefile
-index 7818f57..362c07f 100644
---- a/Makefile
-+++ b/Makefile
-@@ -23,7 +23,7 @@ fsck-larch.1: fsck-larch.1.in fsck-larch
-
- check:
- python -m CoverageTestRunner --ignore-missing-from=without-tests
-- rm .coverage
-+ rm -f .coverage
- ./insert-remove-test tempdir 100
- rm -r tempdir larch.log
- cmdtest tests
---
-cgit v1.1
-
diff --git a/gnu/packages/patches/qt4-ldflags.patch b/gnu/packages/patches/qt4-ldflags.patch
deleted file mode 100644
index 0d6398018a..0000000000
--- a/gnu/packages/patches/qt4-ldflags.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Explicitly link against libicui18n so that libQtCore.so always finds it.
-
---- qt-everywhere-opensource-src-4.8.6/src/corelib/corelib.pro 2015-04-15 12:01:41.661862663 +0200
-+++ qt-everywhere-opensource-src-4.8.6/src/corelib/corelib.pro 2015-04-15 12:03:57.954586336 +0200
-@@ -19,6 +19,13 @@ include(codecs/codecs.pri)
- include(statemachine/statemachine.pri)
- include(xml/xml.pri)
-
-+# Explicitly link with icui18n, which is dlopened by libQtCore.so.
-+# We cannot do this by setting LDFLAGS because that then overrides
-+# other LDFLAGS: <https://bugreports.qt.io/browse/QTBUG-5471>.
-+# XXX: According to the Nixpkgs recipe, this may be necessary for
-+# further libraries (cups, gtk-x11-2.0, libgdk-x11-2.0).
-+LIBS_PRIVATE += -licui18n
-+
- !qpa:mac|darwin:LIBS_PRIVATE += -framework ApplicationServices
- qpa:mac {
- !ios {
diff --git a/gnu/packages/patches/racket-enable-scheme-backport.patch b/gnu/packages/patches/racket-enable-scheme-backport.patch
new file mode 100644
index 0000000000..3a5a4a3d82
--- /dev/null
+++ b/gnu/packages/patches/racket-enable-scheme-backport.patch
@@ -0,0 +1,465 @@
+From 8d7687842f099e3e7e60d3a83fed58b2c6a92863 Mon Sep 17 00:00:00 2001
+From: Matthew Flatt <mflatt@racket-lang.org>
+Date: Sun, 6 Feb 2022 10:36:09 -0700
+Subject: [PATCH 1/2] Chez Scheme: adapt bootfile build for supplied `Scheme=`
+
+(cherry picked from commit fca1e02349664060e10278ca2ce6577a949bebf5)
+
+(Fixed conflicts by dropping pbchunks and pbarch changes.)
+---
+ racket/src/ChezScheme/configure | 15 ++++++++++++++-
+ racket/src/ChezScheme/s/Mf-base | 4 ++--
+ racket/src/ChezScheme/s/Mf-cross | 4 +++-
+ 3 files changed, 19 insertions(+), 4 deletions(-)
+
+diff --git a/racket/src/ChezScheme/configure b/racket/src/ChezScheme/configure
+index 4515ffc105..0098829091 100755
+--- a/racket/src/ChezScheme/configure
++++ b/racket/src/ChezScheme/configure
+@@ -45,6 +45,7 @@ threads=yes
+ nothreads=no
+ temproot=""
+ help=no
++forceworkarea=no
+ gzipmanpages=yes
+ installowner=""
+ installgroup=""
+@@ -205,6 +206,9 @@ while [ $# != 0 ] ; do
+ --pb)
+ pb=yes
+ ;;
++ --force)
++ forceworkarea=yes
++ ;;
+ --installprefix=*)
+ installprefix=`echo $1 | sed -e 's/^--installprefix=//'`
+ ;;
+@@ -439,6 +443,7 @@ if [ "$help" = "yes" ]; then
+ echo " --toolprefix=<prefix> prefix tool (compiler, linker, ...) names"
+ echo " --[no]gzip-man-pages compress manual pages ($gzipmanpages)"
+ echo " --workarea=<pathname> build directory ($w)"
++ echo " --force configure even without boot files"
+ echo " CC=<C compiler> C compiler"
+ echo " CPPFLAGS=<C preprocessor flags> C preprocessor flags"
+ echo " CFLAGS=<C compiler flags> C compiler flags"
+@@ -721,8 +726,16 @@ case "${flagsmuni}" in
+ ;;
+ esac
+
++if [ "$w" = "$m" ] ; then
++ configuringin=""
++else
++ configuringin=" in $w"
++fi
++
+ if [ -f boot/$m/scheme.boot -o -f "$srcdir"/boot/$m/scheme.boot ] ; then
+- echo "Configuring for $m"
++ echo "Configuring for $m$configuringin"
++elif [ "$forceworkarea" = yes ] ; then
++ echo "Configuring for $m$configuringin despite missing boot files"
+ else
+ if [ "$m" = "" ] ; then
+ maybem="<machine type>"
+diff --git a/racket/src/ChezScheme/s/Mf-base b/racket/src/ChezScheme/s/Mf-base
+index cc6178c973..1f4a967998 100644
+--- a/racket/src/ChezScheme/s/Mf-base
++++ b/racket/src/ChezScheme/s/Mf-base
+@@ -94,7 +94,7 @@ endif
+ # that Scheme and SCHEMEHEAPDIRS are set by Mf-cross to point to the host Scheme
+ # implementation
+ Scheme = ../bin/$m/scheme${ExeSuffix}
+-export SCHEMEHEAPDIRS=../boot/%m
++export SCHEMEHEAPDIRS=../boot/$m
+ export CHEZSCHEMELIBDIRS=.
+
+ # Define the libdirs separator character
+@@ -691,4 +691,4 @@ reset-one:
+
+ .PHONY: run
+ run:
+- env SCHEMEHEAPDIRS=../boot/$m/ ../bin/$m/scheme $(ARGS)
++ env SCHEMEHEAPDIRS=${SCHEMEHEAPDIRS} ${Scheme} $(ARGS)
+diff --git a/racket/src/ChezScheme/s/Mf-cross b/racket/src/ChezScheme/s/Mf-cross
+index d796cbb459..397af59a28 100644
+--- a/racket/src/ChezScheme/s/Mf-cross
++++ b/racket/src/ChezScheme/s/Mf-cross
+@@ -43,5 +43,7 @@ x$(xm).$(m):
+ $(MAKE) -f Mf-cross m=$(m) xm=$(xm) i=f o=3 d=0 xpatch
+ mv xpatch x$(xm).$(m)
+
++ifneq ($(SCHEMEHEAPDIRS),:)
+ # Ensure that cross-compiling "nanopass.so" is rebuilt if the host compiler changed
+-nanopass.so: ${SCHEME} ${SCHEMEHEAPDIRS}/petite.boot ${SCHEMEHEAPDIRS}/scheme.boot
++nanopass.so: ${Scheme} ${SCHEMEHEAPDIRS}/petite.boot ${SCHEMEHEAPDIRS}/scheme.boot
++endif
+--
+2.32.0
+
+
+From 26c8e2c1d9b02ad85acef8bda40d92154cf0b699 Mon Sep 17 00:00:00 2001
+From: Matthew Flatt <mflatt@racket-lang.org>
+Date: Sun, 6 Feb 2022 11:03:30 -0700
+Subject: [PATCH 2/2] configure: make `--enable-scheme` work with an executable
+
+When the same Chez Scheme version as used by Racket is already
+available, then `--enable-scheme=...` can supply an executable. For
+cross builds, `--enable-scheme=...` can still supply a build
+directory, instead, as before.
+
+(cherry picked from commit 4f0e76855ce7e86107de495292a553469daf0b3f)
+---
+ racket/src/ChezScheme/makefiles/Makefile.in | 3 ++
+ racket/src/README.txt | 30 +++++++++++---
+ racket/src/configure | 8 +++-
+ racket/src/cs/README.txt | 6 ++-
+ racket/src/cs/c/Makefile.in | 44 ++++++++++++++++-----
+ racket/src/cs/c/configure | 24 +++++++++--
+ racket/src/cs/c/configure.ac | 21 ++++++++--
+ 7 files changed, 112 insertions(+), 24 deletions(-)
+
+diff --git a/racket/src/ChezScheme/makefiles/Makefile.in b/racket/src/ChezScheme/makefiles/Makefile.in
+index c396efc851..3998ef9ccd 100644
+--- a/racket/src/ChezScheme/makefiles/Makefile.in
++++ b/racket/src/ChezScheme/makefiles/Makefile.in
+@@ -59,6 +59,9 @@ reset:
+ %.boot:
+ (cd $(workarea) && $(MAKE) $*.boot)
+
++auto.boot:
++ (cd $(workarea) && $(MAKE) $(defaultm).boot)
++
+ # <machine>.bootquick to build boot files for <machine>
+ # with o=3 d=0 for the cross compiler, and only after
+ # building the kernel for the configured machine
+diff --git a/racket/src/README.txt b/racket/src/README.txt
+index 98647aebce..d77310b4a4 100644
+--- a/racket/src/README.txt
++++ b/racket/src/README.txt
+@@ -354,6 +354,10 @@ variant of MinGW without "libdelayimp.a", get the implementation of
+ ========================================================================
+
+ Cross-compilation requires at least two flags to `configure`:
++`--host=OS` and either `--enable-racket=RACKET` or (for Racket CS)
++`--enable-scheme-SCHEME`.
++
++More information:
+
+ * `--host=OS`, where OS is something like `i386-gnu-linux` to
+ indicate the target platform.
+@@ -374,11 +378,27 @@ Cross-compilation requires at least two flags to `configure`:
+ run `configure` again (with no arguments) in a "local" subdirectory
+ to create a build for the current platform.
+
+-An additional flag is needed for building Racket CS, unless the flag
+-`--enable-racket=auto` is used:
+-
+- * `--enable-scheme=DIR`, where DIR is a path that has a "ChezScheme"
+- directory where Chez Scheme is built for the host system.
++ * `--enable-scheme=SCHEME`, where SCHEME is a Chez Scheme executable
++ executable that runs on the build platform; the executable must be
++ the same version as used in Racket built for the target platform.
++
++ Supplying `--enable-scheme=DIR` is also supported in cross-build
++ mode, where DIR is a path that has a "ChezScheme" directory where
++ Chez Scheme is built for the host system.
++
++The `--enable-racket=RACKET` and `--enable-scheme=SCHEME` flags are
++allowed for non-cross builds, too:
++
++ * For Racket CS, supplying either selects a Racket or Chez Scheme
++ implementation used to create boot files to the build platform.
++ Suppling Chez Scheme is a much more direct path, but when Racket is
++ supplied, its version does not have to match the version being
++ built.
++
++ * For Racket BC, `--enable-racket=RACKET` selects a Racket for
++ prepare C sources to cooperate with garbage collection. Its version
++ needs to be close to the one being built, and potentially exactly
++ the same version.
+
+ Some less commonly needed `configure` flags are for Racket BC:
+
+diff --git a/racket/src/configure b/racket/src/configure
+index c9f3ba4419..1b53ec7ce2 100755
+--- a/racket/src/configure
++++ b/racket/src/configure
+@@ -9,6 +9,7 @@ pb_dir="$dir/ChezScheme/boot/pb"
+ use_cs=maybe
+ use_bc=maybe
+ supplied_racket=no
++supplied_scheme=no
+ enable_boothelp=
+
+ # We don't have to detect conflicts like `--enable-csdefault --enable-bcdefault`,
+@@ -34,6 +35,9 @@ for arg in $*; do
+ --enable-racket=*)
+ supplied_racket=yes
+ ;;
++ --enable-scheme=*)
++ supplied_scheme=yes
++ ;;
+ --help | -h)
+ echo $0:
+ echo see --help-bc or --help-cs, since the Racket CS build and the
+@@ -70,8 +74,8 @@ elif test "$use_cs" = "maybe" ; then
+ fi
+
+ if test "$use_cs" = "yes" ; then
+- if test $use_bc = no -a $supplied_racket = no -a ! -d "$pb_dir" ; then
+- echo $0: must have $pb_dir or --enable-racket=... for --enable-csonly
++ if test $use_bc = no -a $supplied_racket = no -a $supplied_scheme = no -a ! -d "$pb_dir" ; then
++ echo $0: must have $pb_dir, --enable-racket=... or --enable-scheme=... for --enable-csonly
+ exit 1
+ fi
+
+diff --git a/racket/src/cs/README.txt b/racket/src/cs/README.txt
+index 2ece417b78..8e6fc57b74 100644
+--- a/racket/src/cs/README.txt
++++ b/racket/src/cs/README.txt
+@@ -39,6 +39,11 @@ build:
+ installed in the "../ChezScheme/boot/pb" directory as described by
+ "../ChezScheme/BUILDING".
+
++ Supplying `--enable-scheme=...` is also an option if you alerady
++ have the same version of Chez Scheme built on the current platform.
++ Another build will be created, anyway, but more quickly than
++ without Chez Scheme.
++
+ * Racket is needed to generate the files in the "schemified"
+ directory from the sources in sibling directories like "../io". The
+ Racket version must be practically the same as the current Racket
+@@ -48,7 +53,6 @@ build:
+ Unlike Chez Scheme boot files, the files generated in "schemified"
+ are human-readable and -editable Scheme code. That provides a way
+ out of bootstrapping black holes, even without BC.
+-
+
+
+ ========================================================================
+diff --git a/racket/src/cs/c/Makefile.in b/racket/src/cs/c/Makefile.in
+index 54a644a1d9..d73993f0fc 100644
+--- a/racket/src/cs/c/Makefile.in
++++ b/racket/src/cs/c/Makefile.in
+@@ -12,7 +12,9 @@ CS_HOST_WORKAREA_PREFIX = @CS_HOST_WORKAREA_PREFIX@
+ SCHEME_HOST_WORKAREA = $(CS_HOST_WORKAREA_PREFIX)$(SCHEME_WORKAREA)
+ SCHEME_BIN = $(SCHEME_HOST_WORKAREA)/$(MACH)/bin/$(MACH)/scheme
+ SCHEME_INC = $(SCHEME_HOST_WORKAREA)/$(MACH)/boot/$(MACH)
+-SCHEME = $(SCHEME_BIN) -B $(SCHEME_INC)/petite.boot -B $(SCHEME_INC)/scheme.boot
++SCHEME_built = $(SCHEME_BIN) -B $(SCHEME_INC)/petite.boot -B $(SCHEME_INC)/scheme.boot
++SCHEME_existing = @MAKE_SCHEME_SCHEME@
++SCHEME = $(SCHEME@USE_SCHEME_MODE@)
+
+ TARGET_MACH = @TARGET_MACH@
+ SCHEME_TARGET_INC = $(SCHEME_WORKAREA)/$(TARGET_MACH)/boot/$(TARGET_MACH)
+@@ -88,7 +90,7 @@ mainsrcdir = @srcdir@/../..
+ @INCLUDEDEP@ @srcdir@/../../version/version.mak
+
+ cs:
+- $(MAKE) scheme@T_CROSS_MODE@
++ $(MAKE) scheme@MAKE_SCHEME_MODE@
+ $(MAKE) racket-so
+ cd rktio; $(MAKE)
+ $(MAKE) racketcs
+@@ -121,9 +123,13 @@ racket-so:
+
+ RACKET_SO_ENV = @CONFIGURE_RACKET_SO_COMPILE@
+
++TARGET_MACH_built = $(TARGET_MACH)
++TARGET_MACH_existing = xc-$(TARGET_MACH)
++XPATCH_FILE = $(SCHEME_WORKAREA)/$(TARGET_MACH@USE_SCHEME_MODE@)/s/xpatch
++
+ CS_PROGS = SCHEME="$(SCHEME)"
+ CS_OPTS = COMPRESS_COMP=@COMPRESS_COMP@ @ENABLE_OR_DISABLE_WPO@
+-CS_OPTScross = $(CS_OPTS) CSO=$(MACH) CROSS_COMP="--xpatch $(SCHEME_WORKAREA)/$(TARGET_MACH)/s/xpatch"
++CS_OPTScross = $(CS_OPTS) CSO=$(MACH) CROSS_COMP="--xpatch $(XPATCH_FILE)"
+ PASS_COMPILE_DEPS = EXTRA_COMPILE_DEPS="$(SCHEME_INC)/petite.boot $(SCHEME_INC)/scheme.boot"
+
+ build-racket-so:
+@@ -163,6 +169,15 @@ pb-bootquick:
+ cd $(SCHEME_WORKAREA) && $(MAKE) reset
+ $(SHELL) $(srcdir)/ready_boot.sh $(MACH) $(SCHEME_WORKAREA)
+
++scheme-via-scheme:
++ $(MAKE) $(SCHEME_WORKAREA)/boot/$(MACH)/scheme.boot
++ $(MAKE) mach-make
++
++$(SCHEME_WORKAREA)/boot/$(MACH)/scheme.boot:
++ mkdir -p $(SCHEME_WORKAREA)
++ $(MAKE) config-scheme CONFIG_SCHEME_MODE="$(CONFIG_SCHEME_MODE) --force"
++ cd $(SCHEME_WORKAREA) && $(MAKE) $(MACH).boot Scheme="$(SCHEME)" SCHEMEHEAPDIRS=: o=3 d=0 what=all
++
+ mach-make:
+ $(MAKE) config-scheme
+ cd $(SCHEME_WORKAREA) && $(MAKE)
+@@ -182,24 +197,33 @@ config-scheme:
+
+ scheme-cross:
+ env MAKE_BOOT_FOR_CROSS=yes SCHEME_SRC="$(SCHEME_DIR)" SCHEME_WORKAREA=$(SCHEME_WORKAREA) MACH="$(TARGET_MACH)" $(BOOTSTRAP_RACKET) "$(SCHEME_DIR)"/rktboot/make-boot.rkt
++ $(MAKE) finish-scheme-cross
++
++finish-scheme-cross:
+ $(SHELL) $(srcdir)/reset_boot.sh $(TARGET_MACH) $(SCHEME_WORKAREA)
+ cd $(SCHEME_WORKAREA) && "$(UP_SCHEME_DIR)"/configure @SCHEME_CROSS_CONFIG_ARGS@ $(SCHEME_CONFIG_VARS)
+ cd $(SCHEME_WORKAREA)/$(TARGET_MACH)/c && $(CHOST_HACK@T_CROSS_MODE@) $(MAKE) o=o cross=t
+- $(MAKE) $(SCHEME_WORKAREA)/$(TARGET_MACH)/s/xpatch
++ $(MAKE) $(XPATCH_FILE)
++
++scheme-cross-via-scheme:
++ $(MAKE) $(SCHEME_WORKAREA)/boot/$(TARGET_MACH)/scheme.boot MACH=$(TARGET_MACH)
++ $(MAKE) finish-scheme-cross
+
+ # Rebuild patch file and cross "petite.boot" and "scheme.boot" when older
+-# than the build-host "scheme.boot" or when "make-boot.rkt" touchs dummy boot files
+-XPATCH_DEPS = $(SCHEME_HOST_WORKAREA)/$(MACH)/boot/$(MACH)/scheme.boot \
+- $(SCHEME_WORKAREA)/boot/$(TARGET_MACH)/scheme.boot
++# than the build-<host "scheme.boot" or when "make-boot.rkt" touchs dummy boot files
++XPATCH_DEPS_built = $(SCHEME_HOST_WORKAREA)/$(MACH)/boot/$(MACH)/scheme.boot \
++ $(SCHEME_WORKAREA)/boot/$(TARGET_MACH)/scheme.boot
++XPATCH_DEPS_existing =
++XPATCH_DEPS = $(XPATCH_DEPS@USE_SCHEME_MODE@)
+
+-$(SCHEME_WORKAREA)/$(TARGET_MACH)/s/xpatch: $(XPATCH_DEPS)
++$(XPATCH_FILE): $(XPATCH_DEPS)
+ $(MAKE) bounce TARGET=build-xpatch-using-host
+
+ build-xpatch-using-host:
+ cd $(SCHEME_WORKAREA)/$(TARGET_MACH)/s && $(MAKE) -f Mf-cross m=$(MACH) xm=$(TARGET_MACH) Scheme="$(SCHEME_BIN)" SCHEMEHEAPDIRS="$(SCHEME_INC)"
+
+ XPATCH =
+-XPATCHcross = --xpatch $(SCHEME_WORKAREA)/$(TARGET_MACH)/s/xpatch
++XPATCHcross = --xpatch $(XPATCH_FILE)
+
+ racket.boot: racket.so
+ $(SCHEME) --script $(srcdir)/convert-to-boot.ss @BOOT_COMPRESS_COMP@ $(XPATCH@CROSS_MODE@) racket.so racket.boot $(TARGET_MACH)
+@@ -410,7 +434,7 @@ install-cross:
+ $(MAKE) compile-xpatch.$(TARGET_MACH)
+ $(MAKE) library-xpatch.$(TARGET_MACH)
+
+-SCHEME_XPATCH = $(SCHEME_WORKAREA)/$(TARGET_MACH)/s/xpatch
++SCHEME_XPATCH = $(XPATCH_FILE)
+
+ CROSS_SERVE_DEPS = $(srcdir)/mk-cross-serve.ss $(srcdir)/cross-serve.ss \
+ $(srcdir)/../expander/env.ss $(srcdir)/../linklet/config.ss
+diff --git a/racket/src/cs/c/configure b/racket/src/cs/c/configure
+index 21695a431a..1eeef57753 100755
+--- a/racket/src/cs/c/configure
++++ b/racket/src/cs/c/configure
+@@ -654,6 +654,9 @@ MINGW
+ NOT_OSX
+ OSX
+ SETUP_BOOT_MODE
++USE_SCHEME_MODE
++MAKE_SCHEME_SCHEME
++MAKE_SCHEME_MODE
+ TT_CROSS_MODE
+ T_CROSS_MODE
+ CROSS_MODE
+@@ -1448,7 +1451,7 @@ Optional Features:
+ --enable-docs build docs on install (enabled by default)
+ --enable-usersetup setup user-specific files on install
+ --enable-racket=<path> use <path> as Racket for build; or "auto" to create
+- --enable-scheme=<path> use <path> as host's build directory for cross
++ --enable-scheme=<path> use <path> as host build for cross
+ --enable-mach=<mach> use Chez Scheme machine type <mach>
+ --enable-target=<mach> cross-build for Chez Scheme machine type <mach>
+ --enable-portable prefer portable to host-specific
+@@ -2867,7 +2870,7 @@ show_explicitly_enabled "${enable_xonx}" "Unix style"
+ show_explicitly_enabled "${enable_libzo}" 'Compiled ".zo" files moved to lib'
+
+ show_explicitly_set "${enable_racket}" "Racket"
+-show_explicitly_set "${enable_scheme}" "Chez Scheme build directory"
++show_explicitly_set "${enable_scheme}" "Chez Scheme for build"
+ show_explicitly_set "${enable_mach}" "machine type"
+ show_explicitly_set "${enable_target}" "cross-build machine type"
+ show_explicitly_enabled "${enable_portable}" "portable"
+@@ -4745,9 +4748,21 @@ esac
+
+ SCHEME_DIR=${srcdir}/../../ChezScheme
+ MAKE_BUILD_SCHEME=checkout
++USE_SCHEME_MODE="_built"
++MAKE_SCHEME_MODE="${T_CROSS_MODE}"
+
+ if test "${enable_scheme}" != "" ; then
+- CS_HOST_WORKAREA_PREFIX="${enable_scheme}/"
++ if test -d "${enable_scheme}" ; then
++ # Directory exists, so use it as a build directory
++ echo "Using supplied Scheme path as a build directory"
++ CS_HOST_WORKAREA_PREFIX="${enable_scheme}/"
++ else
++ # Directory does not exist, so assume it's an executable
++ echo "Using supplied Scheme path as an executable"
++ MAKE_SCHEME_MODE="${T_CROSS_MODE}-via-scheme"
++ MAKE_SCHEME_SCHEME="${enable_scheme}"
++ USE_SCHEME_MODE="_existing"
++ fi
+ fi
+
+ if test "${enable_racket}" != "" ; then
+@@ -6012,6 +6027,9 @@ SCHEME_CROSS_CONFIG_ARGS="--machine=${TARGET_MACH} --disable-x11 ${cs_auto_flags
+
+
+
++
++
++
+
+
+
+diff --git a/racket/src/cs/c/configure.ac b/racket/src/cs/c/configure.ac
+index 464ebe1760..aaee88156d 100644
+--- a/racket/src/cs/c/configure.ac
++++ b/racket/src/cs/c/configure.ac
+@@ -23,7 +23,7 @@ AC_ARG_ENABLE(compressmore, [ --enable-compressmore compress compiled code ev
+ AC_ARG_ENABLE(compressboot, [ --enable-compressboot compress boot files])
+ m4_include(../ac/path_arg.m4)
+ AC_ARG_ENABLE(racket, [ --enable-racket=<path> use <path> as Racket for build; or "auto" to create])
+-AC_ARG_ENABLE(scheme, [ --enable-scheme=<path> use <path> as host's build directory for cross])
++AC_ARG_ENABLE(scheme, [ --enable-scheme=<path> use <path> as host build for cross])
+ AC_ARG_ENABLE(mach, [ --enable-mach=<mach> use Chez Scheme machine type <mach>])
+ AC_ARG_ENABLE(target, [ --enable-target=<mach> cross-build for Chez Scheme machine type <mach>])
+ m4_include(../ac/portable_arg.m4)
+@@ -81,7 +81,7 @@ show_explicitly_disabled "${enable_compressboot}" "Compressed boot files"
+ show_explicitly_enabled "${enable_xonx}" "Unix style"
+ m4_include(../ac/path_show.m4)
+ show_explicitly_set "${enable_racket}" "Racket"
+-show_explicitly_set "${enable_scheme}" "Chez Scheme build directory"
++show_explicitly_set "${enable_scheme}" "Chez Scheme for build"
+ show_explicitly_set "${enable_mach}" "machine type"
+ show_explicitly_set "${enable_target}" "cross-build machine type"
+ m4_include(../ac/portable_show.m4)
+@@ -504,9 +504,21 @@ esac
+
+ SCHEME_DIR=${srcdir}/../../ChezScheme
+ MAKE_BUILD_SCHEME=checkout
++USE_SCHEME_MODE="_built"
++MAKE_SCHEME_MODE="${T_CROSS_MODE}"
+
+ if test "${enable_scheme}" != "" ; then
+- CS_HOST_WORKAREA_PREFIX="${enable_scheme}/"
++ if test -d "${enable_scheme}" ; then
++ # Directory exists, so use it as a build directory
++ echo "Using supplied Scheme path as a build directory"
++ CS_HOST_WORKAREA_PREFIX="${enable_scheme}/"
++ else
++ # Directory does not exist, so assume it's an executable
++ echo "Using supplied Scheme path as an executable"
++ MAKE_SCHEME_MODE="${T_CROSS_MODE}-via-scheme"
++ MAKE_SCHEME_SCHEME="${enable_scheme}"
++ USE_SCHEME_MODE="_existing"
++ fi
+ fi
+
+ if test "${enable_racket}" != "" ; then
+@@ -821,6 +833,9 @@ AC_SUBST(DIFF_MACH)
+ AC_SUBST(CROSS_MODE)
+ AC_SUBST(T_CROSS_MODE)
+ AC_SUBST(TT_CROSS_MODE)
++AC_SUBST(MAKE_SCHEME_MODE)
++AC_SUBST(MAKE_SCHEME_SCHEME)
++AC_SUBST(USE_SCHEME_MODE)
+ AC_SUBST(SETUP_BOOT_MODE)
+ AC_SUBST(OSX)
+ AC_SUBST(NOT_OSX)
+--
+2.32.0
+
diff --git a/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch b/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch
new file mode 100644
index 0000000000..1e018eaa79
--- /dev/null
+++ b/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch
@@ -0,0 +1,26 @@
+From aa792e707b1fbc5cc33691bfaee5828dc3fbebaa Mon Sep 17 00:00:00 2001
+From: Matthew Flatt <mflatt@racket-lang.org>
+Date: Mon, 31 Jan 2022 15:31:22 -0700
+Subject: [PATCH] fix creation of tethered launchers
+
+Related to racket/racket#4133
+
+(cherry picked from commit 563c68432f127729592f234ef30c31e92618b517)
+---
+ gui-lib/mred/installer.rkt | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/gui-lib/mred/installer.rkt b/gui-lib/mred/installer.rkt
+index b1691472..9ef06c53 100644
+--- a/gui-lib/mred/installer.rkt
++++ b/gui-lib/mred/installer.rkt
+@@ -72,4 +72,5 @@
+ (list "-A" (path->string (find-system-path 'addon-dir)))))
+
+ (define (config-flags)
+- (list "-G" (path->string (find-config-dir))))
++ (list "-X" (path->string (find-collects-dir))
++ "-G" (path->string (find-config-dir))))
+--
+2.32.0
+
diff --git a/gnu/packages/patches/rust-coresimd-doctest.patch b/gnu/packages/patches/rust-coresimd-doctest.patch
deleted file mode 100644
index bfa0ab224b..0000000000
--- a/gnu/packages/patches/rust-coresimd-doctest.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Doctest coresimd::x86::__m256 failed on processors withouth "avx" feature.
-Backported patch with changes from https://github.com/rust-lang-nursery/stdsimd/issues/481
-
---- rustc-1.26.2-src-orig/src/stdsimd/coresimd/x86/mod.rs 1970-01-01 05:00:00.000000000 +0500
-+++ rustc-1.26.2-src/src/stdsimd/coresimd/x86/mod.rs 2018-06-22 00:01:55.142026720 +0500
-@@ -293,13 +293,13 @@
- /// use std::arch::x86_64::*;
- ///
- /// # fn main() {
-- /// # #[target_feature(enable = "sse")]
-+ /// # #[target_feature(enable = "avx")]
- /// # unsafe fn foo() {
- /// let eight_zeros = _mm256_setzero_ps();
- /// let eight_ones = _mm256_set1_ps(1.0);
- /// let eight_floats = _mm256_set_ps(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0);
- /// # }
-- /// # if is_x86_feature_detected!("sse") { unsafe { foo() } }
-+ /// # if is_x86_feature_detected!("avx") { unsafe { foo() } }
- /// # }
- /// ```
- pub struct __m256(f32, f32, f32, f32, f32, f32, f32, f32);
diff --git a/gnu/packages/patches/screen-CVE-2021-26937.patch b/gnu/packages/patches/screen-CVE-2021-26937.patch
deleted file mode 100644
index d87a54a83f..0000000000
--- a/gnu/packages/patches/screen-CVE-2021-26937.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-https://salsa.debian.org/debian/screen/-/raw/debian/4.8.0-5/debian/patches/99_CVE-2021-26937.patch
-
-Description: [CVE-2021-26937] Fix out of bounds array access
-Author: Michael Schröder <mls@suse.de>
-Bug-Debian: https://bugs.debian.org/982435
-Bug: https://savannah.gnu.org/bugs/?60030
-Bug: https://lists.gnu.org/archive/html/screen-devel/2021-02/msg00000.html
-Bug-OSS-Security: https://www.openwall.com/lists/oss-security/2021/02/09/3
-Origin: https://lists.gnu.org/archive/html/screen-devel/2021-02/msg00010.html
-
---- a/encoding.c
-+++ b/encoding.c
-@@ -43,7 +43,7 @@
- # ifdef UTF8
- static int recode_char __P((int, int, int));
- static int recode_char_to_encoding __P((int, int));
--static void comb_tofront __P((int, int));
-+static void comb_tofront __P((int));
- # ifdef DW_CHARS
- static int recode_char_dw __P((int, int *, int, int));
- static int recode_char_dw_to_encoding __P((int, int *, int));
-@@ -1263,6 +1263,8 @@
- {0x30000, 0x3FFFD},
- };
-
-+ if (c >= 0xdf00 && c <= 0xdfff)
-+ return 1; /* dw combining sequence */
- return ((bisearch(c, wide, sizeof(wide) / sizeof(struct interval) - 1)) ||
- (cjkwidth &&
- bisearch(c, ambiguous,
-@@ -1330,11 +1332,12 @@
- }
-
- static void
--comb_tofront(root, i)
--int root, i;
-+comb_tofront(i)
-+int i;
- {
- for (;;)
- {
-+ int root = i >= 0x700 ? 0x801 : 0x800;
- debug1("bring to front: %x\n", i);
- combchars[combchars[i]->prev]->next = combchars[i]->next;
- combchars[combchars[i]->next]->prev = combchars[i]->prev;
-@@ -1396,9 +1399,9 @@
- {
- /* full, recycle old entry */
- if (c1 >= 0xd800 && c1 < 0xe000)
-- comb_tofront(root, c1 - 0xd800);
-+ comb_tofront(c1 - 0xd800);
- i = combchars[root]->prev;
-- if (c1 == i + 0xd800)
-+ if (i == 0x800 || i == 0x801 || c1 == i + 0xd800)
- {
- /* completely full, can't recycle */
- debug("utf8_handle_comp: completely full!\n");
-@@ -1422,7 +1425,7 @@
- mc->font = (i >> 8) + 0xd8;
- mc->fontx = 0;
- debug3("combinig char %x %x -> %x\n", c1, c, i + 0xd800);
-- comb_tofront(root, i);
-+ comb_tofront(i);
- }
-
- #else /* !UTF8 */
diff --git a/gnu/packages/patches/sdcc-disable-non-free-code.patch b/gnu/packages/patches/sdcc-disable-non-free-code.patch
index 1c823c3c18..39046ae280 100644
--- a/gnu/packages/patches/sdcc-disable-non-free-code.patch
+++ b/gnu/packages/patches/sdcc-disable-non-free-code.patch
@@ -15,10 +15,10 @@ remove instructions that encourage the use of SDCC with non-free
software.
diff --git a/Makefile.common.in b/Makefile.common.in
-index 926b761..0362fd5 100644
+index 1a11f67..69d5efe 100644
--- a/Makefile.common.in
+++ b/Makefile.common.in
-@@ -71,7 +71,6 @@ OPT_DISABLE_PACKIHX = @OPT_DISABLE_PACKIHX@
+@@ -73,7 +73,6 @@ OPT_DISABLE_PACKIHX = @OPT_DISABLE_PACKIHX@
OPT_DISABLE_SDBINUTILS = @OPT_DISABLE_SDBINUTILS@
OPT_DISABLE_SDCPP = @OPT_DISABLE_SDCPP@
OPT_DISABLE_UCSIM = @OPT_DISABLE_UCSIM@
@@ -27,10 +27,10 @@ index 926b761..0362fd5 100644
SLIB = $(top_builddir)/support/util
diff --git a/Makefile.in b/Makefile.in
-index 5485074..3071472 100644
+index d899b62..554a1c3 100644
--- a/Makefile.in
+++ b/Makefile.in
-@@ -100,9 +100,6 @@ endif
+@@ -105,9 +105,6 @@ endif
ifeq ($(OPT_DISABLE_DEVICE_LIB), 0)
TARGETS += sdcc-device-lib
PKGS += device/lib
@@ -40,7 +40,7 @@ index 5485074..3071472 100644
endif
ifeq ($(OPT_DISABLE_PACKIHX), 0)
-@@ -123,9 +120,6 @@ endif
+@@ -128,9 +125,6 @@ endif
TARGETS += sdcc-libs sdcc-cc sdcc-device-inc sdcc-as sdcc-ld sdcc-scripts
PKGS += $(SDCC_LIBS) src device/include
@@ -50,7 +50,7 @@ index 5485074..3071472 100644
PKGS += $(SDCC_AS) sdas/linksrc $(SDCC_SCRIPTS)
PORTS = $(shell cat ports.build)
-@@ -171,21 +165,12 @@ sdcc-sdbinutils:
+@@ -176,21 +170,12 @@ sdcc-sdbinutils:
sdcc-device-inc:
$(MAKE) -C device/include
@@ -73,10 +73,10 @@ index 5485074..3071472 100644
# doc depends on latex and latex2html
diff --git a/configure b/configure
-index 4c2226b..b8a9251 100755
+index 232d98e..3eeb17c 100755
--- a/configure
+++ b/configure
-@@ -632,7 +632,6 @@ LATEX
+@@ -659,7 +659,6 @@ LATEX
LATEX2HTML
LYX
OPT_ENABLE_DOC
@@ -84,7 +84,7 @@ index 4c2226b..b8a9251 100755
OPT_DISABLE_SDBINUTILS
OPT_DISABLE_SDCDB
OPT_DISABLE_SDCPP
-@@ -661,10 +660,7 @@ OPT_DISABLE_R2K
+@@ -690,10 +689,7 @@ OPT_DISABLE_R2K
OPT_DISABLE_Z180
OPT_DISABLE_Z80
OPT_DISABLE_MCS51
@@ -95,7 +95,7 @@ index 4c2226b..b8a9251 100755
include_dir_suffix
inclib_dir_suffix
LIB_TYPE
-@@ -785,7 +781,6 @@ enable_packihx
+@@ -821,7 +817,6 @@ enable_packihx
enable_sdcpp
enable_sdcdb
enable_sdbinutils
@@ -103,7 +103,7 @@ index 4c2226b..b8a9251 100755
enable_doc
enable_libgc
'
-@@ -806,10 +801,7 @@ sdccconf_h_dir_separator
+@@ -842,10 +837,7 @@ sdccconf_h_dir_separator
LIB_TYPE
inclib_dir_suffix
include_dir_suffix
@@ -114,7 +114,7 @@ index 4c2226b..b8a9251 100755
docdir'
ac_subdirs_all='support/cpp
support/packihx
-@@ -817,9 +809,7 @@ sim/ucsim
+@@ -853,9 +845,7 @@ sim/ucsim
debugger/mcs51
support/sdbinutils
device/lib/pic14
@@ -125,7 +125,7 @@ index 4c2226b..b8a9251 100755
# Initialize some variables set by options.
ac_init_help=
-@@ -1473,7 +1463,6 @@ Optional Features:
+@@ -1509,7 +1499,6 @@ Optional Features:
--disable-sdcpp Disables building sdcpp
--disable-sdcdb Disables building sdcdb
--disable-sdbinutils Disables configuring and building of sdbinutils
@@ -133,7 +133,7 @@ index 4c2226b..b8a9251 100755
--enable-doc Enables building the documentation
--enable-libgc Use the Bohem memory allocator. Lower runtime
footprint.
-@@ -1502,16 +1491,8 @@ Some influential environment variables:
+@@ -1538,16 +1527,8 @@ Some influential environment variables:
appended to datadir to define SDCC's include/lib directory
include_dir_suffix
appended to datadir to define SDCC's include directory
@@ -150,7 +150,7 @@ index 4c2226b..b8a9251 100755
docdir documentation installation directory
Use these variables to override the choices made by `configure' or to help
-@@ -7156,19 +7137,6 @@ if test "${include_dir_suffix}" = ""; then
+@@ -7421,19 +7402,6 @@ if test "${include_dir_suffix}" = ""; then
include_dir_suffix="${inclib_dir_suffix}/include"
fi
@@ -170,7 +170,7 @@ index 4c2226b..b8a9251 100755
# lib_dir_suffix:
# *nix default: "sdcc/lib"
-@@ -7176,13 +7144,6 @@ if test "${lib_dir_suffix}" = ""; then
+@@ -7441,13 +7409,6 @@ if test "${lib_dir_suffix}" = ""; then
lib_dir_suffix="${inclib_dir_suffix}/lib"
fi
@@ -184,9 +184,9 @@ index 4c2226b..b8a9251 100755
# docdir:
# *nix default: "${datadir}/sdcc/doc"
-@@ -7349,24 +7310,6 @@ cat >>confdefs.h <<_ACEOF
- #define INCLUDE_DIR_SUFFIX DIR_SEPARATOR_STRING "${norm_inc_dir_suffix}"
- _ACEOF
+@@ -7600,22 +7561,6 @@ esac
+
+ printf "%s\n" "#define INCLUDE_DIR_SUFFIX DIR_SEPARATOR_STRING \"${norm_inc_dir_suffix}\"" >>confdefs.h
-norm_non_free_inc_dir_suffix=${non_free_include_dir_suffix}
-case ":$norm_non_free_inc_dir_suffix:" in
@@ -202,16 +202,14 @@ index 4c2226b..b8a9251 100755
- *) norm_non_free_inc_dir_suffix=`echo "$norm_non_free_inc_dir_suffix" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
-esac
-
--cat >>confdefs.h <<_ACEOF
--#define NON_FREE_INCLUDE_DIR_SUFFIX DIR_SEPARATOR_STRING "${norm_non_free_inc_dir_suffix}"
--_ACEOF
+-printf "%s\n" "#define NON_FREE_INCLUDE_DIR_SUFFIX DIR_SEPARATOR_STRING \"${norm_non_free_inc_dir_suffix}\"" >>confdefs.h
-
norm_lib_dir_suffix=${lib_dir_suffix}
case ":$norm_lib_dir_suffix:" in
-@@ -7386,24 +7329,6 @@ cat >>confdefs.h <<_ACEOF
- #define LIB_DIR_SUFFIX DIR_SEPARATOR_STRING "${norm_lib_dir_suffix}"
- _ACEOF
+@@ -7633,22 +7578,6 @@ esac
+
+ printf "%s\n" "#define LIB_DIR_SUFFIX DIR_SEPARATOR_STRING \"${norm_lib_dir_suffix}\"" >>confdefs.h
-norm_non_free_lib_dir_suffix=${non_free_lib_dir_suffix}
-case ":$norm_non_free_lib_dir_suffix:" in
@@ -227,19 +225,18 @@ index 4c2226b..b8a9251 100755
- *) norm_non_free_lib_dir_suffix=`echo "$norm_non_free_lib_dir_suffix" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
-esac
-
--cat >>confdefs.h <<_ACEOF
--#define NON_FREE_LIB_DIR_SUFFIX DIR_SEPARATOR_STRING "${norm_non_free_lib_dir_suffix}"
--_ACEOF
+-printf "%s\n" "#define NON_FREE_LIB_DIR_SUFFIX DIR_SEPARATOR_STRING \"${norm_non_free_lib_dir_suffix}\"" >>confdefs.h
-
# relative paths
for _lcl_i in expanded_bindir:expanded_datadir:bin2data_dir; do
-@@ -8513,28 +8438,6 @@ _ACEOF
+@@ -8751,27 +8680,6 @@ printf "%s\n" "#define OPT_DISABLE_SDBINUTILS $OPT_DISABLE_SDBINUTILS" >>confdef
- # Check whether --enable-non-free was given.
--if test "${enable_non_free+set}" = set; then :
+-if test ${enable_non_free+y}
+-then :
- enableval=$enable_non_free;
-fi
-
@@ -253,17 +250,15 @@ index 4c2226b..b8a9251 100755
- fi
-
-
--cat >>confdefs.h <<_ACEOF
--#define OPT_DISABLE_NON_FREE $OPT_DISABLE_NON_FREE
--_ACEOF
+-printf "%s\n" "#define OPT_DISABLE_NON_FREE $OPT_DISABLE_NON_FREE" >>confdefs.h
-
-
-
-
# Check whether --enable-doc was given.
- if test "${enable_doc+set}" = set; then :
-@@ -8929,20 +8832,12 @@ if test $OPT_DISABLE_PIC14 = 0; then
+ if test ${enable_doc+y}
+@@ -9199,20 +9107,12 @@ if test $OPT_DISABLE_PIC14 = 0; then
test $OPT_DISABLE_DEVICE_LIB = 0 && subdirs="$subdirs device/lib/pic14"
@@ -283,8 +278,8 @@ index 4c2226b..b8a9251 100755
-
fi
- if test $OPT_DISABLE_Z80 = 0 || test $OPT_DISABLE_Z180 = 0 || test $OPT_DISABLE_R2K = 0 || test $OPT_DISABLE_R2KA = 0 || test $OPT_DISABLE_R3KA = 0 || test $OPT_DISABLE_GBZ80 = 0 || test $OPT_DISABLE_TLCS90 = 0 || test $OPT_DISABLE_EZ80_Z80 = 0 || test $OPT_DISABLE_Z80N = 0; then
-@@ -9019,15 +8914,9 @@ fi
+ if test $OPT_DISABLE_Z80 = 0 || test $OPT_DISABLE_Z180 = 0 || test $OPT_DISABLE_R2K = 0 || test $OPT_DISABLE_R2KA = 0 || test $OPT_DISABLE_R3KA = 0 || test $OPT_DISABLE_SM83 = 0 || test $OPT_DISABLE_TLCS90 = 0 || test $OPT_DISABLE_EZ80_Z80 = 0 || test $OPT_DISABLE_Z80N = 0; then
+@@ -9289,15 +9189,9 @@ fi
test $OPT_DISABLE_DEVICE_LIB = 0 && ac_config_files="$ac_config_files device/lib/Makefile"
@@ -300,7 +295,7 @@ index 4c2226b..b8a9251 100755
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
-@@ -9768,7 +9657,6 @@ do
+@@ -10037,7 +9931,6 @@ do
"device/lib/pdk15-stack-auto/Makefile") CONFIG_FILES="$CONFIG_FILES device/lib/pdk15-stack-auto/Makefile" ;;
"sdas/aspdk16/Makefile") CONFIG_FILES="$CONFIG_FILES sdas/aspdk16/Makefile" ;;
"device/lib/Makefile") CONFIG_FILES="$CONFIG_FILES device/lib/Makefile" ;;
@@ -308,7 +303,7 @@ index 4c2226b..b8a9251 100755
"main.mk") CONFIG_FILES="$CONFIG_FILES main.mk:main_in.mk" ;;
"src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
"device/include/Makefile") CONFIG_FILES="$CONFIG_FILES device/include/Makefile" ;;
-@@ -9780,7 +9668,6 @@ do
+@@ -10049,7 +9942,6 @@ do
"support/regression/ports/host/spec.mk") CONFIG_FILES="$CONFIG_FILES support/regression/ports/host/spec.mk:support/regression/ports/host/spec.mk.in" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"Makefile.common") CONFIG_FILES="$CONFIG_FILES Makefile.common:Makefile.common.in" ;;
@@ -316,7 +311,7 @@ index 4c2226b..b8a9251 100755
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
-@@ -10589,54 +10476,6 @@ esac
+@@ -10856,54 +10748,6 @@ esac
incPath3=`echo "$incPath3" | sed 's,\\\\\\\\,\\\\,g'`
@@ -371,7 +366,7 @@ index 4c2226b..b8a9251 100755
libPath1=`echo "/${prefix2data_dir}/${norm_lib_dir_suffix}" | sed 's,/\./,/,g'`
case ":$libPath1:" in
-@@ -10686,54 +10525,6 @@ esac
+@@ -10953,54 +10797,6 @@ esac
libPath3=`echo "$libPath3" | sed 's,\\\\\\\\,\\\\,g'`
@@ -423,18 +418,18 @@ index 4c2226b..b8a9251 100755
-nonFreeLibPath3=`echo "$nonFreeLibPath3" | sed 's,\\\\\\\\,\\\\,g'`
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result:
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result:
sdcc ${VERSION} is now configured for
-@@ -10772,7 +10563,6 @@ sdcc ${VERSION} is now configured for
- pdk15 ${enable_pdk15_port}
- pdk16 ${enable_pdk16_port}
+@@ -11041,7 +10837,6 @@ sdcc ${VERSION} is now configured for
+ mos6502 ${enable_mos6502_port}
+ mos65c02 ${enable_mos65c02_port}
- Disable non-free lib: ${OPT_DISABLE_NON_FREE}
Disable packihx: ${OPT_DISABLE_PACKIHX}
Disable ucsim: ${OPT_DISABLE_UCSIM}
Disable device lib: ${OPT_DISABLE_DEVICE_LIB}
-@@ -10787,9 +10577,6 @@ sdcc ${VERSION} is now configured for
+@@ -11056,9 +10851,6 @@ sdcc ${VERSION} is now configured for
include/library files: ${datadir}/${inclib_dir_suffix}
include files: ${datadir}/${include_dir_suffix}
library files: ${datadir}/${lib_dir_suffix}
@@ -444,7 +439,7 @@ index 4c2226b..b8a9251 100755
documentation: ${docdir}
prefix: ${prefix}
-@@ -10801,15 +10588,9 @@ sdcc ${VERSION} is now configured for
+@@ -11070,15 +10862,9 @@ sdcc ${VERSION} is now configured for
include files: ${incPath1}
path(argv[0])${incPath2}
${incPath3}
@@ -458,17 +453,17 @@ index 4c2226b..b8a9251 100755
- path(argv[0])${nonFreeLibPath2}${dirch}<model>
- ${nonFreeLibPath3}${dirch}<model>
" >&5
- $as_echo "
+ printf "%s\n" "
sdcc ${VERSION} is now configured for
-@@ -10849,7 +10630,6 @@ sdcc ${VERSION} is now configured for
- pdk15 ${enable_pdk15_port}
- pdk16 ${enable_pdk16_port}
+@@ -11120,7 +10906,6 @@ sdcc ${VERSION} is now configured for
+ mos6502 ${enable_mos6502_port}
+ mos65c02 ${enable_mos65c02_port}
- Disable non-free lib: ${OPT_DISABLE_NON_FREE}
Disable packihx: ${OPT_DISABLE_PACKIHX}
Disable ucsim: ${OPT_DISABLE_UCSIM}
Disable device lib: ${OPT_DISABLE_DEVICE_LIB}
-@@ -10864,9 +10644,6 @@ sdcc ${VERSION} is now configured for
+@@ -11135,9 +10920,6 @@ sdcc ${VERSION} is now configured for
include/library files: ${datadir}/${inclib_dir_suffix}
include files: ${datadir}/${include_dir_suffix}
library files: ${datadir}/${lib_dir_suffix}
@@ -478,7 +473,7 @@ index 4c2226b..b8a9251 100755
documentation: ${docdir}
prefix: ${prefix}
-@@ -10878,14 +10655,8 @@ sdcc ${VERSION} is now configured for
+@@ -11149,15 +10931,9 @@ sdcc ${VERSION} is now configured for
include files: ${incPath1}
path(argv[0])${incPath2}
${incPath3}
@@ -493,11 +488,12 @@ index 4c2226b..b8a9251 100755
- ${nonFreeLibPath3}${dirch}<model>
" >&6; }
# End of configure/configure.in
+
diff --git a/configure.ac b/configure.ac
-index 455fee1..48e0a20 100644
+index cc5309e..5eb4326 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -548,19 +548,6 @@ if test "${include_dir_suffix}" = ""; then
+@@ -562,19 +562,6 @@ if test "${include_dir_suffix}" = ""; then
include_dir_suffix="${inclib_dir_suffix}/include"
fi
@@ -517,7 +513,7 @@ index 455fee1..48e0a20 100644
# lib_dir_suffix:
# *nix default: "sdcc/lib"
AC_ARG_VAR([lib_dir_suffix], [appended to datadir to define SDCC's library root directory])
-@@ -568,13 +555,6 @@ if test "${lib_dir_suffix}" = ""; then
+@@ -582,13 +569,6 @@ if test "${lib_dir_suffix}" = ""; then
lib_dir_suffix="${inclib_dir_suffix}/lib"
fi
@@ -531,7 +527,7 @@ index 455fee1..48e0a20 100644
# docdir:
# *nix default: "${datadir}/sdcc/doc"
AC_ARG_VAR([docdir], [documentation installation directory])
-@@ -615,19 +595,11 @@ norm_inc_dir_suffix=${include_dir_suffix}
+@@ -629,19 +609,11 @@ norm_inc_dir_suffix=${include_dir_suffix}
adl_NORMALIZE_PATH([norm_inc_dir_suffix], [$sdccconf_h_dir_separator])
AC_DEFINE_UNQUOTED(INCLUDE_DIR_SUFFIX,
DIR_SEPARATOR_STRING "${norm_inc_dir_suffix}", [XXX])
@@ -551,7 +547,7 @@ index 455fee1..48e0a20 100644
# relative paths
adl_COMPUTE_RELATIVE_PATHS([expanded_bindir:expanded_datadir:bin2data_dir])
-@@ -803,7 +775,6 @@ AC_DO_DISABLER(packihx, PACKIHX, [Disables building packihx])
+@@ -819,7 +791,6 @@ AC_DO_DISABLER(packihx, PACKIHX, [Disables building packihx])
AC_DO_DISABLER(sdcpp, SDCPP, [Disables building sdcpp])
AC_DO_DISABLER(sdcdb, SDCDB, [Disables building sdcdb])
AC_DO_DISABLER(sdbinutils, SDBINUTILS, [Disables configuring and building of sdbinutils])
@@ -559,7 +555,7 @@ index 455fee1..48e0a20 100644
AC_DO_ENABLER(doc, DOC, [Enables building the documentation])
AC_CHECK_PROG([LYX], [lyx], [lyx], [:])
-@@ -874,16 +845,10 @@ if test $OPT_DISABLE_PIC14 = 0; then
+@@ -897,16 +868,10 @@ if test $OPT_DISABLE_PIC14 = 0; then
AC_CONFIG_FILES(src/pic14/Makefile)
test $OPT_DISABLE_DEVICE_LIB = 0 && AC_CONFIG_SUBDIRS(device/lib/pic14)
fi
@@ -574,9 +570,9 @@ index 455fee1..48e0a20 100644
- test $OPT_DISABLE_DEVICE_LIB = 0 && AC_CONFIG_SUBDIRS(device/non-free/lib/pic16)
-fi
- if test $OPT_DISABLE_Z80 = 0 || test $OPT_DISABLE_Z180 = 0 || test $OPT_DISABLE_R2K = 0 || test $OPT_DISABLE_R2KA = 0 || test $OPT_DISABLE_R3KA = 0 || test $OPT_DISABLE_GBZ80 = 0 || test $OPT_DISABLE_TLCS90 = 0 || test $OPT_DISABLE_EZ80_Z80 = 0 || test $OPT_DISABLE_Z80N = 0; then
+ if test $OPT_DISABLE_Z80 = 0 || test $OPT_DISABLE_Z180 = 0 || test $OPT_DISABLE_R2K = 0 || test $OPT_DISABLE_R2KA = 0 || test $OPT_DISABLE_R3KA = 0 || test $OPT_DISABLE_SM83 = 0 || test $OPT_DISABLE_TLCS90 = 0 || test $OPT_DISABLE_EZ80_Z80 = 0 || test $OPT_DISABLE_Z80N = 0; then
AC_CONFIG_FILES([src/z80/Makefile])
-@@ -947,7 +912,6 @@ fi
+@@ -970,7 +935,6 @@ fi
test $OPT_DISABLE_DEVICE_LIB = 0 && AC_CONFIG_FILES([device/lib/Makefile])
@@ -584,7 +580,7 @@ index 455fee1..48e0a20 100644
AC_CONFIG_FILES([main.mk:main_in.mk
src/Makefile
-@@ -961,9 +925,6 @@ support/regression/ports/host/spec.mk:support/regression/ports/host/spec.mk.in
+@@ -984,9 +948,6 @@ support/regression/ports/host/spec.mk:support/regression/ports/host/spec.mk.in
Makefile
Makefile.common:Makefile.common.in
])
@@ -594,7 +590,7 @@ index 455fee1..48e0a20 100644
AC_OUTPUT
# I found no better place
-@@ -981,16 +942,10 @@ adl_NORMALIZE_PATH_MSG(/${prefix2bin_dir}, [binPath], [
+@@ -1004,16 +965,10 @@ adl_NORMALIZE_PATH_MSG(/${prefix2bin_dir}, [binPath], [
adl_NORMALIZE_PATH_MSG(/${prefix2data_dir}/${norm_inc_dir_suffix}, [incPath1], [$dirch])
adl_NORMALIZE_PATH_MSG(/${bin2data_dir}/${norm_inc_dir_suffix}, [incPath2], [$dirch])
adl_NORMALIZE_PATH_MSG(${expanded_datadir}/${norm_inc_dir_suffix}, [incPath3], [$dirch])
@@ -611,15 +607,15 @@ index 455fee1..48e0a20 100644
AC_MSG_RESULT([
sdcc ${VERSION} is now configured for
-@@ -1030,7 +985,6 @@ sdcc ${VERSION} is now configured for
- pdk15 ${enable_pdk15_port}
- pdk16 ${enable_pdk16_port}
+@@ -1055,7 +1010,6 @@ sdcc ${VERSION} is now configured for
+ mos6502 ${enable_mos6502_port}
+ mos65c02 ${enable_mos65c02_port}
- Disable non-free lib: ${OPT_DISABLE_NON_FREE}
Disable packihx: ${OPT_DISABLE_PACKIHX}
Disable ucsim: ${OPT_DISABLE_UCSIM}
Disable device lib: ${OPT_DISABLE_DEVICE_LIB}
-@@ -1045,9 +999,6 @@ sdcc ${VERSION} is now configured for
+@@ -1070,9 +1024,6 @@ sdcc ${VERSION} is now configured for
include/library files: ${datadir}/${inclib_dir_suffix}
include files: ${datadir}/${include_dir_suffix}
library files: ${datadir}/${lib_dir_suffix}
@@ -629,7 +625,7 @@ index 455fee1..48e0a20 100644
documentation: ${docdir}
prefix: ${prefix}
-@@ -1059,14 +1010,8 @@ sdcc ${VERSION} is now configured for
+@@ -1084,14 +1035,8 @@ sdcc ${VERSION} is now configured for
include files: ${incPath1}
path(argv[[0]])${incPath2}
${incPath3}
@@ -875,7 +871,7 @@ index 01ad950..62839b9 100644
clean-local:
diff --git a/device/lib/pic16/Makefile.in b/device/lib/pic16/Makefile.in
-index e4e3abb..730066b 100644
+index 6a4c9cf..4b07384 100644
--- a/device/lib/pic16/Makefile.in
+++ b/device/lib/pic16/Makefile.in
@@ -87,10 +87,7 @@ PRE_UNINSTALL = :
@@ -890,7 +886,7 @@ index e4e3abb..730066b 100644
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
-@@ -295,8 +292,7 @@ top_build_prefix = @top_build_prefix@
+@@ -297,8 +294,7 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = debug libc libio libm libsdcc startup
@@ -900,7 +896,7 @@ index e4e3abb..730066b 100644
#AM_CFLAGS += --no-optimize-goto
#AM_CFLAGS += --debug-ralloc
-@@ -310,11 +306,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \
+@@ -312,11 +308,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \
#AM_CFLAGS += --noinduction
#AM_CFLAGS += --nojtbound
#AM_CFLAGS += --noloopreverse
@@ -915,19 +911,40 @@ index e4e3abb..730066b 100644
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
diff --git a/device/lib/pic16/configure b/device/lib/pic16/configure
-index ed8ad06..65baa93 100755
+index add51b9..c451a74 100755
--- a/device/lib/pic16/configure
+++ b/device/lib/pic16/configure
-@@ -3657,7 +3657,6 @@ fi
+@@ -3828,7 +3828,6 @@ fi
-LIBDEV="${srcdir}/../../non-free/lib/pic16/libdev"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking devices supported by gputils" >&5
- $as_echo_n "checking devices supported by gputils... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking devices supported by gputils" >&5
+ printf %s "checking devices supported by gputils... " >&6; }
GOOD_PICS="";
+@@ -3839,20 +3838,6 @@ N_GOOD=0
+ N_BAD=0
+ mkdir -p ".checkdevices";
+ rm -f "$RESULT";
+-for i in "${LIBDEV}/pic1"*.c; do
+- p="${i##*pic}";
+- p="${p%.c}";
+- P=$(echo "$p" | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ);
+- printf " include \"p%s.inc\"\n END" "$p" > "${CHECK}.asm";
+- if "$mCCAS" -p "$p" -o "${CHECK}.o" -c "${CHECK}.asm" >/dev/null 2>&1 && "$mLD" "${CHECK}.o" >/dev/null 2>&1; then
+- GOOD_PICS="$GOOD_PICS $p";
+- N_GOOD=`expr $N_GOOD + 1`;
+- echo "$P" >> "$RESULT";
+- else
+- BAD_PICS="$BAD_PICS $p";
+- N_BAD=`expr $N_BAD + 1`;
+- fi;
+-done;
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $N_GOOD devices ($GOOD_PICS)" >&5
+ printf "%s\n" "$N_GOOD devices ($GOOD_PICS)" >&6; }
+
diff --git a/device/lib/pic16/configure.ac b/device/lib/pic16/configure.ac
-index 3966c11..cdbffc7 100644
+index 75bea9d..65e98be 100644
--- a/device/lib/pic16/configure.ac
+++ b/device/lib/pic16/configure.ac
@@ -68,10 +68,6 @@ AC_SUBST(OBJEXT, [o])
@@ -942,7 +959,7 @@ index 3966c11..cdbffc7 100644
# Checks for header files.
diff --git a/device/lib/pic16/debug/Makefile.in b/device/lib/pic16/debug/Makefile.in
-index 8d5eb80..9dd8bb2 100644
+index 05108a8..a6a94bb 100644
--- a/device/lib/pic16/debug/Makefile.in
+++ b/device/lib/pic16/debug/Makefile.in
@@ -88,10 +88,7 @@ PRE_UNINSTALL = :
@@ -957,7 +974,7 @@ index 8d5eb80..9dd8bb2 100644
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
-@@ -291,8 +288,7 @@ top_builddir = @top_builddir@
+@@ -292,8 +289,7 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
lib_LIBRARIES = libdebug.a
libdebug_a_SOURCES = gstack/gstack.c
@@ -967,7 +984,7 @@ index 8d5eb80..9dd8bb2 100644
#AM_CFLAGS += --no-optimize-goto
#AM_CFLAGS += --debug-ralloc
-@@ -306,11 +302,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \
+@@ -307,11 +303,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \
#AM_CFLAGS += --noinduction
#AM_CFLAGS += --nojtbound
#AM_CFLAGS += --noloopreverse
@@ -982,7 +999,7 @@ index 8d5eb80..9dd8bb2 100644
.SUFFIXES:
diff --git a/device/lib/pic16/libc/Makefile.in b/device/lib/pic16/libc/Makefile.in
-index 659db72..cbb73bf 100644
+index 49a437d..5579b71 100644
--- a/device/lib/pic16/libc/Makefile.in
+++ b/device/lib/pic16/libc/Makefile.in
@@ -88,10 +88,7 @@ PRE_UNINSTALL = :
@@ -997,7 +1014,7 @@ index 659db72..cbb73bf 100644
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
-@@ -381,8 +378,7 @@ libc18f_a_SOURCES = ctype/iscntrl.c ctype/isdigit.c ctype/isgraph.c \
+@@ -382,8 +379,7 @@ libc18f_a_SOURCES = ctype/iscntrl.c ctype/isdigit.c ctype/isgraph.c \
string/strpbrk.c string/strrchr.c string/strspn.c \
string/strstr.c string/strtok.c string/strupr.c \
utils/cnvfrac.S utils/cnvint.S utils/cvtdec.S
@@ -1007,7 +1024,7 @@ index 659db72..cbb73bf 100644
#AM_CFLAGS += --no-optimize-goto
#AM_CFLAGS += --debug-ralloc
-@@ -396,11 +392,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \
+@@ -397,11 +393,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \
#AM_CFLAGS += --noinduction
#AM_CFLAGS += --nojtbound
#AM_CFLAGS += --noloopreverse
@@ -1022,7 +1039,7 @@ index 659db72..cbb73bf 100644
.SUFFIXES:
diff --git a/device/lib/pic16/libio/Makefile.in b/device/lib/pic16/libio/Makefile.in
-index 128ffcc..b298c7c 100644
+index 5b1a9b0..664958f 100644
--- a/device/lib/pic16/libio/Makefile.in
+++ b/device/lib/pic16/libio/Makefile.in
@@ -481,10 +481,7 @@ POST_UNINSTALL = :
@@ -1037,7 +1054,7 @@ index 128ffcc..b298c7c 100644
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
-@@ -15600,8 +15597,7 @@ libio18lf8722_a_SOURCES = dummy.c i2c/i2cack.c i2c/i2cclose.c \
+@@ -15601,8 +15598,7 @@ libio18lf8722_a_SOURCES = dummy.c i2c/i2cack.c i2c/i2cclose.c \
libio18lf8722_a_CFLAGS = -p18lf8722 $(AM_CFLAGS)
libio18lf8723_a_SOURCES = dummy.c
libio18lf8723_a_CFLAGS = -p18lf8723 $(AM_CFLAGS)
@@ -1047,7 +1064,7 @@ index 128ffcc..b298c7c 100644
#AM_CFLAGS += --no-optimize-goto
#AM_CFLAGS += --debug-ralloc
-@@ -15615,11 +15611,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \
+@@ -15616,11 +15612,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \
#AM_CFLAGS += --noinduction
#AM_CFLAGS += --nojtbound
#AM_CFLAGS += --noloopreverse
@@ -1107,7 +1124,7 @@ index 211604e..e8896bf 100755
include \$(top_srcdir)/Makefile.common
diff --git a/device/lib/pic16/libm/Makefile.in b/device/lib/pic16/libm/Makefile.in
-index af29662..05f1c24 100644
+index 285c5b8..ad6c293 100644
--- a/device/lib/pic16/libm/Makefile.in
+++ b/device/lib/pic16/libm/Makefile.in
@@ -88,10 +88,7 @@ PRE_UNINSTALL = :
@@ -1122,7 +1139,7 @@ index af29662..05f1c24 100644
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
-@@ -312,8 +309,7 @@ libm18f_a_SOURCES = acosf.c asincosf.c asinf.c atan2f.c atanf.c \
+@@ -313,8 +310,7 @@ libm18f_a_SOURCES = acosf.c asincosf.c asinf.c atan2f.c atanf.c \
frexpf.c isinf.c isnan.c ldexpf.c log10f.c logf.c modff.c \
powf.c sincosf.c sincoshf.c sinf.c sinhf.c sqrtf.c tancotf.c \
tanf.c tanhf.c
@@ -1132,7 +1149,7 @@ index af29662..05f1c24 100644
#AM_CFLAGS += --no-optimize-goto
#AM_CFLAGS += --debug-ralloc
-@@ -327,11 +323,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \
+@@ -328,11 +324,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \
#AM_CFLAGS += --noinduction
#AM_CFLAGS += --nojtbound
#AM_CFLAGS += --noloopreverse
@@ -1147,7 +1164,7 @@ index af29662..05f1c24 100644
.SUFFIXES:
diff --git a/device/lib/pic16/libsdcc/Makefile.in b/device/lib/pic16/libsdcc/Makefile.in
-index d384631..01129e3 100644
+index 808b8a5..412dc80 100644
--- a/device/lib/pic16/libsdcc/Makefile.in
+++ b/device/lib/pic16/libsdcc/Makefile.in
@@ -88,10 +88,7 @@ PRE_UNINSTALL = :
@@ -1162,7 +1179,7 @@ index d384631..01129e3 100644
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
-@@ -413,8 +410,7 @@ libsdcc_a_SOURCES = char/divschar.c char/divuchar.c char/modschar.c \
+@@ -414,8 +411,7 @@ libsdcc_a_SOURCES = char/divschar.c char/divuchar.c char/modschar.c \
int/modsint.c int/moduint.c int/mulint.c long/divslong.c \
long/divulong.c long/modslong.c long/modulong.c long/mullong.c \
lregs/lrrest.c lregs/lrst.c stack/stack.S
@@ -1172,7 +1189,7 @@ index d384631..01129e3 100644
#AM_CFLAGS += --no-optimize-goto
#AM_CFLAGS += --debug-ralloc
-@@ -428,11 +424,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \
+@@ -429,11 +425,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \
#AM_CFLAGS += --noinduction
#AM_CFLAGS += --nojtbound
#AM_CFLAGS += --noloopreverse
@@ -1187,7 +1204,7 @@ index d384631..01129e3 100644
.SUFFIXES:
diff --git a/device/lib/pic16/startup/Makefile.in b/device/lib/pic16/startup/Makefile.in
-index 6169096..0172a25 100644
+index d57c254..7394a4c 100644
--- a/device/lib/pic16/startup/Makefile.in
+++ b/device/lib/pic16/startup/Makefile.in
@@ -89,10 +89,7 @@ PRE_UNINSTALL = :
@@ -1202,7 +1219,7 @@ index 6169096..0172a25 100644
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
-@@ -308,8 +305,7 @@ libcrt0iz_a_SOURCES = crt0iz.c
+@@ -309,8 +306,7 @@ libcrt0iz_a_SOURCES = crt0iz.c
# Force installation of .o files into $libdir
crtdir = $(libdir)
crt_DATA = crt0.o crt0i.o crt0iz.o
@@ -1212,7 +1229,7 @@ index 6169096..0172a25 100644
#AM_CFLAGS += --no-optimize-goto
#AM_CFLAGS += --debug-ralloc
-@@ -323,11 +319,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \
+@@ -324,11 +320,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \
#AM_CFLAGS += --noinduction
#AM_CFLAGS += --nojtbound
#AM_CFLAGS += --noloopreverse
@@ -1227,7 +1244,7 @@ index 6169096..0172a25 100644
.SUFFIXES:
diff --git a/doc/INSTALL.txt b/doc/INSTALL.txt
-index d630b99..8cd747f 100644
+index 3c4bc1f..0a6fdd5 100644
--- a/doc/INSTALL.txt
+++ b/doc/INSTALL.txt
@@ -18,9 +18,7 @@ To install:
@@ -1261,10 +1278,10 @@ index d630b99..8cd747f 100644
You can test the install by entering:
diff --git a/doc/README.txt b/doc/README.txt
-index 88f8c98..a36db81 100644
+index 3720fd6..5a0d0a8 100644
--- a/doc/README.txt
+++ b/doc/README.txt
-@@ -35,10 +35,9 @@ Exception are pic device libraries and header files which are derived
+@@ -37,10 +37,9 @@ Exception are pic device libraries and header files which are derived
from Microchip header (.inc) and linker script (.lkr) files. Microchip
requires that "The header files should state that they are only to be
used with authentic Microchip devices" which makes them incompatible
@@ -1276,13 +1293,13 @@ index 88f8c98..a36db81 100644
+and run-time options that enable their use) are omitted in the SDCC
+package distributed with GNU Guix.
- See:
-
+ However: Many think that the Microchip requirement is not legally enforceable,
+ arguing that the header files only contain noncopyrightable facts.
diff --git a/doc/sdccman.lyx b/doc/sdccman.lyx
-index c8f8e73..e4afb0c 100644
+index 9ba31eb..3d69b5a 100644
--- a/doc/sdccman.lyx
+++ b/doc/sdccman.lyx
-@@ -1092,54 +1092,9 @@ A possible exception are pic device libraries and header files which are
+@@ -1093,54 +1093,9 @@ A possible exception are pic device libraries and header files which are
to be used with authentic Microchip devices" which makes them incompatible
with the GPL, if Microchip has any copyright in them (which might depend
on local copyright laws).
@@ -1340,7 +1357,7 @@ index c8f8e73..e4afb0c 100644
\end_layout
\begin_layout Itemize
-@@ -2890,18 +2845,6 @@ include_dir_suffix environment variable, see table below
+@@ -2943,18 +2898,6 @@ include_dir_suffix environment variable, see table below
\end_inset
@@ -1359,7 +1376,7 @@ index c8f8e73..e4afb0c 100644
\begin_inset space ~
\end_inset
-@@ -2914,22 +2857,6 @@ lib_dir_suffix environment variable, see table below
+@@ -2967,22 +2910,6 @@ lib_dir_suffix environment variable, see table below
\end_inset
@@ -1382,7 +1399,7 @@ index c8f8e73..e4afb0c 100644
\begin_inset space ~
\end_inset
-@@ -3428,7 +3355,7 @@ These defaults are:
+@@ -3481,7 +3408,7 @@ These defaults are:
\begin_layout Standard
\align center
\begin_inset Tabular
@@ -1391,7 +1408,7 @@ index c8f8e73..e4afb0c 100644
<features tabularvalignment="middle">
<column alignment="block" valignment="top" width="0in">
<column alignment="block" valignment="top" width="0in">
-@@ -3712,68 +3639,6 @@ sdcc/include
+@@ -3765,68 +3692,6 @@ sdcc/include
include
\end_layout
@@ -1460,7 +1477,7 @@ index c8f8e73..e4afb0c 100644
\end_inset
</cell>
</row>
-@@ -3784,7 +3649,7 @@ lib
+@@ -3837,7 +3702,7 @@ lib
\begin_layout Plain Layout
\emph on
@@ -1469,7 +1486,7 @@ index c8f8e73..e4afb0c 100644
\end_layout
\end_inset
-@@ -3793,7 +3658,7 @@ NON_FREE_LIB_DIR_SUFFIX
+@@ -3846,7 +3711,7 @@ NON_FREE_LIB_DIR_SUFFIX
\begin_inset Text
\begin_layout Plain Layout
@@ -1478,7 +1495,7 @@ index c8f8e73..e4afb0c 100644
\end_layout
\end_inset
-@@ -3802,7 +3667,7 @@ sdcc/non-free/lib
+@@ -3855,7 +3720,7 @@ sdcc/non-free/lib
\begin_inset Text
\begin_layout Plain Layout
@@ -1487,7 +1504,7 @@ index c8f8e73..e4afb0c 100644
\end_layout
\end_inset
-@@ -4201,20 +4066,6 @@ include
+@@ -4254,20 +4119,6 @@ include
\end_inset
@@ -1508,7 +1525,7 @@ index c8f8e73..e4afb0c 100644
\backslash
\begin_inset Newline newline
-@@ -4229,20 +4080,6 @@ lib
+@@ -4282,20 +4133,6 @@ lib
\end_inset
@@ -1529,7 +1546,7 @@ index c8f8e73..e4afb0c 100644
\backslash
\begin_inset Newline newline
-@@ -4423,20 +4260,6 @@ include
+@@ -4476,20 +4313,6 @@ include
\end_inset
@@ -1550,7 +1567,7 @@ index c8f8e73..e4afb0c 100644
\backslash
\begin_inset Newline newline
-@@ -4451,20 +4274,6 @@ lib
+@@ -4504,20 +4327,6 @@ lib
\end_inset
@@ -1571,7 +1588,7 @@ index c8f8e73..e4afb0c 100644
\backslash
\begin_inset Newline newline
-@@ -4561,7 +4370,7 @@ Install paths
+@@ -4614,7 +4423,7 @@ Install paths
\begin_layout Standard
\align center
\begin_inset Tabular
@@ -1580,7 +1597,7 @@ index c8f8e73..e4afb0c 100644
<features tabularvalignment="middle">
<column alignment="left" valignment="top">
<column alignment="left" valignment="top" width="4.5cm">
-@@ -4717,64 +4526,6 @@ include
+@@ -4770,64 +4579,6 @@ include
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
@@ -1645,7 +1662,7 @@ index c8f8e73..e4afb0c 100644
\begin_layout Plain Layout
Library file**
\end_layout
-@@ -4824,64 +4575,6 @@ sdcc
+@@ -4877,64 +4628,6 @@ sdcc
lib
\end_layout
@@ -1710,7 +1727,7 @@ index c8f8e73..e4afb0c 100644
\end_inset
</cell>
</row>
-@@ -5204,7 +4897,7 @@ $PATH
+@@ -5257,7 +4950,7 @@ $PATH
\begin_layout Standard
\align center
\begin_inset Tabular
@@ -1719,7 +1736,7 @@ index c8f8e73..e4afb0c 100644
<features tabularvalignment="middle">
<column alignment="block" valignment="top" width="0.5cm">
<column alignment="block" valignment="top" width="4.8cm">
-@@ -5482,203 +5175,13 @@ include
+@@ -5535,203 +5228,13 @@ include
</cell>
</row>
<row>
@@ -1924,7 +1941,7 @@ index c8f8e73..e4afb0c 100644
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-@@ -5694,21 +5197,13 @@ $DATADIR/
+@@ -5747,21 +5250,13 @@ $DATADIR/
\end_inset
@@ -1947,7 +1964,7 @@ index c8f8e73..e4afb0c 100644
\begin_inset Text
\begin_layout Plain Layout
-@@ -5716,7 +5211,7 @@ $INCLUDE_DIR_SUFFIX
+@@ -5769,7 +5264,7 @@ $INCLUDE_DIR_SUFFIX
\begin_inset Newline newline
\end_inset
@@ -1956,7 +1973,7 @@ index c8f8e73..e4afb0c 100644
\end_layout
\end_inset
-@@ -5814,7 +5309,7 @@ model
+@@ -5867,7 +5362,7 @@ model
\begin_layout Standard
\align center
\begin_inset Tabular
@@ -1965,7 +1982,7 @@ index c8f8e73..e4afb0c 100644
<features tabularvalignment="middle">
<column alignment="block" valignment="top" width="0.5cm">
<column alignment="block" valignment="top" width="4.5cm">
-@@ -6094,7 +5589,7 @@ lib
+@@ -6147,7 +5642,7 @@ lib
</cell>
</row>
<row>
@@ -1974,7 +1991,7 @@ index c8f8e73..e4afb0c 100644
\begin_inset Text
\begin_layout Plain Layout
-@@ -6103,7 +5598,7 @@ lib
+@@ -6156,7 +5651,7 @@ lib
\end_inset
</cell>
@@ -1983,7 +2000,7 @@ index c8f8e73..e4afb0c 100644
\begin_inset Text
\begin_layout Plain Layout
-@@ -6134,7 +5629,7 @@ $LIB_DIR_SUFFIX/
+@@ -6187,7 +5682,7 @@ $LIB_DIR_SUFFIX/
\end_inset
</cell>
@@ -1992,7 +2009,7 @@ index c8f8e73..e4afb0c 100644
\begin_inset Text
\begin_layout Plain Layout
-@@ -6149,7 +5644,7 @@ lib/
+@@ -6202,7 +5697,7 @@ lib/
\end_inset
</cell>
@@ -2001,7 +2018,7 @@ index c8f8e73..e4afb0c 100644
\begin_inset Text
\begin_layout Plain Layout
-@@ -6172,308 +5667,6 @@ lib
+@@ -6225,308 +5720,6 @@ lib
<model>
\end_layout
@@ -2310,7 +2327,7 @@ index c8f8e73..e4afb0c 100644
\end_inset
</cell>
</row>
-@@ -8737,14 +7930,6 @@ In <installdir>/share/sdcc/include
+@@ -8801,14 +7994,6 @@ In <installdir>/share/sdcc/include
the include files
\end_layout
@@ -2325,7 +2342,7 @@ index c8f8e73..e4afb0c 100644
\begin_layout Standard
In <installdir>/share/sdcc/lib
\end_layout
-@@ -8753,14 +7938,6 @@ In <installdir>/share/sdcc/lib
+@@ -8817,14 +8002,6 @@ In <installdir>/share/sdcc/lib
the src and target subdirectories with the precompiled relocatables.
\end_layout
@@ -2340,7 +2357,7 @@ index c8f8e73..e4afb0c 100644
\begin_layout Standard
In <installdir>/share/sdcc/doc
\end_layout
-@@ -15274,66 +14451,6 @@ splint
+@@ -15590,66 +14767,6 @@ splint
myprogram.c
\end_layout
@@ -2407,7 +2424,7 @@ index c8f8e73..e4afb0c 100644
\begin_layout Subsection
Linker Options
\begin_inset Index idx
-@@ -44653,66 +43770,9 @@ http://sourceforge.net/projects/gputils
+@@ -45248,66 +44365,9 @@ http://sourceforge.net/projects/gputils
Pic device specific header and c source files are automatically generated
from MPLAB include files, which are published by Microchip with a special
requirement that they are only to be used with authentic Microchip devices.
@@ -2477,7 +2494,7 @@ index c8f8e73..e4afb0c 100644
\begin_inset Newline newline
\end_inset
-@@ -44766,7 +43826,7 @@ Makefile
+@@ -45361,7 +44421,7 @@ Makefile
\begin_inset space ~
\end_inset
@@ -2486,7 +2503,7 @@ index c8f8e73..e4afb0c 100644
\begin_inset Newline newline
\end_inset
-@@ -44860,7 +43920,7 @@ Makefile
+@@ -45455,7 +44515,7 @@ Makefile
\begin_inset space ~
\end_inset
@@ -2495,7 +2512,7 @@ index c8f8e73..e4afb0c 100644
\begin_inset Newline newline
\end_inset
-@@ -45142,47 +44202,6 @@ status collapsed
+@@ -45737,47 +44797,6 @@ status collapsed
\begin_layout Plain Layout
@@ -2543,7 +2560,7 @@ index c8f8e73..e4afb0c 100644
\backslash
/
\end_layout
-@@ -46055,47 +45074,6 @@ status collapsed
+@@ -46650,47 +45669,6 @@ status collapsed
-all-callee-saves
\end_layout
@@ -2591,7 +2608,7 @@ index c8f8e73..e4afb0c 100644
\begin_layout Subsection
Port Specific Options
\begin_inset Index idx
-@@ -47372,188 +46350,6 @@ Linker
+@@ -47967,188 +46945,6 @@ Linker
\end_inset
@@ -2780,7 +2797,7 @@ index c8f8e73..e4afb0c 100644
\end_layout
\begin_layout Subsection
-@@ -48249,66 +47045,9 @@ name "subsec:PIC16_Header-Files-and-Libraries"
+@@ -48844,66 +47640,9 @@ name "subsec:PIC16_Header-Files-and-Libraries"
Pic device specific header and c source files are automatically generated
from MPLAB include files, which are published by Microchip with a special
requirement that they are only to be used with authentic Microchip devices.
@@ -2850,7 +2867,7 @@ index c8f8e73..e4afb0c 100644
\end_layout
\begin_layout Subsection
-@@ -48554,195 +47293,6 @@ vfprintf.c
+@@ -49149,195 +47888,6 @@ vfprintf.c
should also work, but is untested.
\end_layout
@@ -3046,7 +3063,7 @@ index c8f8e73..e4afb0c 100644
\begin_layout Subsection
Memory Models
\end_layout
-@@ -73528,6 +72078,12 @@ This document was initially written by Sandeep Dutta and updated by SDCC
+@@ -74082,6 +72632,12 @@ This document was initially written by Sandeep Dutta and updated by SDCC
developers.
\end_layout
@@ -3060,7 +3077,7 @@ index c8f8e73..e4afb0c 100644
All product names mentioned herein may be trademarks
\begin_inset Index idx
diff --git a/sdcc.spec b/sdcc.spec
-index 3609ffe..4b4a5cb 100644
+index 85ae200..8e0ef4b 100644
--- a/sdcc.spec
+++ b/sdcc.spec
@@ -89,9 +89,7 @@ rm -rf $RPM_BUILD_ROOT
@@ -3073,8 +3090,8 @@ index 3609ffe..4b4a5cb 100644
%files doc
%defattr(-,root,root)
-@@ -100,6 +98,8 @@ rm -rf $RPM_BUILD_ROOT
- %changelog
+@@ -102,6 +100,8 @@ rm -rf $RPM_BUILD_ROOT
+ - version updated to 4.2.0
* Sat Feb 20 2021 - pkk AT spth.de
- version updated to 4.0.0
+* Tue Dec 08 2020 - simon AT simonsouth.net
@@ -3083,7 +3100,7 @@ index 3609ffe..4b4a5cb 100644
- version updated to 4.0.0
* Fri Apr 05 2019 - krauseph AT informatik.uni-freiburg.de
diff --git a/sdcc_vc.h.in b/sdcc_vc.h.in
-index 06d8cca..736c325 100644
+index 8cf401b..19f5113 100644
--- a/sdcc_vc.h.in
+++ b/sdcc_vc.h.in
@@ -23,8 +23,6 @@
@@ -3096,7 +3113,7 @@ index 06d8cca..736c325 100644
#define BIN2DATA_DIR "\\.."
#define PREFIX2BIN_DIR "\\bin"
diff --git a/sdccconf_in.h b/sdccconf_in.h
-index eb6f48b..9f5b003 100644
+index ca8d69f..980af8d 100644
--- a/sdccconf_in.h
+++ b/sdccconf_in.h
@@ -100,12 +100,6 @@
@@ -3112,9 +3129,9 @@ index eb6f48b..9f5b003 100644
/* Define to 1 to disable the AVR port */
#undef OPT_DISABLE_AVR
-@@ -130,9 +124,6 @@
+@@ -133,9 +127,6 @@
/* XXX */
- #undef OPT_DISABLE_MCS51
+ #undef OPT_DISABLE_MOS65C02
-/* XXX */
-#undef OPT_DISABLE_NON_FREE
@@ -3123,10 +3140,10 @@ index eb6f48b..9f5b003 100644
#undef OPT_DISABLE_PACKIHX
diff --git a/src/SDCCglobl.h b/src/SDCCglobl.h
-index 9383f68..c2f0b42 100644
+index b49fa1b..d357169 100644
--- a/src/SDCCglobl.h
+++ b/src/SDCCglobl.h
-@@ -288,7 +288,6 @@ struct options
+@@ -287,7 +287,6 @@ struct options
int stack_size; /* MCS51/DS390 - Tells the linker to allocate this space for stack */
int acall_ajmp; /* MCS51 - Use acall/ajmp instead of lcall/ljmp */
int no_ret_without_call; /* MCS51 - Do not use ret independent of acall/lcall */
@@ -3135,7 +3152,7 @@ index 9383f68..c2f0b42 100644
int xstack_loc; /* initial location of external stack */
int stack_loc; /* initial value of internal stack pointer */
diff --git a/src/SDCCmain.c b/src/SDCCmain.c
-index 2a7a711..f46370f 100644
+index bc1493d..e775988 100644
--- a/src/SDCCmain.c
+++ b/src/SDCCmain.c
@@ -151,7 +151,6 @@ char buffer[PATH_MAX * 2];
@@ -3146,7 +3163,7 @@ index 2a7a711..f46370f 100644
#define OPTION_PEEP_RETURN "--peep-return"
#define OPTION_NO_PEEP_RETURN "--no-peep-return"
#define OPTION_NO_OPTSDCC_IN_ASM "--no-optsdcc-in-asm"
-@@ -207,7 +206,6 @@ static const OPTION optionsTable[] = {
+@@ -209,7 +208,6 @@ static const OPTION optionsTable[] = {
{0, OPTION_STD_SDCC2X, NULL, "Use ISO C2X standard with SDCC extensions"},
{0, OPTION_DOLLARS_IN_IDENT, &options.dollars_in_ident, "Permit '$' as an identifier character"},
{0, OPTION_SIGNED_CHAR, &options.signed_char, "Make \"char\" signed by default"},
@@ -3154,7 +3171,7 @@ index 2a7a711..f46370f 100644
{0, NULL, NULL, "Code generation options"},
{'m', NULL, NULL, "Set the port to use e.g. -mz80."},
-@@ -2113,10 +2111,6 @@ preProcess (char **envp)
+@@ -2132,10 +2130,6 @@ preProcess (char **envp)
else
addSet (&preArgvSet, Safe_strdup ("-D__SDCC_CHAR_UNSIGNED"));
@@ -3165,7 +3182,7 @@ index 2a7a711..f46370f 100644
/* set the macro for large model */
switch (options.model)
{
-@@ -2336,12 +2330,6 @@ setIncludePath (void)
+@@ -2365,12 +2359,6 @@ setIncludePath (void)
* 6. - $SDCC_HOME/PREFIX2DATA_DIR/INCLUDE_DIR_SUFFIX
* 7. - path(argv[0])/BIN2DATA_DIR/INCLUDE_DIR_SUFFIX
* 8. - DATADIR/INCLUDE_DIR_SUFFIX (only on *nix)
@@ -3178,7 +3195,7 @@ index 2a7a711..f46370f 100644
*/
if (!options.nostdinc)
-@@ -2357,17 +2345,6 @@ setIncludePath (void)
+@@ -2386,17 +2374,6 @@ setIncludePath (void)
includeDirsSet = processStrSet (includeDirsSet, NULL, port->target, NULL);
mergeSets (&includeDirsSet, tempSet);
@@ -3196,7 +3213,7 @@ index 2a7a711..f46370f 100644
if ((p = getenv (SDCC_INCLUDE_NAME)) != NULL)
{
struct dbuf_s dbuf;
-@@ -2392,9 +2369,6 @@ setLibPath (void)
+@@ -2421,9 +2398,6 @@ setLibPath (void)
* 3. - $SDCC_HOME/PREFIX2DATA_DIR/LIB_DIR_SUFFIX/<model>
* 4. - path(argv[0])/BIN2DATA_DIR/LIB_DIR_SUFFIX/<model>
* 5. - DATADIR/LIB_DIR_SUFFIX/<model> (only on *nix)
@@ -3206,7 +3223,7 @@ index 2a7a711..f46370f 100644
*/
if (!options.nostdlib)
-@@ -2411,13 +2385,6 @@ setLibPath (void)
+@@ -2440,13 +2414,6 @@ setLibPath (void)
dbuf_makePath (&dbuf, LIB_DIR_SUFFIX, port->general.get_model ? port->general.get_model () : targetname);
libDirsSet = processStrSet (dataDirsSet, NULL, dbuf_c_str (&dbuf), NULL);
@@ -3221,7 +3238,7 @@ index 2a7a711..f46370f 100644
{
addSetHead (&libDirsSet, Safe_strdup (p));
diff --git a/src/pic14/main.c b/src/pic14/main.c
-index ee90470..519ccfc 100644
+index 38d8730..a0eecdb 100644
--- a/src/pic14/main.c
+++ b/src/pic14/main.c
@@ -42,7 +42,6 @@ static OPTION _pic14_poptions[] =
@@ -3232,7 +3249,7 @@ index ee90470..519ccfc 100644
{ 0, NULL, NULL, NULL }
};
-@@ -176,16 +175,6 @@ _pic14_finaliseOptions (void)
+@@ -180,16 +179,6 @@ _pic14_finaliseOptions (void)
addSet (&preArgvSet, Safe_strdup (dbuf_detach_c_str (&dbuf)));
}
@@ -3274,10 +3291,10 @@ index cdfbba0..5877f09 100644
extern pic16_options_t pic16_options;
diff --git a/src/pic16/main.c b/src/pic16/main.c
-index d416642..bfe514d 100644
+index b0e717a..d7616f5 100644
--- a/src/pic16/main.c
+++ b/src/pic16/main.c
-@@ -655,7 +655,6 @@ OPTION pic16_optionsTable[]= {
+@@ -660,7 +660,6 @@ OPTION pic16_optionsTable[]= {
{ 0, "--pcode-verbose", &pic16_pcode_verbose, "dump pcode related info"},
{ 0, "--calltree", &pic16_options.dumpcalltree, "dump call tree in .calltree file"},
{ 0, "--gstack", &pic16_options.gstack, "trace stack pointer push/pop to overflow"},
@@ -3285,7 +3302,7 @@ index d416642..bfe514d 100644
{ 0, NULL, NULL, NULL}
};
-@@ -940,16 +939,6 @@ _pic16_finaliseOptions (void)
+@@ -945,16 +944,6 @@ _pic16_finaliseOptions (void)
addSet (&asmOptionsSet, Safe_strdup ("-D__STACK_MODEL_SMALL"));
}
@@ -3302,7 +3319,7 @@ index d416642..bfe514d 100644
dbuf_destroy (&dbuf);
}
-@@ -979,7 +968,6 @@ _pic16_setDefaultOptions (void)
+@@ -984,7 +973,6 @@ _pic16_setDefaultOptions (void)
pic16_options.ip_stack = 1; /* set to 1 to enable ipop/ipush for stack */
pic16_options.gstack = 0;
pic16_options.debgen = 0;
@@ -3496,10 +3513,10 @@ index 6db417a..4b35225 100755
);
diff --git a/support/scripts/sdcc.nsi b/support/scripts/sdcc.nsi
-index da63063..dae8d8d 100644
+index cebb8a6..778472a 100644
--- a/support/scripts/sdcc.nsi
+++ b/support/scripts/sdcc.nsi
-@@ -479,11 +479,6 @@ ${Section} "SDCC include files" SEC05
+@@ -480,11 +480,6 @@ ${Section} "SDCC include files" SEC05
SetOutPath "$INSTDIR\include"
File "${DEV_ROOT}\include\*.h"
@@ -3511,7 +3528,7 @@ index da63063..dae8d8d 100644
${SectionEnd}
${Section} "SDCC DS390 library" SEC06
-@@ -581,18 +576,12 @@ ${Section} "SDCC PIC16 library" SEC21
+@@ -582,18 +577,12 @@ ${Section} "SDCC PIC16 library" SEC21
SetOutPath "$INSTDIR\lib\pic16"
File "${DEV_ROOT}\lib\pic16\*.o"
File "${DEV_ROOT}\lib\pic16\*.lib"
@@ -3530,7 +3547,7 @@ index da63063..dae8d8d 100644
${SectionEnd}
${Section} "SDCC STM8 small model library" SEC23
-@@ -697,10 +686,6 @@ ${Section} "SDCC library sources" SEC25
+@@ -702,10 +691,6 @@ ${Section} "SDCC library sources" SEC25
File "${DEV_ROOT}\lib\src\pic14\libsdcc\enhanced\*.inc"
# File "${DEV_ROOT}\lib\src\pic14\libsdcc\Makefile"
@@ -3541,7 +3558,7 @@ index da63063..dae8d8d 100644
SetOutPath "$INSTDIR\lib\src\pic14\libm"
# File "${DEV_ROOT}\lib\src\pic14\libm\*.c"
-@@ -752,10 +737,6 @@ ${Section} "SDCC library sources" SEC25
+@@ -757,10 +742,6 @@ ${Section} "SDCC library sources" SEC25
File "${DEV_ROOT}\lib\src\pic16\libc\utils\*.S"
# File "${DEV_ROOT}\lib\src\pic16\libc\utils\Makefile"
@@ -3552,7 +3569,7 @@ index da63063..dae8d8d 100644
SetOutPath "$INSTDIR\lib\src\pic16\libio"
File "${DEV_ROOT}\lib\src\pic16\libio\*.ignore"
# File "${DEV_ROOT}\lib\src\pic16\libio\Makefile"
-@@ -1105,13 +1086,9 @@ ${Section} Uninstall SECUNINSTALL
+@@ -1126,13 +1107,9 @@ ${Section} Uninstall SECUNINSTALL
Delete "$INSTDIR\lib\pic14\*.lib"
@@ -3566,7 +3583,7 @@ index da63063..dae8d8d 100644
Delete "$INSTDIR\lib\hc08\*.lib"
Delete "$INSTDIR\lib\s08\*.lib"
-@@ -1182,9 +1159,7 @@ ${Section} Uninstall SECUNINSTALL
+@@ -1208,9 +1185,7 @@ ${Section} Uninstall SECUNINSTALL
Delete "$INSTDIR\include\pic14\*.h"
Delete "$INSTDIR\include\pic14\*.txt"
Delete "$INSTDIR\include\pic14\*.inc"
@@ -3576,7 +3593,7 @@ index da63063..dae8d8d 100644
Delete "$INSTDIR\include\pic16\*.txt"
Delete "$INSTDIR\include\mcs51\*.h"
Delete "$INSTDIR\include\hc08\*.h"
-@@ -1246,9 +1221,7 @@ ${Section} Uninstall SECUNINSTALL
+@@ -1273,9 +1248,7 @@ ${Section} Uninstall SECUNINSTALL
Delete "$INSTDIR\uninstall.exe"
RMDir /r "$INSTDIR\lib\src\pic14"
@@ -3586,8 +3603,8 @@ index da63063..dae8d8d 100644
RMDir "$INSTDIR\lib\src\small"
RMDir "$INSTDIR\lib\src\medium"
RMDir "$INSTDIR\lib\src\large"
-@@ -1274,12 +1247,9 @@ ${Section} Uninstall SECUNINSTALL
- RMDir "$INSTDIR\lib\src\tlcs90"
+@@ -1303,12 +1276,9 @@ ${Section} Uninstall SECUNINSTALL
+ RMDir "$INSTDIR\lib\src\mos6502"
RMDir "$INSTDIR\lib\src\z80n"
RMDir "$INSTDIR\lib\src"
- RMDir "$INSTDIR\non-free\lib\src"
@@ -3599,8 +3616,8 @@ index da63063..dae8d8d 100644
RMDir "$INSTDIR\lib\z80"
RMDir "$INSTDIR\lib\z180"
RMDir "$INSTDIR\lib\r2k"
-@@ -1305,15 +1275,12 @@ ${Section} Uninstall SECUNINSTALL
- RMDir "$INSTDIR\lib\tlcs90"
+@@ -1336,15 +1306,12 @@ ${Section} Uninstall SECUNINSTALL
+ RMDir "$INSTDIR\lib\mos6502"
RMDir "$INSTDIR\lib\z80n"
RMDir "$INSTDIR\lib"
- RMDir "$INSTDIR\non-free\lib"
@@ -3613,9 +3630,9 @@ index da63063..dae8d8d 100644
RMDir "$INSTDIR\include\asm\pic14"
- RMDir "$INSTDIR\non-free\include\asm\pic14"
RMDir "$INSTDIR\include\asm\mcs51"
- RMDir "$INSTDIR\include\asm\gbz80"
+ RMDir "$INSTDIR\include\asm\sm83"
RMDir "$INSTDIR\include\asm\ds390"
-@@ -1322,17 +1289,12 @@ ${Section} Uninstall SECUNINSTALL
+@@ -1353,17 +1320,12 @@ ${Section} Uninstall SECUNINSTALL
RMDir "$INSTDIR\include\asm"
RMDir "$INSTDIR\include\z180"
RMDir "$INSTDIR\include\pic14"
diff --git a/gnu/packages/patches/streamlink-update-test.patch b/gnu/packages/patches/streamlink-update-test.patch
deleted file mode 100644
index 2d90009192..0000000000
--- a/gnu/packages/patches/streamlink-update-test.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-https://github.com/streamlink/streamlink/commit/a3123346824ee7b9c461110f292ea6987ea9a78d.patch
-This is taken from upstream, and can be removed at the next release
-
-From c6f3994e177a42792238f2edd07ba9053c10abc9 Mon Sep 17 00:00:00 2001
-From: back-to <backto@protonmail.ch>
-Date: Sat, 21 Jul 2018 14:30:51 +0200
-Subject: [PATCH] tests.localization: use en_CA instead of en_US for
- test_equivalent
-
-**python-iso3166** got an update which breaks the Streamlink tests.
-https://pypi.org/project/iso3166/#history
-
-**python-iso3166** and **pycountry** have now a different `name` for _the United States of America_
-
-> python-iso3166: United States of America
-https://github.com/deactivated/python-iso3166/commit/e5f8b37f18b01fcb5fa0e8130d8296fc7a7b5a9f
-
-> pycountry: United States
-https://bitbucket.org/flyingcircus/pycountry/src/5aa4bb47e33798cb631a81521b7b5b18f7d6c919/src/pycountry/databases/iso3166-1.json?at=default&fileviewer=file-view-default#iso3166-1.json-1572:1578
-
-https://www.iso.org/obp/ui/#iso:code:3166:US
-
----
-
-use **en_CA** instead of **en_US** for backwards compatibility,
-as changing the **US** name would fail with older versions of **python-iso3166** / **pycountry**
----
- tests/test_localization.py | 13 +++++++------
- 1 file changed, 7 insertions(+), 6 deletions(-)
-
-diff --git a/tests/test_localization.py b/tests/test_localization.py
-index 0b81ae591..90bb3ac31 100644
---- a/tests/test_localization.py
-+++ b/tests/test_localization.py
-@@ -32,11 +32,12 @@ def test_bad_language_code(self):
- self.assertRaises(LookupError, l10n.Localization, "enUS")
-
- def test_equivalent(self):
-- l = l10n.Localization("en_US")
-+ l = l10n.Localization("en_CA")
- self.assertTrue(l.equivalent(language="eng"))
- self.assertTrue(l.equivalent(language="en"))
-- self.assertTrue(l.equivalent(language="en", country="US"))
-- self.assertTrue(l.equivalent(language="en", country="United States"))
-+ self.assertTrue(l.equivalent(language="en", country="CA"))
-+ self.assertTrue(l.equivalent(language="en", country="CAN"))
-+ self.assertTrue(l.equivalent(language="en", country="Canada"))
-
- def test_equivalent_remap(self):
- l = l10n.Localization("fr_FR")
-@@ -48,7 +49,7 @@ def test_not_equivalent(self):
- self.assertFalse(l.equivalent(language="eng"))
- self.assertFalse(l.equivalent(language="en"))
- self.assertFalse(l.equivalent(language="en", country="US"))
-- self.assertFalse(l.equivalent(language="en", country="United States"))
-+ self.assertFalse(l.equivalent(language="en", country="Canada"))
- self.assertFalse(l.equivalent(language="en", country="ES"))
- self.assertFalse(l.equivalent(language="en", country="Spain"))
-
-@@ -71,8 +72,8 @@ def test_get_country(self):
- l10n.Localization.get_country("USA").alpha2)
- self.assertEqual("GB",
- l10n.Localization.get_country("GB").alpha2)
-- self.assertEqual("United States",
-- l10n.Localization.get_country("United States").name)
-+ self.assertEqual("Canada",
-+ l10n.Localization.get_country("Canada").name)
-
- def test_get_country_miss(self):
- self.assertRaises(LookupError, l10n.Localization.get_country, "XE")
diff --git a/gnu/packages/patches/tcc-boot-0.9.27.patch b/gnu/packages/patches/tcc-boot-0.9.27.patch
deleted file mode 100644
index 6f9d365788..0000000000
--- a/gnu/packages/patches/tcc-boot-0.9.27.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 1431ba3a99582e4c3d2693ac37e57f361858affd Mon Sep 17 00:00:00 2001
-From: Jan Nieuwenhuizen <janneke@gnu.org>
-Date: Mon, 11 Jun 2018 18:39:44 +0200
-Subject: [PATCH] bootstrappable: Force static link.
-
----
- libtcc.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/libtcc.c b/libtcc.c
-index 3448f44..02ab850 100644
---- a/libtcc.c
-+++ b/libtcc.c
-@@ -735,6 +735,9 @@ LIBTCCAPI TCCState *tcc_new(void)
- tcc_state = s;
- ++nb_states;
-
-+#if BOOTSTRAP
-+ s->static_link = 1;
-+#endif
- s->alacarte_link = 1;
- s->nocommon = 1;
- s->warn_implicit_function_declaration = 1;
---
-2.16.2
-
diff --git a/gnu/packages/patches/transfig-gcc10-fno-common.patch b/gnu/packages/patches/transfig-gcc10-fno-common.patch
new file mode 100644
index 0000000000..ebe9236533
--- /dev/null
+++ b/gnu/packages/patches/transfig-gcc10-fno-common.patch
@@ -0,0 +1,33 @@
+Fixes "multiple definition" errors when building with GCC 10+.
+
+Based on <https://bugs.gentoo.org/show_bug.cgi?id=706706>.
+--- a/fig2dev/dev/gensvg.c 2010-07-01 22:41:16.000000000 +0200
++++ b/fig2dev/dev/gensvg.c 2022-02-27 20:02:33.379945500 +0100
+@@ -230,10 +230,12 @@
+ };
+
+ /* arrowhead arrays */
+-Point points[50], fillpoints[50], clippoints[50];
+-int npoints, nfillpoints, nclippoints;
+-int arrowx1, arrowy1; /* first point of object */
+-int arrowx2, arrowy2; /* second point of object */
++Point fillpoints[50];
++int nfillpoints;
++extern Point points[50], clippoints[50];
++extern int npoints, nclippoints;
++extern int arrowx1, arrowy1; /* first point of object */
++extern int arrowx2, arrowy2; /* second point of object */
+
+ static int tileno=0; /* number of current tile */
+
+--- a/fig2dev/fig2dev.h 2010-03-16 19:53:20.000000000 +0100
++++ b/fig2dev/fig2dev.h 2022-02-27 19:56:06.072253991 +0100
+@@ -126,7 +126,7 @@
+ extern char *prog, *from, *to;
+ extern char *name;
+ extern double font_size;
+-Boolean correct_font_size; /* use correct font size */
++extern Boolean correct_font_size; /* use correct font size */
+ extern double mag, fontmag;
+ extern FILE *tfp;
+
diff --git a/gnu/packages/patches/upower-builddir.patch b/gnu/packages/patches/upower-builddir.patch
deleted file mode 100644
index a61d387faf..0000000000
--- a/gnu/packages/patches/upower-builddir.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 27ae011b31d831752b97eb209bc2b2206fcf40f7 Mon Sep 17 00:00:00 2001
-From: Tobias Geerinckx-Rice <me@tobias.gr>
-Date: Mon, 28 Jun 2021 11:58:47 +0200
-Subject: [PATCH] gnu: upower: Fix build directory.
-
-Remove explicit set of UPOWER_CONF_FILE_NAME in up-self-test.c;
-instead the harness should set it. In Guix we set it explicitly; the
-right thing is to use AM_TEST_ENVIRONMENT and regenerate the
-makefiles, but we can't regenerate because current autotools carp on
-some things, so we patch the Makefile.in instead.
-
-Also fix to not try to create /var/lib/upower if /var isn't writable.
-
-Based on a patch by Andy Wingo <wingo@igalia.com>
----
- src/Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 3400139..f51ee89 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -181,7 +181,7 @@ $(systemdservice_DATA): $(systemdservice_in_files) Makefile
- endif
-
- install-data-hook:
-- if test -w $(DESTDIR)$(prefix)/; then \
-+ if test -w $(DESTDIR)$(localstatedir)/; then \
- mkdir -p $(DESTDIR)$(historydir); \
- fi
-
---
-2.32.0
-
diff --git a/gnu/packages/patches/vtk-8-fix-freetypetools-build-failure.patch b/gnu/packages/patches/vtk-8-fix-freetypetools-build-failure.patch
deleted file mode 100644
index 6988e65872..0000000000
--- a/gnu/packages/patches/vtk-8-fix-freetypetools-build-failure.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-This fixes a build failure in VTK when building against recent versions
-of freetype.
-
- https://gitlab.kitware.com/vtk/vtk/-/merge_requests/7432
-
-Patch by Ben Boeckel <ben.boeckel@kitware.com>
-
-Subject: [PATCH] vtkFreeTypeTools: avoid using an internal macro
-
-This macro has been removed upstream as it was always intended to be
-private.
----
- Rendering/FreeType/vtkFreeTypeTools.cxx | 7 ++-----
- 1 file changed, 2 insertions(+), 5 deletions(-)
-
-diff --git a/Rendering/FreeType/vtkFreeTypeTools.cxx b/Rendering/FreeType/vtkFreeTypeTools.cxx
-index c54289dc60..03b899c4da 100644
---- a/Rendering/FreeType/vtkFreeTypeTools.cxx
-+++ b/Rendering/FreeType/vtkFreeTypeTools.cxx
-@@ -387,11 +387,8 @@ FTC_CMapCache* vtkFreeTypeTools::GetCMapCache()
- }
-
- //----------------------------------------------------------------------------
--FT_CALLBACK_DEF(FT_Error)
--vtkFreeTypeToolsFaceRequester(FTC_FaceID face_id,
-- FT_Library lib,
-- FT_Pointer request_data,
-- FT_Face* face)
-+static FT_Error vtkFreeTypeToolsFaceRequester(
-+ FTC_FaceID face_id, FT_Library lib, FT_Pointer request_data, FT_Face* face)
- {
- #if VTK_FTFC_DEBUG_CD
- printf("vtkFreeTypeToolsFaceRequester()\n");
---
-2.30.1
-
diff --git a/gnu/packages/patches/webkitgtk-adjust-bubblewrap-paths.patch b/gnu/packages/patches/webkitgtk-adjust-bubblewrap-paths.patch
new file mode 100644
index 0000000000..18ddb645ad
--- /dev/null
+++ b/gnu/packages/patches/webkitgtk-adjust-bubblewrap-paths.patch
@@ -0,0 +1,38 @@
+Share /gnu/store in the BubbleWrap container and remove FHS mounts.
+
+This is a Guix-specific patch not meant to be upstreamed.
+diff --git a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
+index f0a5e4b05dff..88b11f806968 100644
+--- a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
++++ b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
+@@ -854,27 +854,12 @@ GRefPtr<GSubprocess> bubblewrapSpawn(GSubprocessLauncher* launcher, const Proces
+ "--ro-bind", "/sys/dev", "/sys/dev",
+ "--ro-bind", "/sys/devices", "/sys/devices",
+
+- "--ro-bind-try", "/usr/share", "/usr/share",
+- "--ro-bind-try", "/usr/local/share", "/usr/local/share",
+ "--ro-bind-try", DATADIR, DATADIR,
+-
+- // We only grant access to the libdirs webkit is built with and
+- // guess system libdirs. This will always have some edge cases.
+- "--ro-bind-try", "/lib", "/lib",
+- "--ro-bind-try", "/usr/lib", "/usr/lib",
+- "--ro-bind-try", "/usr/local/lib", "/usr/local/lib",
+ "--ro-bind-try", LIBDIR, LIBDIR,
+-#if CPU(ADDRESS64)
+- "--ro-bind-try", "/lib64", "/lib64",
+- "--ro-bind-try", "/usr/lib64", "/usr/lib64",
+- "--ro-bind-try", "/usr/local/lib64", "/usr/local/lib64",
+-#else
+- "--ro-bind-try", "/lib32", "/lib32",
+- "--ro-bind-try", "/usr/lib32", "/usr/lib32",
+- "--ro-bind-try", "/usr/local/lib32", "/usr/local/lib32",
+-#endif
+-
+ "--ro-bind-try", PKGLIBEXECDIR, PKGLIBEXECDIR,
++
++ // Bind mount the store inside the WebKitGTK sandbox.
++ "--ro-bind", "@storedir@", "@storedir@",
+ };
+
+ if (launchOptions.processType == ProcessLauncher::ProcessType::DBusProxy) {
diff --git a/gnu/packages/patches/webkitgtk-bind-all-fonts.patch b/gnu/packages/patches/webkitgtk-bind-all-fonts.patch
index e7b06cc650..27013180c4 100644
--- a/gnu/packages/patches/webkitgtk-bind-all-fonts.patch
+++ b/gnu/packages/patches/webkitgtk-bind-all-fonts.patch
@@ -1,26 +1,25 @@
-Add fonts from all XDG_DATA_DIRS, not just XDG_DATA_HOME.
+Upstream commit: https://github.com/WebKit/WebKit/commit/31ac354cbeecf866f9a38f7b2f8f59f7975d3f6a
-See <http://bugs.gnu.org/41174>.
-Author: Liliana Marie Prikler <liliana.prikler@gmail.com>
-Index: webkitgtk-2.28.2/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
-===================================================================
+diff --git a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
+index ecc804663784..8de174be3c0e 100644
--- a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
+++ b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
-@@ -387,6 +387,7 @@ static void bindFonts(Vector<CString>& args)
+@@ -288,6 +288,7 @@ static void bindFonts(Vector<CString>& args)
const char* homeDir = g_get_home_dir();
const char* dataDir = g_get_user_data_dir();
const char* cacheDir = g_get_user_cache_dir();
+ const char* const * dataDirs = g_get_system_data_dirs();
-
+
// Configs can include custom dirs but then we have to parse them...
GUniquePtr<char> fontConfig(g_build_filename(configDir, "fontconfig", nullptr));
-@@ -403,6 +404,10 @@ static void bindFonts(Vector<CString>& args)
+@@ -304,6 +305,10 @@ static void bindFonts(Vector<CString>& args)
bindIfExists(args, fontHomeConfigDir.get());
bindIfExists(args, fontData.get());
bindIfExists(args, fontHomeData.get());
-+ for (auto dataDir = dataDirs; dataDir != nullptr && *dataDir != nullptr; dataDir++) {
++ for (auto* dataDir = dataDirs; dataDir && *dataDir; dataDir++) {
+ GUniquePtr<char> fontDataDir(g_build_filename(*dataDir, "fonts", nullptr));
+ bindIfExists(args, fontDataDir.get());
+ }
bindIfExists(args, "/var/cache/fontconfig"); // Used by Debian.
}
+
diff --git a/gnu/packages/patches/webkitgtk-canonicalize-paths.patch b/gnu/packages/patches/webkitgtk-canonicalize-paths.patch
new file mode 100644
index 0000000000..741d534831
--- /dev/null
+++ b/gnu/packages/patches/webkitgtk-canonicalize-paths.patch
@@ -0,0 +1,66 @@
+Upstream commit: https://github.com/WebKit/WebKit/commit/6a87eb254ef57a986a1a6ce9a3a4b66928afeb65
+
+diff --git a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
+index ecc804663784..a2a1c9d7a4dd 100644
+--- a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
++++ b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
+@@ -27,7 +27,6 @@
+ #include <seccomp.h>
+ #include <sys/ioctl.h>
+ #include <sys/mman.h>
+-#include <unistd.h>
+ #include <wtf/FileSystem.h>
+ #include <wtf/UniStdExtras.h>
+ #include <wtf/glib/GRefPtr.h>
+@@ -165,6 +164,15 @@ enum class BindFlags {
+ Device,
+ };
+
++static void bindSymlinksRealPath(Vector<CString>& args, const char* path, const char* bindOption = "--ro-bind")
++{
++ WTF::String realPath = FileSystem::realPath(path);
++ if (path != realPath) {
++ CString rpath = realPath.utf8();
++ args.appendVector(Vector<CString>({ bindOption, rpath.data(), rpath.data() }));
++ }
++}
++
+ static void bindIfExists(Vector<CString>& args, const char* path, BindFlags bindFlags = BindFlags::ReadOnly)
+ {
+ if (!path || path[0] == '\0')
+@@ -177,7 +185,16 @@ static void bindIfExists(Vector<CString>& args, const char* path, BindFlags bind
+ bindType = "--ro-bind-try";
+ else
+ bindType = "--bind-try";
+- args.appendVector(Vector<CString>({ bindType, path, path }));
++
++ // Canonicalize the source path, otherwise a symbolic link could
++ // point to a location outside of the namespace.
++ bindSymlinksRealPath(args, path, bindType);
++
++ // As /etc is exposed wholesale, do not layer extraneous bind
++ // directives on top, which could fail in the presence of symbolic
++ // links.
++ if (!g_str_has_prefix(path, "/etc/"))
++ args.appendVector(Vector<CString>({ bindType, path, path }));
+ }
+
+ static void bindDBusSession(Vector<CString>& args, bool allowPortals)
+@@ -410,17 +427,6 @@ static void bindV4l(Vector<CString>& args)
+ }));
+ }
+
+-static void bindSymlinksRealPath(Vector<CString>& args, const char* path)
+-{
+- char realPath[PATH_MAX];
+-
+- if (realpath(path, realPath) && strcmp(path, realPath)) {
+- args.appendVector(Vector<CString>({
+- "--ro-bind", realPath, realPath,
+- }));
+- }
+-}
+-
+ // Translate a libseccomp error code into an error message. libseccomp
+ // mostly returns negative errno values such as -ENOMEM, but some
+ // standard errno values are used for non-standard purposes where their
diff --git a/gnu/packages/patches/webkitgtk-share-store.patch b/gnu/packages/patches/webkitgtk-share-store.patch
deleted file mode 100644
index 053d86fcf4..0000000000
--- a/gnu/packages/patches/webkitgtk-share-store.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Tell bubblewrap to share the store. Required for programs that use the
-sandboxing features such as Epiphany.
-
-See <https://bugs.gnu.org/40837>.
-Author: Jack Hill <jackhill@jackhill.us>
----
-diff --git a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
---- a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
-+++ b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
-@@ -737,6 +737,9 @@ GRefPtr<GSubprocess> bubblewrapSpawn(GSubprocessLauncher* launcher, const Proces
- "--ro-bind-try", "/usr/local/share", "/usr/local/share",
- "--ro-bind-try", DATADIR, DATADIR,
-
-+ // Bind mount the store inside the WebKitGTK sandbox.
-+ "--ro-bind", "@storedir@", "@storedir@",
-+
- // We only grant access to the libdirs webkit is built with and
- // guess system libdirs. This will always have some edge cases.
- "--ro-bind-try", "/lib", "/lib",