summary refs log tree commit diff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorLiliana Marie Prikler <liliana.prikler@gmail.com>2023-09-22 23:54:34 +0200
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2023-09-22 23:54:34 +0200
commitcdbd81ce144f17644ceebd3d08723aa244696a05 (patch)
treef2d4c484a5a8880fb32b81ac4330842c88a53e2a /gnu/packages/patches
parent10664c0f1c351eae24629127d97fe23f5e18a93c (diff)
parentec130e1a1b7f3b87b1a6e626754f7e7a07f6b717 (diff)
downloadguix-cdbd81ce144f17644ceebd3d08723aa244696a05.tar.gz
Merge branch 'master' into emacs-team
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/alure-dumb-2.patch30
-rw-r--r--gnu/packages/patches/enblend-enfuse-reproducible.patch44
-rw-r--r--gnu/packages/patches/evdi-fix-build-with-linux-6.2.patch72
-rw-r--r--gnu/packages/patches/glibc-hurd-getauxval.patch34
-rw-r--r--gnu/packages/patches/gnome-dictionary-meson-i18n.patch52
-rw-r--r--gnu/packages/patches/hdf4-architectures.patch632
-rw-r--r--gnu/packages/patches/hdf4-tirpc.patch33
-rw-r--r--gnu/packages/patches/kwin-unwrap-executable-name-for-dot-desktop-search.patch89
-rw-r--r--gnu/packages/patches/libftdi-fix-paths-when-FTDIPP-set.patch39
-rw-r--r--gnu/packages/patches/nanosvg-prusa-slicer.patch248
-rw-r--r--gnu/packages/patches/openjdk-21-fix-rpath.patch16
-rw-r--r--gnu/packages/patches/tensorflow-lite-unbundle.patch27
12 files changed, 579 insertions, 737 deletions
diff --git a/gnu/packages/patches/alure-dumb-2.patch b/gnu/packages/patches/alure-dumb-2.patch
new file mode 100644
index 0000000000..60d18f8570
--- /dev/null
+++ b/gnu/packages/patches/alure-dumb-2.patch
@@ -0,0 +1,30 @@
+Source: https://gitlab.archlinux.org/archlinux/packaging/packages/alure/-/blob/main/dumb-2.patch
+
+diff -Naur a/src/codec_dumb.cpp b/src/codec_dumb.cpp
+--- a/src/codec_dumb.cpp	2011-07-29 09:37:48.000000000 +0100
++++ b/src/codec_dumb.cpp	2020-05-10 15:59:48.502632496 +0100
+@@ -272,7 +272,11 @@
+ 
+ private:
+     // DUMBFILE iostream callbacks
++#if DUMB_VERSION >= 2*10000
++    static int skip(void *user_data, dumb_off_t offset)
++#else
+     static int skip(void *user_data, long offset)
++#endif
+     {
+         std::istream *stream = static_cast<dumbStream*>(user_data)->fstream;
+         stream->clear();
+@@ -282,7 +286,11 @@
+         return -1;
+     }
+ 
++#if DUMB_VERSION >= 2*10000
++    static dumb_ssize_t read(char *ptr, size_t size, void *user_data)
++#else
+     static long read(char *ptr, long size, void *user_data)
++#endif
+     {
+         std::istream *stream = static_cast<dumbStream*>(user_data)->fstream;
+         stream->clear();
+
diff --git a/gnu/packages/patches/enblend-enfuse-reproducible.patch b/gnu/packages/patches/enblend-enfuse-reproducible.patch
new file mode 100644
index 0000000000..8bd6a3aeda
--- /dev/null
+++ b/gnu/packages/patches/enblend-enfuse-reproducible.patch
@@ -0,0 +1,44 @@
+# HG changeset patch
+# User Bernhard M. Wiedemann <bwiedemann@suse.de>
+# Date 1502609999 -7200
+#      Sun Aug 13 09:39:59 2017 +0200
+# Node ID a98e00eed893f62dd8349fc2894abca3aff4b33a
+# Parent  41ce01b7d413b3654211da0147857e7d6a1495de
+Facilitate reproducible builds
+by allowing to externally hold constant the build date and time.
+See
+        https://reproducible-builds.org/specs/source-date-epoch/
+
+Backport asap.
+
+diff -r 41ce01b7d413 -r a98e00eed893 NEWS
+--- a/NEWS	Sun Aug 13 09:39:56 2017 +0200
++++ b/NEWS	Sun Aug 13 09:39:59 2017 +0200
+@@ -48,6 +48,12 @@
+           https://github.com/akrzemi1/Optional
+   where only "optional.hpp" is needed.
+ 
++- The environment variable SOURCE_DATE_EPOCH overrides the build
++  timestamp as recorded by the signatures.  See
++          https://reproducible-builds.org/specs/source-date-epoch/
++  for details.
++
++
+ 
+ * Version 4.2  "Compressor Road"
+ 
+diff -r 41ce01b7d413 -r a98e00eed893 src/DefaultSig.pm
+--- a/src/DefaultSig.pm	Sun Aug 13 09:39:56 2017 +0200
++++ b/src/DefaultSig.pm	Sun Aug 13 09:39:59 2017 +0200
+@@ -109,9 +109,10 @@
+ sub update_date_and_time {
+     my $self = shift;
+ 
++    my $now = $ENV{SOURCE_DATE_EPOCH} || time;
+     my ($second, $minute, $hour,
+         $day_of_month, $month, $year,
+-        $day_of_week) = $self->is_using_gmt() ? gmtime : localtime;
++        $day_of_week) = $self->is_using_gmt() ? gmtime($now) : localtime($now);
+ 
+     $self->{DATE} = $self->format_date($day_of_month, $month, $year + 1900, $day_of_week,
+                                        $self->weekdays->[$day_of_week],
diff --git a/gnu/packages/patches/evdi-fix-build-with-linux-6.2.patch b/gnu/packages/patches/evdi-fix-build-with-linux-6.2.patch
deleted file mode 100644
index 0c53cd2ef7..0000000000
--- a/gnu/packages/patches/evdi-fix-build-with-linux-6.2.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-Fix the build with Linux 6.2:
-
-https://github.com/DisplayLink/evdi/issues/402
-
-Patch copied from upstream pull request:
-
-https://github.com/DisplayLink/evdi/pull/401
-
-From a90ecd5f0f09e976e4b8784fa16b92804138b1bd Mon Sep 17 00:00:00 2001
-From: listout <listout@protonmail.com>
-Date: Wed, 22 Feb 2023 13:09:40 +0530
-Subject: [PATCH] Original patch was suggested by Crashdummyy.
-
-Since commit 9877d8f6bc374912b08dfe862cddbb78b395a5ef
-feild fbdev has been renamed to info in struct drm_fb_helper.
-
-Fixes: https://github.com/DisplayLink/evdi/issues/402
-Fixes: https://github.com/DisplayLink/evdi/issues/394
-Fixes: https://github.com/DisplayLink/evdi/issues/384
-Signed-off-by: listout <listout@protonmail.com>
----
- module/evdi_fb.c | 16 ++++++++++++++++
- 1 file changed, 16 insertions(+)
-
-diff --git a/module/evdi_fb.c b/module/evdi_fb.c
-index 6b367fe8..f5de81f1 100644
---- a/module/evdi_fb.c
-+++ b/module/evdi_fb.c
-@@ -405,7 +405,11 @@ static int evdifb_create(struct drm_fb_helper *helper,
- 	fb = &efbdev->efb.base;
- 
- 	efbdev->helper.fb = fb;
-+#if KERNEL_VERSION(6, 2, 0) <= LINUX_VERSION_CODE
-+	efbdev->helper.info = info;
-+#else
- 	efbdev->helper.fbdev = info;
-+#endif
- 
- 	strcpy(info->fix.id, "evdidrmfb");
- 
-@@ -459,8 +463,13 @@ static void evdi_fbdev_destroy(__always_unused struct drm_device *dev,
- {
- 	struct fb_info *info;
- 
-+#if KERNEL_VERSION(6, 2, 0) <= LINUX_VERSION_CODE
-+	if (efbdev->helper.info) {
-+		info = efbdev->helper.info;
-+#else
- 	if (efbdev->helper.fbdev) {
- 		info = efbdev->helper.fbdev;
-+#endif
- 		unregister_framebuffer(info);
- 		if (info->cmap.len)
- 			fb_dealloc_cmap(&info->cmap);
-@@ -537,10 +546,17 @@ void evdi_fbdev_unplug(struct drm_device *dev)
- 		return;
- 
- 	efbdev = evdi->fbdev;
-+#if KERNEL_VERSION(6, 2, 0) <= LINUX_VERSION_CODE
-+	if (efbdev->helper.info) {
-+		struct fb_info *info;
-+
-+		info = efbdev->helper.info;
-+#else
- 	if (efbdev->helper.fbdev) {
- 		struct fb_info *info;
- 
- 		info = efbdev->helper.fbdev;
-+#endif
- #if KERNEL_VERSION(5, 6, 0) <= LINUX_VERSION_CODE || defined(EL8)
- 		unregister_framebuffer(info);
- #else
diff --git a/gnu/packages/patches/glibc-hurd-getauxval.patch b/gnu/packages/patches/glibc-hurd-getauxval.patch
new file mode 100644
index 0000000000..815371b2d0
--- /dev/null
+++ b/gnu/packages/patches/glibc-hurd-getauxval.patch
@@ -0,0 +1,34 @@
+Taken from https://salsa.debian.org/glibc-team/glibc/-/blob/5af8e3701c63ad202b652b5051bec592b8385820/debian/patches/hurd-i386/unsubmitted-getaux_at_secure.diff
+
+This fixes gdk-pixbuf, gobject-introspection.
+
+FIXME: sysdeps/mach/hurd/i386/init-first.c should instead pass an auxv
+to __libc_start_main
+
+Index: glibc-2.33/misc/getauxval.c
+===================================================================
+--- glibc-2.33.orig/misc/getauxval.c
++++ glibc-2.33/misc/getauxval.c
+@@ -19,6 +19,7 @@
+ #include <errno.h>
+ #include <ldsodefs.h>
+ #include <stdbool.h>
++#include <unistd.h>
+ 
+ bool
+ __getauxval2 (unsigned long int type, unsigned long int *result)
+@@ -27,6 +28,14 @@ __getauxval2 (unsigned long int type, un
+   ElfW(auxv_t) *p;
+ #endif
+ 
++#ifdef AT_SECURE
++  if (type == AT_SECURE)
++    {
++      *result = __libc_enable_secure;
++      return true;
++    }
++#endif
++
+   if (type == AT_HWCAP)
+     {
+       *result = GLRO(dl_hwcap);
diff --git a/gnu/packages/patches/gnome-dictionary-meson-i18n.patch b/gnu/packages/patches/gnome-dictionary-meson-i18n.patch
new file mode 100644
index 0000000000..fea45af69a
--- /dev/null
+++ b/gnu/packages/patches/gnome-dictionary-meson-i18n.patch
@@ -0,0 +1,52 @@
+From 71933f6586475b36c70ef325373fe6d50c7a034f Mon Sep 17 00:00:00 2001
+From: Jan Beich <jbeich@FreeBSD.org>
+Date: Mon, 24 Jan 2022 11:13:54 +0000
+Subject: [PATCH] meson: drop unused argument for i18n.merge_file()
+
+Ignored in Meson < 0.60.0, deprecated since 0.60.1 and fatal since 0.61.0.
+
+data/appdata/meson.build:3:5: ERROR: Function does not take positional arguments.
+data/meson.build:6:5: ERROR: Function does not take positional arguments.
+data/meson.build:49:5: ERROR: Function does not take positional arguments.
+---
+ data/appdata/meson.build | 2 +-
+ data/meson.build         | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/data/appdata/meson.build b/data/appdata/meson.build
+index 1dc4ed7..e44a58e 100644
+--- a/data/appdata/meson.build
++++ b/data/appdata/meson.build
+@@ -1,6 +1,6 @@
+ appdata_conf = configuration_data()
+ appdata_conf.set('application_id', application_id)
+-i18n.merge_file('appdata',
++appdata_file = i18n.merge_file(
+   input: configure_file(
+     input: 'org.gnome.Dictionary.appdata.xml.in.in',
+     output: 'org.gnome.Dictionary.appdata.xml.in',
+diff --git a/data/meson.build b/data/meson.build
+index 660e6b8..7ec7251 100644
+--- a/data/meson.build
++++ b/data/meson.build
+@@ -3,7 +3,7 @@ subdir('appdata')
+ desktop_conf = configuration_data()
+ desktop_conf.set('icon', application_id)
+ desktop_conf.set('application_id', application_id)
+-i18n.merge_file('desktop',
++desktop_file = i18n.merge_file(
+   input: configure_file(
+     input: 'org.gnome.Dictionary.desktop.in.in',
+     output: 'org.gnome.Dictionary.desktop.in',
+@@ -45,7 +45,7 @@ sources = [
+ ]
+ 
+ foreach s: sources
+-  i18n.merge_file('sources',
++  i18n.merge_file(
+     input: '@0@.in'.format(s),
+     output: s,
+     install: true,
+-- 
+2.41.0
+
diff --git a/gnu/packages/patches/hdf4-architectures.patch b/gnu/packages/patches/hdf4-architectures.patch
deleted file mode 100644
index aa71d5a383..0000000000
--- a/gnu/packages/patches/hdf4-architectures.patch
+++ /dev/null
@@ -1,632 +0,0 @@
-Copied from Debian.
-
-Description: Support additional architectures.
-Author: Francesco Paolo Lovergine <frankie@debian.org>
-
---- a/hdf/src/hdfi.h
-+++ b/hdf/src/hdfi.h
-@@ -48,6 +48,7 @@
- /*      8 - Cray IEEE                                                       */
- /*          (i.e. Big-Endian, all 64-bit architecture w/IEEE Floats)        */
- /*--------------------------------------------------------------------------*/
-+#define     DFMT_S390           0x1111
- #define     DFMT_SUN            0x1111 
- #define     DFMT_SUN_INTEL      0x4441
- #define     DFMT_ALLIANT        0x1111
-@@ -62,6 +63,7 @@
- #define     DFMT_CTSS           0x3331
- #define     DFMT_VAX            0x2221
- #define     DFMT_MIPSEL         0x4441
-+#define     DFMT_MIPSEB         0x1111
- #define     DFMT_PC             0x4441
- #define     DFMT_APPLE          0x1111
- #define     DFMT_APPLE_INTEL    0x4441
-@@ -75,6 +77,13 @@
- #define     DFMT_IA64           0x4441
- #define     DFMT_LINUX64        0x4441
- #define     DFMT_POWERPC64      0x1111
-+#define     DFMT_POWERPC64LE    0x4441
-+#define     DFMT_ARMV4L         0x4441
-+#define     DFMT_AARCH64        0x4441
-+#define     DFMT_X86_64         0x4441
-+#define     DFMT_SH             0x4441
-+#define     DFMT_SHEB           0x1111
-+#define     DFMT_RISCV64        0x4441
- 
- /* I/O library constants */
- #define UNIXUNBUFIO 1
-@@ -288,7 +297,7 @@ typedef int               hdf_pint_t;
- 
- #endif /* IBM6000 */
- 
--#if defined(HP9000) || (!defined(__convexc__) && (defined(hpux) || defined(__hpux)))
-+#if defined(HP9000) || (!defined(__convexc__) && (defined(hpux) || defined(__hpux) || defined(__hppa__)))
- 
- #ifndef HP9000
- #define HP9000
-@@ -347,6 +356,10 @@ typedef int               hdf_pint_t;
- /*  what each does */
- #define JMEMSYS         MEM_ANSI
- 
-+#ifdef __linux__
-+#define FNAME_POST_UNDERSCORE
-+#endif
-+
- #endif /* HP9000 */
- 
- 
-@@ -670,6 +683,462 @@ typedef int               hdf_pint_t;
- #endif /* !(defined(__APPLE__)) */
- 
- /*-----------------------------------------------------*/
-+#if defined (__linux__) && defined (__mc68000__)
-+
-+#ifdef GOT_MACHINE
-+If you get an error on this line more than one machine type has been defined.
-+Please check your Makefile.
-+#endif
-+#define GOT_MACHINE 1
-+
-+#include <fcntl.h>
-+#include <sys/types.h>      /* for unbuffered file I/O */
-+#include <sys/stat.h>
-+#include <unistd.h>
-+#include <ctype.h>          /* for character macros */
-+
-+#define DF_MT             DFMT_MOTOROLA
-+
-+#ifndef VOID    /* The stupid windows.h header file uses a #define instead of a typedef */
-+typedef void              VOID;
-+#endif  /* end VOID */
-+typedef void *            VOIDP;
-+typedef char *            _fcd;
-+typedef char              char8;
-+typedef unsigned char     uchar8;
-+typedef char              int8;
-+typedef unsigned char     uint8;
-+typedef short int         int16;
-+typedef unsigned short int uint16;
-+typedef long int          int32;
-+typedef unsigned long int uint32;
-+typedef int               intn;
-+typedef unsigned int      uintn;
-+typedef float             float32;
-+typedef double            float64;
-+typedef long              intf;     /* size of INTEGERs in Fortran compiler */
-+typedef int               hdf_pint_t;   /* an integer the same size as a pointer */
-+#define FNAME_POST_UNDERSCORE
-+#define _fcdtocp(desc) (desc)
-+
-+#ifdef  HAVE_FMPOOL
-+#define FILELIB PAGEBUFIO  /* enable page buffering */
-+#else
-+#define FILELIB UNIXBUFIO
-+#endif
-+
-+/* JPEG #define's - Look in the JPEG docs before changing - (Q) */
-+
-+/* Determine the memory manager we are going to use. Valid values are: */
-+/*  MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS.  See the JPEG docs for details on */
-+/*  what each does */
-+#define JMEMSYS         MEM_ANSI
-+#define HAVE_STDC
-+#define INCLUDES_ARE_ANSI
-+
-+#endif /* Linux/m68k */
-+
-+#if defined (__linux__) && defined (__sparc__)
-+
-+#ifdef GOT_MACHINE
-+If you get an error on this line more than one machine type has been defined.
-+Please check your Makefile.
-+#endif
-+#define GOT_MACHINE 1
-+
-+#include <fcntl.h>
-+#include <sys/types.h>      /* for unbuffered file I/O */
-+#include <sys/stat.h>
-+#include <unistd.h>
-+#include <ctype.h>          /* for character macros */
-+
-+#define DF_MT             DFMT_SUN
-+
-+#ifndef VOID    /* The stupid windows.h header file uses a #define instead of a typedef */
-+typedef void              VOID;
-+#endif  /* end VOID */
-+typedef void *            VOIDP;
-+typedef char *            _fcd;
-+typedef char              char8;
-+typedef unsigned char     uchar8;
-+typedef char              int8;
-+typedef unsigned char     uint8;
-+typedef short int         int16;
-+typedef unsigned short int uint16;
-+#ifdef _LP64 /* 64-bit environment */
-+typedef int               int32;
-+typedef unsigned int      uint32;
-+#else /* 32-bit environment */
-+typedef long int          int32;
-+typedef unsigned long int uint32;
-+#endif
-+typedef int               intn;
-+typedef unsigned int      uintn;
-+typedef float             float32;
-+typedef double            float64;
-+typedef long              intf;     /* size of INTEGERs in Fortran compiler */
-+#ifdef _LP64 /* 64-bit environment */
-+typedef long              hdf_pint_t;   /* an integer the same size as a pointer */
-+#else /* 32-bit environment */
-+typedef int               hdf_pint_t;   /* an integer the same size as a pointer */
-+#endif
-+#define FNAME_POST_UNDERSCORE
-+#define _fcdtocp(desc) (desc)
-+
-+#ifdef  HAVE_FMPOOL
-+#define FILELIB PAGEBUFIO  /* enable page buffering */
-+#else
-+#define FILELIB UNIXBUFIO
-+#endif
-+
-+/* JPEG #define's - Look in the JPEG docs before changing - (Q) */
-+
-+/* Determine the memory manager we are going to use. Valid values are: */
-+/*  MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS.  See the JPEG docs for details on */
-+/*  what each does */
-+#define JMEMSYS         MEM_ANSI
-+#define HAVE_STDC
-+#define INCLUDES_ARE_ANSI
-+
-+#endif /* Linux/Sparc */
-+
-+#if defined (__linux__) && defined (__powerpc__) && !defined(__powerpc64__)
-+
-+#ifdef GOT_MACHINE
-+If you get an error on this line more than one machine type has been defined.
-+Please check your Makefile.
-+#endif
-+#define GOT_MACHINE 1
-+
-+#include <fcntl.h>
-+#include <sys/types.h>      /* for unbuffered file I/O */
-+#include <sys/stat.h>
-+#include <unistd.h>
-+#include <ctype.h>          /* for character macros */
-+
-+#define DF_MT             DFMT_MOTOROLA
-+
-+#ifndef VOID    /* The stupid windows.h header file uses a #define instead of a typedef */
-+typedef void              VOID;
-+#endif  /* end VOID */
-+typedef void *            VOIDP;
-+typedef char *            _fcd;
-+typedef char              char8;
-+typedef unsigned char     uchar8;
-+typedef signed char       int8;
-+typedef unsigned char     uint8;
-+typedef short int         int16;
-+typedef unsigned short int uint16;
-+typedef long int          int32;
-+typedef unsigned long int uint32;
-+typedef int               intn;
-+typedef unsigned int      uintn;
-+typedef float             float32;
-+typedef double            float64;
-+typedef long              intf;     /* size of INTEGERs in Fortran compiler */
-+typedef int               hdf_pint_t;   /* an integer the same size as a pointer */
-+#define FNAME_POST_UNDERSCORE
-+#define _fcdtocp(desc) (desc)
-+
-+#ifdef  HAVE_FMPOOL
-+#define FILELIB PAGEBUFIO  /* enable page buffering */
-+#else
-+#define FILELIB UNIXBUFIO
-+#endif
-+
-+/* JPEG #define's - Look in the JPEG docs before changing - (Q) */
-+
-+/* Determine the memory manager we are going to use. Valid values are: */
-+/*  MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS.  See the JPEG docs for details on */
-+/*  what each does */
-+#define JMEMSYS         MEM_ANSI
-+#define HAVE_STDC
-+#define INCLUDES_ARE_ANSI
-+
-+#endif /* Linux/powerpc */
-+
-+#if defined (__linux__) && defined (__s390__)
-+
-+#ifdef GOT_MACHINE
-+If you get an error on this line more than one machine type has been defined.
-+Please check your Makefile.
-+#endif
-+#define GOT_MACHINE 1
-+
-+#include <fcntl.h>
-+#include <sys/types.h>      /* for unbuffered file I/O */
-+#include <sys/stat.h>
-+#include <unistd.h>
-+#include <ctype.h>          /* for character macros */
-+
-+#define DF_MT             DFMT_S390
-+
-+#ifndef VOID    /* The stupid windows.h header file uses a #define instead of a typedef */
-+typedef void              VOID;
-+#endif  /* end VOID */
-+typedef void *            VOIDP;
-+typedef char *            _fcd;
-+typedef char              char8;
-+typedef unsigned char     uchar8;
-+typedef signed char       int8;
-+typedef unsigned char     uint8;
-+typedef short int         int16;
-+typedef unsigned short int uint16;
-+#ifdef _LP64 /* 64-bit environment */
-+typedef int               int32;
-+typedef unsigned int      uint32;
-+#else /* 32-bit environment */
-+typedef long int          int32;
-+typedef unsigned long int uint32;
-+#endif
-+typedef int               intn;
-+typedef unsigned int      uintn;
-+typedef float             float32;
-+typedef double            float64;
-+typedef long              intf;     /* size of INTEGERs in Fortran compiler */
-+#ifdef _LP64 /* 64-bit environment */
-+typedef long              hdf_pint_t;   /* an integer the same size as a pointer */
-+#else /* 32-bit environment */
-+typedef int               hdf_pint_t;   /* an integer the same size as a pointer */
-+#endif
-+#define FNAME_POST_UNDERSCORE
-+#define _fcdtocp(desc) (desc)
-+
-+#ifdef  HAVE_FMPOOL
-+#define FILELIB PAGEBUFIO  /* enable page buffering */
-+#else
-+#define FILELIB UNIXBUFIO
-+#endif
-+
-+/* JPEG #define's - Look in the JPEG docs before changing - (Q) */
-+
-+/* Determine the memory manager we are going to use. Valid values are: */
-+/*  MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS.  See the JPEG docs for details on */
-+/*  what each does */
-+#define JMEMSYS         MEM_ANSI
-+#define HAVE_STDC
-+#define INCLUDES_ARE_ANSI
-+
-+#endif /* Linux/s390 */
-+
-+#if defined (__linux__) && (defined (__MIPSEB__) || defined(__MIPSEL__))
-+
-+#ifdef GOT_MACHINE
-+If you get an error on this line more than one machine type has been defined.
-+Please check your Makefile.
-+#endif
-+#define GOT_MACHINE 1
-+
-+#include <fcntl.h>
-+#include <sys/types.h>      /* for unbuffered file I/O */
-+#include <sys/stat.h>
-+#include <unistd.h>
-+#include <ctype.h>          /* for character macros */
-+
-+#if defined (__MIPSEB__)
-+#define DF_MT             DFMT_MIPSEB
-+#elif defined(__MIPSEL__)
-+#define DF_MT		  DFMT_MIPSEL
-+#endif
-+
-+#ifndef VOID    /* The stupid windows.h header file uses a #define instead of a typedef */
-+typedef void              VOID;
-+#endif  /* end VOID */
-+typedef void *            VOIDP;
-+typedef char *            _fcd;
-+typedef char              char8;
-+typedef unsigned char     uchar8;
-+typedef signed char       int8;
-+typedef unsigned char     uint8;
-+typedef short int         int16;
-+typedef unsigned short int uint16;
-+typedef int          int32;
-+typedef unsigned int uint32;
-+typedef int               intn;
-+typedef unsigned int      uintn;
-+typedef float             float32;
-+typedef double            float64;
-+typedef long              intf;     /* size of INTEGERs in Fortran compiler */
-+typedef long int               hdf_pint_t;   /* an integer the same size as a pointer */
-+#define FNAME_POST_UNDERSCORE
-+#define _fcdtocp(desc) (desc)
-+
-+#ifdef  HAVE_FMPOOL
-+#define FILELIB PAGEBUFIO  /* enable page buffering */
-+#else
-+#define FILELIB UNIXBUFIO
-+#endif
-+
-+/* JPEG #define's - Look in the JPEG docs before changing - (Q) */
-+
-+/* Determine the memory manager we are going to use. Valid values are: */
-+/*  MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS.  See the JPEG docs for details on */
-+/*  what each does */
-+#define JMEMSYS         MEM_ANSI
-+#define HAVE_STDC
-+#define INCLUDES_ARE_ANSI
-+
-+#endif /* Linux/mips */
-+
-+#if defined (__linux__) && defined (__arm__)
-+
-+#ifdef GOT_MACHINE
-+If you get an error on this line more than one machine type has been defined.
-+Please check your Makefile.
-+#endif
-+#define GOT_MACHINE 1
-+
-+#include <fcntl.h>
-+#include <sys/types.h>      /* for unbuffered file I/O */
-+#include <sys/stat.h>
-+#include <unistd.h>
-+#include <ctype.h>          /* for character macros */
-+
-+#define DF_MT             DFMT_ARMV4L
-+
-+#ifndef VOID    /* The stupid windows.h header file uses a #define instead of a typedef */
-+typedef void              VOID;
-+#endif  /* end VOID */
-+typedef void *            VOIDP;
-+typedef char *            _fcd;
-+typedef char              char8;
-+typedef unsigned char     uchar8;
-+typedef signed char       int8;
-+typedef unsigned char     uint8;
-+typedef short int         int16;
-+typedef unsigned short int uint16;
-+typedef int          int32;
-+typedef unsigned int uint32;
-+typedef int               intn;
-+typedef unsigned int      uintn;
-+typedef float             float32;
-+typedef double            float64;
-+typedef long              intf;     /* size of INTEGERs in Fortran compiler */
-+typedef long              hdf_pint_t;   /* an integer the same size as a pointer */
-+#define FNAME_POST_UNDERSCORE
-+#define _fcdtocp(desc) (desc)
-+
-+#ifdef  HAVE_FMPOOL
-+#define FILELIB PAGEBUFIO  /* enable page buffering */
-+#else
-+#define FILELIB UNIXBUFIO
-+#endif
-+
-+/* JPEG #define's - Look in the JPEG docs before changing - (Q) */
-+
-+/* Determine the memory manager we are going to use. Valid values are: */
-+/*  MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS.  See the JPEG docs for details on */
-+/*  what each does */
-+#define JMEMSYS         MEM_ANSI
-+#define HAVE_STDC
-+#define INCLUDES_ARE_ANSI
-+
-+#endif /* Linux/arm */
-+
-+#if defined (__linux__) && defined (__aarch64__)
-+
-+#ifdef GOT_MACHINE
-+If you get an error on this line more than one machine type has been defined.
-+Please check your Makefile.
-+#endif
-+#define GOT_MACHINE 1
-+
-+#include <fcntl.h>
-+#include <sys/types.h>      /* for unbuffered file I/O */
-+#include <sys/stat.h>
-+#include <unistd.h>
-+#include <ctype.h>          /* for character macros */
-+
-+#define DF_MT             DFMT_AARCH64
-+
-+typedef void              VOID;
-+typedef void *            VOIDP;
-+typedef char *            _fcd;
-+typedef char              char8;
-+typedef unsigned char     uchar8;
-+typedef signed char       int8;
-+typedef unsigned char     uint8;
-+typedef short int         int16;
-+typedef unsigned short int uint16;
-+typedef int               int32;
-+typedef unsigned int      uint32;
-+typedef int               intn;
-+typedef unsigned int      uintn;
-+typedef float             float32;
-+typedef double            float64;
-+typedef int               intf;     /* size of INTEGERs in Fortran compiler */
-+typedef long              hdf_pint_t;   /* an integer the same size as a pointer */
-+#define FNAME_POST_UNDERSCORE
-+#define _fcdtocp(desc) (desc)
-+#define FILELIB UNIXBUFIO
-+
-+#ifndef BIG_LONGS
-+#define BIG_LONGS
-+#endif
-+
-+/* JPEG #define's - Look in the JPEG docs before changing - (Q) */
-+
-+/* Determine the memory manager we are going to use. Valid values are: */
-+/*  MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS.  See the JPEG docs for details on */
-+/*  what each does */
-+#define JMEMSYS         MEM_ANSI
-+#define HAVE_STDC
-+#define INCLUDES_ARE_ANSI
-+
-+#endif /* Linux/aarch64 */
-+
-+#if defined (__linux__) && defined (__riscv) && (__riscv_xlen == 64)
-+
-+#ifdef GOT_MACHINE
-+If you get an error on this line more than one machine type has been defined.
-+Please check your Makefile.
-+#endif
-+#define GOT_MACHINE 1
-+
-+#include <fcntl.h>
-+#include <sys/types.h>      /* for unbuffered file I/O */
-+#include <sys/stat.h>
-+#include <unistd.h>
-+#include <ctype.h>          /* for character macros */
-+
-+#define DF_MT             DFMT_RISCV64
-+
-+typedef void              VOID;
-+typedef void *            VOIDP;
-+typedef char *            _fcd;
-+typedef char              char8;
-+typedef unsigned char     uchar8;
-+typedef signed char       int8;
-+typedef unsigned char     uint8;
-+typedef short int         int16;
-+typedef unsigned short int uint16;
-+typedef int               int32;
-+typedef unsigned int      uint32;
-+typedef int               intn;
-+typedef unsigned int      uintn;
-+typedef float             float32;
-+typedef double            float64;
-+typedef int               intf;     /* size of INTEGERs in Fortran compiler */
-+typedef long              hdf_pint_t;   /* an integer the same size as a pointer */
-+#define FNAME_POST_UNDERSCORE
-+#define _fcdtocp(desc) (desc)
-+#define FILELIB UNIXBUFIO
-+
-+#ifndef BIG_LONGS
-+#define BIG_LONGS
-+#endif
-+
-+/* JPEG #define's - Look in the JPEG docs before changing - (Q) */
-+
-+/* Determine the memory manager we are going to use. Valid values are: */
-+/*  MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS.  See the JPEG docs for details on */
-+/*  what each does */
-+#define JMEMSYS         MEM_ANSI
-+#define HAVE_STDC
-+#define INCLUDES_ARE_ANSI
-+
-+#endif /* Linux/riscv64 */
-+
- #if defined(NEXT) || defined(NeXT)
- 
- #ifndef NEXT
-@@ -932,7 +1401,11 @@ Please check your Makefile.
- 
- #include <sys/file.h>               /* for unbuffered i/o stuff */
- #include <sys/stat.h>
--#define DF_MT             DFMT_POWERPC64
-+#ifdef __LITTLE_ENDIAN__
-+#define DF_MT DFMT_POWERPC64LE
-+#else
-+#define DF_MT DFMT_POWERPC64
-+#endif
- typedef void              VOID;
- typedef void              *VOIDP;
- typedef char              *_fcd;
-@@ -956,6 +1429,11 @@ typedef long              hdf_pint_t;
- #define _fcdtocp(desc) (desc)
- #define FILELIB UNIXBUFIO
- 
-+#ifndef BIG_LONGS
-+#define BIG_LONGS
-+#endif
-+
-+
- /* JPEG #define's - Look in the JPEG docs before changing - (Q) */
- 
- /* Determine the memory manager we are going to use. Valid values are: */
-@@ -1101,6 +1579,8 @@ typedef long              hdf_pint_t;
- #define _fcdtocp(desc) (desc)
- #define FILELIB UNIXBUFIO
- 
-+#define BIG_LONGS
-+
- /* JPEG #define's - Look in the JPEG docs before changing - (Q) */
- 
- /* Determine the memory manager we are going to use. Valid values are: */
-@@ -1115,6 +1595,66 @@ typedef long              hdf_pint_t;
- 
- #endif /* IA64 */
- 
-+/* Renesas SuperH SH3(little/big)/SH4(little/big) */
-+#if defined (__linux__) && defined(__sh__)
-+
-+#ifdef GOT_MACHINE
-+If you get an error on this line more than one machine type has been defined.
-+Please check your Makefile.
-+#endif
-+#define GOT_MACHINE 1
-+
-+#include <fcntl.h>
-+#include <sys/types.h>      /* for unbuffered file I/O */
-+#include <sys/stat.h>
-+#include <unistd.h>
-+#include <ctype.h>          /* for character macros */
-+
-+#if defined (__LITTLE_ENDIAN__)
-+#define DF_MT             DFMT_SH
-+#elif defined(__BIG_ENDIAN__)
-+#define DF_MT		  DFMT_SHEB
-+#endif
-+
-+#ifndef VOID /* The stupid windows.h header file uses a #define instead of a typedef */
-+typedef void              VOID;
-+#endif  /* end VOID */
-+
-+typedef void *            VOIDP;
-+typedef char *            _fcd;
-+typedef char              char8;
-+typedef unsigned char     uchar8;
-+typedef signed char       int8;
-+typedef unsigned char     uint8;
-+typedef short int         int16;
-+typedef unsigned short int uint16;
-+typedef long int          int32;
-+typedef unsigned long int uint32;
-+typedef int               intn;
-+typedef unsigned int      uintn;
-+typedef float             float32;
-+typedef double            float64;
-+typedef long              intf;
-+typedef int               hdf_pint_t;
-+#define FNAME_POST_UNDERSCORE
-+#define _fcdtocp(desc) (desc)
-+
-+#ifdef  HAVE_FMPOOL
-+#define FILELIB PAGEBUFIO  /* enable page buffering */
-+#else
-+#define FILELIB UNIXBUFIO
-+#endif
-+
-+/* JPEG #define's - Look in the JPEG docs before changing - (Q) */
-+/* Determine the memory manager we are going to use. Valid values are: */
-+/*  MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS.  See the JPEG docs for details on */
-+/*  what each does */
-+#define JMEMSYS         MEM_ANSI
-+#define HAVE_STDC
-+#define INCLUDES_ARE_ANSI
-+
-+#endif /* Linux/sh */
-+
- #ifndef GOT_MACHINE
- No machine type has been defined.  Your Makefile needs to have someing like
- -DSUN or -DUNICOS in order for the HDF internal structures to be defined
---- a/hdf/src/hconv.h
-+++ b/hdf/src/hconv.h
-@@ -59,7 +59,7 @@
- /* CONSTANT DEFINITIONS                                                      */
- /*****************************************************************************/
- /* Generally Big-Endian machines */
--#if !defined(INTEL86) && !defined(MIPSEL) && !defined(DEC_ALPHA) && !defined(I860) && !defined(SUN386) && !(defined(__ia64) && !(defined(hpux) || defined(__hpux))) && !defined(__x86_64__)
-+#if !defined(INTEL86) && !defined(MIPSEL) && !defined(DEC_ALPHA) && !defined(I860) && !defined(SUN386) && !(defined(__ia64) && !(defined(hpux) || defined(__hpux))) && !defined(__x86_64__) && !(defined(__powerpc__) && defined(__LITTLE_ENDIAN__)) && !defined(__aarch64__) && !defined(__ARM_EABI__) && !defined(__riscv)
- #       define UI8_IN     DFKnb1b   /* Unsigned Integer, 8 bits */
- #       define UI8_OUT    DFKnb1b
- #       define SI16_IN    DFKnb2b   /* S = Signed */
diff --git a/gnu/packages/patches/hdf4-tirpc.patch b/gnu/packages/patches/hdf4-tirpc.patch
deleted file mode 100644
index 3f436e3887..0000000000
--- a/gnu/packages/patches/hdf4-tirpc.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Build with libtirpc on all architectures because glibc no longer provides
-SunRPC support.
-
-diff --git a/configure b/configure
---- a/configure
-+++ b/configure
-@@ -23635,10 +23635,13 @@
-   *-pc-cygwin*)
-     LIBS="$LIBS -ltirpc"
-     CPPFLAGS="$CPPFLAGS -I/usr/include/tirpc"  ;;
-+  *-linux-gnu)
-+    LIBS="$LIBS -ltirpc"
-+    CPPFLAGS="$CPPFLAGS"  ;;
-   *) ;;
- esac
- 
--if test "X$BUILD_XDR" != "Xyes"; then
-+if test "X$BUILD_XDR" = "Xyes"; then
-     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- 
-@@ -23693,9 +23696,9 @@
-   ## but we need to make sure that it is present on the system. Do that here,
-   ## The SunRPC of the glibc has been replaced by a TI-RPC (Transport Independent RPC) library for IPv6 support
-   case "$host" in
--    *-pc-cygwin*)
-+    *)
-       HAVE_RPC="yes"
--      ac_fn_c_check_header_mongrel "$LINENO" "rpc.h" "ac_cv_header_rpc_h" "$ac_includes_default"
-+      ac_fn_c_check_header_mongrel "$LINENO" "rpc/rpc.h" "ac_cv_header_rpc_h" "$ac_includes_default"
- if test "x$ac_cv_header_rpc_h" = xyes; then :
-   :
- else
diff --git a/gnu/packages/patches/kwin-unwrap-executable-name-for-dot-desktop-search.patch b/gnu/packages/patches/kwin-unwrap-executable-name-for-dot-desktop-search.patch
new file mode 100644
index 0000000000..8f67553138
--- /dev/null
+++ b/gnu/packages/patches/kwin-unwrap-executable-name-for-dot-desktop-search.patch
@@ -0,0 +1,89 @@
+origin patch from nixos.
+
+see https://github.com/NixOS/nixpkgs/blob/2457551a54ffbd93b7d8f84af8b8fb3aac5cbdd5/pkgs/desktops/plasma-5/kwin/0001-NixOS-Unwrap-executable-name-for-.desktop-search.patch
+
+---
+ src/guix_utils.h     | 41 +++++++++++++++++++++++++++++++++++++++++
+ src/service_utils.h   |  4 +++-
+ src/waylandwindow.cpp |  5 ++++-
+ 3 files changed, 48 insertions(+), 2 deletions(-)
+ create mode 100644 src/guix_utils.h
+
+diff a/src/guix_utils.h b/src/guix_utils.h
+new file mode 100644
+index 0000000..726065d
+--- /dev/null
++++ b/src/guix_utils.h
+@@ -0,0 +1,24 @@
++#ifndef GUIX_UTILS_H
++#define GUIX_UTILS_H
++
++// kwin
++#include <kwinglobals.h>
++
++namespace KWin
++{
++
++static QString unwrapExecutablePath(const QString &in_executablePath)
++{
++    QString executablePath(in_executablePath);
++
++    while (executablePath.endsWith("-real") && executablePath[executablePath.lastIndexOf("/")+1] == QChar('.')) {
++        executablePath.remove(executablePath.length() - 5, 5);
++        executablePath.remove(executablePath.lastIndexOf("/")+1, 1);
++    }
++
++    return executablePath;
++}
++
++}// namespace
++
++#endif // GUIX_UTILS_H
+diff a/src/utils/serviceutils.h b/src/utils/serviceutils.h
+index 8a70c1f..475b15d 100644
+--- a/src/utils/serviceutils.h
++++ b/src/utils/serviceutils.h
+@@ -19,6 +19,7 @@
+ #include <QLoggingCategory>
+ //KF
+ #include <KApplicationTrader>
++#include "guix_utils.h"
+ 
+ namespace KWin
+ {
+@@ -26,8 +27,9 @@ namespace KWin
+ const static QString s_waylandInterfaceName = QStringLiteral("X-KDE-Wayland-Interfaces");
+ const static QString s_dbusRestrictedInterfaceName = QStringLiteral("X-KDE-DBUS-Restricted-Interfaces");
+ 
+-static QStringList fetchProcessServiceField(const QString &executablePath, const QString &fieldName)
++static QStringList fetchProcessServiceField(const QString &in_executablePath, const QString &fieldName)
+ {
++    const QString executablePath = unwrapExecutablePath(in_executablePath);
+     // needed to be able to use the logging category in a header static function
+     static QLoggingCategory KWIN_UTILS ("KWIN_UTILS", QtWarningMsg);
+     const auto servicesFound = KApplicationTrader::query([&executablePath] (const KService::Ptr &service) {
+diff a/src/waylandwindow.cpp b/src/waylandwindow.cpp
+index fd2c0c1..ae8cf96 100644
+--- a/src/waylandwindow.cpp
++++ b/src/waylandwindow.cpp
+@@ -10,6 +10,7 @@
+ #include "screens.h"
+ #include "wayland_server.h"
+ #include "workspace.h"
++#include "guix_utils.h"
+ 
+ #include <KWaylandServer/display.h>
+ #include <KWaylandServer/clientbuffer.h>
+@@ -173,7 +174,9 @@ void WaylandWindow::updateIcon()
+ 
+ void WaylandWindow::updateResourceName()
+ {
+-    const QFileInfo fileInfo(surface()->client()->executablePath());
++    const QString in_path = surface()->client()->executablePath();
++    const QString path = unwrapExecutablePath(in_path);
++    const QFileInfo fileInfo(path);
+     if (fileInfo.exists()) {
+         const QByteArray executableFileName = fileInfo.fileName().toUtf8();
+         setResourceClass(executableFileName, executableFileName);
+-- 
+2.32.0
\ No newline at end of file
diff --git a/gnu/packages/patches/libftdi-fix-paths-when-FTDIPP-set.patch b/gnu/packages/patches/libftdi-fix-paths-when-FTDIPP-set.patch
new file mode 100644
index 0000000000..0a81cceb26
--- /dev/null
+++ b/gnu/packages/patches/libftdi-fix-paths-when-FTDIPP-set.patch
@@ -0,0 +1,39 @@
+commit cdb28383402d248dbc6062f4391b038375c52385
+Author: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date:   Fri Jul 17 21:25:03 2020 +0200
+
+    CMakeLists.txt: fix paths when FTDIPP is set
+    
+    Use the same project name (i.e. libftdi1 and not libftdipp1) when FTDIPP
+    is enabled as suggested by Aurelien Jarno in
+    http://developer.intra2net.com/mailarchive/html/libftdi/2020/msg00044.html
+    
+    Without this change, the libftdi1.pc config file defines the include
+    path as /usr/local/include/libftdipp1 while the ftdi.h file is actually
+    installed in /usr/local/include/libftdi1
+    
+    This is an issue for example for libsigrok which will fail on:
+    
+    In file included from src/hardware/asix-sigma/protocol.c:27:
+    src/hardware/asix-sigma/protocol.h:28:10: fatal error: ftdi.h: No such file or directory
+       28 | #include <ftdi.h>
+          |          ^~~~~~~~
+    
+    Fixes:
+     - http://autobuild.buildroot.org/results/1427f44e36752c337791597fab47a1889552a2fe
+    
+    Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5aecafc..3b0b87c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -136,7 +136,7 @@ endif ()
+ 
+ add_subdirectory(src)
+ if ( FTDIPP )
+-  project(libftdipp1 C CXX)
++  project(libftdi1 C CXX)
+   add_subdirectory(ftdipp)
+ endif ()
+ if ( PYTHON_BINDINGS )
diff --git a/gnu/packages/patches/nanosvg-prusa-slicer.patch b/gnu/packages/patches/nanosvg-prusa-slicer.patch
new file mode 100644
index 0000000000..dc11e9365c
--- /dev/null
+++ b/gnu/packages/patches/nanosvg-prusa-slicer.patch
@@ -0,0 +1,248 @@
+From abcd277ea45e9098bed752cf9c6875b533c0892f Mon Sep 17 00:00:00 2001
+From: AlbrechtS <AlbrechtS.svn@fltk.example.org>
+Date: Sun, 4 Feb 2018 23:47:38 +0100
+Subject: [PATCH] Modify rasterizer to support non-square X,Y axes scaling.
+
+Add new function nsvgRasterizeXY() similar to nsvgRasterize() but with
+separate scaling factors for x-axis and y-axis.
+---
+ src/nanosvgrast.h | 78 +++++++++++++++++++++++++++++++----------------
+ 1 file changed, 51 insertions(+), 27 deletions(-)
+
+diff --git a/src/nanosvgrast.h b/src/nanosvgrast.h
+index 17ba3b0..a83db27 100644
+--- a/src/nanosvgrast.h
++++ b/src/nanosvgrast.h
+@@ -22,6 +22,12 @@
+  *
+  */
+ 
++/* Modified by FLTK to support non-square X,Y axes scaling.
++ *
++ * Added: nsvgRasterizeXY()
++*/
++
++
+ #ifndef NANOSVGRAST_H
+ #define NANOSVGRAST_H
+ 
+@@ -46,6 +52,9 @@ typedef struct NSVGrasterizer NSVGrasterizer;
+ 	unsigned char* img = malloc(w*h*4);
+ 	// Rasterize
+ 	nsvgRasterize(rast, image, 0,0,1, img, w, h, w*4);
++
++	// For non-square X,Y scaling, use
++	nsvgRasterizeXY(rast, image, 0,0,1,1, img, w, h, w*4);
+ */
+ 
+ // Allocated rasterizer context.
+@@ -55,7 +64,7 @@ NSVGrasterizer* nsvgCreateRasterizer(void);
+ //   r - pointer to rasterizer context
+ //   image - pointer to image to rasterize
+ //   tx,ty - image offset (applied after scaling)
+-//   scale - image scale
++//   scale - image scale (assumes square aspect ratio)
+ //   dst - pointer to destination image data, 4 bytes per pixel (RGBA)
+ //   w - width of the image to render
+ //   h - height of the image to render
+@@ -64,6 +73,12 @@ void nsvgRasterize(NSVGrasterizer* r,
+ 				   NSVGimage* image, float tx, float ty, float scale,
+ 				   unsigned char* dst, int w, int h, int stride);
+ 
++// As above, but allow X and Y axes to scale independently for non-square aspects
++void nsvgRasterizeXY(NSVGrasterizer* r,
++				   NSVGimage* image, float tx, float ty,
++				   float sx, float sy,
++				   unsigned char* dst, int w, int h, int stride);
++
+ // Deletes rasterizer context.
+ void nsvgDeleteRasterizer(NSVGrasterizer*);
+ 
+@@ -370,7 +385,7 @@ static void nsvg__flattenCubicBez(NSVGrasterizer* r,
+ 	nsvg__flattenCubicBez(r, x1234,y1234, x234,y234, x34,y34, x4,y4, level+1, type);
+ }
+ 
+-static void nsvg__flattenShape(NSVGrasterizer* r, NSVGshape* shape, float scale)
++static void nsvg__flattenShape(NSVGrasterizer* r, NSVGshape* shape, float sx, float sy)
+ {
+ 	int i, j;
+ 	NSVGpath* path;
+@@ -378,13 +393,13 @@ static void nsvg__flattenShape(NSVGrasterizer* r, NSVGshape* shape, float scale)
+ 	for (path = shape->paths; path != NULL; path = path->next) {
+ 		r->npoints = 0;
+ 		// Flatten path
+-		nsvg__addPathPoint(r, path->pts[0]*scale, path->pts[1]*scale, 0);
++		nsvg__addPathPoint(r, path->pts[0]*sx, path->pts[1]*sy, 0);
+ 		for (i = 0; i < path->npts-1; i += 3) {
+ 			float* p = &path->pts[i*2];
+-			nsvg__flattenCubicBez(r, p[0]*scale,p[1]*scale, p[2]*scale,p[3]*scale, p[4]*scale,p[5]*scale, p[6]*scale,p[7]*scale, 0, 0);
++			nsvg__flattenCubicBez(r, p[0]*sx,p[1]*sy, p[2]*sx,p[3]*sy, p[4]*sx,p[5]*sy, p[6]*sx,p[7]*sy, 0, 0);
+ 		}
+ 		// Close path
+-		nsvg__addPathPoint(r, path->pts[0]*scale, path->pts[1]*scale, 0);
++		nsvg__addPathPoint(r, path->pts[0]*sx, path->pts[1]*sy, 0);
+ 		// Build edges
+ 		for (i = 0, j = r->npoints-1; i < r->npoints; j = i++)
+ 			nsvg__addEdge(r, r->points[j].x, r->points[j].y, r->points[i].x, r->points[i].y);
+@@ -734,7 +749,7 @@ static void nsvg__prepareStroke(NSVGrasterizer* r, float miterLimit, int lineJoi
+ 	}
+ }
+ 
+-static void nsvg__flattenShapeStroke(NSVGrasterizer* r, NSVGshape* shape, float scale)
++static void nsvg__flattenShapeStroke(NSVGrasterizer* r, NSVGshape* shape, float sx, float sy)
+ {
+ 	int i, j, closed;
+ 	NSVGpath* path;
+@@ -742,15 +757,16 @@ static void nsvg__flattenShapeStroke(NSVGrasterizer* r, NSVGshape* shape, float
+ 	float miterLimit = shape->miterLimit;
+ 	int lineJoin = shape->strokeLineJoin;
+ 	int lineCap = shape->strokeLineCap;
+-	float lineWidth = shape->strokeWidth * scale;
++	const float sw = (sx + sy) / 2; // average scaling factor
++	const float lineWidth = shape->strokeWidth * sw; // FIXME (?)
+ 
+ 	for (path = shape->paths; path != NULL; path = path->next) {
+ 		// Flatten path
+ 		r->npoints = 0;
+-		nsvg__addPathPoint(r, path->pts[0]*scale, path->pts[1]*scale, NSVG_PT_CORNER);
++		nsvg__addPathPoint(r, path->pts[0]*sx, path->pts[1]*sy, NSVG_PT_CORNER);
+ 		for (i = 0; i < path->npts-1; i += 3) {
+ 			float* p = &path->pts[i*2];
+-			nsvg__flattenCubicBez(r, p[0]*scale,p[1]*scale, p[2]*scale,p[3]*scale, p[4]*scale,p[5]*scale, p[6]*scale,p[7]*scale, 0, NSVG_PT_CORNER);
++			nsvg__flattenCubicBez(r, p[0]*sx,p[1]*sy, p[2]*sx,p[3]*sy, p[4]*sx,p[5]*sy, p[6]*sx,p[7]*sy, 0, NSVG_PT_CORNER);
+ 		}
+ 		if (r->npoints < 2)
+ 			continue;
+@@ -796,7 +812,7 @@ static void nsvg__flattenShapeStroke(NSVGrasterizer* r, NSVGshape* shape, float
+ 				dashOffset -= shape->strokeDashArray[idash];
+ 				idash = (idash + 1) % shape->strokeDashCount;
+ 			}
+-			dashLen = (shape->strokeDashArray[idash] - dashOffset) * scale;
++			dashLen = (shape->strokeDashArray[idash] - dashOffset) * sw;
+ 
+ 			for (j = 1; j < r->npoints2; ) {
+ 				float dx = r->points2[j].x - cur.x;
+@@ -818,7 +834,7 @@ static void nsvg__flattenShapeStroke(NSVGrasterizer* r, NSVGshape* shape, float
+ 					// Advance dash pattern
+ 					dashState = !dashState;
+ 					idash = (idash+1) % shape->strokeDashCount;
+-					dashLen = shape->strokeDashArray[idash] * scale;
++					dashLen = shape->strokeDashArray[idash] * sw;
+ 					// Restart
+ 					cur.x = x;
+ 					cur.y = y;
+@@ -987,7 +1003,7 @@ static inline int nsvg__div255(int x)
+ }
+ 
+ static void nsvg__scanlineSolid(unsigned char* dst, int count, unsigned char* cover, int x, int y,
+-								float tx, float ty, float scale, NSVGcachedPaint* cache)
++								float tx, float ty, float sx, float sy, NSVGcachedPaint* cache)
+ {
+ 
+ 	if (cache->type == NSVG_PAINT_COLOR) {
+@@ -1028,9 +1044,9 @@ static void nsvg__scanlineSolid(unsigned char* dst, int count, unsigned char* co
+ 		int i, cr, cg, cb, ca;
+ 		unsigned int c;
+ 
+-		fx = ((float)x - tx) / scale;
+-		fy = ((float)y - ty) / scale;
+-		dx = 1.0f / scale;
++		fx = ((float)x - tx) / sx;
++		fy = ((float)y - ty) / sy;
++		dx = 1.0f / sx;
+ 
+ 		for (i = 0; i < count; i++) {
+ 			int r,g,b,a,ia;
+@@ -1073,9 +1089,9 @@ static void nsvg__scanlineSolid(unsigned char* dst, int count, unsigned char* co
+ 		int i, cr, cg, cb, ca;
+ 		unsigned int c;
+ 
+-		fx = ((float)x - tx) / scale;
+-		fy = ((float)y - ty) / scale;
+-		dx = 1.0f / scale;
++		fx = ((float)x - tx) / sx;
++		fy = ((float)y - ty) / sy;
++		dx = 1.0f / sx;
+ 
+ 		for (i = 0; i < count; i++) {
+ 			int r,g,b,a,ia;
+@@ -1114,7 +1130,7 @@ static void nsvg__scanlineSolid(unsigned char* dst, int count, unsigned char* co
+ 	}
+ }
+ 
+-static void nsvg__rasterizeSortedEdges(NSVGrasterizer *r, float tx, float ty, float scale, NSVGcachedPaint* cache, char fillRule)
++static void nsvg__rasterizeSortedEdges(NSVGrasterizer *r, float tx, float ty, float sx, float sy, NSVGcachedPaint* cache, char fillRule)
+ {
+ 	NSVGactiveEdge *active = NULL;
+ 	int y, s;
+@@ -1196,7 +1212,7 @@ static void nsvg__rasterizeSortedEdges(NSVGrasterizer *r, float tx, float ty, fl
+ 		if (xmin < 0) xmin = 0;
+ 		if (xmax > r->width-1) xmax = r->width-1;
+ 		if (xmin <= xmax) {
+-			nsvg__scanlineSolid(&r->bitmap[y * r->stride] + xmin*4, xmax-xmin+1, &r->scanline[xmin], xmin, y, tx,ty, scale, cache);
++			nsvg__scanlineSolid(&r->bitmap[y * r->stride] + xmin*4, xmax-xmin+1, &r->scanline[xmin], xmin, y, tx,ty, sx, sy, cache);
+ 		}
+ 	}
+ 
+@@ -1364,8 +1380,9 @@ static void dumpEdges(NSVGrasterizer* r, const char* name)
+ }
+ */
+ 
+-void nsvgRasterize(NSVGrasterizer* r,
+-				   NSVGimage* image, float tx, float ty, float scale,
++void nsvgRasterizeXY(NSVGrasterizer* r,
++				   NSVGimage* image, float tx, float ty,
++				   float sx, float sy,
+ 				   unsigned char* dst, int w, int h, int stride)
+ {
+ 	NSVGshape *shape = NULL;
+@@ -1396,7 +1413,7 @@ void nsvgRasterize(NSVGrasterizer* r,
+ 			r->freelist = NULL;
+ 			r->nedges = 0;
+ 
+-			nsvg__flattenShape(r, shape, scale);
++			nsvg__flattenShape(r, shape, sx, sy);
+ 
+ 			// Scale and translate edges
+ 			for (i = 0; i < r->nedges; i++) {
+@@ -1414,14 +1431,14 @@ void nsvgRasterize(NSVGrasterizer* r,
+ 			// now, traverse the scanlines and find the intersections on each scanline, use non-zero rule
+ 			nsvg__initPaint(&cache, &shape->fill, shape->opacity);
+ 
+-			nsvg__rasterizeSortedEdges(r, tx,ty,scale, &cache, shape->fillRule);
++			nsvg__rasterizeSortedEdges(r, tx,ty, sx, sy, &cache, shape->fillRule);
+ 		}
+-		if (shape->stroke.type != NSVG_PAINT_NONE && (shape->strokeWidth * scale) > 0.01f) {
++		if (shape->stroke.type != NSVG_PAINT_NONE && (shape->strokeWidth * sx) > 0.01f) {
+ 			nsvg__resetPool(r);
+ 			r->freelist = NULL;
+ 			r->nedges = 0;
+ 
+-			nsvg__flattenShapeStroke(r, shape, scale);
++			nsvg__flattenShapeStroke(r, shape, sx, sy);
+ 
+ //			dumpEdges(r, "edge.svg");
+ 
+@@ -1441,7 +1458,7 @@ void nsvgRasterize(NSVGrasterizer* r,
+ 			// now, traverse the scanlines and find the intersections on each scanline, use non-zero rule
+ 			nsvg__initPaint(&cache, &shape->stroke, shape->opacity);
+ 
+-			nsvg__rasterizeSortedEdges(r, tx,ty,scale, &cache, NSVG_FILLRULE_NONZERO);
++			nsvg__rasterizeSortedEdges(r, tx,ty,sx, sy, &cache, NSVG_FILLRULE_NONZERO);
+ 		}
+ 	}
+ 
+@@ -1453,6 +1470,13 @@ void nsvgRasterize(NSVGrasterizer* r,
+ 	r->stride = 0;
+ }
+ 
++void nsvgRasterize(NSVGrasterizer* r,
++				   NSVGimage* image, float tx, float ty, float scale,
++				   unsigned char* dst, int w, int h, int stride)
++{
++	nsvgRasterizeXY(r,image, tx, ty, scale, scale, dst, w, h, stride);
++}
++
+ #endif // NANOSVGRAST_IMPLEMENTATION
+ 
+ #endif // NANOSVGRAST_H
diff --git a/gnu/packages/patches/openjdk-21-fix-rpath.patch b/gnu/packages/patches/openjdk-21-fix-rpath.patch
new file mode 100644
index 0000000000..62e2a50a52
--- /dev/null
+++ b/gnu/packages/patches/openjdk-21-fix-rpath.patch
@@ -0,0 +1,16 @@
+Author: Danny Milosavljevic <dannym@scratchpost.org>
+Date: 2023-09-20
+
+diff -ru openjdk-21/make/modules/jdk.internal.le/Lib.gmk.orig openjdk-21.drv-4/source/make/modules/jdk.internal.le/Lib.gmk
+--- openjdk-21/make/modules/jdk.internal.le/Lib.gmk.orig	1970-01-01 01:00:01.000000000 +0100
++++ openjdk-21/make/modules/jdk.internal.le/Lib.gmk	2023-09-20 21:42:04.626821839 +0200
+@@ -34,7 +34,8 @@
+       TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
+       OPTIMIZATION := LOW, \
+       CFLAGS := $(CXXFLAGS_JDKLIB), \
+-      LDFLAGS := $(LDFLAGS_JDKLIB), \
++      LDFLAGS := $(LDFLAGS_JDKLIB) \
++        $(call SET_SHARED_LIBRARY_ORIGIN), \
+       LIBS_unix := $(JDKLIB_LIBS) $(LIBCXX), \
+       LIBS_windows := $(JDKLIB_LIBS) user32.lib, \
+   ))
diff --git a/gnu/packages/patches/tensorflow-lite-unbundle.patch b/gnu/packages/patches/tensorflow-lite-unbundle.patch
new file mode 100644
index 0000000000..efd7d5bbc6
--- /dev/null
+++ b/gnu/packages/patches/tensorflow-lite-unbundle.patch
@@ -0,0 +1,27 @@
+Disable local CMake build code for bundled 3rdparty components.
+
+diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt
+index 0476170e075..90abea00e8c 100644
+--- a/tensorflow/lite/CMakeLists.txt
++++ b/tensorflow/lite/CMakeLists.txt
+@@ -564,7 +564,7 @@ set(_ALL_TFLITE_HDRS ${_ALL_TFLITE_SRCS})
+ list(FILTER _ALL_TFLITE_HDRS INCLUDE REGEX ".*\\.h$")
+ target_include_directories(tensorflow-lite
+   PUBLIC $<BUILD_INTERFACE:${TENSORFLOW_SOURCE_DIR}> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
+-  ${CMAKE_BINARY_DIR}/gemmlowp
++  ${gemmlowp_ROOT}/include/gemmlowp
+ )
+ target_link_libraries(tensorflow-lite
+   PUBLIC
+diff --git a/tensorflow/lite/tools/cmake/modules/Findgemmlowp.cmake b/tensorflow/lite/tools/cmake/modules/Findgemmlowp.cmake
+index 70331ad0a69..a9bd8a0f3bd 100644
+--- a/tensorflow/lite/tools/cmake/modules/Findgemmlowp.cmake
++++ b/tensorflow/lite/tools/cmake/modules/Findgemmlowp.cmake
+@@ -18,7 +18,6 @@
+ include(gemmlowp)
+ if(gemmlowp_POPULATED)
+   set(GEMMLOWP_FOUND TRUE)
+-  get_target_property(GEMMLOWP_INCLUDE_DIRS gemmlowp INTERFACE_DIRECTORIES)
+   set(GEMMLOWP_LIBRARIES
+     gemmlowp
+     gemmlowp_fixedpoint