Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] Qt6: Update to 6.5.0
@ 2023-04-05 22:13 Johnnynator
  2023-04-05 22:31 ` [PR PATCH] [Updated] " Johnnynator
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Johnnynator @ 2023-04-05 22:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2188 bytes --]

There is a new pull request by Johnnynator against master on the void-packages repository

https://github.com/Johnnynator/void-packages qt6.5.0
https://github.com/void-linux/void-packages/pull/43293

Qt6: Update to 6.5.0
- qt6-websockets: update to 6.5.0.
- qt6-webengine: update to 6.5.0.
- qt6-webchannel: update to 6.5.0.
- qt6-wayland: update to 6.5.0.
- qt6-virtualkeyboard: update to 6.5.0.
- qt6-translations: update to 6.5.0.
- qt6-tools: update to 6.5.0.
- qt6-svg: update to 6.5.0.
- qt6-shadertools: update to 6.5.0.
- qt6-serialport: update to 6.5.0.
- qt6-sensors: update to 6.5.0.
- qt6-scxml: update to 6.5.0.
- qt6-remoteobjects: update to 6.5.0.
- qt6-quicktimeline: update to 6.5.0.
- qt6-quick3d: update to 6.5.0.
- qt6-qt5compat: update to 6.5.0.
- qt6-networkauth: update to 6.5.0.
- qt6-multimedia: update to 6.5.0.
- qt6-lottie: update to 6.5.0.
- qt6-location: update to 6.5.0.
- qt6-imageformats: update to 6.5.0.
- qt6-declarative: update to 6.5.0.
- qt6-connectivity: update to 6.5.0.
- qt6-charts: update to 6.5.0.
- qt6-base: update to 6.5.0.
- qt6-3d: update to 6.5.0.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86_64
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  -  - [x] riscv64
  -  - [ ] x86_64-musl
  -  - [ ] aarch64

[ci skip]
[skip ci]

A patch file from https://github.com/void-linux/void-packages/pull/43293.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-qt6.5.0-43293.patch --]
[-- Type: text/x-diff, Size: 182339 bytes --]

From 58a3c1fd8ca4b9fed905e9671b1be1cb5b5557e3 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:37:45 +0200
Subject: [PATCH 01/26] qt6-websockets: update to 6.5.0.

---
 srcpkgs/qt6-websockets/patches/no-cmake-test.patch | 7 -------
 srcpkgs/qt6-websockets/template                    | 8 ++++----
 2 files changed, 4 insertions(+), 11 deletions(-)
 delete mode 100644 srcpkgs/qt6-websockets/patches/no-cmake-test.patch

diff --git a/srcpkgs/qt6-websockets/patches/no-cmake-test.patch b/srcpkgs/qt6-websockets/patches/no-cmake-test.patch
deleted file mode 100644
index 8829f9fab1df..000000000000
--- a/srcpkgs/qt6-websockets/patches/no-cmake-test.patch
+++ /dev/null
@@ -1,7 +0,0 @@
---- a/tests/auto/CMakeLists.txt
-+++ b/tests/auto/CMakeLists.txt
-@@ -1,4 +1,3 @@
--add_subdirectory(cmake)
- add_subdirectory(websockets)
- if(TARGET Qt::Quick)
-     add_subdirectory(qml)
diff --git a/srcpkgs/qt6-websockets/template b/srcpkgs/qt6-websockets/template
index 467083fcd44c..3e02fb127fd6 100644
--- a/srcpkgs/qt6-websockets/template
+++ b/srcpkgs/qt6-websockets/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-websockets'
 pkgname=qt6-websockets
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base qt6-declarative-host-tools"
@@ -12,7 +12,7 @@ maintainer="John <me@johnnynator.dev>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtwebsockets-everywhere-src-${version}.tar.xz"
-checksum=71cf857582db20c20103a56f67d51c33c4ab0b72448209c963d3b449a527c626
+checksum=bc087bd656bb34da120ccab6e927036a219f75fd88f1543744c426bfca616308
 
 pre_check() {
 	export QML2_IMPORT_PATH="$wrksrc/build/lib/qt6/qml"
@@ -28,11 +28,11 @@ qt6-websockets-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 3adfc8a5a2066684cec3b5a04d67ab1fe0ec9e25 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:37:44 +0200
Subject: [PATCH 02/26] qt6-webengine: update to 6.5.0.

---
 .../patches/0004-riscv-angle.patch            |   28 +
 .../patches/0004-riscv-angle.patch.args       |    1 +
 .../patches/0005-riscv-crashpad.patch         |  778 +++++++
 .../patches/0005-riscv-crashpad.patch.args    |    1 +
 .../patches/0006-riscv-dav1d.patch            |   44 +
 .../patches/0006-riscv-dav1d.patch.args       |    1 +
 .../patches/0007-riscv-sandbox.patch          | 1956 +++++++++++++++++
 .../patches/0007-riscv-sandbox.patch.args     |    1 +
 .../0100-chromium-revert-9d080c0.patch        |  154 --
 ...omium-102-fenced_frame_utils-include.patch |   20 -
 ...102-chromium-102-regex_pattern-array.patch |   14 -
 ...0103-chromium-i686-vaapi-fpermissive.patch |   23 -
 .../0104-chromium-libxml-unbundle.patch       |   10 -
 .../patches/0107-chromium-cross-build.patch   |    6 +-
 .../0108-chromium-cursed^Uscoped_file.patch   |   18 -
 .../patches/0117-chromium-musl-resolver.patch |   25 +-
 .../patches/0124-chromium-enable-i686.patch   |   17 -
 .../0129-chromium-sandbox-shed_getparam.patch |   23 +-
 .../qt6-webengine/patches/0155-systypes.patch |   11 +
 .../patches/0200-chromium-sndio.patch         |  849 -------
 .../patches/0300-chromium-musl-hacks.patch    |   14 -
 .../patches/0301-chromium-musl-sandbox.patch  |   86 -
 .../patches/0302-chromium-no-mallinfo.patch   |   37 +-
 srcpkgs/qt6-webengine/template                |    8 +-
 24 files changed, 2865 insertions(+), 1260 deletions(-)
 create mode 100644 srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch.args
 create mode 100644 srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch.args
 create mode 100644 srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch.args
 create mode 100644 srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch.args
 delete mode 100644 srcpkgs/qt6-webengine/patches/0100-chromium-revert-9d080c0.patch
 delete mode 100644 srcpkgs/qt6-webengine/patches/0101-chromium-102-fenced_frame_utils-include.patch
 delete mode 100644 srcpkgs/qt6-webengine/patches/0102-chromium-102-regex_pattern-array.patch
 delete mode 100644 srcpkgs/qt6-webengine/patches/0103-chromium-i686-vaapi-fpermissive.patch
 delete mode 100644 srcpkgs/qt6-webengine/patches/0104-chromium-libxml-unbundle.patch
 delete mode 100644 srcpkgs/qt6-webengine/patches/0108-chromium-cursed^Uscoped_file.patch
 delete mode 100644 srcpkgs/qt6-webengine/patches/0124-chromium-enable-i686.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0155-systypes.patch
 delete mode 100644 srcpkgs/qt6-webengine/patches/0200-chromium-sndio.patch
 delete mode 100644 srcpkgs/qt6-webengine/patches/0301-chromium-musl-sandbox.patch

diff --git a/srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch b/srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch
new file mode 100644
index 000000000000..1aceb6f2d229
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch
@@ -0,0 +1,28 @@
+Index: chromium-111.0.5563.64/third_party/angle/gni/angle.gni
+===================================================================
+--- chromium-111.0.5563.64.orig/third_party/angle/gni/angle.gni
++++ chromium-111.0.5563.64/third_party/angle/gni/angle.gni
+@@ -105,7 +105,8 @@ declare_args() {
+ 
+   if (current_cpu == "arm64" || current_cpu == "x64" ||
+       current_cpu == "mips64el" || current_cpu == "s390x" ||
+-      current_cpu == "ppc64" || current_cpu == "loong64") {
++      current_cpu == "ppc64" || current_cpu == "loong64" ||
++      current_cpu == "riscv64") {
+     angle_64bit_current_cpu = true
+   } else if (current_cpu == "arm" || current_cpu == "x86" ||
+              current_cpu == "mipsel" || current_cpu == "s390" ||
+Index: chromium-111.0.5563.64/third_party/angle/src/common/platform.h
+===================================================================
+--- chromium-111.0.5563.64.orig/third_party/angle/src/common/platform.h
++++ chromium-111.0.5563.64/third_party/angle/src/common/platform.h
+@@ -108,7 +108,7 @@
+ #endif
+ 
+ // Mips and arm devices need to include stddef for size_t.
+-#if defined(__mips__) || defined(__arm__) || defined(__aarch64__)
++#if defined(__mips__) || defined(__arm__) || defined(__aarch64__) || defined(__riscv)
+ #    include <stddef.h>
+ #endif
+ 
+
diff --git a/srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch.args b/srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch.args
new file mode 100644
index 000000000000..d5f38e354e7f
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch.args
@@ -0,0 +1 @@
+-Np1 --directory=src/3rdparty/chromium/
diff --git a/srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch b/srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch
new file mode 100644
index 000000000000..012a38c38865
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch
@@ -0,0 +1,778 @@
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_context.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/minidump/minidump_context.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_context.h
+@@ -637,6 +637,41 @@ struct MinidumpContextMIPS64 {
+   uint64_t fir;
+ };
+ 
++//! \brief 64bit RISC-V-specifc flags for MinidumpContextRISCV64::context_flags.
++//! Based on minidump_cpu_riscv64.h from breakpad
++enum MinidumpContextRISCV64Flags : uint32_t {
++  //! \brief Identifies the context structure as RISCV64.
++  kMinidumpContextRISCV64 = 0x00080000,
++
++  //! \brief Indicates the validity of integer registers.
++  //!
++  //! Registers `x1`-`x31` and pc are valid.
++  kMinidumpContextRISCV64Integer = kMinidumpContextRISCV64 | 0x00000002,
++
++  //! \brief Indicates the validity of floating point registers.
++  //!
++  //! Floating point registers `f0`-`f31`, and `fcsr` are valid
++  kMinidumpContextRISCV64FloatingPoint = kMinidumpContextRISCV64 | 0x00000004,
++
++  //! \brief Indicates the validity of all registers.
++  kMinidumpContextRISCV64All = kMinidumpContextRISCV64Integer |
++                              kMinidumpContextRISCV64FloatingPoint,
++};
++
++//! \brief A 64bit RISCV CPU context (register state) carried in a minidump file.
++struct MinidumpContextRISCV64 {
++  uint64_t context_flags;
++
++  //! \brief General purpose registers.
++  uint64_t regs[32];
++
++  //! \brief FPU registers.
++  uint64_t fpregs[32];
++
++  //! \brief FPU status register.
++  uint64_t fcsr;
++};
++
+ }  // namespace crashpad
+ 
+ #endif  // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_H_
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
+@@ -102,6 +102,13 @@ MinidumpContextWriter::CreateFromSnapsho
+       break;
+     }
+ 
++    case kCPUArchitectureRISCV64: {
++      context = std::make_unique<MinidumpContextRISCV64Writer>();
++      reinterpret_cast<MinidumpContextRISCV64Writer*>(context.get())
++          ->InitializeFromSnapshot(context_snapshot->riscv64);
++      break;
++    }
++
+     default: {
+       LOG(ERROR) << "unknown context architecture "
+                  << context_snapshot->architecture;
+@@ -555,5 +562,42 @@ size_t MinidumpContextMIPS64Writer::Cont
+   DCHECK_GE(state(), kStateFrozen);
+   return sizeof(context_);
+ }
++
++MinidumpContextRISCV64Writer::MinidumpContextRISCV64Writer()
++    : MinidumpContextWriter(), context_() {
++  context_.context_flags = kMinidumpContextRISCV64;
++}
++
++MinidumpContextRISCV64Writer::~MinidumpContextRISCV64Writer() = default;
++
++void MinidumpContextRISCV64Writer::InitializeFromSnapshot(
++    const CPUContextRISCV64* context_snapshot) {
++  DCHECK_EQ(state(), kStateMutable);
++  DCHECK_EQ(context_.context_flags, kMinidumpContextRISCV64);
++
++  context_.context_flags = kMinidumpContextRISCV64All;
++
++  static_assert(sizeof(context_.regs) == sizeof(context_snapshot->regs),
++                "GPRs size mismatch");
++  memcpy(context_.regs, context_snapshot->regs, sizeof(context_.regs));
++
++  static_assert(sizeof(context_.fpregs) == sizeof(context_snapshot->fpregs),
++                "FPRs size mismatch");
++  memcpy(context_.fpregs,
++         context_snapshot->fpregs,
++         sizeof(context_.fpregs));
++  context_.fcsr = context_snapshot->fcsr;
++}
++
++bool MinidumpContextRISCV64Writer::WriteObject(
++    FileWriterInterface* file_writer) {
++  DCHECK_EQ(state(), kStateWritable);
++  return file_writer->Write(&context_, sizeof(context_));
++}
++
++size_t MinidumpContextRISCV64Writer::ContextSize() const {
++  DCHECK_GE(state(), kStateFrozen);
++  return sizeof(context_);
++}
+ 
+ }  // namespace crashpad
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
+@@ -369,6 +369,49 @@ class MinidumpContextMIPS64Writer final
+   MinidumpContextMIPS64 context_;
+ };
+ 
++//! \brief The writer for a MinidumpContextRISCV64 structure in a minidump file.
++class MinidumpContextRISCV64Writer final : public MinidumpContextWriter {
++ public:
++  MinidumpContextRISCV64Writer();
++
++  MinidumpContextRISCV64Writer(const MinidumpContextRISCV64Writer&) = delete;
++  MinidumpContextRISCV64Writer& operator=(const MinidumpContextRISCV64Writer&) =
++      delete;
++
++  ~MinidumpContextRISCV64Writer() override;
++
++  //! \brief Initializes the MinidumpContextRISCV based on \a context_snapshot.
++  //!
++  //! \param[in] context_snapshot The context snapshot to use as source data.
++  //!
++  //! \note Valid in #kStateMutable. No mutation of context() may be done before
++  //!     calling this method, and it is not normally necessary to alter
++  //!     context() after calling this method.
++  void InitializeFromSnapshot(const CPUContextRISCV64* context_snapshot);
++
++  //! \brief Returns a pointer to the context structure that this object will
++  //!     write.
++  //!
++  //! \attention This returns a non-`const` pointer to this object’s private
++  //!     data so that a caller can populate the context structure directly.
++  //!     This is done because providing setter interfaces to each field in the
++  //!     context structure would be unwieldy and cumbersome. Care must be taken
++  //!     to populate the context structure correctly. The context structure
++  //!     must only be modified while this object is in the #kStateMutable
++  //!     state.
++  MinidumpContextRISCV64* context() { return &context_; }
++
++ protected:
++  // MinidumpWritable:
++  bool WriteObject(FileWriterInterface* file_writer) override;
++
++  // MinidumpContextWriter:
++  size_t ContextSize() const override;
++
++ private:
++  MinidumpContextRISCV64 context_;
++};
++
+ }  // namespace crashpad
+ 
+ #endif  // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_WRITER_H_
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
+@@ -175,6 +175,10 @@ std::string MinidumpMiscInfoDebugBuildSt
+   static constexpr char kCPU[] = "mips";
+ #elif defined(ARCH_CPU_MIPS64EL)
+   static constexpr char kCPU[] = "mips64";
++#elif defined(ARCH_CPU_RISCV32)
++  static constexpr char kCPU[] = "riscv32";
++#elif defined(ARCH_CPU_RISCV64)
++  static constexpr char kCPU[] = "riscv64";
+ #else
+ #error define kCPU for this CPU
+ #endif
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/capture_memory.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/capture_memory.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/capture_memory.cc
+@@ -117,6 +117,16 @@ void CaptureMemory::PointedToByContext(c
+   for (size_t i = 0; i < std::size(context.mipsel->regs); ++i) {
+     MaybeCaptureMemoryAround(delegate, context.mipsel->regs[i]);
+   }
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++  if (context.architecture == kCPUArchitectureRISCV64) {
++    for (size_t i = 0; i < std::size(context.riscv64->regs); ++i) {
++      MaybeCaptureMemoryAround(delegate, context.riscv64->regs[i]);
++    }
++  } else {
++    for (size_t i = 0; i < std::size(context.riscv32->regs); ++i) {
++      MaybeCaptureMemoryAround(delegate, context.riscv32->regs[i]);
++    }
++  }
+ #else
+ #error Port.
+ #endif
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
+@@ -43,7 +43,13 @@ enum CPUArchitecture {
+   kCPUArchitectureMIPSEL,
+ 
+   //! \brief 64-bit MIPSEL.
+-  kCPUArchitectureMIPS64EL
++  kCPUArchitectureMIPS64EL,
++
++  //! \brief 32-bit RISCV.
++  kCPUArchitectureRISCV32,
++
++  //! \brief 64-bit RISCV.
++  kCPUArchitectureRISCV64
+ };
+ 
+ }  // namespace crashpad
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/cpu_context.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/cpu_context.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/cpu_context.cc
+@@ -226,10 +226,12 @@ bool CPUContext::Is64Bit() const {
+     case kCPUArchitectureX86_64:
+     case kCPUArchitectureARM64:
+     case kCPUArchitectureMIPS64EL:
++    case kCPUArchitectureRISCV64:
+       return true;
+     case kCPUArchitectureX86:
+     case kCPUArchitectureARM:
+     case kCPUArchitectureMIPSEL:
++    case kCPUArchitectureRISCV32:
+       return false;
+     default:
+       NOTREACHED();
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/cpu_context.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/cpu_context.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/cpu_context.h
+@@ -362,6 +362,20 @@ struct CPUContextMIPS64 {
+   uint64_t fir;
+ };
+ 
++//! \brief A context structure carrying RISCV32 CPU state.
++struct CPUContextRISCV32 {
++  uint32_t regs[32];
++  uint64_t fpregs[32];
++  uint32_t fcsr;
++};
++
++//! \brief A context structure carrying RISCV64 CPU state.
++struct CPUContextRISCV64 {
++  uint64_t regs[32];
++  uint64_t fpregs[32];
++  uint32_t fcsr;
++};
++
+ //! \brief A context structure capable of carrying the context of any supported
+ //!     CPU architecture.
+ struct CPUContext {
+@@ -402,6 +416,8 @@ struct CPUContext {
+     CPUContextARM64* arm64;
+     CPUContextMIPS* mipsel;
+     CPUContextMIPS64* mips64;
++    CPUContextRISCV32* riscv32;
++    CPUContextRISCV64* riscv64;
+   };
+ };
+ 
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
+@@ -266,6 +266,30 @@ void InitializeCPUContextARM64_OnlyFPSIM
+   context->fpcr = float_context.fpcr;
+ }
+ 
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++
++template <typename Traits>
++void InitializeCPUContextRISCV(
++    const typename Traits::SignalThreadContext& thread_context,
++    const typename Traits::SignalFloatContext& float_context,
++    typename Traits::CPUContext* context) {
++  static_assert(sizeof(context->regs) == sizeof(thread_context),
++                "registers size mismatch");
++  static_assert(sizeof(context->fpregs) == sizeof(float_context.f),
++                "fp registers size mismatch");
++  memcpy(&context->regs, &thread_context, sizeof(context->regs));
++  memcpy(&context->fpregs, &float_context.f, sizeof(context->fpregs));
++  context->fcsr = float_context.fcsr;
++}
++template void InitializeCPUContextRISCV<ContextTraits32>(
++    const ContextTraits32::SignalThreadContext& thread_context,
++    const ContextTraits32::SignalFloatContext& float_context,
++    ContextTraits32::CPUContext* context);
++template void InitializeCPUContextRISCV<ContextTraits64>(
++    const ContextTraits64::SignalThreadContext& thread_context,
++    const ContextTraits64::SignalFloatContext& float_context,
++    ContextTraits64::CPUContext* context);
++
+ #endif  // ARCH_CPU_X86_FAMILY
+ 
+ }  // namespace internal
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
+@@ -174,6 +174,22 @@ void InitializeCPUContextMIPS(
+ 
+ #endif  // ARCH_CPU_MIPS_FAMILY || DOXYGEN
+ 
++#if defined(ARCH_CPU_RISCV_FAMILY) || DOXYGEN
++
++//! \brief Initializes a CPUContextRISCV structure from native context
++//!     structures on Linux.
++//!
++//! \param[in] thread_context The native thread context.
++//! \param[in] float_context The native float context.
++//! \param[out] context The CPUContextRISCV structure to initialize.
++template <typename Traits>
++void InitializeCPUContextRISCV(
++    const typename Traits::SignalThreadContext& thread_context,
++    const typename Traits::SignalFloatContext& float_context,
++    typename Traits::CPUContext* context);
++
++#endif  // ARCH_CPU_RISCV_FAMILY || DOXYGEN
++
+ }  // namespace internal
+ }  // namespace crashpad
+ 
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
+@@ -325,6 +325,61 @@ bool ExceptionSnapshotLinux::ReadContext
+       reader, context_address, context_.mips64);
+ }
+ 
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++
++template <typename Traits>
++static bool ReadContext(ProcessReaderLinux* reader,
++                        LinuxVMAddress context_address,
++                        typename Traits::CPUContext* dest_context) {
++  const ProcessMemory* memory = reader->Memory();
++
++  LinuxVMAddress gregs_address = context_address +
++                                 offsetof(UContext<Traits>, mcontext) +
++                                 offsetof(typename Traits::MContext, gregs);
++
++  typename Traits::SignalThreadContext thread_context;
++  if (!memory->Read(gregs_address, sizeof(thread_context), &thread_context)) {
++    LOG(ERROR) << "Couldn't read gregs";
++    return false;
++  }
++
++  LinuxVMAddress fpregs_address = context_address +
++                                  offsetof(UContext<Traits>, mcontext) +
++                                  offsetof(typename Traits::MContext, fpregs);
++
++  typename Traits::SignalFloatContext fp_context;
++  if (!memory->Read(fpregs_address, sizeof(fp_context), &fp_context)) {
++    LOG(ERROR) << "Couldn't read fpregs";
++    return false;
++  }
++
++  InitializeCPUContextRISCV<Traits>(thread_context, fp_context, dest_context);
++
++  return true;
++}
++
++template <>
++bool ExceptionSnapshotLinux::ReadContext<ContextTraits32>(
++    ProcessReaderLinux* reader,
++    LinuxVMAddress context_address) {
++  context_.architecture = kCPUArchitectureRISCV32;
++  context_.riscv32 = &context_union_.riscv32;
++
++  return internal::ReadContext<ContextTraits32>(
++      reader, context_address, context_.riscv32);
++}
++
++template <>
++bool ExceptionSnapshotLinux::ReadContext<ContextTraits64>(
++    ProcessReaderLinux* reader,
++    LinuxVMAddress context_address) {
++  context_.architecture = kCPUArchitectureRISCV64;
++  context_.riscv64 = &context_union_.riscv64;
++
++  return internal::ReadContext<ContextTraits64>(
++      reader, context_address, context_.riscv64);
++}
++
+ #endif  // ARCH_CPU_X86_FAMILY
+ 
+ bool ExceptionSnapshotLinux::Initialize(
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
+@@ -89,6 +89,9 @@ class ExceptionSnapshotLinux final : pub
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+     CPUContextMIPS mipsel;
+     CPUContextMIPS64 mips64;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++    CPUContextRISCV32 riscv32;
++    CPUContextRISCV64 riscv64;
+ #endif
+   } context_union_;
+   CPUContext context_;
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
+@@ -127,6 +127,9 @@ void ProcessReaderLinux::Thread::Initial
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+   stack_pointer = reader->Is64Bit() ? thread_info.thread_context.t64.regs[29]
+                                     : thread_info.thread_context.t32.regs[29];
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++  stack_pointer = reader->Is64Bit() ? thread_info.thread_context.t64.sp
++                                    : thread_info.thread_context.t32.sp;
+ #else
+ #error Port.
+ #endif
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
+@@ -422,6 +422,67 @@ static_assert(offsetof(UContext<ContextT
+               "context offset mismatch");
+ #endif
+ 
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++
++struct MContext32 {
++  uint32_t gregs[32];
++  uint64_t fpregs[32];
++  unsigned int fcsr;
++};
++
++struct MContext64 {
++  uint64_t gregs[32];
++  uint64_t fpregs[32];
++  unsigned int fcsr;
++};
++
++struct ContextTraits32 : public Traits32 {
++  using MContext = MContext32;
++  using SignalThreadContext = ThreadContext::t32_t;
++  using SignalFloatContext = FloatContext::f32_t;
++  using CPUContext = CPUContextRISCV32;
++};
++
++struct ContextTraits64 : public Traits64 {
++  using MContext = MContext64;
++  using SignalThreadContext = ThreadContext::t64_t;
++  using SignalFloatContext = FloatContext::f64_t;
++  using CPUContext = CPUContextRISCV64;
++};
++
++template <typename Traits>
++struct UContext {
++  typename Traits::ULong flags;
++  typename Traits::Address link;
++  SignalStack<Traits> stack;
++  Sigset<Traits> sigmask;
++  char padding[128 - sizeof(sigmask)];
++  typename Traits::Char_64Only padding2[8];
++  typename Traits::MContext mcontext;
++};
++
++#if defined(ARCH_CPU_RISCV32)
++static_assert(offsetof(UContext<ContextTraits32>, mcontext) ==
++                  offsetof(ucontext_t, uc_mcontext),
++              "context offset mismatch");
++static_assert(offsetof(UContext<ContextTraits32>, mcontext.gregs) ==
++                  offsetof(ucontext_t, uc_mcontext.__gregs),
++              "context offset mismatch");
++static_assert(offsetof(UContext<ContextTraits32>, mcontext.fpregs) ==
++                  offsetof(ucontext_t, uc_mcontext.__fpregs),
++              "context offset mismatch");
++#elif defined(ARCH_CPU_RISCV64)
++static_assert(offsetof(UContext<ContextTraits64>, mcontext) ==
++                  offsetof(ucontext_t, uc_mcontext),
++              "context offset mismatch");
++static_assert(offsetof(UContext<ContextTraits64>, mcontext.gregs) ==
++                  offsetof(ucontext_t, uc_mcontext.__gregs),
++              "context offset mismatch");
++static_assert(offsetof(UContext<ContextTraits64>, mcontext.fpregs) ==
++                  offsetof(ucontext_t, uc_mcontext.__fpregs),
++              "context offset mismatch");
++#endif
++
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
+@@ -205,6 +205,9 @@ CPUArchitecture SystemSnapshotLinux::Get
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+   return process_reader_->Is64Bit() ? kCPUArchitectureMIPS64EL
+                                     : kCPUArchitectureMIPSEL;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++  return process_reader_->Is64Bit() ? kCPUArchitectureRISCV64
++                                    : kCPUArchitectureRISCV32;
+ #else
+ #error port to your architecture
+ #endif
+@@ -220,6 +223,9 @@ uint32_t SystemSnapshotLinux::CPURevisio
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+   // Not implementable on MIPS
+   return 0;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++  // Not implementable on RISCV
++  return 0;
+ #else
+ #error port to your architecture
+ #endif
+@@ -240,6 +246,9 @@ std::string SystemSnapshotLinux::CPUVend
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+   // Not implementable on MIPS
+   return std::string();
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++  // Not implementable on RISCV
++  return std::string();
+ #else
+ #error port to your architecture
+ #endif
+@@ -373,6 +382,9 @@ bool SystemSnapshotLinux::NXEnabled() co
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+   // Not implementable on MIPS
+   return false;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++  // Not implementable on RISCV
++  return false;
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
+@@ -190,6 +190,22 @@ bool ThreadSnapshotLinux::Initialize(
+         thread.thread_info.float_context.f32,
+         context_.mipsel);
+   }
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++  if (process_reader->Is64Bit()) {
++    context_.architecture = kCPUArchitectureRISCV64;
++    context_.riscv64 = &context_union_.riscv64;
++    InitializeCPUContextRISCV<ContextTraits64>(
++	thread.thread_info.thread_context.t64,
++	thread.thread_info.float_context.f64,
++	context_.riscv64);
++  } else {
++    context_.architecture = kCPUArchitectureRISCV32;
++    context_.riscv32 = &context_union_.riscv32;
++    InitializeCPUContextRISCV<ContextTraits32>(
++	thread.thread_info.thread_context.t32,
++	thread.thread_info.float_context.f32,
++	context_.riscv32);
++  }
+ #else
+ #error Port.
+ #endif
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
+@@ -74,6 +74,9 @@ class ThreadSnapshotLinux final : public
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+     CPUContextMIPS mipsel;
+     CPUContextMIPS64 mips64;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++    CPUContextRISCV32 riscv32;
++    CPUContextRISCV64 riscv64;
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/util/linux/ptracer.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/util/linux/ptracer.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/util/linux/ptracer.cc
+@@ -398,6 +398,51 @@ bool GetThreadArea64(pid_t tid,
+   return true;
+ }
+ 
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++
++template <typename Destination>
++bool GetRegisterSet(pid_t tid, int set, Destination* dest, bool can_log) {
++  iovec iov;
++  iov.iov_base = dest;
++  iov.iov_len = sizeof(*dest);
++  if (ptrace(PTRACE_GETREGSET, tid, reinterpret_cast<void*>(set), &iov) != 0) {
++    PLOG_IF(ERROR, can_log) << "ptrace";
++    return false;
++  }
++  if (iov.iov_len != sizeof(*dest)) {
++    LOG_IF(ERROR, can_log) << "Unexpected registers size";
++    return false;
++  }
++  return true;
++}
++
++bool GetFloatingPointRegisters32(pid_t tid,
++                                 FloatContext* context,
++                                 bool can_log) {
++  return false;
++}
++
++bool GetFloatingPointRegisters64(pid_t tid,
++                                 FloatContext* context,
++                                 bool can_log) {
++  return GetRegisterSet(tid, NT_PRFPREG, &context->f64.f, can_log);
++}
++
++bool GetThreadArea32(pid_t tid,
++                     const ThreadContext& context,
++                     LinuxVMAddress* address,
++                     bool can_log) {
++  return false;
++}
++
++bool GetThreadArea64(pid_t tid,
++                     const ThreadContext& context,
++                     LinuxVMAddress* address,
++                     bool can_log) {
++  *address = context.t64.tp;
++  return true;
++}
++
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/util/linux/thread_info.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/util/linux/thread_info.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/util/linux/thread_info.h
+@@ -79,6 +79,40 @@ union ThreadContext {
+     uint32_t cp0_status;
+     uint32_t cp0_cause;
+     uint32_t padding1_;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++    // Reflects user_regs_struct in asm/ptrace.h.
++    uint32_t pc;
++    uint32_t ra;
++    uint32_t sp;
++    uint32_t gp;
++    uint32_t tp;
++    uint32_t t0;
++    uint32_t t1;
++    uint32_t t2;
++    uint32_t s0;
++    uint32_t s1;
++    uint32_t a0;
++    uint32_t a1;
++    uint32_t a2;
++    uint32_t a3;
++    uint32_t a4;
++    uint32_t a5;
++    uint32_t a6;
++    uint32_t a7;
++    uint32_t s2;
++    uint32_t s3;
++    uint32_t s4;
++    uint32_t s5;
++    uint32_t s6;
++    uint32_t s7;
++    uint32_t s8;
++    uint32_t s9;
++    uint32_t s10;
++    uint32_t s11;
++    uint32_t t3;
++    uint32_t t4;
++    uint32_t t5;
++    uint32_t t6;
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+@@ -132,6 +166,40 @@ union ThreadContext {
+     uint64_t cp0_badvaddr;
+     uint64_t cp0_status;
+     uint64_t cp0_cause;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++    // Reflects user_regs_struct in asm/ptrace.h.
++    uint64_t pc;
++    uint64_t ra;
++    uint64_t sp;
++    uint64_t gp;
++    uint64_t tp;
++    uint64_t t0;
++    uint64_t t1;
++    uint64_t t2;
++    uint64_t s0;
++    uint64_t s1;
++    uint64_t a0;
++    uint64_t a1;
++    uint64_t a2;
++    uint64_t a3;
++    uint64_t a4;
++    uint64_t a5;
++    uint64_t a6;
++    uint64_t a7;
++    uint64_t s2;
++    uint64_t s3;
++    uint64_t s4;
++    uint64_t s5;
++    uint64_t s6;
++    uint64_t s7;
++    uint64_t s8;
++    uint64_t s9;
++    uint64_t s10;
++    uint64_t s11;
++    uint64_t t3;
++    uint64_t t4;
++    uint64_t t5;
++    uint64_t t6;
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+@@ -143,11 +211,12 @@ union ThreadContext {
+   using NativeThreadContext = user_regs;
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+ // No appropriate NativeThreadsContext type available for MIPS
++#elif defined(ARCH_CPU_RISCV_FAMILY)
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY || ARCH_CPU_ARM64
+ 
+-#if !defined(ARCH_CPU_MIPS_FAMILY)
++#if !defined(ARCH_CPU_MIPS_FAMILY) && !defined(ARCH_CPU_RISCV_FAMILY)
+ #if defined(ARCH_CPU_32_BITS)
+   static_assert(sizeof(t32_t) == sizeof(NativeThreadContext), "Size mismatch");
+ #else  // ARCH_CPU_64_BITS
+@@ -218,6 +287,9 @@ union FloatContext {
+     } fpregs[32];
+     uint32_t fpcsr;
+     uint32_t fpu_id;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++    uint64_t f[32];
++    uint32_t fcsr;
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+@@ -252,6 +324,9 @@ union FloatContext {
+     double fpregs[32];
+     uint32_t fpcsr;
+     uint32_t fpu_id;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++    uint64_t f[32];
++    uint32_t fcsr;
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+@@ -281,6 +356,7 @@ union FloatContext {
+   static_assert(sizeof(f64) == sizeof(user_fpsimd_struct), "Size mismatch");
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+ // No appropriate floating point context native type for available MIPS.
++#elif defined(ARCH_CPU_RISCV_FAMILY)
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
+@@ -237,6 +237,8 @@ std::string UserAgent() {
+ #elif defined(ARCH_CPU_BIG_ENDIAN)
+     static constexpr char arch[] = "aarch64_be";
+ #endif
++#elif defined(ARCH_CPU_RISCV64)
++    static constexpr char arch[] = "riscv64";
+ #else
+ #error Port
+ #endif
+
diff --git a/srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch.args b/srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch.args
new file mode 100644
index 000000000000..d5f38e354e7f
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch.args
@@ -0,0 +1 @@
+-Np1 --directory=src/3rdparty/chromium/
diff --git a/srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch b/srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch
new file mode 100644
index 000000000000..12ad07275bd3
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch
@@ -0,0 +1,44 @@
+Index: chromium-102.0.5005.61/third_party/dav1d/config/linux/riscv64/config.h
+===================================================================
+--- /dev/null
++++ chromium-102.0.5005.61/third_party/dav1d/config/linux/riscv64/config.h
+@@ -0,0 +1,38 @@
++/*
++ * Autogenerated by the Meson build system.
++ * Do not edit, your changes will be lost.
++ */
++
++#pragma once
++
++#define ARCH_AARCH64 0
++
++#define ARCH_ARM 0
++
++#define ARCH_PPC64LE 0
++
++#define ARCH_X86 0
++
++#define ARCH_X86_32 0
++
++#define ARCH_X86_64 0
++
++#define CONFIG_16BPC 1
++
++#define CONFIG_8BPC 1
++
++// #define CONFIG_LOG 1 -- Logging is controlled by Chromium
++
++#define ENDIANNESS_BIG 0
++
++#define HAVE_ASM 0
++
++#define HAVE_AS_FUNC 0
++
++#define HAVE_CLOCK_GETTIME 1
++
++#define HAVE_GETAUXVAL 1
++
++#define HAVE_POSIX_MEMALIGN 1
++
++#define HAVE_UNISTD_H 1
+
diff --git a/srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch.args b/srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch.args
new file mode 100644
index 000000000000..d5f38e354e7f
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch.args
@@ -0,0 +1 @@
+-Np1 --directory=src/3rdparty/chromium/
diff --git a/srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch b/srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch
new file mode 100644
index 000000000000..098bd95a8de6
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch
@@ -0,0 +1,1956 @@
+Index: chromium-107.0.5304.87/sandbox/features.gni
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/features.gni
++++ chromium-107.0.5304.87/sandbox/features.gni
+@@ -9,7 +9,8 @@
+ use_seccomp_bpf = (is_linux || is_chromeos || is_android) &&
+                   (current_cpu == "x86" || current_cpu == "x64" ||
+                    current_cpu == "arm" || current_cpu == "arm64" ||
+-                   current_cpu == "mipsel" || current_cpu == "mips64el")
++                   current_cpu == "mipsel" || current_cpu == "mips64el" ||
++                   current_cpu == "riscv64")
+ 
+ # SSBD (Speculative Store Bypass Disable) is a mitigation of Spectre Variant 4.
+ # As Spectre Variant 4 can be mitigated by site isolation, opt-out SSBD on site
+Index: chromium-107.0.5304.87/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
++++ chromium-107.0.5304.87/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
+@@ -56,6 +56,12 @@
+ #define MAX_PUBLIC_SYSCALL __NR_syscalls
+ #define MAX_SYSCALL MAX_PUBLIC_SYSCALL
+ 
++#elif defined(__riscv)
++
++#define MIN_SYSCALL 0u
++#define MAX_PUBLIC_SYSCALL 1024u
++#define MAX_SYSCALL MAX_PUBLIC_SYSCALL
++
+ #else
+ #error "Unsupported architecture"
+ #endif
+Index: chromium-107.0.5304.87/sandbox/linux/bpf_dsl/seccomp_macros.h
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/bpf_dsl/seccomp_macros.h
++++ chromium-107.0.5304.87/sandbox/linux/bpf_dsl/seccomp_macros.h
+@@ -343,6 +343,46 @@ struct regs_struct {
+ #define SECCOMP_PT_PARM4(_regs) (_regs).regs[3]
+ #define SECCOMP_PT_PARM5(_regs) (_regs).regs[4]
+ #define SECCOMP_PT_PARM6(_regs) (_regs).regs[5]
++
++#elif defined(__riscv)
++struct regs_struct {
++  unsigned long regs[32];
++};
++
++#define SECCOMP_ARCH AUDIT_ARCH_RISCV64
++
++#define SECCOMP_REG(_ctx, _reg) ((_ctx)->uc_mcontext.__gregs[_reg])
++
++#define SECCOMP_RESULT(_ctx) SECCOMP_REG(_ctx, REG_A0)
++#define SECCOMP_SYSCALL(_ctx) SECCOMP_REG(_ctx, REG_A0+7)
++#define SECCOMP_IP(_ctx) (_ctx)->uc_mcontext.__gregs[REG_PC]
++#define SECCOMP_PARM1(_ctx) SECCOMP_REG(_ctx, REG_A0)
++#define SECCOMP_PARM2(_ctx) SECCOMP_REG(_ctx, REG_A0+1)
++#define SECCOMP_PARM3(_ctx) SECCOMP_REG(_ctx, REG_A0+2)
++#define SECCOMP_PARM4(_ctx) SECCOMP_REG(_ctx, REG_A0+3)
++#define SECCOMP_PARM5(_ctx) SECCOMP_REG(_ctx, REG_A0+4)
++#define SECCOMP_PARM6(_ctx) SECCOMP_REG(_ctx, REG_A0+5)
++
++#define SECCOMP_NR_IDX (offsetof(struct arch_seccomp_data, nr))
++#define SECCOMP_ARCH_IDX (offsetof(struct arch_seccomp_data, arch))
++#define SECCOMP_IP_MSB_IDX \
++  (offsetof(struct arch_seccomp_data, instruction_pointer) + 4)
++#define SECCOMP_IP_LSB_IDX \
++  (offsetof(struct arch_seccomp_data, instruction_pointer) + 0)
++#define SECCOMP_ARG_MSB_IDX(nr) \
++  (offsetof(struct arch_seccomp_data, args) + 8 * (nr) + 4)
++#define SECCOMP_ARG_LSB_IDX(nr) \
++  (offsetof(struct arch_seccomp_data, args) + 8 * (nr) + 0)
++
++#define SECCOMP_PT_RESULT(_regs) (_regs).regs[REG_A0]
++#define SECCOMP_PT_SYSCALL(_regs) (_regs).regs[REG_A0+7]
++#define SECCOMP_PT_IP(_regs) (_regs).regs[REG_PC]
++#define SECCOMP_PT_PARM1(_regs) (_regs).regs[REG_A0]
++#define SECCOMP_PT_PARM2(_regs) (_regs).regs[REG_A0+1]
++#define SECCOMP_PT_PARM3(_regs) (_regs).regs[REG_A0+2]
++#define SECCOMP_PT_PARM4(_regs) (_regs).regs[REG_A0+3]
++#define SECCOMP_PT_PARM5(_regs) (_regs).regs[REG_A0+4]
++#define SECCOMP_PT_PARM6(_regs) (_regs).regs[REG_A0+5]
+ #else
+ #error Unsupported target platform
+ 
+Index: chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
++++ chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
+@@ -61,6 +61,9 @@ bool IsBaselinePolicyAllowed(int sysno)
+ #if defined(__mips__)
+          SyscallSets::IsMipsPrivate(sysno) ||
+ #endif
++#if defined(__riscv)
++         SyscallSets::IsRiscvPrivate(sysno) ||
++#endif
+          SyscallSets::IsAllowedOperationOnFd(sysno);
+   // clang-format on
+ }
+@@ -198,7 +201,7 @@ ResultExpr EvaluateSyscallImpl(int fs_de
+     return RestrictFcntlCommands();
+ #endif
+ 
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+   // fork() is never used as a system call (clone() is used instead), but we
+   // have seen it in fallback code on Android.
+   if (sysno == __NR_fork) {
+@@ -253,7 +256,7 @@ ResultExpr EvaluateSyscallImpl(int fs_de
+   }
+ 
+ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+   if (sysno == __NR_mmap)
+     return RestrictMmapFlags();
+ #endif
+@@ -274,7 +277,7 @@ ResultExpr EvaluateSyscallImpl(int fs_de
+     return RestrictPrctl();
+ 
+ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+   if (sysno == __NR_socketpair) {
+     // Only allow AF_UNIX, PF_UNIX. Crash if anything else is seen.
+     static_assert(AF_UNIX == PF_UNIX,
+Index: chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
++++ chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
+@@ -37,6 +37,7 @@
+ 
+ #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \
+     !defined(__arm__) && !defined(__aarch64__) &&             \
++    !defined(__riscv) &&                                      \
+     !defined(PTRACE_GET_THREAD_AREA)
+ // Also include asm/ptrace-abi.h since ptrace.h in older libc (for instance
+ // the one in Ubuntu 16.04 LTS) is missing PTRACE_GET_THREAD_AREA.
+@@ -443,7 +444,7 @@ ResultExpr RestrictPtrace() {
+ #endif
+   return Switch(request)
+       .CASES((
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+                  PTRACE_GETREGS, PTRACE_GETFPREGS, PTRACE_GET_THREAD_AREA,
+                  PTRACE_GETREGSET,
+ #endif
+Index: chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
++++ chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+@@ -103,7 +103,7 @@ bool SyscallSets::IsUmask(int sysno) {
+ // Both EPERM and ENOENT are valid errno unless otherwise noted in comment.
+ bool SyscallSets::IsFileSystem(int sysno) {
+   switch (sysno) {
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_access:  // EPERM not a valid errno.
+     case __NR_chmod:
+     case __NR_chown:
+@@ -136,7 +136,7 @@ bool SyscallSets::IsFileSystem(int sysno
+     case __NR_faccessat2:
+     case __NR_fchmodat:
+     case __NR_fchownat:  // Should be called chownat ?
+-#if defined(__x86_64__) || defined(__aarch64__)
++#if defined(__x86_64__) || defined(__aarch64__) || defined(__riscv)
+     case __NR_newfstatat:  // fstatat(). EPERM not a valid errno.
+ #elif defined(__i386__) || defined(__arm__) || \
+     (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+@@ -226,7 +226,7 @@ bool SyscallSets::IsAllowedFileSystemAcc
+     case __NR_oldfstat:
+ #endif
+ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_sync_file_range:  // EPERM not a valid errno.
+ #elif defined(__arm__)
+     case __NR_arm_sync_file_range:  // EPERM not a valid errno.
+@@ -245,7 +245,7 @@ bool SyscallSets::IsDeniedFileSystemAcce
+ #if defined(__i386__) || defined(__arm__)
+     case __NR_fchown32:
+ #endif
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_getdents:    // EPERM not a valid errno.
+ #endif
+     case __NR_getdents64:  // EPERM not a valid errno.
+@@ -324,7 +324,7 @@ bool SyscallSets::IsProcessPrivilegeChan
+ bool SyscallSets::IsProcessGroupOrSession(int sysno) {
+   switch (sysno) {
+     case __NR_setpgid:
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_getpgrp:
+ #endif
+     case __NR_setsid:
+@@ -358,7 +358,7 @@ bool SyscallSets::IsAllowedSignalHandlin
+     case __NR_rt_sigqueueinfo:
+     case __NR_rt_sigsuspend:
+     case __NR_rt_tgsigqueueinfo:
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_signalfd:
+ #endif
+     case __NR_signalfd4:
+@@ -382,12 +382,12 @@ bool SyscallSets::IsAllowedOperationOnFd
+   switch (sysno) {
+     case __NR_close:
+     case __NR_dup:
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_dup2:
+ #endif
+     case __NR_dup3:
+ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_shutdown:
+ #endif
+       return true;
+@@ -426,7 +426,7 @@ bool SyscallSets::IsAllowedProcessStartO
+       return true;
+     case __NR_clone:  // Should be parameter-restricted.
+     case __NR_setns:  // Privileged.
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_fork:
+ #endif
+ #if defined(__i386__) || defined(__x86_64__)
+@@ -437,7 +437,7 @@ bool SyscallSets::IsAllowedProcessStartO
+ #endif
+     case __NR_set_tid_address:
+     case __NR_unshare:
+-#if !defined(__mips__) && !defined(__aarch64__)
++#if !defined(__mips__) && !defined(__aarch64__) && !defined(__riscv)
+     case __NR_vfork:
+ #endif
+     default:
+@@ -462,7 +462,7 @@ bool SyscallSets::IsAllowedFutex(int sys
+ 
+ bool SyscallSets::IsAllowedEpoll(int sysno) {
+   switch (sysno) {
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_epoll_create:
+     case __NR_epoll_wait:
+ #endif
+@@ -483,14 +483,14 @@ bool SyscallSets::IsAllowedEpoll(int sys
+ 
+ bool SyscallSets::IsAllowedGetOrModifySocket(int sysno) {
+   switch (sysno) {
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_pipe:
+ #endif
+     case __NR_pipe2:
+       return true;
+     default:
+ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_socketpair:  // We will want to inspect its argument.
+ #endif
+       return false;
+@@ -500,7 +500,7 @@ bool SyscallSets::IsAllowedGetOrModifySo
+ bool SyscallSets::IsDeniedGetOrModifySocket(int sysno) {
+   switch (sysno) {
+ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_accept:
+     case __NR_accept4:
+     case __NR_bind:
+@@ -554,7 +554,7 @@ bool SyscallSets::IsAllowedAddressSpaceA
+     case __NR_mincore:
+     case __NR_mlockall:
+ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_mmap:
+ #endif
+ #if defined(__i386__) || defined(__arm__) || \
+@@ -587,7 +587,7 @@ bool SyscallSets::IsAllowedGeneralIo(int
+     (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+     case __NR__llseek:
+ #endif
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_poll:
+ #endif
+     case __NR_ppoll:
+@@ -608,7 +608,7 @@ bool SyscallSets::IsAllowedGeneralIo(int
+     case __NR_recv:
+ #endif
+ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_recvfrom:  // Could specify source.
+     case __NR_recvmsg:   // Could specify source.
+ #endif
+@@ -623,7 +623,7 @@ bool SyscallSets::IsAllowedGeneralIo(int
+     case __NR_send:
+ #endif
+ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_sendmsg:  // Could specify destination.
+     case __NR_sendto:   // Could specify destination.
+ #endif
+@@ -672,7 +672,7 @@ bool SyscallSets::IsSeccomp(int sysno) {
+ bool SyscallSets::IsAllowedBasicScheduler(int sysno) {
+   switch (sysno) {
+     case __NR_sched_yield:
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_pause:
+ #endif
+     case __NR_nanosleep:
+@@ -756,7 +756,7 @@ bool SyscallSets::IsNuma(int sysno) {
+     case __NR_getcpu:
+     case __NR_mbind:
+ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_migrate_pages:
+ #endif
+     case __NR_move_pages:
+@@ -791,7 +791,7 @@ bool SyscallSets::IsGlobalProcessEnviron
+   switch (sysno) {
+     case __NR_acct:  // Privileged.
+ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_getrlimit:
+ #endif
+ #if defined(__i386__) || defined(__arm__)
+@@ -826,7 +826,7 @@ bool SyscallSets::IsDebug(int sysno) {
+ 
+ bool SyscallSets::IsGlobalSystemStatus(int sysno) {
+   switch (sysno) {
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR__sysctl:
+     case __NR_sysfs:
+ #endif
+@@ -844,7 +844,7 @@ bool SyscallSets::IsGlobalSystemStatus(i
+ 
+ bool SyscallSets::IsEventFd(int sysno) {
+   switch (sysno) {
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_eventfd:
+ #endif
+     case __NR_eventfd2:
+@@ -896,7 +896,8 @@ bool SyscallSets::IsKeyManagement(int sy
+ }
+ 
+ #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \
+-    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
++    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
++    defined(__riscv)
+ bool SyscallSets::IsSystemVSemaphores(int sysno) {
+   switch (sysno) {
+     case __NR_semctl:
+@@ -916,7 +917,8 @@ bool SyscallSets::IsSystemVSemaphores(in
+ 
+ #if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
+     defined(__aarch64__) ||                                         \
+-    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
++    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
++    defined(__riscv)
+ // These give a lot of ambient authority and bypass the setuid sandbox.
+ bool SyscallSets::IsSystemVSharedMemory(int sysno) {
+   switch (sysno) {
+@@ -932,7 +934,8 @@ bool SyscallSets::IsSystemVSharedMemory(
+ #endif
+ 
+ #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \
+-    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
++    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
++    defined(__riscv)
+ bool SyscallSets::IsSystemVMessageQueue(int sysno) {
+   switch (sysno) {
+     case __NR_msgctl:
+@@ -963,7 +966,8 @@ bool SyscallSets::IsSystemVIpc(int sysno
+ 
+ bool SyscallSets::IsAnySystemV(int sysno) {
+ #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \
+-    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
++    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
++    defined(__riscv)
+   return IsSystemVMessageQueue(sysno) || IsSystemVSemaphores(sysno) ||
+          IsSystemVSharedMemory(sysno);
+ #elif defined(__i386__) || \
+@@ -1000,7 +1004,7 @@ bool SyscallSets::IsAdvancedScheduler(in
+ bool SyscallSets::IsInotify(int sysno) {
+   switch (sysno) {
+     case __NR_inotify_add_watch:
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_inotify_init:
+ #endif
+     case __NR_inotify_init1:
+@@ -1138,7 +1142,7 @@ bool SyscallSets::IsMisc(int sysno) {
+ #if defined(__x86_64__)
+     case __NR_tuxcall:
+ #endif
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_vserver:
+ #endif
+       return true;
+@@ -1173,6 +1177,17 @@ bool SyscallSets::IsArmPrivate(int sysno
+ }
+ #endif  // defined(__arm__)
+ 
++#if defined(__riscv)
++bool SyscallSets::IsRiscvPrivate(int sysno) {
++  switch (sysno) {
++    case __NR_riscv_flush_icache:
++      return true;
++    default:
++      return false;
++  }
++}
++#endif  // defined(__riscv)
++
+ #if defined(__mips__)
+ bool SyscallSets::IsMipsPrivate(int sysno) {
+   switch (sysno) {
+Index: chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h
++++ chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h
+@@ -52,7 +52,7 @@ class SANDBOX_EXPORT SyscallSets {
+ #endif
+ 
+ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+   static bool IsNetworkSocketInformation(int sysno);
+ #endif
+ 
+@@ -79,18 +79,21 @@ class SANDBOX_EXPORT SyscallSets {
+   static bool IsAsyncIo(int sysno);
+   static bool IsKeyManagement(int sysno);
+ #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \
+-    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
++    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
++    defined(__riscv)
+   static bool IsSystemVSemaphores(int sysno);
+ #endif
+ #if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
+     defined(__aarch64__) ||                                         \
+-    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
++    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
++    defined(__riscv)
+   // These give a lot of ambient authority and bypass the setuid sandbox.
+   static bool IsSystemVSharedMemory(int sysno);
+ #endif
+ 
+ #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \
+-    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
++    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
++    defined(__riscv)
+   static bool IsSystemVMessageQueue(int sysno);
+ #endif
+ 
+@@ -117,6 +120,9 @@ class SANDBOX_EXPORT SyscallSets {
+   static bool IsMipsPrivate(int sysno);
+   static bool IsMipsMisc(int sysno);
+ #endif  // defined(__mips__)
++#if defined(__riscv)
++  static bool IsRiscvPrivate(int sysno);
++#endif
+   static bool IsGoogle3Threading(int sysno);
+ };
+ 
+Index: chromium-107.0.5304.87/sandbox/linux/seccomp-bpf/syscall.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/seccomp-bpf/syscall.cc
++++ chromium-107.0.5304.87/sandbox/linux/seccomp-bpf/syscall.cc
+@@ -18,7 +18,7 @@ namespace sandbox {
+ namespace {
+ 
+ #if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \
+-    defined(ARCH_CPU_MIPS_FAMILY)
++    defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_RISCV_FAMILY)
+ // Number that's not currently used by any Linux kernel ABIs.
+ const int kInvalidSyscallNumber = 0x351d3;
+ #else
+@@ -308,6 +308,28 @@ asm(// We need to be able to tell the ke
+     "2:ret\n"
+     ".cfi_endproc\n"
+     ".size SyscallAsm, .-SyscallAsm\n"
++#elif defined(__riscv)
++    ".text\n"
++    ".align 2\n"
++    ".type SyscallAsm, %function\n"
++    "SyscallAsm:\n"
++    ".cfi_startproc\n"
++    "bgez a0,1f\n"
++    "la a0,2f\n"
++    "j 2f\n"
++    "1:mv a7, a0\n"
++    "ld a0, (t0)\n"
++    "ld a1, 8(t0)\n"
++    "ld a2, 16(t0)\n"
++    "ld a3, 24(t0)\n"
++    "ld a4, 32(t0)\n"
++    "ld a5, 40(t0)\n"
++    "ld a6, 48(t0)\n"
++    // Enter the kernel
++    "scall\n"
++    "2:ret\n"
++    ".cfi_endproc\n"
++    ".size SyscallAsm, .-SyscallAsm\n"
+ #endif
+     );  // asm
+ 
+@@ -425,6 +447,18 @@ intptr_t Syscall::Call(int nr,
+     ret = inout;
+   }
+ 
++#elif defined(__riscv)
++  intptr_t ret;
++  {
++    register intptr_t inout __asm__("a0") = nr;
++    register const intptr_t* data __asm__("t0") = args;
++    asm volatile("jal SyscallAsm\n"
++                 : "+r"(inout)
++                 : "r"(data)
++                 : "memory", "a1", "a2", "a3", "a4", "a5", "a6");
++    ret = inout;
++  }
++
+ #else
+ #error "Unimplemented architecture"
+ #endif
+Index: chromium-107.0.5304.87/sandbox/linux/services/credentials.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/services/credentials.cc
++++ chromium-107.0.5304.87/sandbox/linux/services/credentials.cc
+@@ -80,7 +80,7 @@ bool ChrootToSafeEmptyDir() {
+   pid_t pid = -1;
+   alignas(16) char stack_buf[PTHREAD_STACK_MIN];
+ #if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \
+-    defined(ARCH_CPU_MIPS_FAMILY)
++    defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_RISCV_FAMILY)
+   // The stack grows downward.
+   void* stack = stack_buf + sizeof(stack_buf);
+ #else
+Index: chromium-107.0.5304.87/sandbox/linux/services/syscall_wrappers.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/services/syscall_wrappers.cc
++++ chromium-107.0.5304.87/sandbox/linux/services/syscall_wrappers.cc
+@@ -61,7 +61,7 @@ long sys_clone(unsigned long flags,
+ #if defined(ARCH_CPU_X86_64)
+   return syscall(__NR_clone, flags, child_stack, ptid, ctid, tls);
+ #elif defined(ARCH_CPU_X86) || defined(ARCH_CPU_ARM_FAMILY) || \
+-    defined(ARCH_CPU_MIPS_FAMILY)
++    defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_RISCV_FAMILY)
+   // CONFIG_CLONE_BACKWARDS defined.
+   return syscall(__NR_clone, flags, child_stack, ptid, tls, ctid);
+ #endif
+Index: chromium-107.0.5304.87/sandbox/linux/syscall_broker/broker_process.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/syscall_broker/broker_process.cc
++++ chromium-107.0.5304.87/sandbox/linux/syscall_broker/broker_process.cc
+@@ -117,44 +117,46 @@ bool BrokerProcess::IsSyscallBrokerable(
+   // and are default disabled in Android. So, we should refuse to broker them
+   // to be consistent with the platform's restrictions.
+   switch (sysno) {
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_access:
+ #endif
+     case __NR_faccessat:
+     case __NR_faccessat2:
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_ACCESS);
+ 
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_mkdir:
+ #endif
+     case __NR_mkdirat:
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_MKDIR);
+ 
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_open:
+ #endif
+     case __NR_openat:
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_OPEN);
+ 
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_readlink:
+ #endif
+     case __NR_readlinkat:
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_READLINK);
+ 
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_rename:
+ #endif
++#ifdef __NR_renameat
+     case __NR_renameat:
++#endif
+     case __NR_renameat2:
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_RENAME);
+ 
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_rmdir:
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_RMDIR);
+ #endif
+ 
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_stat:
+     case __NR_lstat:
+ #endif
+@@ -164,7 +166,7 @@ bool BrokerProcess::IsSyscallBrokerable(
+ #if defined(__NR_fstatat64)
+     case __NR_fstatat64:
+ #endif
+-#if defined(__x86_64__) || defined(__aarch64__)
++#if defined(__x86_64__) || defined(__aarch64__) || defined(__riscv)
+     case __NR_newfstatat:
+ #endif
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_STAT);
+@@ -179,7 +181,7 @@ bool BrokerProcess::IsSyscallBrokerable(
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_STAT);
+ #endif
+ 
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_unlink:
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_UNLINK);
+ #endif
+Index: chromium-107.0.5304.87/sandbox/linux/system_headers/linux_seccomp.h
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/system_headers/linux_seccomp.h
++++ chromium-107.0.5304.87/sandbox/linux/system_headers/linux_seccomp.h
+@@ -38,6 +38,9 @@
+ #ifndef EM_AARCH64
+ #define EM_AARCH64 183
+ #endif
++#ifndef EM_RISCV
++#define EM_RISCV 243
++#endif
+ 
+ #ifndef __AUDIT_ARCH_64BIT
+ #define __AUDIT_ARCH_64BIT 0x80000000
+@@ -70,6 +73,9 @@
+ #ifndef AUDIT_ARCH_AARCH64
+ #define AUDIT_ARCH_AARCH64 (EM_AARCH64 | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE)
+ #endif
++#ifndef AUDIT_ARCH_RISCV64
++#define AUDIT_ARCH_RISCV64 (EM_RISCV|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
++#endif
+ 
+ // For prctl.h
+ #ifndef PR_SET_SECCOMP
+Index: chromium-107.0.5304.87/sandbox/linux/system_headers/linux_signal.h
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/system_headers/linux_signal.h
++++ chromium-107.0.5304.87/sandbox/linux/system_headers/linux_signal.h
+@@ -13,7 +13,7 @@
+ // (not undefined, but defined different values and in different memory
+ // layouts). So, fill the gap here.
+ #if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+ 
+ #define LINUX_SIGHUP 1
+ #define LINUX_SIGINT 2
+Index: chromium-107.0.5304.87/sandbox/linux/system_headers/linux_stat.h
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/system_headers/linux_stat.h
++++ chromium-107.0.5304.87/sandbox/linux/system_headers/linux_stat.h
+@@ -150,7 +150,7 @@ struct kernel_stat {
+   int st_blocks;
+   int st_pad4[14];
+ };
+-#elif defined(__aarch64__)
++#elif defined(__aarch64__) || defined(__riscv)
+ struct kernel_stat {
+   unsigned long st_dev;
+   unsigned long st_ino;
+Index: chromium-107.0.5304.87/sandbox/linux/system_headers/linux_syscalls.h
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/system_headers/linux_syscalls.h
++++ chromium-107.0.5304.87/sandbox/linux/system_headers/linux_syscalls.h
+@@ -35,5 +35,9 @@
+ #include "sandbox/linux/system_headers/arm64_linux_syscalls.h"
+ #endif
+ 
++#if defined(__riscv) && __riscv_xlen == 64
++#include "sandbox/linux/system_headers/riscv64_linux_syscalls.h"
++#endif
++
+ #endif  // SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SYSCALLS_H_
+ 
+Index: chromium-107.0.5304.87/sandbox/linux/system_headers/riscv64_linux_syscalls.h
+===================================================================
+--- /dev/null
++++ chromium-107.0.5304.87/sandbox/linux/system_headers/riscv64_linux_syscalls.h
+@@ -0,0 +1,1222 @@
++// Copyright 2014 The Chromium Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#ifndef SANDBOX_LINUX_SYSTEM_HEADERS_RISCV64_LINUX_SYSCALLS_H_
++#define SANDBOX_LINUX_SYSTEM_HEADERS_RISCV64_LINUX_SYSCALLS_H_
++
++#include <asm-generic/unistd.h>
++
++#if !defined(__NR_io_setup)
++#define __NR_io_setup 0
++#endif
++
++#if !defined(__NR_io_destroy)
++#define __NR_io_destroy 1
++#endif
++
++#if !defined(__NR_io_submit)
++#define __NR_io_submit 2
++#endif
++
++#if !defined(__NR_io_cancel)
++#define __NR_io_cancel 3
++#endif
++
++#if !defined(__NR_io_getevents)
++#define __NR_io_getevents 4
++#endif
++
++#if !defined(__NR_setxattr)
++#define __NR_setxattr 5
++#endif
++
++#if !defined(__NR_lsetxattr)
++#define __NR_lsetxattr 6
++#endif
++
++#if !defined(__NR_fsetxattr)
++#define __NR_fsetxattr 7
++#endif
++
++#if !defined(__NR_getxattr)
++#define __NR_getxattr 8
++#endif
++
++#if !defined(__NR_lgetxattr)
++#define __NR_lgetxattr 9
++#endif
++
++#if !defined(__NR_fgetxattr)
++#define __NR_fgetxattr 10
++#endif
++
++#if !defined(__NR_listxattr)
++#define __NR_listxattr 11
++#endif
++
++#if !defined(__NR_llistxattr)
++#define __NR_llistxattr 12
++#endif
++
++#if !defined(__NR_flistxattr)
++#define __NR_flistxattr 13
++#endif
++
++#if !defined(__NR_removexattr)
++#define __NR_removexattr 14
++#endif
++
++#if !defined(__NR_lremovexattr)
++#define __NR_lremovexattr 15
++#endif
++
++#if !defined(__NR_fremovexattr)
++#define __NR_fremovexattr 16
++#endif
++
++#if !defined(__NR_getcwd)
++#define __NR_getcwd 17
++#endif
++
++#if !defined(__NR_lookup_dcookie)
++#define __NR_lookup_dcookie 18
++#endif
++
++#if !defined(__NR_eventfd2)
++#define __NR_eventfd2 19
++#endif
++
++#if !defined(__NR_epoll_create1)
++#define __NR_epoll_create1 20
++#endif
++
++#if !defined(__NR_epoll_ctl)
++#define __NR_epoll_ctl 21
++#endif
++
++#if !defined(__NR_epoll_pwait)
++#define __NR_epoll_pwait 22
++#endif
++
++#if !defined(__NR_dup)
++#define __NR_dup 23
++#endif
++
++#if !defined(__NR_dup3)
++#define __NR_dup3 24
++#endif
++
++#if !defined(__NR_fcntl)
++#define __NR_fcntl 25
++#endif
++
++#if !defined(__NR_inotify_init1)
++#define __NR_inotify_init1 26
++#endif
++
++#if !defined(__NR_inotify_add_watch)
++#define __NR_inotify_add_watch 27
++#endif
++
++#if !defined(__NR_inotify_rm_watch)
++#define __NR_inotify_rm_watch 28
++#endif
++
++#if !defined(__NR_ioctl)
++#define __NR_ioctl 29
++#endif
++
++#if !defined(__NR_ioprio_set)
++#define __NR_ioprio_set 30
++#endif
++
++#if !defined(__NR_ioprio_get)
++#define __NR_ioprio_get 31
++#endif
++
++#if !defined(__NR_flock)
++#define __NR_flock 32
++#endif
++
++#if !defined(__NR_mknodat)
++#define __NR_mknodat 33
++#endif
++
++#if !defined(__NR_mkdirat)
++#define __NR_mkdirat 34
++#endif
++
++#if !defined(__NR_unlinkat)
++#define __NR_unlinkat 35
++#endif
++
++#if !defined(__NR_symlinkat)
++#define __NR_symlinkat 36
++#endif
++
++#if !defined(__NR_linkat)
++#define __NR_linkat 37
++#endif
++
++#if !defined(__NR_renameat)
++#define __NR_renameat 38
++#endif
++
++#if !defined(__NR_umount2)
++#define __NR_umount2 39
++#endif
++
++#if !defined(__NR_mount)
++#define __NR_mount 40
++#endif
++
++#if !defined(__NR_pivot_root)
++#define __NR_pivot_root 41
++#endif
++
++#if !defined(__NR_nfsservctl)
++#define __NR_nfsservctl 42
++#endif
++
++#if !defined(__NR_statfs)
++#define __NR_statfs 43
++#endif
++
++#if !defined(__NR_fstatfs)
++#define __NR_fstatfs 44
++#endif
++
++#if !defined(__NR_truncate)
++#define __NR_truncate 45
++#endif
++
++#if !defined(__NR_ftruncate)
++#define __NR_ftruncate 46
++#endif
++
++#if !defined(__NR_fallocate)
++#define __NR_fallocate 47
++#endif
++
++#if !defined(__NR_faccessat)
++#define __NR_faccessat 48
++#endif
++
++#if !defined(__NR_chdir)
++#define __NR_chdir 49
++#endif
++
++#if !defined(__NR_fchdir)
++#define __NR_fchdir 50
++#endif
++
++#if !defined(__NR_chroot)
++#define __NR_chroot 51
++#endif
++
++#if !defined(__NR_fchmod)
++#define __NR_fchmod 52
++#endif
++
++#if !defined(__NR_fchmodat)
++#define __NR_fchmodat 53
++#endif
++
++#if !defined(__NR_fchownat)
++#define __NR_fchownat 54
++#endif
++
++#if !defined(__NR_fchown)
++#define __NR_fchown 55
++#endif
++
++#if !defined(__NR_openat)
++#define __NR_openat 56
++#endif
++
++#if !defined(__NR_close)
++#define __NR_close 57
++#endif
++
++#if !defined(__NR_vhangup)
++#define __NR_vhangup 58
++#endif
++
++#if !defined(__NR_pipe2)
++#define __NR_pipe2 59
++#endif
++
++#if !defined(__NR_quotactl)
++#define __NR_quotactl 60
++#endif
++
++#if !defined(__NR_getdents64)
++#define __NR_getdents64 61
++#endif
++
++#if !defined(__NR_lseek)
++#define __NR_lseek 62
++#endif
++
++#if !defined(__NR_read)
++#define __NR_read 63
++#endif
++
++#if !defined(__NR_write)
++#define __NR_write 64
++#endif
++
++#if !defined(__NR_readv)
++#define __NR_readv 65
++#endif
++
++#if !defined(__NR_writev)
++#define __NR_writev 66
++#endif
++
++#if !defined(__NR_pread64)
++#define __NR_pread64 67
++#endif
++
++#if !defined(__NR_pwrite64)
++#define __NR_pwrite64 68
++#endif
++
++#if !defined(__NR_preadv)
++#define __NR_preadv 69
++#endif
++
++#if !defined(__NR_pwritev)
++#define __NR_pwritev 70
++#endif
++
++#if !defined(__NR_sendfile)
++#define __NR_sendfile 71
++#endif
++
++#if !defined(__NR_pselect6)
++#define __NR_pselect6 72
++#endif
++
++#if !defined(__NR_ppoll)
++#define __NR_ppoll 73
++#endif
++
++#if !defined(__NR_signalfd4)
++#define __NR_signalfd4 74
++#endif
++
++#if !defined(__NR_vmsplice)
++#define __NR_vmsplice 75
++#endif
++
++#if !defined(__NR_splice)
++#define __NR_splice 76
++#endif
++
++#if !defined(__NR_tee)
++#define __NR_tee 77
++#endif
++
++#if !defined(__NR_readlinkat)
++#define __NR_readlinkat 78
++#endif
++
++#if !defined(__NR_newfstatat)
++#define __NR_newfstatat 79
++#endif
++
++#if !defined(__NR_fstat)
++#define __NR_fstat 80
++#endif
++
++#if !defined(__NR_sync)
++#define __NR_sync 81
++#endif
++
++#if !defined(__NR_fsync)
++#define __NR_fsync 82
++#endif
++
++#if !defined(__NR_fdatasync)
++#define __NR_fdatasync 83
++#endif
++
++#if !defined(__NR_sync_file_range)
++#define __NR_sync_file_range 84
++#endif
++
++#if !defined(__NR_timerfd_create)
++#define __NR_timerfd_create 85
++#endif
++
++#if !defined(__NR_timerfd_settime)
++#define __NR_timerfd_settime 86
++#endif
++
++#if !defined(__NR_timerfd_gettime)
++#define __NR_timerfd_gettime 87
++#endif
++
++#if !defined(__NR_utimensat)
++#define __NR_utimensat 88
++#endif
++
++#if !defined(__NR_acct)
++#define __NR_acct 89
++#endif
++
++#if !defined(__NR_capget)
++#define __NR_capget 90
++#endif
++
++#if !defined(__NR_capset)
++#define __NR_capset 91
++#endif
++
++#if !defined(__NR_personality)
++#define __NR_personality 92
++#endif
++
++#if !defined(__NR_exit)
++#define __NR_exit 93
++#endif
++
++#if !defined(__NR_exit_group)
++#define __NR_exit_group 94
++#endif
++
++#if !defined(__NR_waitid)
++#define __NR_waitid 95
++#endif
++
++#if !defined(__NR_set_tid_address)
++#define __NR_set_tid_address 96
++#endif
++
++#if !defined(__NR_unshare)
++#define __NR_unshare 97
++#endif
++
++#if !defined(__NR_futex)
++#define __NR_futex 98
++#endif
++
++#if !defined(__NR_set_robust_list)
++#define __NR_set_robust_list 99
++#endif
++
++#if !defined(__NR_get_robust_list)
++#define __NR_get_robust_list 100
++#endif
++
++#if !defined(__NR_nanosleep)
++#define __NR_nanosleep 101
++#endif
++
++#if !defined(__NR_getitimer)
++#define __NR_getitimer 102
++#endif
++
++#if !defined(__NR_setitimer)
++#define __NR_setitimer 103
++#endif
++
++#if !defined(__NR_kexec_load)
++#define __NR_kexec_load 104
++#endif
++
++#if !defined(__NR_init_module)
++#define __NR_init_module 105
++#endif
++
++#if !defined(__NR_delete_module)
++#define __NR_delete_module 106
++#endif
++
++#if !defined(__NR_timer_create)
++#define __NR_timer_create 107
++#endif
++
++#if !defined(__NR_timer_gettime)
++#define __NR_timer_gettime 108
++#endif
++
++#if !defined(__NR_timer_getoverrun)
++#define __NR_timer_getoverrun 109
++#endif
++
++#if !defined(__NR_timer_settime)
++#define __NR_timer_settime 110
++#endif
++
++#if !defined(__NR_timer_delete)
++#define __NR_timer_delete 111
++#endif
++
++#if !defined(__NR_clock_settime)
++#define __NR_clock_settime 112
++#endif
++
++#if !defined(__NR_clock_gettime)
++#define __NR_clock_gettime 113
++#endif
++
++#if !defined(__NR_clock_getres)
++#define __NR_clock_getres 114
++#endif
++
++#if !defined(__NR_clock_nanosleep)
++#define __NR_clock_nanosleep 115
++#endif
++
++#if !defined(__NR_syslog)
++#define __NR_syslog 116
++#endif
++
++#if !defined(__NR_ptrace)
++#define __NR_ptrace 117
++#endif
++
++#if !defined(__NR_sched_setparam)
++#define __NR_sched_setparam 118
++#endif
++
++#if !defined(__NR_sched_setscheduler)
++#define __NR_sched_setscheduler 119
++#endif
++
++#if !defined(__NR_sched_getscheduler)
++#define __NR_sched_getscheduler 120
++#endif
++
++#if !defined(__NR_sched_getparam)
++#define __NR_sched_getparam 121
++#endif
++
++#if !defined(__NR_sched_setaffinity)
++#define __NR_sched_setaffinity 122
++#endif
++
++#if !defined(__NR_sched_getaffinity)
++#define __NR_sched_getaffinity 123
++#endif
++
++#if !defined(__NR_sched_yield)
++#define __NR_sched_yield 124
++#endif
++
++#if !defined(__NR_sched_get_priority_max)
++#define __NR_sched_get_priority_max 125
++#endif
++
++#if !defined(__NR_sched_get_priority_min)
++#define __NR_sched_get_priority_min 126
++#endif
++
++#if !defined(__NR_sched_rr_get_interval)
++#define __NR_sched_rr_get_interval 127
++#endif
++
++#if !defined(__NR_restart_syscall)
++#define __NR_restart_syscall 128
++#endif
++
++#if !defined(__NR_kill)
++#define __NR_kill 129
++#endif
++
++#if !defined(__NR_tkill)
++#define __NR_tkill 130
++#endif
++
++#if !defined(__NR_tgkill)
++#define __NR_tgkill 131
++#endif
++
++#if !defined(__NR_sigaltstack)
++#define __NR_sigaltstack 132
++#endif
++
++#if !defined(__NR_rt_sigsuspend)
++#define __NR_rt_sigsuspend 133
++#endif
++
++#if !defined(__NR_rt_sigaction)
++#define __NR_rt_sigaction 134
++#endif
++
++#if !defined(__NR_rt_sigprocmask)
++#define __NR_rt_sigprocmask 135
++#endif
++
++#if !defined(__NR_rt_sigpending)
++#define __NR_rt_sigpending 136
++#endif
++
++#if !defined(__NR_rt_sigtimedwait)
++#define __NR_rt_sigtimedwait 137
++#endif
++
++#if !defined(__NR_rt_sigqueueinfo)
++#define __NR_rt_sigqueueinfo 138
++#endif
++
++#if !defined(__NR_rt_sigreturn)
++#define __NR_rt_sigreturn 139
++#endif
++
++#if !defined(__NR_setpriority)
++#define __NR_setpriority 140
++#endif
++
++#if !defined(__NR_getpriority)
++#define __NR_getpriority 141
++#endif
++
++#if !defined(__NR_reboot)
++#define __NR_reboot 142
++#endif
++
++#if !defined(__NR_setregid)
++#define __NR_setregid 143
++#endif
++
++#if !defined(__NR_setgid)
++#define __NR_setgid 144
++#endif
++
++#if !defined(__NR_setreuid)
++#define __NR_setreuid 145
++#endif
++
++#if !defined(__NR_setuid)
++#define __NR_setuid 146
++#endif
++
++#if !defined(__NR_setresuid)
++#define __NR_setresuid 147
++#endif
++
++#if !defined(__NR_getresuid)
++#define __NR_getresuid 148
++#endif
++
++#if !defined(__NR_setresgid)
++#define __NR_setresgid 149
++#endif
++
++#if !defined(__NR_getresgid)
++#define __NR_getresgid 150
++#endif
++
++#if !defined(__NR_setfsuid)
++#define __NR_setfsuid 151
++#endif
++
++#if !defined(__NR_setfsgid)
++#define __NR_setfsgid 152
++#endif
++
++#if !defined(__NR_times)
++#define __NR_times 153
++#endif
++
++#if !defined(__NR_setpgid)
++#define __NR_setpgid 154
++#endif
++
++#if !defined(__NR_getpgid)
++#define __NR_getpgid 155
++#endif
++
++#if !defined(__NR_getsid)
++#define __NR_getsid 156
++#endif
++
++#if !defined(__NR_setsid)
++#define __NR_setsid 157
++#endif
++
++#if !defined(__NR_getgroups)
++#define __NR_getgroups 158
++#endif
++
++#if !defined(__NR_setgroups)
++#define __NR_setgroups 159
++#endif
++
++#if !defined(__NR_uname)
++#define __NR_uname 160
++#endif
++
++#if !defined(__NR_sethostname)
++#define __NR_sethostname 161
++#endif
++
++#if !defined(__NR_setdomainname)
++#define __NR_setdomainname 162
++#endif
++
++#if !defined(__NR_getrlimit)
++#define __NR_getrlimit 163
++#endif
++
++#if !defined(__NR_setrlimit)
++#define __NR_setrlimit 164
++#endif
++
++#if !defined(__NR_getrusage)
++#define __NR_getrusage 165
++#endif
++
++#if !defined(__NR_umask)
++#define __NR_umask 166
++#endif
++
++#if !defined(__NR_prctl)
++#define __NR_prctl 167
++#endif
++
++#if !defined(__NR_getcpu)
++#define __NR_getcpu 168
++#endif
++
++#if !defined(__NR_gettimeofday)
++#define __NR_gettimeofday 169
++#endif
++
++#if !defined(__NR_settimeofday)
++#define __NR_settimeofday 170
++#endif
++
++#if !defined(__NR_adjtimex)
++#define __NR_adjtimex 171
++#endif
++
++#if !defined(__NR_getpid)
++#define __NR_getpid 172
++#endif
++
++#if !defined(__NR_getppid)
++#define __NR_getppid 173
++#endif
++
++#if !defined(__NR_getuid)
++#define __NR_getuid 174
++#endif
++
++#if !defined(__NR_geteuid)
++#define __NR_geteuid 175
++#endif
++
++#if !defined(__NR_getgid)
++#define __NR_getgid 176
++#endif
++
++#if !defined(__NR_getegid)
++#define __NR_getegid 177
++#endif
++
++#if !defined(__NR_gettid)
++#define __NR_gettid 178
++#endif
++
++#if !defined(__NR_sysinfo)
++#define __NR_sysinfo 179
++#endif
++
++#if !defined(__NR_mq_open)
++#define __NR_mq_open 180
++#endif
++
++#if !defined(__NR_mq_unlink)
++#define __NR_mq_unlink 181
++#endif
++
++#if !defined(__NR_mq_timedsend)
++#define __NR_mq_timedsend 182
++#endif
++
++#if !defined(__NR_mq_timedreceive)
++#define __NR_mq_timedreceive 183
++#endif
++
++#if !defined(__NR_mq_notify)
++#define __NR_mq_notify 184
++#endif
++
++#if !defined(__NR_mq_getsetattr)
++#define __NR_mq_getsetattr 185
++#endif
++
++#if !defined(__NR_msgget)
++#define __NR_msgget 186
++#endif
++
++#if !defined(__NR_msgctl)
++#define __NR_msgctl 187
++#endif
++
++#if !defined(__NR_msgrcv)
++#define __NR_msgrcv 188
++#endif
++
++#if !defined(__NR_msgsnd)
++#define __NR_msgsnd 189
++#endif
++
++#if !defined(__NR_semget)
++#define __NR_semget 190
++#endif
++
++#if !defined(__NR_semctl)
++#define __NR_semctl 191
++#endif
++
++#if !defined(__NR_semtimedop)
++#define __NR_semtimedop 192
++#endif
++
++#if !defined(__NR_semop)
++#define __NR_semop 193
++#endif
++
++#if !defined(__NR_shmget)
++#define __NR_shmget 194
++#endif
++
++#if !defined(__NR_shmctl)
++#define __NR_shmctl 195
++#endif
++
++#if !defined(__NR_shmat)
++#define __NR_shmat 196
++#endif
++
++#if !defined(__NR_shmdt)
++#define __NR_shmdt 197
++#endif
++
++#if !defined(__NR_socket)
++#define __NR_socket 198
++#endif
++
++#if !defined(__NR_socketpair)
++#define __NR_socketpair 199
++#endif
++
++#if !defined(__NR_bind)
++#define __NR_bind 200
++#endif
++
++#if !defined(__NR_listen)
++#define __NR_listen 201
++#endif
++
++#if !defined(__NR_accept)
++#define __NR_accept 202
++#endif
++
++#if !defined(__NR_connect)
++#define __NR_connect 203
++#endif
++
++#if !defined(__NR_getsockname)
++#define __NR_getsockname 204
++#endif
++
++#if !defined(__NR_getpeername)
++#define __NR_getpeername 205
++#endif
++
++#if !defined(__NR_sendto)
++#define __NR_sendto 206
++#endif
++
++#if !defined(__NR_recvfrom)
++#define __NR_recvfrom 207
++#endif
++
++#if !defined(__NR_setsockopt)
++#define __NR_setsockopt 208
++#endif
++
++#if !defined(__NR_getsockopt)
++#define __NR_getsockopt 209
++#endif
++
++#if !defined(__NR_shutdown)
++#define __NR_shutdown 210
++#endif
++
++#if !defined(__NR_sendmsg)
++#define __NR_sendmsg 211
++#endif
++
++#if !defined(__NR_recvmsg)
++#define __NR_recvmsg 212
++#endif
++
++#if !defined(__NR_readahead)
++#define __NR_readahead 213
++#endif
++
++#if !defined(__NR_brk)
++#define __NR_brk 214
++#endif
++
++#if !defined(__NR_munmap)
++#define __NR_munmap 215
++#endif
++
++#if !defined(__NR_mremap)
++#define __NR_mremap 216
++#endif
++
++#if !defined(__NR_add_key)
++#define __NR_add_key 217
++#endif
++
++#if !defined(__NR_request_key)
++#define __NR_request_key 218
++#endif
++
++#if !defined(__NR_keyctl)
++#define __NR_keyctl 219
++#endif
++
++#if !defined(__NR_clone)
++#define __NR_clone 220
++#endif
++
++#if !defined(__NR_execve)
++#define __NR_execve 221
++#endif
++
++#if !defined(__NR_mmap)
++#define __NR_mmap 222
++#endif
++
++#if !defined(__NR_fadvise64)
++#define __NR_fadvise64 223
++#endif
++
++#if !defined(__NR_swapon)
++#define __NR_swapon 224
++#endif
++
++#if !defined(__NR_swapoff)
++#define __NR_swapoff 225
++#endif
++
++#if !defined(__NR_mprotect)
++#define __NR_mprotect 226
++#endif
++
++#if !defined(__NR_msync)
++#define __NR_msync 227
++#endif
++
++#if !defined(__NR_mlock)
++#define __NR_mlock 228
++#endif
++
++#if !defined(__NR_munlock)
++#define __NR_munlock 229
++#endif
++
++#if !defined(__NR_mlockall)
++#define __NR_mlockall 230
++#endif
++
++#if !defined(__NR_munlockall)
++#define __NR_munlockall 231
++#endif
++
++#if !defined(__NR_mincore)
++#define __NR_mincore 232
++#endif
++
++#if !defined(__NR_madvise)
++#define __NR_madvise 233
++#endif
++
++#if !defined(__NR_remap_file_pages)
++#define __NR_remap_file_pages 234
++#endif
++
++#if !defined(__NR_mbind)
++#define __NR_mbind 235
++#endif
++
++#if !defined(__NR_get_mempolicy)
++#define __NR_get_mempolicy 236
++#endif
++
++#if !defined(__NR_set_mempolicy)
++#define __NR_set_mempolicy 237
++#endif
++
++#if !defined(__NR_migrate_pages)
++#define __NR_migrate_pages 238
++#endif
++
++#if !defined(__NR_move_pages)
++#define __NR_move_pages 239
++#endif
++
++#if !defined(__NR_rt_tgsigqueueinfo)
++#define __NR_rt_tgsigqueueinfo 240
++#endif
++
++#if !defined(__NR_perf_event_open)
++#define __NR_perf_event_open 241
++#endif
++
++#if !defined(__NR_accept4)
++#define __NR_accept4 242
++#endif
++
++#if !defined(__NR_recvmmsg)
++#define __NR_recvmmsg 243
++#endif
++
++#if !defined(__NR_riscv_flush_icache)
++#define __NR_riscv_flush_icache 259
++#endif
++
++#if !defined(__NR_wait4)
++#define __NR_wait4 260
++#endif
++
++#if !defined(__NR_prlimit64)
++#define __NR_prlimit64 261
++#endif
++
++#if !defined(__NR_fanotify_init)
++#define __NR_fanotify_init 262
++#endif
++
++#if !defined(__NR_fanotify_mark)
++#define __NR_fanotify_mark 263
++#endif
++
++#if !defined(__NR_name_to_handle_at)
++#define __NR_name_to_handle_at 264
++#endif
++
++#if !defined(__NR_open_by_handle_at)
++#define __NR_open_by_handle_at 265
++#endif
++
++#if !defined(__NR_clock_adjtime)
++#define __NR_clock_adjtime 266
++#endif
++
++#if !defined(__NR_syncfs)
++#define __NR_syncfs 267
++#endif
++
++#if !defined(__NR_setns)
++#define __NR_setns 268
++#endif
++
++#if !defined(__NR_sendmmsg)
++#define __NR_sendmmsg 269
++#endif
++
++#if !defined(__NR_process_vm_readv)
++#define __NR_process_vm_readv 270
++#endif
++
++#if !defined(__NR_process_vm_writev)
++#define __NR_process_vm_writev 271
++#endif
++
++#if !defined(__NR_kcmp)
++#define __NR_kcmp 272
++#endif
++
++#if !defined(__NR_finit_module)
++#define __NR_finit_module 273
++#endif
++
++#if !defined(__NR_sched_setattr)
++#define __NR_sched_setattr 274
++#endif
++
++#if !defined(__NR_sched_getattr)
++#define __NR_sched_getattr 275
++#endif
++
++#if !defined(__NR_renameat2)
++#define __NR_renameat2 276
++#endif
++
++#if !defined(__NR_seccomp)
++#define __NR_seccomp 277
++#endif
++
++#if !defined(__NR_getrandom)
++#define __NR_getrandom 278
++#endif
++
++#if !defined(__NR_memfd_create)
++#define __NR_memfd_create 279
++#endif
++
++#if !defined(__NR_bpf)
++#define __NR_bpf 280
++#endif
++
++#if !defined(__NR_execveat)
++#define __NR_execveat 281
++#endif
++
++#if !defined(__NR_userfaultfd)
++#define __NR_userfaultfd 282
++#endif
++
++#if !defined(__NR_membarrier)
++#define __NR_membarrier 283
++#endif
++
++#if !defined(__NR_mlock2)
++#define __NR_mlock2 284
++#endif
++
++#if !defined(__NR_copy_file_range)
++#define __NR_copy_file_range 285
++#endif
++
++#if !defined(__NR_preadv2)
++#define __NR_preadv2 286
++#endif
++
++#if !defined(__NR_pwritev2)
++#define __NR_pwritev2 287
++#endif
++
++#if !defined(__NR_pkey_mprotect)
++#define __NR_pkey_mprotect 288
++#endif
++
++#if !defined(__NR_pkey_alloc)
++#define __NR_pkey_alloc 289
++#endif
++
++#if !defined(__NR_pkey_free)
++#define __NR_pkey_free 290
++#endif
++
++#if !defined(__NR_statx)
++#define __NR_statx 291
++#endif
++
++#if !defined(__NR_io_pgetevents)
++#define __NR_io_pgetevents 292
++#endif
++
++#if !defined(__NR_rseq)
++#define __NR_rseq 293
++#endif
++
++#if !defined(__NR_kexec_file_load)
++#define __NR_kexec_file_load 294
++#endif
++
++#if !defined(__NR_pidfd_send_signal)
++#define __NR_pidfd_send_signal 424
++#endif
++
++#if !defined(__NR_io_uring_setup)
++#define __NR_io_uring_setup 425
++#endif
++
++#if !defined(__NR_io_uring_enter)
++#define __NR_io_uring_enter 426
++#endif
++
++#if !defined(__NR_io_uring_register)
++#define __NR_io_uring_register 427
++#endif
++
++#if !defined(__NR_open_tree)
++#define __NR_open_tree 428
++#endif
++
++#if !defined(__NR_move_mount)
++#define __NR_move_mount 429
++#endif
++
++#if !defined(__NR_fsopen)
++#define __NR_fsopen 430
++#endif
++
++#if !defined(__NR_fsconfig)
++#define __NR_fsconfig 431
++#endif
++
++#if !defined(__NR_fsmount)
++#define __NR_fsmount 432
++#endif
++
++#if !defined(__NR_fspick)
++#define __NR_fspick 433
++#endif
++
++#if !defined(__NR_pidfd_open)
++#define __NR_pidfd_open 434
++#endif
++
++#if !defined(__NR_clone3)
++#define __NR_clone3 435
++#endif
++
++#if !defined(__NR_close_range)
++#define __NR_close_range 436
++#endif
++
++#if !defined(__NR_openat2)
++#define __NR_openat2 437
++#endif
++
++#if !defined(__NR_pidfd_getfd)
++#define __NR_pidfd_getfd 438
++#endif
++
++#if !defined(__NR_faccessat2)
++#define __NR_faccessat2 439
++#endif
++
++#if !defined(__NR_process_madvise)
++#define __NR_process_madvise 440
++#endif
++
++#if !defined(__NR_epoll_pwait2)
++#define __NR_epoll_pwait2 441
++#endif
++
++#if !defined(__NR_mount_setattr)
++#define __NR_mount_setattr 442
++#endif
++
++#if !defined(__NR_quotactl_path)
++#define __NR_quotactl_path 443
++#endif
++
++#if !defined(__NR_landlock_create_ruleset)
++#define __NR_landlock_create_ruleset 444
++#endif
++
++#if !defined(__NR_landlock_add_rule)
++#define __NR_landlock_add_rule 445
++#endif
++
++#if !defined(__NR_landlock_restrict_self)
++#define __NR_landlock_restrict_self 446
++#endif
++
++#endif  // SANDBOX_LINUX_SYSTEM_HEADERS_RISCV64_LINUX_SYSCALLS_H_
+Index: chromium-107.0.5304.87/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc
++++ chromium-107.0.5304.87/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc
+@@ -38,7 +38,7 @@ ResultExpr CrosAmdGpuProcessPolicy::Eval
+     case __NR_sched_setscheduler:
+     case __NR_sysinfo:
+     case __NR_uname:
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_readlink:
+     case __NR_stat:
+ #endif
+Index: chromium-107.0.5304.87/sandbox/policy/linux/bpf_gpu_policy_linux.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/policy/linux/bpf_gpu_policy_linux.cc
++++ chromium-107.0.5304.87/sandbox/policy/linux/bpf_gpu_policy_linux.cc
+@@ -73,7 +73,7 @@ ResultExpr GpuProcessPolicy::EvaluateSys
+     (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+     case __NR_ftruncate64:
+ #endif
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_getdents:
+ #endif
+     case __NR_getdents64:
+
diff --git a/srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch.args b/srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch.args
new file mode 100644
index 000000000000..d5f38e354e7f
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch.args
@@ -0,0 +1 @@
+-Np1 --directory=src/3rdparty/chromium/
diff --git a/srcpkgs/qt6-webengine/patches/0100-chromium-revert-9d080c0.patch b/srcpkgs/qt6-webengine/patches/0100-chromium-revert-9d080c0.patch
deleted file mode 100644
index adca364a4060..000000000000
--- a/srcpkgs/qt6-webengine/patches/0100-chromium-revert-9d080c0.patch
+++ /dev/null
@@ -1,154 +0,0 @@
-Revert 9d080c0934b848ee4a05013c78641e612fcc1e03
-
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/build/config/sanitizers/BUILD.gn
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/build/config/sanitizers/BUILD.gn
-@@ -271,11 +271,11 @@ config("asan_flags") {
-   if (is_asan) {
-     cflags += [ "-fsanitize=address" ]
-     if (is_win) {
--      if (!defined(asan_win_blocklist_path)) {
--        asan_win_blocklist_path =
-+      if (!defined(asan_win_blacklist_path)) {
-+        asan_win_blacklist_path =
-             rebase_path("//tools/memory/asan/blocklist_win.txt", root_build_dir)
-       }
--      cflags += [ "-fsanitize-ignorelist=$asan_win_blocklist_path" ]
-+      cflags += [ "-fsanitize-blacklist=$asan_win_blacklist_path" ]
-     }
-   }
- }
-@@ -305,13 +305,13 @@ config("link_shared_library") {
- config("cfi_flags") {
-   cflags = []
-   if (is_cfi && current_toolchain == default_toolchain) {
--    if (!defined(cfi_ignorelist_path)) {
--      cfi_ignorelist_path =
-+    if (!defined(cfi_blacklist_path)) {
-+      cfi_blacklist_path =
-           rebase_path("//tools/cfi/ignores.txt", root_build_dir)
-     }
-     cflags += [
-       "-fsanitize=cfi-vcall",
--      "-fsanitize-ignorelist=$cfi_ignorelist_path",
-+      "-fsanitize-blacklist=$cfi_blacklist_path",
-     ]
- 
-     if (use_cfi_cast) {
-@@ -408,14 +408,14 @@ config("msan_flags") {
-   if (is_msan) {
-     assert(is_linux || is_chromeos,
-            "msan only supported on linux x86_64/ChromeOS")
--    if (!defined(msan_ignorelist_path)) {
--      msan_ignorelist_path =
--          rebase_path("//tools/msan/ignorelist.txt", root_build_dir)
-+    if (!defined(msan_blacklist_path)) {
-+      msan_blacklist_path =
-+          rebase_path("//tools/msan/blacklist.txt", root_build_dir)
-     }
-     cflags = [
-       "-fsanitize=memory",
-       "-fsanitize-memory-track-origins=$msan_track_origins",
--      "-fsanitize-ignorelist=$msan_ignorelist_path",
-+      "-fsanitize-blacklist=$msan_blacklist_path",
-     ]
-   }
- }
-@@ -423,13 +423,13 @@ config("msan_flags") {
- config("tsan_flags") {
-   if (is_tsan) {
-     assert(is_linux || is_chromeos, "tsan only supported on linux x86_64")
--    if (!defined(tsan_ignorelist_path)) {
--      tsan_ignorelist_path =
-+    if (!defined(tsan_blacklist_path)) {
-+      tsan_blacklist_path =
-           rebase_path("//tools/memory/tsan_v2/ignores.txt", root_build_dir)
-     }
-     cflags = [
-       "-fsanitize=thread",
--      "-fsanitize-ignorelist=$tsan_ignorelist_path",
-+      "-fsanitize-blacklist=$tsan_blacklist_path",
-     ]
-   }
- }
-@@ -437,8 +437,8 @@ config("tsan_flags") {
- config("ubsan_flags") {
-   cflags = []
-   if (is_ubsan) {
--    if (!defined(ubsan_ignorelist_path)) {
--      ubsan_ignorelist_path =
-+    if (!defined(ubsan_blacklist_path)) {
-+      ubsan_blacklist_path =
-           rebase_path("//tools/ubsan/ignorelist.txt", root_build_dir)
-     }
-     cflags += [
-@@ -455,7 +455,7 @@ config("ubsan_flags") {
-       "-fsanitize=signed-integer-overflow",
-       "-fsanitize=unreachable",
-       "-fsanitize=vla-bound",
--      "-fsanitize-ignorelist=$ubsan_ignorelist_path",
-+      "-fsanitize-blacklist=$ubsan_blacklist_path",
-     ]
-     if (!is_clang) {
-       # These exposes too much illegal C++14 code to compile on anything stricter than clang:
-@@ -496,8 +496,8 @@ config("ubsan_no_recover") {
- 
- config("ubsan_security_flags") {
-   if (is_ubsan_security) {
--    if (!defined(ubsan_security_ignorelist_path)) {
--      ubsan_security_ignorelist_path =
-+    if (!defined(ubsan_security_blacklist_path)) {
-+      ubsan_security_blacklist_path =
-           rebase_path("//tools/ubsan/security_ignorelist.txt", root_build_dir)
-     }
-     cflags = [
-@@ -505,7 +505,7 @@ config("ubsan_security_flags") {
-       "-fsanitize=shift",
-       "-fsanitize=signed-integer-overflow",
-       "-fsanitize=vla-bound",
--      "-fsanitize-ignorelist=$ubsan_security_ignorelist_path",
-+      "-fsanitize-blacklist=$ubsan_security_blacklist_path",
-     ]
-   }
- }
-@@ -518,13 +518,13 @@ config("ubsan_null_flags") {
- 
- config("ubsan_vptr_flags") {
-   if (is_ubsan_vptr) {
--    if (!defined(ubsan_vptr_ignorelist_path)) {
--      ubsan_vptr_ignorelist_path =
-+    if (!defined(ubsan_vptr_blacklist_path)) {
-+      ubsan_vptr_blacklist_path =
-           rebase_path("//tools/ubsan/vptr_ignorelist.txt", root_build_dir)
-     }
-     cflags = [
-       "-fsanitize=vptr",
--      "-fsanitize-ignorelist=$ubsan_vptr_ignorelist_path",
-+      "-fsanitize-blacklist=$ubsan_vptr_blacklist_path",
-     ]
-     if (!is_clang) {
-       # Clang specific flag:
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/build_overrides/build.gni
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/build_overrides/build.gni
-@@ -43,15 +43,15 @@ declare_args() {
- # Allows different projects to specify their own suppression/ignore lists for
- # sanitizer tools.
- # asan_suppressions_file = "path/to/asan_suppressions.cc"
--# asan_win_ignorelist_path = "path/to/asan/blocklist_win.txt"
-+# asan_win_blacklist_path = "path/to/asan/blocklist_win.txt"
- # lsan_suppressions_file = "path/to/lsan_suppressions.cc"
- # tsan_suppressions_file = "path/to/tsan_suppressions.cc"
--# tsan_ignorelist_path = "path/to/tsan/ignores.txt"
--# msan_ignorelist_path = "path/to/msan/ignorelist.txt"
--# ubsan_ignorelist_path = "path/to/ubsan/ignorelist.txt"
--# ubsan_vptr_ignorelist_path = "path/to/ubsan/vptr_ignorelist.txt"
--# ubsan_security_ignorelist_path = "path/to/ubsan/security_ignorelist.txt"
--# cfi_ignorelist_path = "path/to/cfi/ignores.txt"
-+# tsan_blacklist_path = "path/to/tsan/ignores.txt"
-+# msan_blacklist_path = "path/to/msan/blacklist.txt"
-+# ubsan_blacklist_path = "path/to/ubsan/blacklist.txt"
-+# ubsan_vptr_blacklist_path = "path/to/ubsan/vptr_blacklist.txt"
-+# ubsan_security_blacklist_path = "path/to/ubsan/security_blacklist.txt"
-+# cfi_blacklist_path = "path/to/cfi/ignores.txt"
- 
- if (host_os == "mac" || is_apple) {
-   # Needed for is_apple when targeting macOS or iOS, independent of host.
diff --git a/srcpkgs/qt6-webengine/patches/0101-chromium-102-fenced_frame_utils-include.patch b/srcpkgs/qt6-webengine/patches/0101-chromium-102-fenced_frame_utils-include.patch
deleted file mode 100644
index f41c7984840d..000000000000
--- a/srcpkgs/qt6-webengine/patches/0101-chromium-102-fenced_frame_utils-include.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-From 7c135a291184b59a59643ed6a8c40b4405ac0175 Mon Sep 17 00:00:00 2001
-From: Stephan Hartmann <stha09@googlemail.com>
-Date: Wed, 27 Apr 2022 16:01:01 +0000
-Subject: [PATCH] IWYU: add cstring for std::strlen in fenced_frame_utils
-
----
- third_party/blink/common/fenced_frame/fenced_frame_utils.cc | 2 ++
- 1 file changed, 2 insertions(+)
-
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/blink/common/fenced_frame/fenced_frame_utils.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/blink/common/fenced_frame/fenced_frame_utils.cc
-@@ -6,6 +6,8 @@
- 
- #include <cstring>
- 
-+#include <cstring>
-+
- #include "base/guid.h"
- #include "base/strings/string_util.h"
- 
diff --git a/srcpkgs/qt6-webengine/patches/0102-chromium-102-regex_pattern-array.patch b/srcpkgs/qt6-webengine/patches/0102-chromium-102-regex_pattern-array.patch
deleted file mode 100644
index 420ef941a386..000000000000
--- a/srcpkgs/qt6-webengine/patches/0102-chromium-102-regex_pattern-array.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/components/autofill/core/browser/BUILD.gn
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/components/autofill/core/browser/BUILD.gn
-@@ -34,6 +34,11 @@ action("regex_patterns_inl_h") {
- }
- 
- jumbo_static_library("browser") {
-+  if (is_clang) {
-+    cflags = [
-+      "-fbracket-depth=1000",
-+    ]
-+  }
-   sources = [
-     "address_normalization_manager.cc",
-     "address_normalization_manager.h",
diff --git a/srcpkgs/qt6-webengine/patches/0103-chromium-i686-vaapi-fpermissive.patch b/srcpkgs/qt6-webengine/patches/0103-chromium-i686-vaapi-fpermissive.patch
deleted file mode 100644
index 708d567a04dc..000000000000
--- a/srcpkgs/qt6-webengine/patches/0103-chromium-i686-vaapi-fpermissive.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/media/gpu/vaapi/BUILD.gn
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/gpu/vaapi/BUILD.gn
-@@ -14,6 +14,12 @@ import("//ui/gl/features.gni")
- assert(is_linux || is_chromeos)
- assert(use_vaapi)
- 
-+config("vaapi_permissive") {
-+  if (target_cpu == "x86") {
-+    cflags = [ "-fpermissive" ]
-+  }
-+}
-+
- generate_stubs("libva_stubs") {
-   extra_header = "va_stub_header.fragment"
-   sigs = [ "va.sigs" ]
-@@ -89,6 +95,7 @@ source_set("vaapi") {
-   configs += [
-     "//build/config/linux/libva",
-     "//third_party/libvpx:libvpx_config",
-+    ":vaapi_permissive",
-   ]
- 
-   deps = [
diff --git a/srcpkgs/qt6-webengine/patches/0104-chromium-libxml-unbundle.patch b/srcpkgs/qt6-webengine/patches/0104-chromium-libxml-unbundle.patch
deleted file mode 100644
index baca484abc4a..000000000000
--- a/srcpkgs/qt6-webengine/patches/0104-chromium-libxml-unbundle.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/build/linux/unbundle/libxml.gn
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/build/linux/unbundle/libxml.gn
-@@ -19,6 +19,7 @@ static_library("libxml_utils") {
-     ":xml_reader",
-     ":xml_writer",
-     "//base/test:test_support",
-+    "//services/data_decoder:lib",
-     "//services/data_decoder:xml_parser_fuzzer_deps",
-   ]
-   sources = [
diff --git a/srcpkgs/qt6-webengine/patches/0107-chromium-cross-build.patch b/srcpkgs/qt6-webengine/patches/0107-chromium-cross-build.patch
index 44954dfbb1e5..7fbfabcd79b7 100644
--- a/srcpkgs/qt6-webengine/patches/0107-chromium-cross-build.patch
+++ b/srcpkgs/qt6-webengine/patches/0107-chromium-cross-build.patch
@@ -11,10 +11,10 @@
    # Normally, Android builds are lightly optimized, even for debug builds, to
    # keep binary size down. Setting this flag to true disables such optimization
    android_full_debug = false
-@@ -970,8 +974,13 @@ config("compiler_cpu_abi") {
-       }
+@@ -1003,8 +1003,13 @@
      } else if (current_cpu == "arm64") {
-       if (is_clang && !is_android && !is_nacl && !is_fuchsia) {
+       if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
+           !(is_chromeos_lacros && is_chromeos_device)) {
 -        cflags += [ "--target=aarch64-linux-gnu" ]
 -        ldflags += [ "--target=aarch64-linux-gnu" ]
 +        if (is_musl) {
diff --git a/srcpkgs/qt6-webengine/patches/0108-chromium-cursed^Uscoped_file.patch b/srcpkgs/qt6-webengine/patches/0108-chromium-cursed^Uscoped_file.patch
deleted file mode 100644
index dd31da9790ad..000000000000
--- a/srcpkgs/qt6-webengine/patches/0108-chromium-cursed^Uscoped_file.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/base/files/scoped_file_linux.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/base/files/scoped_file_linux.cc
-@@ -77,15 +77,3 @@ bool IsFDOwned(int fd) {
- }
- 
- }  // namespace base
--
--extern "C" {
--
--int __close(int);
--
--__attribute__((visibility("default"), noinline)) int close(int fd) {
--  if (base::IsFDOwned(fd) && g_is_ownership_enforced)
--    CrashOnFdOwnershipViolation();
--  return __close(fd);
--}
--
--}  // extern "C"
diff --git a/srcpkgs/qt6-webengine/patches/0117-chromium-musl-resolver.patch b/srcpkgs/qt6-webengine/patches/0117-chromium-musl-resolver.patch
index 176524adc083..5f090c810579 100644
--- a/srcpkgs/qt6-webengine/patches/0117-chromium-musl-resolver.patch
+++ b/srcpkgs/qt6-webengine/patches/0117-chromium-musl-resolver.patch
@@ -27,17 +27,6 @@
  }
  
  bool ScopedResState::IsValid() const {
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/net/dns/host_resolver_manager.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/net/dns/host_resolver_manager.cc
-@@ -3158,7 +3158,7 @@ HostResolverManager::HostResolverManager
-   if (system_dns_config_notifier_)
-     system_dns_config_notifier_->AddObserver(this);
- #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_OPENBSD) && \
--    !BUILDFLAG(IS_ANDROID)
-+    !BUILDFLAG(IS_ANDROID) && !(BUILDFLAG(IS_LINUX) && !defined(__GLIBC__))
-   EnsureDnsReloaderInit();
- #endif
- 
 --- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/net/dns/dns_reloader.cc
 +++ qt6-webengine-6.4.2/src/3rdparty/chromium/net/dns/dns_reloader.cc
 @@ -7,7 +7,8 @@
@@ -50,8 +39,18 @@
  
  #include <resolv.h>
  
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/net/dns/host_resolver_proc.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/net/dns/host_resolver_proc.cc
+--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/net/dns/host_resolver_system_task.cc
++++ qt6-webengine-6.4.2/src/3rdparty/chromium/net/dns/host_resolver_system_task.cc
+@@ -310,8 +310,7 @@
+ }
+ 
+ void EnsureSystemHostResolverCallReady() {
+-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_OPENBSD) && \
+-    !BUILDFLAG(IS_ANDROID)
++#if defined(__GLIBC__)
+   EnsureDnsReloaderInit();
+ #elif BUILDFLAG(IS_WIN)
+   EnsureWinsockInit();
 @@ -192,7 +192,8 @@ int SystemHostResolverCall(const std::st
                                                  base::BlockingType::WILL_BLOCK);
  
diff --git a/srcpkgs/qt6-webengine/patches/0124-chromium-enable-i686.patch b/srcpkgs/qt6-webengine/patches/0124-chromium-enable-i686.patch
deleted file mode 100644
index 11d8de7c23f8..000000000000
--- a/srcpkgs/qt6-webengine/patches/0124-chromium-enable-i686.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/BUILD.gn
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/BUILD.gn
-@@ -1537,14 +1537,6 @@ if (!is_ios && !use_qt) {
-   }
- }
- 
--# TODO(cassew): Add more OS's that don't support x86.
--is_valid_x86_target =
--    target_os != "ios" && target_os != "mac" &&
--    (target_os != "linux" || use_libfuzzer || !build_with_chromium)
--assert(
--    is_valid_x86_target || target_cpu != "x86",
--    "'target_cpu=x86' is not supported for 'target_os=$target_os'. Consider omitting 'target_cpu' (default) or using 'target_cpu=x64' instead.")
--
- group("chromium_builder_perf") {
-   testonly = true
- 
diff --git a/srcpkgs/qt6-webengine/patches/0129-chromium-sandbox-shed_getparam.patch b/srcpkgs/qt6-webengine/patches/0129-chromium-sandbox-shed_getparam.patch
index 80d91c77e8ba..31f403bc10fe 100644
--- a/srcpkgs/qt6-webengine/patches/0129-chromium-sandbox-shed_getparam.patch
+++ b/srcpkgs/qt6-webengine/patches/0129-chromium-sandbox-shed_getparam.patch
@@ -1,20 +1,15 @@
 Allow SYS_sched_getparam and SYS_sched_getscheduler
 musl uses them for pthread_getschedparam()
 
-source: https://git.alpinelinux.org/aports/commit/community/chromium?id=54af9f8ac24f52d382c5758e2445bf0206eff40e
-
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
-@@ -97,10 +97,10 @@ ResultExpr RendererProcessPolicy::Evalua
+--- a/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
++++ b/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
+@@ -94,6 +94,9 @@
+     case __NR_pwrite64:
+     case __NR_sched_get_priority_max:
+     case __NR_sched_get_priority_min:
++    case __NR_sched_getparam:
++    case __NR_sched_getscheduler:
++    case __NR_sched_setscheduler:
      case __NR_sysinfo:
      case __NR_times:
      case __NR_uname:
--      return Allow();
--    case __NR_sched_getaffinity:
-     case __NR_sched_getparam:
-     case __NR_sched_getscheduler:
-+      return Allow();
-+    case __NR_sched_getaffinity:
-     case __NR_sched_setscheduler:
-       return RestrictSchedTarget(GetPolicyPid(), sysno);
-     case __NR_prlimit64:
diff --git a/srcpkgs/qt6-webengine/patches/0155-systypes.patch b/srcpkgs/qt6-webengine/patches/0155-systypes.patch
new file mode 100644
index 000000000000..f4e71e939cd1
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0155-systypes.patch
@@ -0,0 +1,11 @@
+--- a/src/3rdparty/chromium/base/third_party/symbolize/symbolize.h
++++ b/src/3rdparty/chromium/base/third_party/symbolize/symbolize.h
+@@ -58,6 +58,8 @@
+ #include "config.h"
+ #include "glog/logging.h"
+ 
++#include <sys/types.h>
++
+ #ifdef HAVE_SYMBOLIZE
+ 
+ #if defined(__ELF__)  // defined by gcc
diff --git a/srcpkgs/qt6-webengine/patches/0200-chromium-sndio.patch b/srcpkgs/qt6-webengine/patches/0200-chromium-sndio.patch
deleted file mode 100644
index d769b531497b..000000000000
--- a/srcpkgs/qt6-webengine/patches/0200-chromium-sndio.patch
+++ /dev/null
@@ -1,849 +0,0 @@
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/media/BUILD.gn
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/BUILD.gn
-@@ -78,6 +78,9 @@ config("media_config") {
-       defines += [ "DLOPEN_PULSEAUDIO" ]
-     }
-   }
-+  if (use_sndio) {
-+    defines += [ "USE_SNDIO" ]
-+  }
-   if (use_cras) {
-     defines += [ "USE_CRAS" ]
-   }
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/media/audio/BUILD.gn
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/BUILD.gn
-@@ -245,6 +245,17 @@ source_set("audio") {
-     sources += [ "linux/audio_manager_linux.cc" ]
-   }
- 
-+  if (use_sndio) {
-+    libs += [ "sndio" ]
-+    sources += [
-+      "sndio/audio_manager_sndio.cc",
-+      "sndio/sndio_input.cc",
-+      "sndio/sndio_input.h",
-+      "sndio/sndio_output.cc",
-+      "sndio/sndio_output.h"
-+    ]
-+  }
-+
-   if (use_alsa) {
-     libs += [ "asound" ]
-     sources += [
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/media/audio/linux/audio_manager_linux.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/linux/audio_manager_linux.cc
-@@ -25,6 +25,11 @@
- #include "media/audio/pulse/audio_manager_pulse.h"
- #include "media/audio/pulse/pulse_util.h"
- #endif
-+#if defined(USE_SNDIO)
-+#include "media/audio/sndio/audio_manager_sndio.h"
-+#include "media/audio/sndio/sndio_input.h"
-+#include "media/audio/sndio/sndio_output.h"
-+#endif
- 
- namespace media {
- 
---- /dev/null
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/sndio/audio_manager_sndio.cc
-@@ -0,0 +1,148 @@
-+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+#include "media/audio/sndio/audio_manager_sndio.h"
-+
-+#include "base/metrics/histogram_macros.h"
-+#include "base/memory/ptr_util.h"
-+#include "media/audio/audio_device_description.h"
-+#include "media/audio/audio_output_dispatcher.h"
-+#include "media/audio/sndio/sndio_input.h"
-+#include "media/audio/sndio/sndio_output.h"
-+#include "media/base/limits.h"
-+#include "media/base/media_switches.h"
-+
-+namespace media {
-+
-+
-+// Maximum number of output streams that can be open simultaneously.
-+static const int kMaxOutputStreams = 4;
-+
-+// Default sample rate for input and output streams.
-+static const int kDefaultSampleRate = 48000;
-+
-+void AddDefaultDevice(AudioDeviceNames* device_names) {
-+  DCHECK(device_names->empty());
-+  device_names->push_front(AudioDeviceName::CreateDefault());
-+}
-+
-+bool AudioManagerSndio::HasAudioOutputDevices() {
-+  return true;
-+}
-+
-+bool AudioManagerSndio::HasAudioInputDevices() {
-+  return true;
-+}
-+
-+void AudioManagerSndio::GetAudioInputDeviceNames(
-+    AudioDeviceNames* device_names) {
-+  DCHECK(device_names->empty());
-+  AddDefaultDevice(device_names);
-+}
-+
-+void AudioManagerSndio::GetAudioOutputDeviceNames(
-+    AudioDeviceNames* device_names) {
-+  AddDefaultDevice(device_names);
-+}
-+
-+const char* AudioManagerSndio::GetName() {
-+  return "SNDIO";
-+}
-+
-+AudioParameters AudioManagerSndio::GetInputStreamParameters(
-+    const std::string& device_id) {
-+  static const int kDefaultInputBufferSize = 1024;
-+
-+  int user_buffer_size = GetUserBufferSize();
-+  int buffer_size = user_buffer_size ?
-+      user_buffer_size : kDefaultInputBufferSize;
-+
-+  return AudioParameters(
-+      AudioParameters::AUDIO_PCM_LOW_LATENCY, CHANNEL_LAYOUT_STEREO,
-+      kDefaultSampleRate, buffer_size);
-+}
-+
-+AudioManagerSndio::AudioManagerSndio(std::unique_ptr<AudioThread> audio_thread,
-+                                         AudioLogFactory* audio_log_factory)
-+    : AudioManagerBase(std::move(audio_thread),
-+                       audio_log_factory) {
-+  DLOG(WARNING) << "AudioManagerSndio";
-+  SetMaxOutputStreamsAllowed(kMaxOutputStreams);
-+}
-+
-+AudioManagerSndio::~AudioManagerSndio() {
-+  Shutdown();
-+}
-+
-+AudioOutputStream* AudioManagerSndio::MakeLinearOutputStream(
-+    const AudioParameters& params,
-+    const LogCallback& log_callback) {
-+  DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format());
-+  return MakeOutputStream(params);
-+}
-+
-+AudioOutputStream* AudioManagerSndio::MakeLowLatencyOutputStream(
-+    const AudioParameters& params,
-+    const std::string& device_id,
-+    const LogCallback& log_callback) {
-+  DLOG_IF(ERROR, !device_id.empty()) << "Not implemented!";
-+  DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format());
-+  return MakeOutputStream(params);
-+}
-+
-+AudioInputStream* AudioManagerSndio::MakeLinearInputStream(
-+    const AudioParameters& params,
-+    const std::string& device_id,
-+    const LogCallback& log_callback) {
-+  DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format());
-+  return MakeInputStream(params);
-+}
-+
-+AudioInputStream* AudioManagerSndio::MakeLowLatencyInputStream(
-+    const AudioParameters& params,
-+    const std::string& device_id,
-+    const LogCallback& log_callback) {
-+  DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format());
-+  return MakeInputStream(params);
-+}
-+
-+AudioParameters AudioManagerSndio::GetPreferredOutputStreamParameters(
-+    const std::string& output_device_id,
-+    const AudioParameters& input_params) {
-+  // TODO(tommi): Support |output_device_id|.
-+  DLOG_IF(ERROR, !output_device_id.empty()) << "Not implemented!";
-+  static const int kDefaultOutputBufferSize = 2048;
-+
-+  ChannelLayout channel_layout = CHANNEL_LAYOUT_STEREO;
-+  int sample_rate = kDefaultSampleRate;
-+  int buffer_size = kDefaultOutputBufferSize;
-+  if (input_params.IsValid()) {
-+    sample_rate = input_params.sample_rate();
-+    channel_layout = input_params.channel_layout();
-+    buffer_size = std::min(buffer_size, input_params.frames_per_buffer());
-+  }
-+
-+  int user_buffer_size = GetUserBufferSize();
-+  if (user_buffer_size)
-+    buffer_size = user_buffer_size;
-+
-+  return AudioParameters(
-+      AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout,
-+      sample_rate, buffer_size);
-+}
-+
-+AudioInputStream* AudioManagerSndio::MakeInputStream(
-+    const AudioParameters& params) {
-+  DLOG(WARNING) << "MakeInputStream";
-+  return new SndioAudioInputStream(this,
-+             AudioDeviceDescription::kDefaultDeviceId, params);
-+}
-+
-+AudioOutputStream* AudioManagerSndio::MakeOutputStream(
-+    const AudioParameters& params) {
-+  DLOG(WARNING) << "MakeOutputStream";
-+  return new SndioAudioOutputStream(params, this);
-+}
-+
-+}  // namespace media
---- /dev/null
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/sndio/audio_manager_sndio.h
-@@ -0,0 +1,65 @@
-+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+#ifndef MEDIA_AUDIO_SNDIO_AUDIO_MANAGER_SNDIO_H_
-+#define MEDIA_AUDIO_SNDIO_AUDIO_MANAGER_SNDIO_H_
-+
-+#include <set>
-+
-+#include "base/compiler_specific.h"
-+#include "base/macros.h"
-+#include "base/memory/ref_counted.h"
-+#include "base/threading/thread.h"
-+#include "media/audio/audio_manager_base.h"
-+
-+namespace media {
-+
-+class MEDIA_EXPORT AudioManagerSndio : public AudioManagerBase {
-+ public:
-+  AudioManagerSndio(std::unique_ptr<AudioThread> audio_thread,
-+                   AudioLogFactory* audio_log_factory);
-+  ~AudioManagerSndio() override;
-+
-+  // Implementation of AudioManager.
-+  bool HasAudioOutputDevices() override;
-+  bool HasAudioInputDevices() override;
-+  void GetAudioInputDeviceNames(AudioDeviceNames* device_names) override;
-+  void GetAudioOutputDeviceNames(AudioDeviceNames* device_names) override;
-+  AudioParameters GetInputStreamParameters(
-+      const std::string& device_id) override;
-+  const char* GetName() override;
-+
-+  // Implementation of AudioManagerBase.
-+  AudioOutputStream* MakeLinearOutputStream(
-+      const AudioParameters& params,
-+      const LogCallback& log_callback) override;
-+  AudioOutputStream* MakeLowLatencyOutputStream(
-+      const AudioParameters& params,
-+      const std::string& device_id,
-+      const LogCallback& log_callback) override;
-+  AudioInputStream* MakeLinearInputStream(
-+      const AudioParameters& params,
-+      const std::string& device_id,
-+      const LogCallback& log_callback) override;
-+  AudioInputStream* MakeLowLatencyInputStream(
-+      const AudioParameters& params,
-+      const std::string& device_id,
-+      const LogCallback& log_callback) override;
-+
-+ protected:
-+  AudioParameters GetPreferredOutputStreamParameters(
-+      const std::string& output_device_id,
-+      const AudioParameters& input_params) override;
-+
-+ private:
-+  // Called by MakeLinearOutputStream and MakeLowLatencyOutputStream.
-+  AudioOutputStream* MakeOutputStream(const AudioParameters& params);
-+  AudioInputStream* MakeInputStream(const AudioParameters& params);
-+
-+  DISALLOW_COPY_AND_ASSIGN(AudioManagerSndio);
-+};
-+
-+}  // namespace media
-+
-+#endif  // MEDIA_AUDIO_SNDIO_AUDIO_MANAGER_SNDIO_H_
---- /dev/null
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/sndio/sndio_input.cc
-@@ -0,0 +1,200 @@
-+// Copyright 2013 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+#include "base/bind.h"
-+#include "base/logging.h"
-+#include "base/macros.h"
-+#include "media/base/audio_timestamp_helper.h"
-+#include "media/audio/sndio/audio_manager_sndio.h"
-+#include "media/audio/audio_manager.h"
-+#include "media/audio/sndio/sndio_input.h"
-+
-+namespace media {
-+
-+static const SampleFormat kSampleFormat = kSampleFormatS16;
-+
-+void SndioAudioInputStream::OnMoveCallback(void *arg, int delta)
-+{
-+  SndioAudioInputStream* self = static_cast<SndioAudioInputStream*>(arg);
-+
-+  self->hw_delay += delta;
-+}
-+
-+void *SndioAudioInputStream::ThreadEntry(void *arg) {
-+  SndioAudioInputStream* self = static_cast<SndioAudioInputStream*>(arg);
-+
-+  self->ThreadLoop();
-+  return NULL;
-+}
-+
-+SndioAudioInputStream::SndioAudioInputStream(AudioManagerBase* manager,
-+                                             const std::string& device_name,
-+                                             const AudioParameters& params)
-+    : manager(manager),
-+      params(params),
-+      audio_bus(AudioBus::Create(params)),
-+      state(kClosed) {
-+}
-+
-+SndioAudioInputStream::~SndioAudioInputStream() {
-+  if (state != kClosed)
-+    Close();
-+}
-+
-+bool SndioAudioInputStream::Open() {
-+  struct sio_par par;
-+  int sig;
-+
-+  if (state != kClosed)
-+    return false;
-+
-+  if (params.format() != AudioParameters::AUDIO_PCM_LINEAR &&
-+      params.format() != AudioParameters::AUDIO_PCM_LOW_LATENCY) {
-+    LOG(WARNING) << "Unsupported audio format.";
-+    return false;
-+  }
-+
-+  sio_initpar(&par);
-+  par.rate = params.sample_rate();
-+  par.rchan = params.channels();
-+  par.bits = SampleFormatToBitsPerChannel(kSampleFormat);
-+  par.bps = par.bits / 8;
-+  par.sig = sig = par.bits != 8 ? 1 : 0;
-+  par.le = SIO_LE_NATIVE;
-+  par.appbufsz = params.frames_per_buffer();
-+
-+  hdl = sio_open(SIO_DEVANY, SIO_REC, 0);
-+
-+  if (hdl == NULL) {
-+    LOG(ERROR) << "Couldn't open audio device.";
-+    return false;
-+  }
-+
-+  if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par)) {
-+    LOG(ERROR) << "Couldn't set audio parameters.";
-+    goto bad_close;
-+  }
-+
-+  if (par.rate  != (unsigned int)params.sample_rate() ||
-+      par.rchan != (unsigned int)params.channels() ||
-+      par.bits  != (unsigned int)SampleFormatToBitsPerChannel(kSampleFormat) ||
-+      par.sig   != (unsigned int)sig ||
-+      (par.bps > 1 && par.le != SIO_LE_NATIVE) ||
-+      (par.bits != par.bps * 8)) {
-+    LOG(ERROR) << "Unsupported audio parameters.";
-+    goto bad_close;
-+  }
-+  state = kStopped;
-+  buffer = new char[audio_bus->frames() * params.GetBytesPerFrame(kSampleFormat)];
-+  sio_onmove(hdl, &OnMoveCallback, this);
-+  return true;
-+bad_close:
-+  sio_close(hdl);
-+  return false;
-+}
-+
-+void SndioAudioInputStream::Start(AudioInputCallback* cb) {
-+
-+  StartAgc();
-+
-+  state = kRunning;
-+  hw_delay = 0;
-+  callback = cb;
-+  sio_start(hdl);
-+  if (pthread_create(&thread, NULL, &ThreadEntry, this) != 0) {
-+    LOG(ERROR) << "Failed to create real-time thread for recording.";
-+    sio_stop(hdl);
-+    state = kStopped;
-+  }
-+}
-+
-+void SndioAudioInputStream::Stop() {
-+
-+  if (state == kStopped)
-+    return;
-+
-+  state = kStopWait;
-+  pthread_join(thread, NULL);
-+  sio_stop(hdl);
-+  state = kStopped;
-+
-+  StopAgc();
-+}
-+
-+void SndioAudioInputStream::Close() {
-+
-+  if (state == kClosed)
-+    return;
-+
-+  if (state == kRunning)
-+    Stop();
-+
-+  state = kClosed;
-+  delete [] buffer;
-+  sio_close(hdl);
-+
-+  manager->ReleaseInputStream(this);
-+}
-+
-+double SndioAudioInputStream::GetMaxVolume() {
-+  // Not supported
-+  return 0.0;
-+}
-+
-+void SndioAudioInputStream::SetVolume(double volume) {
-+  // Not supported. Do nothing.
-+}
-+
-+double SndioAudioInputStream::GetVolume() {
-+  // Not supported.
-+  return 0.0;
-+}
-+
-+bool SndioAudioInputStream::IsMuted() {
-+  // Not supported.
-+  return false;
-+}
-+
-+void SndioAudioInputStream::SetOutputDeviceForAec(
-+    const std::string& output_device_id) {
-+  // Not supported.
-+}
-+
-+void SndioAudioInputStream::ThreadLoop(void) {
-+  size_t todo, n;
-+  char *data;
-+  unsigned int nframes;
-+  double normalized_volume = 0.0;
-+
-+  nframes = audio_bus->frames();
-+
-+  while (state == kRunning && !sio_eof(hdl)) {
-+
-+    GetAgcVolume(&normalized_volume);
-+
-+    // read one block
-+    todo = nframes * params.GetBytesPerFrame(kSampleFormat);
-+    data = buffer;
-+    while (todo > 0) {
-+      n = sio_read(hdl, data, todo);
-+      if (n == 0)
-+        return;	// unrecoverable I/O error
-+      todo -= n;
-+      data += n;
-+    }
-+    hw_delay -= nframes;
-+
-+    // convert frames count to TimeDelta
-+    const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay,
-+      params.sample_rate());
-+
-+    // push into bus
-+    audio_bus->FromInterleaved<SignedInt16SampleTypeTraits>(reinterpret_cast<int16_t*>(buffer), nframes);
-+
-+    // invoke callback
-+    callback->OnData(audio_bus.get(), base::TimeTicks::Now() - delay, 1.);
-+  }
-+}
-+
-+}  // namespace media
---- /dev/null
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/sndio/sndio_input.h
-@@ -0,0 +1,91 @@
-+// Copyright 2013 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+#ifndef MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_
-+#define MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_
-+
-+#include <stdint.h>
-+#include <string>
-+#include <sndio.h>
-+
-+#include "base/compiler_specific.h"
-+#include "base/macros.h"
-+#include "base/memory/weak_ptr.h"
-+#include "base/time/time.h"
-+#include "media/audio/agc_audio_stream.h"
-+#include "media/audio/audio_io.h"
-+#include "media/audio/audio_device_description.h"
-+#include "media/base/audio_parameters.h"
-+
-+namespace media {
-+
-+class AudioManagerBase;
-+
-+// Implementation of AudioOutputStream using sndio(7)
-+class SndioAudioInputStream : public AgcAudioStream<AudioInputStream> {
-+ public:
-+  // Pass this to the constructor if you want to attempt auto-selection
-+  // of the audio recording device.
-+  static const char kAutoSelectDevice[];
-+
-+  // Create a PCM Output stream for the SNDIO device identified by
-+  // |device_name|. If unsure of what to use for |device_name|, use
-+  // |kAutoSelectDevice|.
-+  SndioAudioInputStream(AudioManagerBase* audio_manager,
-+                     const std::string& device_name,
-+                     const AudioParameters& params);
-+
-+  ~SndioAudioInputStream() override;
-+
-+  // Implementation of AudioInputStream.
-+  bool Open() override;
-+  void Start(AudioInputCallback* callback) override;
-+  void Stop() override;
-+  void Close() override;
-+  double GetMaxVolume() override;
-+  void SetVolume(double volume) override;
-+  double GetVolume() override;
-+  bool IsMuted() override;
-+  void SetOutputDeviceForAec(const std::string& output_device_id) override;
-+
-+ private:
-+
-+  enum StreamState {
-+    kClosed,            // Not opened yet
-+    kStopped,           // Device opened, but not started yet
-+    kRunning,           // Started, device playing
-+    kStopWait           // Stopping, waiting for the real-time thread to exit
-+  };
-+
-+  // C-style call-backs
-+  static void OnMoveCallback(void *arg, int delta);
-+  static void* ThreadEntry(void *arg);
-+
-+  // Continuously moves data from the device to the consumer
-+  void ThreadLoop();
-+  // Our creator, the audio manager needs to be notified when we close.
-+  AudioManagerBase* manager;
-+  // Parameters of the source
-+  AudioParameters params;
-+  // We store data here for consumer
-+  std::unique_ptr<AudioBus> audio_bus;
-+  // Call-back that consumes recorded data
-+  AudioInputCallback* callback;  // Valid during a recording session.
-+  // Handle of the audio device
-+  struct sio_hdl* hdl;
-+  // Current state of the stream
-+  enum StreamState state;
-+  // High priority thread running ThreadLoop()
-+  pthread_t thread;
-+  // Number of frames buffered in the hardware
-+  int hw_delay;
-+  // Temporary buffer where data is stored sndio-compatible format
-+  char* buffer;
-+
-+  DISALLOW_COPY_AND_ASSIGN(SndioAudioInputStream);
-+};
-+
-+}  // namespace media
-+
-+#endif  // MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_
---- /dev/null
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/sndio/sndio_output.cc
-@@ -0,0 +1,183 @@
-+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+#include "base/logging.h"
-+#include "base/time/time.h"
-+#include "base/time/default_tick_clock.h"
-+#include "media/audio/audio_manager_base.h"
-+#include "media/base/audio_timestamp_helper.h"
-+#include "media/audio/sndio/sndio_output.h"
-+
-+namespace media {
-+
-+static const SampleFormat kSampleFormat = kSampleFormatS16;
-+
-+void SndioAudioOutputStream::OnMoveCallback(void *arg, int delta) {
-+  SndioAudioOutputStream* self = static_cast<SndioAudioOutputStream*>(arg);
-+
-+  self->hw_delay -= delta;
-+}
-+
-+void SndioAudioOutputStream::OnVolCallback(void *arg, unsigned int vol) {
-+  SndioAudioOutputStream* self = static_cast<SndioAudioOutputStream*>(arg);
-+
-+  self->vol = vol;
-+}
-+
-+void *SndioAudioOutputStream::ThreadEntry(void *arg) {
-+  SndioAudioOutputStream* self = static_cast<SndioAudioOutputStream*>(arg);
-+
-+  self->ThreadLoop();
-+  return NULL;
-+}
-+
-+SndioAudioOutputStream::SndioAudioOutputStream(const AudioParameters& params,
-+                                               AudioManagerBase* manager)
-+    : manager(manager),
-+      params(params),
-+      audio_bus(AudioBus::Create(params)),
-+      state(kClosed),
-+      mutex(PTHREAD_MUTEX_INITIALIZER) {
-+}
-+
-+SndioAudioOutputStream::~SndioAudioOutputStream() {
-+  if (state != kClosed)
-+    Close();
-+}
-+
-+bool SndioAudioOutputStream::Open() {
-+  struct sio_par par;
-+  int sig;
-+
-+  if (params.format() != AudioParameters::AUDIO_PCM_LINEAR &&
-+      params.format() != AudioParameters::AUDIO_PCM_LOW_LATENCY) {
-+    LOG(WARNING) << "Unsupported audio format.";
-+    return false;
-+  }
-+  sio_initpar(&par);
-+  par.rate = params.sample_rate();
-+  par.pchan = params.channels();
-+  par.bits = SampleFormatToBitsPerChannel(kSampleFormat);
-+  par.bps = par.bits / 8;
-+  par.sig = sig = par.bits != 8 ? 1 : 0;
-+  par.le = SIO_LE_NATIVE;
-+  par.appbufsz = params.frames_per_buffer();
-+
-+  hdl = sio_open(SIO_DEVANY, SIO_PLAY, 0);
-+  if (hdl == NULL) {
-+    LOG(ERROR) << "Couldn't open audio device.";
-+    return false;
-+  }
-+  if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par)) {
-+    LOG(ERROR) << "Couldn't set audio parameters.";
-+    goto bad_close;
-+  }
-+  if (par.rate  != (unsigned int)params.sample_rate() ||
-+      par.pchan != (unsigned int)params.channels() ||
-+      par.bits  != (unsigned int)SampleFormatToBitsPerChannel(kSampleFormat) ||
-+      par.sig   != (unsigned int)sig ||
-+      (par.bps > 1 && par.le != SIO_LE_NATIVE) ||
-+      (par.bits != par.bps * 8)) {
-+    LOG(ERROR) << "Unsupported audio parameters.";
-+    goto bad_close;
-+  }
-+  state = kStopped;
-+  volpending = 0;
-+  vol = 0;
-+  buffer = new char[audio_bus->frames() * params.GetBytesPerFrame(kSampleFormat)];
-+  sio_onmove(hdl, &OnMoveCallback, this);
-+  sio_onvol(hdl, &OnVolCallback, this);
-+  return true;
-+ bad_close:
-+  sio_close(hdl);
-+  return false;
-+}
-+
-+void SndioAudioOutputStream::Close() {
-+  if (state == kClosed)
-+    return;
-+  if (state == kRunning)
-+    Stop();
-+  state = kClosed;
-+  delete [] buffer;
-+  sio_close(hdl);
-+  manager->ReleaseOutputStream(this);  // Calls the destructor
-+}
-+
-+void SndioAudioOutputStream::Start(AudioSourceCallback* callback) {
-+  state = kRunning;
-+  hw_delay = 0;
-+  source = callback;
-+  sio_start(hdl);
-+  if (pthread_create(&thread, NULL, &ThreadEntry, this) != 0) {
-+    LOG(ERROR) << "Failed to create real-time thread.";
-+    sio_stop(hdl);
-+    state = kStopped;
-+  }
-+}
-+
-+void SndioAudioOutputStream::Stop() {
-+  if (state == kStopped)
-+    return;
-+  state = kStopWait;
-+  pthread_join(thread, NULL);
-+  sio_stop(hdl);
-+  state = kStopped;
-+}
-+
-+void SndioAudioOutputStream::SetVolume(double v) {
-+  pthread_mutex_lock(&mutex);
-+  vol = v * SIO_MAXVOL;
-+  volpending = 1;
-+  pthread_mutex_unlock(&mutex);
-+}
-+
-+void SndioAudioOutputStream::GetVolume(double* v) {
-+  pthread_mutex_lock(&mutex);
-+  *v = vol * (1. / SIO_MAXVOL);
-+  pthread_mutex_unlock(&mutex);
-+}
-+
-+// This stream is always used with sub second buffer sizes, where it's
-+// sufficient to simply always flush upon Start().
-+void SndioAudioOutputStream::Flush() {}
-+
-+void SndioAudioOutputStream::ThreadLoop(void) {
-+  int avail, count, result;
-+
-+  while (state == kRunning) {
-+    // Update volume if needed
-+    pthread_mutex_lock(&mutex);
-+    if (volpending) {
-+      volpending = 0;
-+      sio_setvol(hdl, vol);
-+    }
-+    pthread_mutex_unlock(&mutex);
-+
-+    // Get data to play
-+    const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay,
-+	params.sample_rate());
-+    count = source->OnMoreData(delay, base::TimeTicks::Now(), 0, audio_bus.get());
-+    audio_bus->ToInterleaved<SignedInt16SampleTypeTraits>(count, reinterpret_cast<int16_t*>(buffer));
-+    if (count == 0) {
-+      // We have to submit something to the device
-+      count = audio_bus->frames();
-+      memset(buffer, 0, count * params.GetBytesPerFrame(kSampleFormat));
-+      LOG(WARNING) << "No data to play, running empty cycle.";
-+    }
-+
-+    // Submit data to the device
-+    avail = count * params.GetBytesPerFrame(kSampleFormat);
-+    result = sio_write(hdl, buffer, avail);
-+    if (result == 0) {
-+      LOG(WARNING) << "Audio device disconnected.";
-+      break;
-+    }
-+
-+    // Update hardware pointer
-+    hw_delay += count;
-+  }
-+}
-+
-+}  // namespace media
---- /dev/null
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/sndio/sndio_output.h
-@@ -0,0 +1,86 @@
-+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+#ifndef MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_
-+#define MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_
-+
-+#include <pthread.h>
-+#include <sndio.h>
-+
-+#include "base/time/tick_clock.h"
-+#include "base/time/time.h"
-+#include "media/audio/audio_io.h"
-+
-+namespace media {
-+
-+class AudioManagerBase;
-+
-+// Implementation of AudioOutputStream using sndio(7)
-+class SndioAudioOutputStream : public AudioOutputStream {
-+ public:
-+  // The manager is creating this object
-+  SndioAudioOutputStream(const AudioParameters& params,
-+                         AudioManagerBase* manager);
-+  virtual ~SndioAudioOutputStream();
-+
-+  // Implementation of AudioOutputStream.
-+  bool Open() override;
-+  void Close() override;
-+  void Start(AudioSourceCallback* callback) override;
-+  void Stop() override;
-+  void SetVolume(double volume) override;
-+  void GetVolume(double* volume) override;
-+  void Flush() override;
-+
-+  friend void sndio_onmove(void *arg, int delta);
-+  friend void sndio_onvol(void *arg, unsigned int vol);
-+  friend void *sndio_threadstart(void *arg);
-+
-+ private:
-+  enum StreamState {
-+    kClosed,            // Not opened yet
-+    kStopped,           // Device opened, but not started yet
-+    kRunning,           // Started, device playing
-+    kStopWait           // Stopping, waiting for the real-time thread to exit
-+  };
-+
-+  // C-style call-backs
-+  static void OnMoveCallback(void *arg, int delta);
-+  static void OnVolCallback(void *arg, unsigned int vol);
-+  static void* ThreadEntry(void *arg);
-+
-+  // Continuously moves data from the producer to the device
-+  void ThreadLoop(void);
-+
-+  // Our creator, the audio manager needs to be notified when we close.
-+  AudioManagerBase* manager;
-+  // Parameters of the source
-+  AudioParameters params;
-+  // Source stores data here
-+  std::unique_ptr<AudioBus> audio_bus;
-+  // Call-back that produces data to play
-+  AudioSourceCallback* source;
-+  // Handle of the audio device
-+  struct sio_hdl* hdl;
-+  // Current state of the stream
-+  enum StreamState state;
-+  // High priority thread running ThreadLoop()
-+  pthread_t thread;
-+  // Protects vol, volpending and hw_delay
-+  pthread_mutex_t mutex;
-+  // Current volume in the 0..SIO_MAXVOL range
-+  int vol;
-+  // Set to 1 if volumes must be refreshed in the realtime thread
-+  int volpending;
-+  // Number of frames buffered in the hardware
-+  int hw_delay;
-+  // Temporary buffer where data is stored sndio-compatible format
-+  char* buffer;
-+
-+  DISALLOW_COPY_AND_ASSIGN(SndioAudioOutputStream);
-+};
-+
-+}  // namespace media
-+
-+#endif  // MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/media/media_options.gni
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/media_options.gni
-@@ -133,6 +133,9 @@ declare_args() {
-   # Enables runtime selection of ALSA library for audio.
-   use_alsa = false
- 
-+  # Enable runtime selection of sndio(7)
-+  use_sndio = false
-+
-   # Alsa should be used on non-Android, non-Mac POSIX systems.
-   # Alsa should be used on desktop Chromecast and audio-only Chromecast builds.
-   if (is_posix && !is_android && !is_mac &&
diff --git a/srcpkgs/qt6-webengine/patches/0300-chromium-musl-hacks.patch b/srcpkgs/qt6-webengine/patches/0300-chromium-musl-hacks.patch
index 525aeb8a63d2..e0b91a09a84f 100644
--- a/srcpkgs/qt6-webengine/patches/0300-chromium-musl-hacks.patch
+++ b/srcpkgs/qt6-webengine/patches/0300-chromium-musl-hacks.patch
@@ -36,17 +36,3 @@
    s.OutputToStream(&os);
  #else
    os << "StackTrace::OutputToStream not implemented.";
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/net/socket/udp_socket_posix.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/net/socket/udp_socket_posix.cc
-@@ -1157,7 +1157,11 @@ SendResult UDPSocketPosixSender::Interna
-     msg_iov->push_back({const_cast<char*>(buffer->data()), buffer->length()});
-   msgvec->reserve(buffers.size());
-   for (size_t j = 0; j < buffers.size(); j++)
-+#ifdef __GLIBC__
-     msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, nullptr, 0, 0}, 0});
-+#else
-+    msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, 0, 0, 0}, 0});
-+#endif
-   int result = HANDLE_EINTR(Sendmmsg(fd, &msgvec[0], buffers.size(), 0));
-   SendResult send_result(0, 0, std::move(buffers));
-   if (result < 0) {
diff --git a/srcpkgs/qt6-webengine/patches/0301-chromium-musl-sandbox.patch b/srcpkgs/qt6-webengine/patches/0301-chromium-musl-sandbox.patch
deleted file mode 100644
index 4afbec5b98ef..000000000000
--- a/srcpkgs/qt6-webengine/patches/0301-chromium-musl-sandbox.patch
+++ /dev/null
@@ -1,86 +0,0 @@
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
-@@ -134,6 +134,7 @@ namespace sandbox {
- ResultExpr RestrictCloneToThreadsAndEPERMFork() {
-   const Arg<unsigned long> flags(0);
- 
-+#ifdef __GLIBC__
-   // TODO(mdempsky): Extend DSL to support (flags & ~mask1) == mask2.
-   const uint64_t kAndroidCloneMask = CLONE_VM | CLONE_FS | CLONE_FILES |
-                                      CLONE_SIGHAND | CLONE_THREAD |
-@@ -160,6 +161,16 @@ ResultExpr RestrictCloneToThreadsAndEPER
-   return If(IsAndroid() ? android_test : glibc_test, Allow())
-       .ElseIf(is_fork_or_clone_vfork, Error(EPERM))
-       .Else(CrashSIGSYSClone());
-+#else
-+  const int required = CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND |
-+                       CLONE_THREAD | CLONE_SYSVSEM;
-+  const int safe = CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID |
-+                   CLONE_DETACHED;
-+  const BoolExpr thread_clone_ok = (flags&~safe)==required;
-+  return If(thread_clone_ok, Allow())
-+      .ElseIf((flags & (CLONE_VM | CLONE_THREAD)) == 0, Error(EPERM))
-+      .Else(CrashSIGSYSClone());
-+#endif
- }
- 
- #ifndef PR_PAC_RESET_KEYS
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
-@@ -424,6 +424,9 @@ bool SyscallSets::IsAllowedProcessStartO
- #if defined(__i386__)
-     case __NR_waitpid:
- #endif
-+#if !defined(__GLIBC__)
-+    case __NR_set_tid_address:
-+#endif
-       return true;
-     case __NR_clone:  // Should be parameter-restricted.
-     case __NR_setns:  // Privileged.
-@@ -436,7 +439,9 @@ bool SyscallSets::IsAllowedProcessStartO
- #if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
-     case __NR_set_thread_area:
- #endif
-+#if defined(__GLIBC__)
-     case __NR_set_tid_address:
-+#endif
-     case __NR_unshare:
- #if !defined(__mips__) && !defined(__aarch64__)
-     case __NR_vfork:
-@@ -550,6 +555,9 @@ bool SyscallSets::IsAllowedAddressSpaceA
-     case __NR_mlock:
-     case __NR_munlock:
-     case __NR_munmap:
-+#ifndef __GLIBC__
-+    case __NR_mremap:
-+#endif
-       return true;
-     case __NR_madvise:
-     case __NR_mincore:
-@@ -567,7 +575,9 @@ bool SyscallSets::IsAllowedAddressSpaceA
-     case __NR_modify_ldt:
- #endif
-     case __NR_mprotect:
-+#ifdef __GLIBC__
-     case __NR_mremap:
-+#endif
-     case __NR_msync:
-     case __NR_munlockall:
-     case __NR_readahead:
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
-@@ -99,9 +99,14 @@ ResultExpr RendererProcessPolicy::Evalua
-     case __NR_uname:
-     case __NR_sched_getparam:
-     case __NR_sched_getscheduler:
-+#ifndef __GLIBC__
-+    case __NR_sched_setscheduler:
-+#endif
-       return Allow();
-     case __NR_sched_getaffinity:
-+#ifdef __GLIBC__
-     case __NR_sched_setscheduler:
-+#endif
-       return RestrictSchedTarget(GetPolicyPid(), sysno);
-     case __NR_prlimit64:
-       // See crbug.com/662450 and setrlimit comment above.
diff --git a/srcpkgs/qt6-webengine/patches/0302-chromium-no-mallinfo.patch b/srcpkgs/qt6-webengine/patches/0302-chromium-no-mallinfo.patch
index 519930e7bef0..13b9c2c3164f 100644
--- a/srcpkgs/qt6-webengine/patches/0302-chromium-no-mallinfo.patch
+++ b/srcpkgs/qt6-webengine/patches/0302-chromium-no-mallinfo.patch
@@ -35,17 +35,23 @@
  #endif
 --- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc
 +++ qt6-webengine-6.4.2/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc
-@@ -174,7 +174,8 @@ void ReportAppleAllocStats(size_t* total
+@@ -185,7 +185,6 @@
+ #define MALLINFO2_FOUND_IN_LIBC
+   struct mallinfo2 info = mallinfo2();
+ #endif
+-#endif  // defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ #if !defined(MALLINFO2_FOUND_IN_LIBC)
+   struct mallinfo info = mallinfo();
+ #endif
+@@ -205,6 +204,7 @@
+     sys_alloc_dump->AddScalar(MemoryAllocatorDump::kNameSize,
+                               MemoryAllocatorDump::kUnitsBytes, info.uordblks);
+   }
++#endif  // defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ }
+ #endif
  
- #if (BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(IS_ANDROID)) || \
-     (!BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && !BUILDFLAG(IS_WIN) &&    \
--     !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_FUCHSIA))
-+     !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_FUCHSIA) && \
-+     !(BUILDFLAG(IS_LINUX) && !defined(__GLIBC__)))
- void ReportMallinfoStats(ProcessMemoryDump* pmd,
-                          size_t* total_virtual_size,
-                          size_t* resident_size,
-@@ -339,7 +340,7 @@ bool MallocDumpProvider::OnMemoryDump(co
+@@ -339,7 +340,7 @@
                       &allocated_objects_count);
  #elif BUILDFLAG(IS_FUCHSIA)
  // TODO(fuchsia): Port, see https://crbug.com/706592.
@@ -54,14 +60,3 @@
    ReportMallinfoStats(/*pmd=*/nullptr, &total_virtual_size, &resident_size,
                        &allocated_objects_size, &allocated_objects_count);
  #endif
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/tflite/src/tensorflow/lite/profiling/memory_info.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/tflite/src/tensorflow/lite/profiling/memory_info.cc
-@@ -35,7 +35,7 @@ bool MemoryUsage::IsSupported() {
- 
- MemoryUsage GetMemoryUsage() {
-   MemoryUsage result;
--#ifdef __linux__
-+#if defined(__linux__) && defined(__GLIBC__)
-   rusage res;
-   if (getrusage(RUSAGE_SELF, &res) == 0) {
-     result.max_rss_kb = res.ru_maxrss;
diff --git a/srcpkgs/qt6-webengine/template b/srcpkgs/qt6-webengine/template
index 96846feaee83..4e22cb6e8863 100644
--- a/srcpkgs/qt6-webengine/template
+++ b/srcpkgs/qt6-webengine/template
@@ -1,7 +1,7 @@
 # Template file for 'qt6-webengine'
 pkgname=qt6-webengine
-version=6.4.2
-revision=2
+version=6.5.0
+revision=1
 build_style=cmake
 configure_args="
  -DQT_FEATURE_webengine_system_ffmpeg=ON
@@ -32,7 +32,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only, GPL-2.0-only, LGPL-3.0-only, BSD-3-Clause"
 homepage="https://www.qt.io"
 distfiles="https://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtwebengine-everywhere-src-${version}.tar.xz"
-checksum=ffa945518d1cc8d9ee73523e8d9c2090844f5a2d9c7eac05c4ad079472a119c9
+checksum=2a10da34a71b307e9ff11ec086455dd20b83d5b0ee6bda499c4ba9221e306f07
 
 if [ "$XBPS_LIBC" = "musl" ]; then
 	hostmakedepends+=" musl-legacy-compat"
@@ -164,7 +164,7 @@ qt6-webengine-devel_package() {
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }
 

From 101b30c023b253b8dd30117db297d749f4f6c4ca Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:36 +0200
Subject: [PATCH 03/26] qt6-webchannel: update to 6.5.0.

---
 srcpkgs/qt6-webchannel/patches/no-cmake-test.patch | 7 -------
 srcpkgs/qt6-webchannel/template                    | 8 ++++----
 2 files changed, 4 insertions(+), 11 deletions(-)
 delete mode 100644 srcpkgs/qt6-webchannel/patches/no-cmake-test.patch

diff --git a/srcpkgs/qt6-webchannel/patches/no-cmake-test.patch b/srcpkgs/qt6-webchannel/patches/no-cmake-test.patch
deleted file mode 100644
index c02028772a2d..000000000000
--- a/srcpkgs/qt6-webchannel/patches/no-cmake-test.patch
+++ /dev/null
@@ -1,7 +0,0 @@
---- a/tests/auto/CMakeLists.txt
-+++ b/tests/auto/CMakeLists.txt
-@@ -1,4 +1,3 @@
--add_subdirectory(cmake)
- add_subdirectory(webchannel)
- if(TARGET Qt::Quick)
-     add_subdirectory(qml)
diff --git a/srcpkgs/qt6-webchannel/template b/srcpkgs/qt6-webchannel/template
index 8f4b58cab240..9c3def385a7b 100644
--- a/srcpkgs/qt6-webchannel/template
+++ b/srcpkgs/qt6-webchannel/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-webchannel'
 pkgname=qt6-webchannel
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtwebchannel-everywhere-src-${version}.tar.xz"
-checksum=06657b2b2509f26c733b7c40da0dbb8571a215b97f99685a6fc3bc51dcbebd87
+checksum=d9553d646df3681b8e09c7609bf7eda0cde69b562f180fa50451a987ed00f1bf
 
 pre_check() {
 	export QML2_IMPORT_PATH="$wrksrc/build/lib/qt6/qml"
@@ -27,13 +27,13 @@ qt6-webchannel-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove usr/lib/qt6/qml/QtWebChannel/plugins.qmltypes
 		vmove usr/lib/qt6/qml/QtWebChannel/qmldir
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 239d1168186b9ea8b3903aa62758a433f2397589 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:35 +0200
Subject: [PATCH 04/26] qt6-wayland: update to 6.5.0.

---
 srcpkgs/qt6-wayland/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-wayland/template b/srcpkgs/qt6-wayland/template
index 3b45f98bc7ce..da0c31b4acd5 100644
--- a/srcpkgs/qt6-wayland/template
+++ b/srcpkgs/qt6-wayland/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-wayland'
 pkgname=qt6-wayland
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="qt6-base perl pkg-config wayland-devel qt6-declarative-host-tools"
@@ -14,7 +14,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only with Qt-GPL-exception-1.0, LGPL-3.0-only, GPL-2.0-or-later"
 homepage="https://www.qt.io"
 distfiles="https://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtwayland-everywhere-src-${version}.tar.xz"
-checksum=24cf1a0af751ab1637b4815d5c5f3704483d5fa7bedbd3519e6fc020d8be135f
+checksum=ccc57fa277fc5f1c1c2c4733eae80a60996b67a067233c47809e542aa31759a3
 
 subpackages="qt6-wayland-tools qt6-wayland-devel"
 
@@ -43,11 +43,11 @@ qt6-wayland-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 3610059ae8080661b6cd1b51a2944b283dcb1974 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:34 +0200
Subject: [PATCH 05/26] qt6-virtualkeyboard: update to 6.5.0.

---
 srcpkgs/qt6-virtualkeyboard/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-virtualkeyboard/template b/srcpkgs/qt6-virtualkeyboard/template
index 3de6238c411f..cf7b6f2ec830 100644
--- a/srcpkgs/qt6-virtualkeyboard/template
+++ b/srcpkgs/qt6-virtualkeyboard/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-virtualkeyboard'
 pkgname=qt6-virtualkeyboard
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl pkg-config qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtvirtualkeyboard-everywhere-src-${version}.tar.xz"
-checksum=9c3c830f6e17896efaca5fdc7c191088eedd70b07490b38835856579346a4f28
+checksum=7b45de78240817e9f4b57af821e4781655463a4f5f396bbc5df0580a7d2a0fa7
 
 if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args="-DQT_BUILD_TESTS=ON"
@@ -34,11 +34,11 @@ qt6-virtualkeyboard-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From f145cc34c5d5caf3a070f83972340b60be2fb912 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:32 +0200
Subject: [PATCH 06/26] qt6-translations: update to 6.5.0.

---
 srcpkgs/qt6-translations/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/qt6-translations/template b/srcpkgs/qt6-translations/template
index 5669ab56dc20..866f504f3b9d 100644
--- a/srcpkgs/qt6-translations/template
+++ b/srcpkgs/qt6-translations/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-translations'
 pkgname=qt6-translations
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="qt6-base qt6-tools perl"
@@ -10,4 +10,4 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qttranslations-everywhere-src-${version}.tar.xz"
-checksum=bbe0291502c2604b72fef730e1935bd22f8b921d8c473250f298a723b2a9c496
+checksum=fc85d0fd8393f518653ccada1014177a56df6e73f30f3b64eea0c2e4a0067a3d

From c0ce5868370b9753729d1472fdc2576fc02e4a56 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:31 +0200
Subject: [PATCH 07/26] qt6-tools: update to 6.5.0.

---
 srcpkgs/qt6-tools/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/qt6-tools/template b/srcpkgs/qt6-tools/template
index d5ad1618e3a7..c0ec27cf612c 100644
--- a/srcpkgs/qt6-tools/template
+++ b/srcpkgs/qt6-tools/template
@@ -1,7 +1,7 @@
 # Template file for 'qt6-tools'
 pkgname=qt6-tools
-version=6.4.2
-revision=2
+version=6.5.0
+revision=1
 build_style=cmake
 configure_args="-DEXTERNAL_GUMBO=ON -DLITEHTML_UTF8=ON -DUSE_ICU=ON
  -DQT_BUILD_SHARED_LIBS=ON -DQT_FEATURE_assistant=ON
@@ -16,7 +16,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only with Qt-GPL-exception-1.0, LGPL-3.0-only, GPL-2.0-or-later"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qttools-everywhere-src-${version}.tar.xz"
-checksum=a31387916184e4a5ef522d3ea841e8e931cc0f88be0824a7a354a572d5826c68
+checksum=49c33d96b0a44988be954269b8ce3d1a495b439726e03a6be7c0d50a686369c4
 
 if [ "$CROSS_BUILD" ]; then
 	configure_args+=" -DQT_FORCE_BUILD_TOOLS=TRUE"

From c93a8329192694ce6238106d381c1b609df1c13e Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:29 +0200
Subject: [PATCH 08/26] qt6-svg: update to 6.5.0.

---
 srcpkgs/qt6-svg/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-svg/template b/srcpkgs/qt6-svg/template
index 06c1fcc306c9..aba275a34c86 100644
--- a/srcpkgs/qt6-svg/template
+++ b/srcpkgs/qt6-svg/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-svg'
 pkgname=qt6-svg
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="qt6-base perl"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only with Qt-GPL-exception-1.0, GPL-2.0-or-later, LGPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtsvg-everywhere-src-${version}.tar.xz"
-checksum=b746af3cb1793621d8ed7eae38d9ad5a15541dc2742031069f2ae3fe87590314
+checksum=64ca7e61f44d51e28bcbb4e0509299b53a9a7e38879e00a7fe91643196067a4f
 
 if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args="-DQT_BUILD_TESTS=ON"
@@ -31,11 +31,11 @@ qt6-svg-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 1b5c6f2d7c179fd8256dd383b9e1e0530b5d7c13 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:28 +0200
Subject: [PATCH 09/26] qt6-shadertools: update to 6.5.0.

---
 srcpkgs/qt6-shadertools/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-shadertools/template b/srcpkgs/qt6-shadertools/template
index fbb2fba7181f..b11b281680ad 100644
--- a/srcpkgs/qt6-shadertools/template
+++ b/srcpkgs/qt6-shadertools/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-shadertools'
 pkgname=qt6-shadertools
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base"
@@ -11,7 +11,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtshadertools-everywhere-src-${version}.tar.xz"
-checksum=fa65bff84d4e9c2cb4cbf6fb098207e0e23d863dbe675eb277034a29c226a217
+checksum=86618d037f3071f1f7ac5eb7ab76ae4e6f51cfddded0a402bb9aa7f3f79f5775
 
 if [ "$CROSS_BUILD" ]; then
 	configure_args="-DQT_FORCE_BUILD_TOOLS=true"
@@ -31,12 +31,12 @@ qt6-shadertools-devel_package() {
 	pkg_install() {
 		local _f
 		vmove usr/include
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 		for _f in ${DESTDIR}/usr/lib/cmake/*; do
 			case "$_f" in
 			*ToolsTools) ;;

From f85d8ec75adeca479fdf938719db0597e7dc940b Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:27 +0200
Subject: [PATCH 10/26] qt6-serialport: update to 6.5.0.

---
 srcpkgs/qt6-serialport/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-serialport/template b/srcpkgs/qt6-serialport/template
index c100f9686fcf..77166598d01f 100644
--- a/srcpkgs/qt6-serialport/template
+++ b/srcpkgs/qt6-serialport/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-serialport'
 pkgname=qt6-serialport
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base pkg-config"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtserialport-everywhere-src-${version}.tar.xz"
-checksum=336d95919037800184b3c3de8ccb6f62954b20f3756c05adce8d5010504340fa
+checksum=9209a9f5978a4adf3a150582270432fe3b635d05513ad1a57bff5ca4954a4dff
 
 qt6-serialport-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision} qt6-base-devel>=${version}_1"
@@ -18,11 +18,11 @@ qt6-serialport-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 6053e7d15c2f9e8fb63650a7b69d7918904d9aa0 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:26 +0200
Subject: [PATCH 11/26] qt6-sensors: update to 6.5.0.

---
 srcpkgs/qt6-sensors/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/qt6-sensors/template b/srcpkgs/qt6-sensors/template
index 1dd0d0f3df13..5e6a1e2a7776 100644
--- a/srcpkgs/qt6-sensors/template
+++ b/srcpkgs/qt6-sensors/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-sensors'
 pkgname=qt6-sensors
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-declarative-host-tools pkg-config"
@@ -10,7 +10,7 @@ maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtsensors-everywhere-src-${version}.tar.xz"
-checksum=455619ff28a39f4caba49c9e1952fbcfafc8ffc893b437d653d5465a077ee656
+checksum=5ee434e2f4917c2d2e9b1de6cb1347c644a8c92338284efeb96202a557e72ea6
 
 post_install() {
 	rm -rf ${DESTDIR}/usr/tests
@@ -23,7 +23,7 @@ qt6-sensors-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove usr/lib/qt6/qml/QtSensors/plugins.qmltypes

From 4e9f7c879d70cc2094a3b99ec79e912ff24d20ae Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:24 +0200
Subject: [PATCH 12/26] qt6-scxml: update to 6.5.0.

---
 srcpkgs/qt6-scxml/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-scxml/template b/srcpkgs/qt6-scxml/template
index 0e53ba7cf506..8f81d750b1b1 100644
--- a/srcpkgs/qt6-scxml/template
+++ b/srcpkgs/qt6-scxml/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-scxml'
 pkgname=qt6-scxml
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtscxml-everywhere-src-${version}.tar.xz"
-checksum=13b0d43459394bed2481967a1feff02b63228a82c1136a62941c0eb83ef54e7f
+checksum=f121843cb8cf4a76d621be371e80265ac28254f3c4c123b051e907c1c915766e
 
 subpackages="qt6-scxml-tools qt6-scxml-devel"
 if [ "$CROSS_BUILD" ]; then
@@ -41,11 +41,11 @@ qt6-scxml-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From aa856ccb56f6b6c1cae82357dbf76f10852e836d Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:23 +0200
Subject: [PATCH 13/26] qt6-remoteobjects: update to 6.5.0.

---
 srcpkgs/qt6-remoteobjects/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/qt6-remoteobjects/template b/srcpkgs/qt6-remoteobjects/template
index 062736349442..b37d82bed03d 100644
--- a/srcpkgs/qt6-remoteobjects/template
+++ b/srcpkgs/qt6-remoteobjects/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-remoteobjects'
 pkgname=qt6-remoteobjects
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-declarative-host-tools pkg-config"
@@ -13,7 +13,7 @@ maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtremoteobjects-everywhere-src-${version}.tar.xz"
-checksum=583c53640020d5d068eef7ae180d750120bb49e30249c2febdd173c5a7428812
+checksum=ff40b6e7afa84e44190d3b6357462569525b1e1fb0e8bfd8de16a8680825c2ae
 
 if [ "$CROSS_BUILD" ]; then
 	hostmakedepends+=" qt6-remoteobjects"
@@ -35,7 +35,7 @@ qt6-remoteobjects-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove usr/lib/qt6/qml/QtRemoteObjects/plugins.qmltypes

From 4ba23c1a3dae6019c87b5fb5eb8bb818b4db22dc Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:22 +0200
Subject: [PATCH 14/26] qt6-quicktimeline: update to 6.5.0.

---
 srcpkgs/qt6-quicktimeline/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/qt6-quicktimeline/template b/srcpkgs/qt6-quicktimeline/template
index f2c8e16e621e..3d24a392ff40 100644
--- a/srcpkgs/qt6-quicktimeline/template
+++ b/srcpkgs/qt6-quicktimeline/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-quicktimeline'
 pkgname=qt6-quicktimeline
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version/rc/-rc}/submodules/qtquicktimeline-everywhere-src-${version/rc/-rc}.tar.xz"
-checksum=3088abb7f478362a354ea1509d1c3c3403e3f5adfb84f3e5cf30a1f2eff09a5e
+checksum=578b3e929662b443cd4e51cb0de71e91f4ff55a512d66e0b1ea2999b5657cfbf
 
 if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args="-DQT_BUILD_TESTS=ON"

From c29f2de084f194a0ecff42e731272835a8ac5cb9 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:21 +0200
Subject: [PATCH 15/26] qt6-quick3d: update to 6.5.0.

---
 srcpkgs/qt6-quick3d/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-quick3d/template b/srcpkgs/qt6-quick3d/template
index e5ef91c9053c..e01cea81bebe 100644
--- a/srcpkgs/qt6-quick3d/template
+++ b/srcpkgs/qt6-quick3d/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-quick3d'
 pkgname=qt6-quick3d
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-declarative-host-tools qt6-shadertools"
@@ -11,7 +11,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtquick3d-everywhere-src-${version}.tar.xz"
-checksum=953d3b6ca6dc00563ceea33d51f25e22b1788ab5aa861941100f6a1b652926a7
+checksum=9b590429ca98b5cc8cec4df2efa3775e9f11ed8260d123e95f3c0fc37f3772a5
 
 subpackages="qt6-quick3d-tools qt6-quick3d-devel"
 if [ "$CROSS_BUILD" ]; then
@@ -50,11 +50,11 @@ qt6-quick3d-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 20efad9aa18bf9eccde6a76c16472271eeccac2a Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:11 +0200
Subject: [PATCH 16/26] qt6-qt5compat: update to 6.5.0.

---
 srcpkgs/qt6-qt5compat/template | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/qt6-qt5compat/template b/srcpkgs/qt6-qt5compat/template
index ed167695b5cd..3b3d2b5dfacf 100644
--- a/srcpkgs/qt6-qt5compat/template
+++ b/srcpkgs/qt6-qt5compat/template
@@ -1,7 +1,7 @@
 # Template file for 'qt6-qt5compat'
 pkgname=qt6-qt5compat
-version=6.4.2
-revision=2
+version=6.5.0
+revision=1
 build_style=cmake
 configure_args="-DQT_FEATURE_textcodec=ON -DQT_FEATURE_codecs=ON
  -DQT_FEATURE_iconv=ON -DQT_FEATURE_big_codecs=ON"
@@ -12,7 +12,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only with Qt-GPL-exception-1.0, LGPL-3.0-only, GPL-2.0-or-later"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qt5compat-everywhere-src-${version}.tar.xz"
-checksum=f51f505c8e985b51b7d733e27d782c6fce181beef53364acb0368cc892c4b792
+checksum=a9e2f53a193fc2e131b01a2f6e7a1fbfe31309c2413fdc213e5a81c558c21261
 
 if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args="-DQT_BUILD_TESTS=ON"
@@ -28,11 +28,11 @@ qt6-qt5compat-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 672c40e876fef0eb34628b99f8d7507f091a45f9 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:07 +0200
Subject: [PATCH 17/26] qt6-networkauth: update to 6.5.0.

---
 srcpkgs/qt6-networkauth/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-networkauth/template b/srcpkgs/qt6-networkauth/template
index 35d7161a3288..03bda38ed1fc 100644
--- a/srcpkgs/qt6-networkauth/template
+++ b/srcpkgs/qt6-networkauth/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-networkauth'
 pkgname=qt6-networkauth
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtnetworkauth-everywhere-src-${version}.tar.xz"
-checksum=deab17bd957d0a493bd7757bc71270918147596fb9661a886b3f1d305047c2ee
+checksum=dbcc522ab2136ebe6c9be5c7f156a3bcefa92cd19a462e33a00e94068a24413e
 
 if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args="-DQT_BUILD_TESTS=ON"
@@ -22,11 +22,11 @@ qt6-networkauth-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 8a4edf794d2fbbe811061b78b7b667aa677090f0 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:06 +0200
Subject: [PATCH 18/26] qt6-multimedia: update to 6.5.0.

---
 srcpkgs/qt6-multimedia/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/qt6-multimedia/template b/srcpkgs/qt6-multimedia/template
index d89e7d54eb5a..c622b7c9e8fc 100644
--- a/srcpkgs/qt6-multimedia/template
+++ b/srcpkgs/qt6-multimedia/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-multimedia'
 pkgname=qt6-multimedia
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 configure_args="-DQT_FEATURE_gstreamer=ON"
@@ -12,7 +12,7 @@ maintainer="John <me@johnnynator.dev>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtmultimedia-everywhere-src-${version}.tar.xz"
-checksum=7f2b70deeada911c8e660e2801286657f297a5d1d543d1f6bfa856f28972c776
+checksum=9480d0c73abdd01aec4899e340938cec046a3f404b9f9ed945288be574dca146
 
 if [ "$XBPS_MACHINE" = "i686" ]; then
 	CXXFLAGS="-DPFFFT_SIMD_DISABLE=1"
@@ -39,7 +39,7 @@ qt6-multimedia-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove usr/lib/qt6/qml/QtMultimedia/plugins.qmltypes

From b6775d1b72d9942eb3b7e947f80966dd9a313cc3 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:04 +0200
Subject: [PATCH 19/26] qt6-lottie: update to 6.5.0.

---
 srcpkgs/qt6-lottie/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-lottie/template b/srcpkgs/qt6-lottie/template
index 0e246987d078..8a37fae7f2dc 100644
--- a/srcpkgs/qt6-lottie/template
+++ b/srcpkgs/qt6-lottie/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-lottie'
 pkgname=qt6-lottie
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtlottie-everywhere-src-${version}.tar.xz"
-checksum=accc8869c72095ce5b373a30c362d21235145a79f9e270480712f861d1de1c56
+checksum=8425ecdeb9286a6c51985bdaf3936026610d04dc31eec06fee79df6442b7e246
 
 if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args="-DQT_BUILD_TESTS=ON"
@@ -30,10 +30,10 @@ qt6-lottie-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 44434da43370136c3fb607ffe0f4c4b491f0fae3 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:04 +0200
Subject: [PATCH 20/26] qt6-location: update to 6.5.0.

---
 srcpkgs/qt6-location/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-location/template b/srcpkgs/qt6-location/template
index 429e9e02db12..89ff6498c679 100644
--- a/srcpkgs/qt6-location/template
+++ b/srcpkgs/qt6-location/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-location'
 pkgname=qt6-location
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtpositioning-everywhere-src-${version}.tar.xz"
-checksum=7f01baf5ba877af5b211c9d32e6075019f00d9d7a2ba81bb0f10ca759e9aef82
+checksum=0da7121ebfd9d2ba985ab1f2c8a3af70027c35732177ec0fc72ff7e82835c886
 
 pre_check() {
 	export QML2_IMPORT_PATH="$wrksrc/build/lib/qt6/qml"
@@ -26,11 +26,11 @@ qt6-location-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 5df459097af48bcbd62c96c080ef9e98158f9360 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:02 +0200
Subject: [PATCH 21/26] qt6-imageformats: update to 6.5.0.

---
 srcpkgs/qt6-imageformats/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/qt6-imageformats/template b/srcpkgs/qt6-imageformats/template
index 3ed63f6e98cd..253ff125e09e 100644
--- a/srcpkgs/qt6-imageformats/template
+++ b/srcpkgs/qt6-imageformats/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-imageformats'
 pkgname=qt6-imageformats
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base"
@@ -10,4 +10,4 @@ maintainer="John <me@johnnynator.dev>"
 license="LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtimageformats-everywhere-src-${version}.tar.xz"
-checksum=fc5f999ae0779a67d5507956d4dd315386eb81cf6ccba632de039bb9eee11707
+checksum=f9f810cd3ac7e60132c0da33f34fcfce42e3e764d6cad3020c2f3b1b42046f78

From 80e50cafa02e2e58d76c19ac7c477a480e4f567c Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:01 +0200
Subject: [PATCH 22/26] qt6-declarative: update to 6.5.0.

---
 .../patches/qml-broken-test.patch             | 64 -------------------
 srcpkgs/qt6-declarative/template              |  8 +--
 2 files changed, 4 insertions(+), 68 deletions(-)
 delete mode 100644 srcpkgs/qt6-declarative/patches/qml-broken-test.patch

diff --git a/srcpkgs/qt6-declarative/patches/qml-broken-test.patch b/srcpkgs/qt6-declarative/patches/qml-broken-test.patch
deleted file mode 100644
index b16412fcd5e5..000000000000
--- a/srcpkgs/qt6-declarative/patches/qml-broken-test.patch
+++ /dev/null
@@ -1,64 +0,0 @@
---- qt6-declarative-6.4.2.orig/tests/auto/quickcontrols2/controls/data/tst_rangeslider.qml
-+++ qt6-declarative-6.4.2/tests/auto/quickcontrols2/controls/data/tst_rangeslider.qml
-@@ -602,61 +602,6 @@ TestCase {
-     }
- 
-     function test_overlappingHandles() {
--        var control = createTemporaryObject(sliderComponent, testCase)
--        verify(control)
--
--        // By default, we force the second handle to be after the first in
--        // terms of stacking order *and* z value.
--        compare(control.second.handle.z, 1)
--        compare(control.first.handle.z, 0)
--        control.first.value = 0
--        control.second.value = 0
--
--        // When both handles overlap, only the handle with the higher Z value
--        // should be hovered.
--        mouseMove(control, control.second.handle.x, control.second.handle.y)
--        compare(control.second.hovered, true)
--        compare(control.first.hovered, false)
--
--        // Both are at the same position, so it doesn't matter whose coordinates we use.
--        mousePress(control, control.first.handle.x, control.first.handle.y, Qt.LeftButton)
--        verify(control.second.pressed)
--        compare(control.second.handle.z, 1)
--        compare(control.first.handle.z, 0)
--
--        // Move the second handle out of the way.
--        mouseMove(control, control.width, control.first.handle.y)
--        mouseRelease(control, control.width, control.first.handle.y, Qt.LeftButton)
--        verify(!control.second.pressed)
--        compare(control.second.value, 1.0)
--        compare(control.second.handle.z, 1)
--        compare(control.first.handle.z, 0)
--
--        // The first handle should not be hovered.
--        compare(control.first.hovered, false)
--
--        // Move the first handle on top of the second.
--        mousePress(control, control.first.handle.x, control.first.handle.y, Qt.LeftButton)
--        verify(control.first.pressed)
--        compare(control.first.handle.z, 1)
--        compare(control.second.handle.z, 0)
--
--        mouseMove(control, control.width, control.first.handle.y)
--        mouseRelease(control, control.width, control.first.handle.y, Qt.LeftButton)
--        verify(!control.first.pressed)
--        compare(control.first.handle.z, 1)
--        compare(control.second.handle.z, 0)
--
--        // The most recently pressed handle (the first) should have the higher z value.
--        mousePress(control, control.first.handle.x, control.first.handle.y, Qt.LeftButton)
--        verify(control.first.pressed)
--        compare(control.first.handle.z, 1)
--        compare(control.second.handle.z, 0)
--
--        mouseRelease(control, control.first.handle.x, control.first.handle.y, Qt.LeftButton)
--        verify(!control.first.pressed)
--        compare(control.first.handle.z, 1)
--        compare(control.second.handle.z, 0)
-     }
- 
-     function test_keys_data() {
diff --git a/srcpkgs/qt6-declarative/template b/srcpkgs/qt6-declarative/template
index a3d921f9ea19..22e58f1578e3 100644
--- a/srcpkgs/qt6-declarative/template
+++ b/srcpkgs/qt6-declarative/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-declarative'
 pkgname=qt6-declarative
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 configure_args="-DQT_BUILD_TESTS=ON"
@@ -11,7 +11,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only with Qt-GPL-exception-1.0, LGPL-3.0-only, GPL-2.0-or-later"
 homepage="https://www.qt.io"
 distfiles="https://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtdeclarative-everywhere-src-${version}.tar.xz"
-checksum=a4bdd983de4e9cbca0f85b767dbdd8598711554e370a06da8f509ded4430f5bd
+checksum=f7d631cd8ebc1491dad0f30f1b5326ae812bee4ad706e61157816a82bf588c97
 replaces="qt6-quickcontrols2>=0"
 
 if [ "$CROSS_BUILD" ]; then
@@ -96,13 +96,13 @@ qt6-declarative-devel_package() {
 	replaces="qt6-quickcontrols2-devel>=0"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.a"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 		for _f in ${DESTDIR}/usr/lib/cmake/*; do
 			case "$_f" in
 			*Tools) ;;

From dac8ad5be8113e7e821f4d2f2ce359e8e9cf91e7 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:35:55 +0200
Subject: [PATCH 23/26] qt6-connectivity: update to 6.5.0.

---
 srcpkgs/qt6-connectivity/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-connectivity/template b/srcpkgs/qt6-connectivity/template
index 66fce5c0397b..5705416ba440 100644
--- a/srcpkgs/qt6-connectivity/template
+++ b/srcpkgs/qt6-connectivity/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-connectivity'
 pkgname=qt6-connectivity
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="GPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtconnectivity-everywhere-src-${version}.tar.xz"
-checksum=8c9b44b239e42b4c4d6fca5f427904e688890b2a1bfb6bcbe5e6e2afcdc5d7af
+checksum=e7636653bab986361a77b23451d966c85591428c0422741890ef0fb197698f06
 
 qt6-connectivity-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision}
@@ -19,11 +19,11 @@ qt6-connectivity-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From bb07ec902c199509077d2fbe1ef689d9efc9c419 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:35:54 +0200
Subject: [PATCH 24/26] qt6-charts: update to 6.5.0.

---
 srcpkgs/qt6-charts/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-charts/template b/srcpkgs/qt6-charts/template
index 57ce88143367..2c00ac9a44a1 100644
--- a/srcpkgs/qt6-charts/template
+++ b/srcpkgs/qt6-charts/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-charts'
 pkgname=qt6-charts
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtcharts-everywhere-src-${version}.tar.xz"
-checksum=a1a7c0e08c8870cf97d1c3a2eb3f37681aaed00a63b5b2f70bdf2da878d0a9aa
+checksum=fccd1d50a7f56de011f7668e0e90f022316bd4065fa7f91b078579403e2e26a8
 
 pre_check() {
 	export QML2_IMPORT_PATH="$wrksrc/build/lib/qt6/qml"
@@ -26,11 +26,11 @@ qt6-charts-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From c8d46ff9680694bf0833fc84c2aa6aefce60a250 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:35:53 +0200
Subject: [PATCH 25/26] qt6-base: update to 6.5.0.

---
 srcpkgs/qt6-base/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/qt6-base/template b/srcpkgs/qt6-base/template
index dfde60bdb438..fe1f013db5a6 100644
--- a/srcpkgs/qt6-base/template
+++ b/srcpkgs/qt6-base/template
@@ -1,7 +1,7 @@
 # Template file for 'qt6-base'
 pkgname=qt6-base
-version=6.4.2
-revision=3
+version=6.5.0
+revision=1
 build_style=cmake
 configure_args="-DINSTALL_DATADIR=share/qt6
  -DINSTALL_ARCHDATADIR=lib/qt6
@@ -32,7 +32,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only WITH Qt-GPL-exception-1.0, LGPL-3.0-only, GPL-2.0-or-later"
 homepage="https://www.qt.io"
 distfiles="https://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtbase-everywhere-src-${version}.tar.xz"
-checksum=a88bc6cedbb34878a49a622baa79cace78cfbad4f95fdbd3656ddb21c705525d
+checksum=fde1aa7b4fbe64ec1b4fc576a57f4688ad1453d2fab59cbadd948a10a6eaf5ef
 python_version=3
 
 if [ "$CROSS_BUILD" ]; then

From b2074949aa2f33b4c0c8a410c1b3db58981ae524 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:35:44 +0200
Subject: [PATCH 26/26] qt6-3d: update to 6.5.0.

---
 srcpkgs/qt6-3d/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/qt6-3d/template b/srcpkgs/qt6-3d/template
index 95519668d1cc..4b7fbee0562e 100644
--- a/srcpkgs/qt6-3d/template
+++ b/srcpkgs/qt6-3d/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-3d'
 pkgname=qt6-3d
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-declarative-host-tools"
@@ -11,7 +11,7 @@ maintainer="John <me@johnnynator.dev>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qt3d-everywhere-src-${version}.tar.xz"
-checksum=456c24c3d3840273e720b79fe8fed452fa889b54cbae6b45db1d1ded4da37341
+checksum=20b250023244f21dfbec5c007bac805d4494fa463a6dd27538afb1a81b230816
 
 qt6-3d-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision}"

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] Qt6: Update to 6.5.0
  2023-04-05 22:13 [PR PATCH] Qt6: Update to 6.5.0 Johnnynator
@ 2023-04-05 22:31 ` Johnnynator
  2023-04-06 11:23 ` Johnnynator
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Johnnynator @ 2023-04-05 22:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2193 bytes --]

There is an updated pull request by Johnnynator against master on the void-packages repository

https://github.com/Johnnynator/void-packages qt6.5.0
https://github.com/void-linux/void-packages/pull/43293

Qt6: Update to 6.5.0
- qt6-websockets: update to 6.5.0.
- qt6-webengine: update to 6.5.0.
- qt6-webchannel: update to 6.5.0.
- qt6-wayland: update to 6.5.0.
- qt6-virtualkeyboard: update to 6.5.0.
- qt6-translations: update to 6.5.0.
- qt6-tools: update to 6.5.0.
- qt6-svg: update to 6.5.0.
- qt6-shadertools: update to 6.5.0.
- qt6-serialport: update to 6.5.0.
- qt6-sensors: update to 6.5.0.
- qt6-scxml: update to 6.5.0.
- qt6-remoteobjects: update to 6.5.0.
- qt6-quicktimeline: update to 6.5.0.
- qt6-quick3d: update to 6.5.0.
- qt6-qt5compat: update to 6.5.0.
- qt6-networkauth: update to 6.5.0.
- qt6-multimedia: update to 6.5.0.
- qt6-lottie: update to 6.5.0.
- qt6-location: update to 6.5.0.
- qt6-imageformats: update to 6.5.0.
- qt6-declarative: update to 6.5.0.
- qt6-connectivity: update to 6.5.0.
- qt6-charts: update to 6.5.0.
- qt6-base: update to 6.5.0.
- qt6-3d: update to 6.5.0.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86_64
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  -  - [x] riscv64
  -  - [ ] x86_64-musl
  -  - [ ] aarch64

[ci skip]
[skip ci]

A patch file from https://github.com/void-linux/void-packages/pull/43293.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-qt6.5.0-43293.patch --]
[-- Type: text/x-diff, Size: 181377 bytes --]

From 58a3c1fd8ca4b9fed905e9671b1be1cb5b5557e3 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:37:45 +0200
Subject: [PATCH 01/26] qt6-websockets: update to 6.5.0.

---
 srcpkgs/qt6-websockets/patches/no-cmake-test.patch | 7 -------
 srcpkgs/qt6-websockets/template                    | 8 ++++----
 2 files changed, 4 insertions(+), 11 deletions(-)
 delete mode 100644 srcpkgs/qt6-websockets/patches/no-cmake-test.patch

diff --git a/srcpkgs/qt6-websockets/patches/no-cmake-test.patch b/srcpkgs/qt6-websockets/patches/no-cmake-test.patch
deleted file mode 100644
index 8829f9fab1df..000000000000
--- a/srcpkgs/qt6-websockets/patches/no-cmake-test.patch
+++ /dev/null
@@ -1,7 +0,0 @@
---- a/tests/auto/CMakeLists.txt
-+++ b/tests/auto/CMakeLists.txt
-@@ -1,4 +1,3 @@
--add_subdirectory(cmake)
- add_subdirectory(websockets)
- if(TARGET Qt::Quick)
-     add_subdirectory(qml)
diff --git a/srcpkgs/qt6-websockets/template b/srcpkgs/qt6-websockets/template
index 467083fcd44c..3e02fb127fd6 100644
--- a/srcpkgs/qt6-websockets/template
+++ b/srcpkgs/qt6-websockets/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-websockets'
 pkgname=qt6-websockets
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base qt6-declarative-host-tools"
@@ -12,7 +12,7 @@ maintainer="John <me@johnnynator.dev>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtwebsockets-everywhere-src-${version}.tar.xz"
-checksum=71cf857582db20c20103a56f67d51c33c4ab0b72448209c963d3b449a527c626
+checksum=bc087bd656bb34da120ccab6e927036a219f75fd88f1543744c426bfca616308
 
 pre_check() {
 	export QML2_IMPORT_PATH="$wrksrc/build/lib/qt6/qml"
@@ -28,11 +28,11 @@ qt6-websockets-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 124a23f769acaf67190ff803221393bc845dd85d Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:37:44 +0200
Subject: [PATCH 02/26] qt6-webengine: update to 6.5.0.

---
 .../patches/0004-riscv-angle.patch            |   28 +
 .../patches/0004-riscv-angle.patch.args       |    1 +
 .../patches/0005-riscv-crashpad.patch         |  778 +++++++
 .../patches/0005-riscv-crashpad.patch.args    |    1 +
 .../patches/0006-riscv-dav1d.patch            |   44 +
 .../patches/0006-riscv-dav1d.patch.args       |    1 +
 .../patches/0007-riscv-sandbox.patch          | 1956 +++++++++++++++++
 .../patches/0007-riscv-sandbox.patch.args     |    1 +
 .../0100-chromium-revert-9d080c0.patch        |  154 --
 ...omium-102-fenced_frame_utils-include.patch |   20 -
 ...102-chromium-102-regex_pattern-array.patch |   14 -
 ...0103-chromium-i686-vaapi-fpermissive.patch |   23 -
 .../0104-chromium-libxml-unbundle.patch       |   10 -
 .../patches/0107-chromium-cross-build.patch   |    6 +-
 .../patches/0117-chromium-musl-resolver.patch |   25 +-
 .../patches/0124-chromium-enable-i686.patch   |   17 -
 .../0129-chromium-sandbox-shed_getparam.patch |   23 +-
 .../qt6-webengine/patches/0155-systypes.patch |   11 +
 .../patches/0200-chromium-sndio.patch         |  849 -------
 .../patches/0300-chromium-musl-hacks.patch    |   14 -
 .../patches/0301-chromium-musl-sandbox.patch  |   86 -
 .../patches/0302-chromium-no-mallinfo.patch   |   37 +-
 srcpkgs/qt6-webengine/template                |    8 +-
 23 files changed, 2865 insertions(+), 1242 deletions(-)
 create mode 100644 srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch.args
 create mode 100644 srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch.args
 create mode 100644 srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch.args
 create mode 100644 srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch.args
 delete mode 100644 srcpkgs/qt6-webengine/patches/0100-chromium-revert-9d080c0.patch
 delete mode 100644 srcpkgs/qt6-webengine/patches/0101-chromium-102-fenced_frame_utils-include.patch
 delete mode 100644 srcpkgs/qt6-webengine/patches/0102-chromium-102-regex_pattern-array.patch
 delete mode 100644 srcpkgs/qt6-webengine/patches/0103-chromium-i686-vaapi-fpermissive.patch
 delete mode 100644 srcpkgs/qt6-webengine/patches/0104-chromium-libxml-unbundle.patch
 delete mode 100644 srcpkgs/qt6-webengine/patches/0124-chromium-enable-i686.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0155-systypes.patch
 delete mode 100644 srcpkgs/qt6-webengine/patches/0200-chromium-sndio.patch
 delete mode 100644 srcpkgs/qt6-webengine/patches/0301-chromium-musl-sandbox.patch

diff --git a/srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch b/srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch
new file mode 100644
index 000000000000..1aceb6f2d229
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch
@@ -0,0 +1,28 @@
+Index: chromium-111.0.5563.64/third_party/angle/gni/angle.gni
+===================================================================
+--- chromium-111.0.5563.64.orig/third_party/angle/gni/angle.gni
++++ chromium-111.0.5563.64/third_party/angle/gni/angle.gni
+@@ -105,7 +105,8 @@ declare_args() {
+ 
+   if (current_cpu == "arm64" || current_cpu == "x64" ||
+       current_cpu == "mips64el" || current_cpu == "s390x" ||
+-      current_cpu == "ppc64" || current_cpu == "loong64") {
++      current_cpu == "ppc64" || current_cpu == "loong64" ||
++      current_cpu == "riscv64") {
+     angle_64bit_current_cpu = true
+   } else if (current_cpu == "arm" || current_cpu == "x86" ||
+              current_cpu == "mipsel" || current_cpu == "s390" ||
+Index: chromium-111.0.5563.64/third_party/angle/src/common/platform.h
+===================================================================
+--- chromium-111.0.5563.64.orig/third_party/angle/src/common/platform.h
++++ chromium-111.0.5563.64/third_party/angle/src/common/platform.h
+@@ -108,7 +108,7 @@
+ #endif
+ 
+ // Mips and arm devices need to include stddef for size_t.
+-#if defined(__mips__) || defined(__arm__) || defined(__aarch64__)
++#if defined(__mips__) || defined(__arm__) || defined(__aarch64__) || defined(__riscv)
+ #    include <stddef.h>
+ #endif
+ 
+
diff --git a/srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch.args b/srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch.args
new file mode 100644
index 000000000000..d5f38e354e7f
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch.args
@@ -0,0 +1 @@
+-Np1 --directory=src/3rdparty/chromium/
diff --git a/srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch b/srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch
new file mode 100644
index 000000000000..012a38c38865
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch
@@ -0,0 +1,778 @@
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_context.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/minidump/minidump_context.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_context.h
+@@ -637,6 +637,41 @@ struct MinidumpContextMIPS64 {
+   uint64_t fir;
+ };
+ 
++//! \brief 64bit RISC-V-specifc flags for MinidumpContextRISCV64::context_flags.
++//! Based on minidump_cpu_riscv64.h from breakpad
++enum MinidumpContextRISCV64Flags : uint32_t {
++  //! \brief Identifies the context structure as RISCV64.
++  kMinidumpContextRISCV64 = 0x00080000,
++
++  //! \brief Indicates the validity of integer registers.
++  //!
++  //! Registers `x1`-`x31` and pc are valid.
++  kMinidumpContextRISCV64Integer = kMinidumpContextRISCV64 | 0x00000002,
++
++  //! \brief Indicates the validity of floating point registers.
++  //!
++  //! Floating point registers `f0`-`f31`, and `fcsr` are valid
++  kMinidumpContextRISCV64FloatingPoint = kMinidumpContextRISCV64 | 0x00000004,
++
++  //! \brief Indicates the validity of all registers.
++  kMinidumpContextRISCV64All = kMinidumpContextRISCV64Integer |
++                              kMinidumpContextRISCV64FloatingPoint,
++};
++
++//! \brief A 64bit RISCV CPU context (register state) carried in a minidump file.
++struct MinidumpContextRISCV64 {
++  uint64_t context_flags;
++
++  //! \brief General purpose registers.
++  uint64_t regs[32];
++
++  //! \brief FPU registers.
++  uint64_t fpregs[32];
++
++  //! \brief FPU status register.
++  uint64_t fcsr;
++};
++
+ }  // namespace crashpad
+ 
+ #endif  // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_H_
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
+@@ -102,6 +102,13 @@ MinidumpContextWriter::CreateFromSnapsho
+       break;
+     }
+ 
++    case kCPUArchitectureRISCV64: {
++      context = std::make_unique<MinidumpContextRISCV64Writer>();
++      reinterpret_cast<MinidumpContextRISCV64Writer*>(context.get())
++          ->InitializeFromSnapshot(context_snapshot->riscv64);
++      break;
++    }
++
+     default: {
+       LOG(ERROR) << "unknown context architecture "
+                  << context_snapshot->architecture;
+@@ -555,5 +562,42 @@ size_t MinidumpContextMIPS64Writer::Cont
+   DCHECK_GE(state(), kStateFrozen);
+   return sizeof(context_);
+ }
++
++MinidumpContextRISCV64Writer::MinidumpContextRISCV64Writer()
++    : MinidumpContextWriter(), context_() {
++  context_.context_flags = kMinidumpContextRISCV64;
++}
++
++MinidumpContextRISCV64Writer::~MinidumpContextRISCV64Writer() = default;
++
++void MinidumpContextRISCV64Writer::InitializeFromSnapshot(
++    const CPUContextRISCV64* context_snapshot) {
++  DCHECK_EQ(state(), kStateMutable);
++  DCHECK_EQ(context_.context_flags, kMinidumpContextRISCV64);
++
++  context_.context_flags = kMinidumpContextRISCV64All;
++
++  static_assert(sizeof(context_.regs) == sizeof(context_snapshot->regs),
++                "GPRs size mismatch");
++  memcpy(context_.regs, context_snapshot->regs, sizeof(context_.regs));
++
++  static_assert(sizeof(context_.fpregs) == sizeof(context_snapshot->fpregs),
++                "FPRs size mismatch");
++  memcpy(context_.fpregs,
++         context_snapshot->fpregs,
++         sizeof(context_.fpregs));
++  context_.fcsr = context_snapshot->fcsr;
++}
++
++bool MinidumpContextRISCV64Writer::WriteObject(
++    FileWriterInterface* file_writer) {
++  DCHECK_EQ(state(), kStateWritable);
++  return file_writer->Write(&context_, sizeof(context_));
++}
++
++size_t MinidumpContextRISCV64Writer::ContextSize() const {
++  DCHECK_GE(state(), kStateFrozen);
++  return sizeof(context_);
++}
+ 
+ }  // namespace crashpad
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
+@@ -369,6 +369,49 @@ class MinidumpContextMIPS64Writer final
+   MinidumpContextMIPS64 context_;
+ };
+ 
++//! \brief The writer for a MinidumpContextRISCV64 structure in a minidump file.
++class MinidumpContextRISCV64Writer final : public MinidumpContextWriter {
++ public:
++  MinidumpContextRISCV64Writer();
++
++  MinidumpContextRISCV64Writer(const MinidumpContextRISCV64Writer&) = delete;
++  MinidumpContextRISCV64Writer& operator=(const MinidumpContextRISCV64Writer&) =
++      delete;
++
++  ~MinidumpContextRISCV64Writer() override;
++
++  //! \brief Initializes the MinidumpContextRISCV based on \a context_snapshot.
++  //!
++  //! \param[in] context_snapshot The context snapshot to use as source data.
++  //!
++  //! \note Valid in #kStateMutable. No mutation of context() may be done before
++  //!     calling this method, and it is not normally necessary to alter
++  //!     context() after calling this method.
++  void InitializeFromSnapshot(const CPUContextRISCV64* context_snapshot);
++
++  //! \brief Returns a pointer to the context structure that this object will
++  //!     write.
++  //!
++  //! \attention This returns a non-`const` pointer to this object’s private
++  //!     data so that a caller can populate the context structure directly.
++  //!     This is done because providing setter interfaces to each field in the
++  //!     context structure would be unwieldy and cumbersome. Care must be taken
++  //!     to populate the context structure correctly. The context structure
++  //!     must only be modified while this object is in the #kStateMutable
++  //!     state.
++  MinidumpContextRISCV64* context() { return &context_; }
++
++ protected:
++  // MinidumpWritable:
++  bool WriteObject(FileWriterInterface* file_writer) override;
++
++  // MinidumpContextWriter:
++  size_t ContextSize() const override;
++
++ private:
++  MinidumpContextRISCV64 context_;
++};
++
+ }  // namespace crashpad
+ 
+ #endif  // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_WRITER_H_
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
+@@ -175,6 +175,10 @@ std::string MinidumpMiscInfoDebugBuildSt
+   static constexpr char kCPU[] = "mips";
+ #elif defined(ARCH_CPU_MIPS64EL)
+   static constexpr char kCPU[] = "mips64";
++#elif defined(ARCH_CPU_RISCV32)
++  static constexpr char kCPU[] = "riscv32";
++#elif defined(ARCH_CPU_RISCV64)
++  static constexpr char kCPU[] = "riscv64";
+ #else
+ #error define kCPU for this CPU
+ #endif
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/capture_memory.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/capture_memory.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/capture_memory.cc
+@@ -117,6 +117,16 @@ void CaptureMemory::PointedToByContext(c
+   for (size_t i = 0; i < std::size(context.mipsel->regs); ++i) {
+     MaybeCaptureMemoryAround(delegate, context.mipsel->regs[i]);
+   }
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++  if (context.architecture == kCPUArchitectureRISCV64) {
++    for (size_t i = 0; i < std::size(context.riscv64->regs); ++i) {
++      MaybeCaptureMemoryAround(delegate, context.riscv64->regs[i]);
++    }
++  } else {
++    for (size_t i = 0; i < std::size(context.riscv32->regs); ++i) {
++      MaybeCaptureMemoryAround(delegate, context.riscv32->regs[i]);
++    }
++  }
+ #else
+ #error Port.
+ #endif
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
+@@ -43,7 +43,13 @@ enum CPUArchitecture {
+   kCPUArchitectureMIPSEL,
+ 
+   //! \brief 64-bit MIPSEL.
+-  kCPUArchitectureMIPS64EL
++  kCPUArchitectureMIPS64EL,
++
++  //! \brief 32-bit RISCV.
++  kCPUArchitectureRISCV32,
++
++  //! \brief 64-bit RISCV.
++  kCPUArchitectureRISCV64
+ };
+ 
+ }  // namespace crashpad
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/cpu_context.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/cpu_context.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/cpu_context.cc
+@@ -226,10 +226,12 @@ bool CPUContext::Is64Bit() const {
+     case kCPUArchitectureX86_64:
+     case kCPUArchitectureARM64:
+     case kCPUArchitectureMIPS64EL:
++    case kCPUArchitectureRISCV64:
+       return true;
+     case kCPUArchitectureX86:
+     case kCPUArchitectureARM:
+     case kCPUArchitectureMIPSEL:
++    case kCPUArchitectureRISCV32:
+       return false;
+     default:
+       NOTREACHED();
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/cpu_context.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/cpu_context.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/cpu_context.h
+@@ -362,6 +362,20 @@ struct CPUContextMIPS64 {
+   uint64_t fir;
+ };
+ 
++//! \brief A context structure carrying RISCV32 CPU state.
++struct CPUContextRISCV32 {
++  uint32_t regs[32];
++  uint64_t fpregs[32];
++  uint32_t fcsr;
++};
++
++//! \brief A context structure carrying RISCV64 CPU state.
++struct CPUContextRISCV64 {
++  uint64_t regs[32];
++  uint64_t fpregs[32];
++  uint32_t fcsr;
++};
++
+ //! \brief A context structure capable of carrying the context of any supported
+ //!     CPU architecture.
+ struct CPUContext {
+@@ -402,6 +416,8 @@ struct CPUContext {
+     CPUContextARM64* arm64;
+     CPUContextMIPS* mipsel;
+     CPUContextMIPS64* mips64;
++    CPUContextRISCV32* riscv32;
++    CPUContextRISCV64* riscv64;
+   };
+ };
+ 
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
+@@ -266,6 +266,30 @@ void InitializeCPUContextARM64_OnlyFPSIM
+   context->fpcr = float_context.fpcr;
+ }
+ 
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++
++template <typename Traits>
++void InitializeCPUContextRISCV(
++    const typename Traits::SignalThreadContext& thread_context,
++    const typename Traits::SignalFloatContext& float_context,
++    typename Traits::CPUContext* context) {
++  static_assert(sizeof(context->regs) == sizeof(thread_context),
++                "registers size mismatch");
++  static_assert(sizeof(context->fpregs) == sizeof(float_context.f),
++                "fp registers size mismatch");
++  memcpy(&context->regs, &thread_context, sizeof(context->regs));
++  memcpy(&context->fpregs, &float_context.f, sizeof(context->fpregs));
++  context->fcsr = float_context.fcsr;
++}
++template void InitializeCPUContextRISCV<ContextTraits32>(
++    const ContextTraits32::SignalThreadContext& thread_context,
++    const ContextTraits32::SignalFloatContext& float_context,
++    ContextTraits32::CPUContext* context);
++template void InitializeCPUContextRISCV<ContextTraits64>(
++    const ContextTraits64::SignalThreadContext& thread_context,
++    const ContextTraits64::SignalFloatContext& float_context,
++    ContextTraits64::CPUContext* context);
++
+ #endif  // ARCH_CPU_X86_FAMILY
+ 
+ }  // namespace internal
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
+@@ -174,6 +174,22 @@ void InitializeCPUContextMIPS(
+ 
+ #endif  // ARCH_CPU_MIPS_FAMILY || DOXYGEN
+ 
++#if defined(ARCH_CPU_RISCV_FAMILY) || DOXYGEN
++
++//! \brief Initializes a CPUContextRISCV structure from native context
++//!     structures on Linux.
++//!
++//! \param[in] thread_context The native thread context.
++//! \param[in] float_context The native float context.
++//! \param[out] context The CPUContextRISCV structure to initialize.
++template <typename Traits>
++void InitializeCPUContextRISCV(
++    const typename Traits::SignalThreadContext& thread_context,
++    const typename Traits::SignalFloatContext& float_context,
++    typename Traits::CPUContext* context);
++
++#endif  // ARCH_CPU_RISCV_FAMILY || DOXYGEN
++
+ }  // namespace internal
+ }  // namespace crashpad
+ 
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
+@@ -325,6 +325,61 @@ bool ExceptionSnapshotLinux::ReadContext
+       reader, context_address, context_.mips64);
+ }
+ 
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++
++template <typename Traits>
++static bool ReadContext(ProcessReaderLinux* reader,
++                        LinuxVMAddress context_address,
++                        typename Traits::CPUContext* dest_context) {
++  const ProcessMemory* memory = reader->Memory();
++
++  LinuxVMAddress gregs_address = context_address +
++                                 offsetof(UContext<Traits>, mcontext) +
++                                 offsetof(typename Traits::MContext, gregs);
++
++  typename Traits::SignalThreadContext thread_context;
++  if (!memory->Read(gregs_address, sizeof(thread_context), &thread_context)) {
++    LOG(ERROR) << "Couldn't read gregs";
++    return false;
++  }
++
++  LinuxVMAddress fpregs_address = context_address +
++                                  offsetof(UContext<Traits>, mcontext) +
++                                  offsetof(typename Traits::MContext, fpregs);
++
++  typename Traits::SignalFloatContext fp_context;
++  if (!memory->Read(fpregs_address, sizeof(fp_context), &fp_context)) {
++    LOG(ERROR) << "Couldn't read fpregs";
++    return false;
++  }
++
++  InitializeCPUContextRISCV<Traits>(thread_context, fp_context, dest_context);
++
++  return true;
++}
++
++template <>
++bool ExceptionSnapshotLinux::ReadContext<ContextTraits32>(
++    ProcessReaderLinux* reader,
++    LinuxVMAddress context_address) {
++  context_.architecture = kCPUArchitectureRISCV32;
++  context_.riscv32 = &context_union_.riscv32;
++
++  return internal::ReadContext<ContextTraits32>(
++      reader, context_address, context_.riscv32);
++}
++
++template <>
++bool ExceptionSnapshotLinux::ReadContext<ContextTraits64>(
++    ProcessReaderLinux* reader,
++    LinuxVMAddress context_address) {
++  context_.architecture = kCPUArchitectureRISCV64;
++  context_.riscv64 = &context_union_.riscv64;
++
++  return internal::ReadContext<ContextTraits64>(
++      reader, context_address, context_.riscv64);
++}
++
+ #endif  // ARCH_CPU_X86_FAMILY
+ 
+ bool ExceptionSnapshotLinux::Initialize(
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
+@@ -89,6 +89,9 @@ class ExceptionSnapshotLinux final : pub
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+     CPUContextMIPS mipsel;
+     CPUContextMIPS64 mips64;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++    CPUContextRISCV32 riscv32;
++    CPUContextRISCV64 riscv64;
+ #endif
+   } context_union_;
+   CPUContext context_;
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
+@@ -127,6 +127,9 @@ void ProcessReaderLinux::Thread::Initial
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+   stack_pointer = reader->Is64Bit() ? thread_info.thread_context.t64.regs[29]
+                                     : thread_info.thread_context.t32.regs[29];
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++  stack_pointer = reader->Is64Bit() ? thread_info.thread_context.t64.sp
++                                    : thread_info.thread_context.t32.sp;
+ #else
+ #error Port.
+ #endif
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
+@@ -422,6 +422,67 @@ static_assert(offsetof(UContext<ContextT
+               "context offset mismatch");
+ #endif
+ 
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++
++struct MContext32 {
++  uint32_t gregs[32];
++  uint64_t fpregs[32];
++  unsigned int fcsr;
++};
++
++struct MContext64 {
++  uint64_t gregs[32];
++  uint64_t fpregs[32];
++  unsigned int fcsr;
++};
++
++struct ContextTraits32 : public Traits32 {
++  using MContext = MContext32;
++  using SignalThreadContext = ThreadContext::t32_t;
++  using SignalFloatContext = FloatContext::f32_t;
++  using CPUContext = CPUContextRISCV32;
++};
++
++struct ContextTraits64 : public Traits64 {
++  using MContext = MContext64;
++  using SignalThreadContext = ThreadContext::t64_t;
++  using SignalFloatContext = FloatContext::f64_t;
++  using CPUContext = CPUContextRISCV64;
++};
++
++template <typename Traits>
++struct UContext {
++  typename Traits::ULong flags;
++  typename Traits::Address link;
++  SignalStack<Traits> stack;
++  Sigset<Traits> sigmask;
++  char padding[128 - sizeof(sigmask)];
++  typename Traits::Char_64Only padding2[8];
++  typename Traits::MContext mcontext;
++};
++
++#if defined(ARCH_CPU_RISCV32)
++static_assert(offsetof(UContext<ContextTraits32>, mcontext) ==
++                  offsetof(ucontext_t, uc_mcontext),
++              "context offset mismatch");
++static_assert(offsetof(UContext<ContextTraits32>, mcontext.gregs) ==
++                  offsetof(ucontext_t, uc_mcontext.__gregs),
++              "context offset mismatch");
++static_assert(offsetof(UContext<ContextTraits32>, mcontext.fpregs) ==
++                  offsetof(ucontext_t, uc_mcontext.__fpregs),
++              "context offset mismatch");
++#elif defined(ARCH_CPU_RISCV64)
++static_assert(offsetof(UContext<ContextTraits64>, mcontext) ==
++                  offsetof(ucontext_t, uc_mcontext),
++              "context offset mismatch");
++static_assert(offsetof(UContext<ContextTraits64>, mcontext.gregs) ==
++                  offsetof(ucontext_t, uc_mcontext.__gregs),
++              "context offset mismatch");
++static_assert(offsetof(UContext<ContextTraits64>, mcontext.fpregs) ==
++                  offsetof(ucontext_t, uc_mcontext.__fpregs),
++              "context offset mismatch");
++#endif
++
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
+@@ -205,6 +205,9 @@ CPUArchitecture SystemSnapshotLinux::Get
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+   return process_reader_->Is64Bit() ? kCPUArchitectureMIPS64EL
+                                     : kCPUArchitectureMIPSEL;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++  return process_reader_->Is64Bit() ? kCPUArchitectureRISCV64
++                                    : kCPUArchitectureRISCV32;
+ #else
+ #error port to your architecture
+ #endif
+@@ -220,6 +223,9 @@ uint32_t SystemSnapshotLinux::CPURevisio
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+   // Not implementable on MIPS
+   return 0;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++  // Not implementable on RISCV
++  return 0;
+ #else
+ #error port to your architecture
+ #endif
+@@ -240,6 +246,9 @@ std::string SystemSnapshotLinux::CPUVend
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+   // Not implementable on MIPS
+   return std::string();
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++  // Not implementable on RISCV
++  return std::string();
+ #else
+ #error port to your architecture
+ #endif
+@@ -373,6 +382,9 @@ bool SystemSnapshotLinux::NXEnabled() co
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+   // Not implementable on MIPS
+   return false;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++  // Not implementable on RISCV
++  return false;
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
+@@ -190,6 +190,22 @@ bool ThreadSnapshotLinux::Initialize(
+         thread.thread_info.float_context.f32,
+         context_.mipsel);
+   }
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++  if (process_reader->Is64Bit()) {
++    context_.architecture = kCPUArchitectureRISCV64;
++    context_.riscv64 = &context_union_.riscv64;
++    InitializeCPUContextRISCV<ContextTraits64>(
++	thread.thread_info.thread_context.t64,
++	thread.thread_info.float_context.f64,
++	context_.riscv64);
++  } else {
++    context_.architecture = kCPUArchitectureRISCV32;
++    context_.riscv32 = &context_union_.riscv32;
++    InitializeCPUContextRISCV<ContextTraits32>(
++	thread.thread_info.thread_context.t32,
++	thread.thread_info.float_context.f32,
++	context_.riscv32);
++  }
+ #else
+ #error Port.
+ #endif
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
+@@ -74,6 +74,9 @@ class ThreadSnapshotLinux final : public
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+     CPUContextMIPS mipsel;
+     CPUContextMIPS64 mips64;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++    CPUContextRISCV32 riscv32;
++    CPUContextRISCV64 riscv64;
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/util/linux/ptracer.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/util/linux/ptracer.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/util/linux/ptracer.cc
+@@ -398,6 +398,51 @@ bool GetThreadArea64(pid_t tid,
+   return true;
+ }
+ 
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++
++template <typename Destination>
++bool GetRegisterSet(pid_t tid, int set, Destination* dest, bool can_log) {
++  iovec iov;
++  iov.iov_base = dest;
++  iov.iov_len = sizeof(*dest);
++  if (ptrace(PTRACE_GETREGSET, tid, reinterpret_cast<void*>(set), &iov) != 0) {
++    PLOG_IF(ERROR, can_log) << "ptrace";
++    return false;
++  }
++  if (iov.iov_len != sizeof(*dest)) {
++    LOG_IF(ERROR, can_log) << "Unexpected registers size";
++    return false;
++  }
++  return true;
++}
++
++bool GetFloatingPointRegisters32(pid_t tid,
++                                 FloatContext* context,
++                                 bool can_log) {
++  return false;
++}
++
++bool GetFloatingPointRegisters64(pid_t tid,
++                                 FloatContext* context,
++                                 bool can_log) {
++  return GetRegisterSet(tid, NT_PRFPREG, &context->f64.f, can_log);
++}
++
++bool GetThreadArea32(pid_t tid,
++                     const ThreadContext& context,
++                     LinuxVMAddress* address,
++                     bool can_log) {
++  return false;
++}
++
++bool GetThreadArea64(pid_t tid,
++                     const ThreadContext& context,
++                     LinuxVMAddress* address,
++                     bool can_log) {
++  *address = context.t64.tp;
++  return true;
++}
++
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/util/linux/thread_info.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/util/linux/thread_info.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/util/linux/thread_info.h
+@@ -79,6 +79,40 @@ union ThreadContext {
+     uint32_t cp0_status;
+     uint32_t cp0_cause;
+     uint32_t padding1_;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++    // Reflects user_regs_struct in asm/ptrace.h.
++    uint32_t pc;
++    uint32_t ra;
++    uint32_t sp;
++    uint32_t gp;
++    uint32_t tp;
++    uint32_t t0;
++    uint32_t t1;
++    uint32_t t2;
++    uint32_t s0;
++    uint32_t s1;
++    uint32_t a0;
++    uint32_t a1;
++    uint32_t a2;
++    uint32_t a3;
++    uint32_t a4;
++    uint32_t a5;
++    uint32_t a6;
++    uint32_t a7;
++    uint32_t s2;
++    uint32_t s3;
++    uint32_t s4;
++    uint32_t s5;
++    uint32_t s6;
++    uint32_t s7;
++    uint32_t s8;
++    uint32_t s9;
++    uint32_t s10;
++    uint32_t s11;
++    uint32_t t3;
++    uint32_t t4;
++    uint32_t t5;
++    uint32_t t6;
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+@@ -132,6 +166,40 @@ union ThreadContext {
+     uint64_t cp0_badvaddr;
+     uint64_t cp0_status;
+     uint64_t cp0_cause;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++    // Reflects user_regs_struct in asm/ptrace.h.
++    uint64_t pc;
++    uint64_t ra;
++    uint64_t sp;
++    uint64_t gp;
++    uint64_t tp;
++    uint64_t t0;
++    uint64_t t1;
++    uint64_t t2;
++    uint64_t s0;
++    uint64_t s1;
++    uint64_t a0;
++    uint64_t a1;
++    uint64_t a2;
++    uint64_t a3;
++    uint64_t a4;
++    uint64_t a5;
++    uint64_t a6;
++    uint64_t a7;
++    uint64_t s2;
++    uint64_t s3;
++    uint64_t s4;
++    uint64_t s5;
++    uint64_t s6;
++    uint64_t s7;
++    uint64_t s8;
++    uint64_t s9;
++    uint64_t s10;
++    uint64_t s11;
++    uint64_t t3;
++    uint64_t t4;
++    uint64_t t5;
++    uint64_t t6;
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+@@ -143,11 +211,12 @@ union ThreadContext {
+   using NativeThreadContext = user_regs;
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+ // No appropriate NativeThreadsContext type available for MIPS
++#elif defined(ARCH_CPU_RISCV_FAMILY)
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY || ARCH_CPU_ARM64
+ 
+-#if !defined(ARCH_CPU_MIPS_FAMILY)
++#if !defined(ARCH_CPU_MIPS_FAMILY) && !defined(ARCH_CPU_RISCV_FAMILY)
+ #if defined(ARCH_CPU_32_BITS)
+   static_assert(sizeof(t32_t) == sizeof(NativeThreadContext), "Size mismatch");
+ #else  // ARCH_CPU_64_BITS
+@@ -218,6 +287,9 @@ union FloatContext {
+     } fpregs[32];
+     uint32_t fpcsr;
+     uint32_t fpu_id;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++    uint64_t f[32];
++    uint32_t fcsr;
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+@@ -252,6 +324,9 @@ union FloatContext {
+     double fpregs[32];
+     uint32_t fpcsr;
+     uint32_t fpu_id;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++    uint64_t f[32];
++    uint32_t fcsr;
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+@@ -281,6 +356,7 @@ union FloatContext {
+   static_assert(sizeof(f64) == sizeof(user_fpsimd_struct), "Size mismatch");
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+ // No appropriate floating point context native type for available MIPS.
++#elif defined(ARCH_CPU_RISCV_FAMILY)
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
+@@ -237,6 +237,8 @@ std::string UserAgent() {
+ #elif defined(ARCH_CPU_BIG_ENDIAN)
+     static constexpr char arch[] = "aarch64_be";
+ #endif
++#elif defined(ARCH_CPU_RISCV64)
++    static constexpr char arch[] = "riscv64";
+ #else
+ #error Port
+ #endif
+
diff --git a/srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch.args b/srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch.args
new file mode 100644
index 000000000000..d5f38e354e7f
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch.args
@@ -0,0 +1 @@
+-Np1 --directory=src/3rdparty/chromium/
diff --git a/srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch b/srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch
new file mode 100644
index 000000000000..12ad07275bd3
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch
@@ -0,0 +1,44 @@
+Index: chromium-102.0.5005.61/third_party/dav1d/config/linux/riscv64/config.h
+===================================================================
+--- /dev/null
++++ chromium-102.0.5005.61/third_party/dav1d/config/linux/riscv64/config.h
+@@ -0,0 +1,38 @@
++/*
++ * Autogenerated by the Meson build system.
++ * Do not edit, your changes will be lost.
++ */
++
++#pragma once
++
++#define ARCH_AARCH64 0
++
++#define ARCH_ARM 0
++
++#define ARCH_PPC64LE 0
++
++#define ARCH_X86 0
++
++#define ARCH_X86_32 0
++
++#define ARCH_X86_64 0
++
++#define CONFIG_16BPC 1
++
++#define CONFIG_8BPC 1
++
++// #define CONFIG_LOG 1 -- Logging is controlled by Chromium
++
++#define ENDIANNESS_BIG 0
++
++#define HAVE_ASM 0
++
++#define HAVE_AS_FUNC 0
++
++#define HAVE_CLOCK_GETTIME 1
++
++#define HAVE_GETAUXVAL 1
++
++#define HAVE_POSIX_MEMALIGN 1
++
++#define HAVE_UNISTD_H 1
+
diff --git a/srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch.args b/srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch.args
new file mode 100644
index 000000000000..d5f38e354e7f
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch.args
@@ -0,0 +1 @@
+-Np1 --directory=src/3rdparty/chromium/
diff --git a/srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch b/srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch
new file mode 100644
index 000000000000..098bd95a8de6
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch
@@ -0,0 +1,1956 @@
+Index: chromium-107.0.5304.87/sandbox/features.gni
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/features.gni
++++ chromium-107.0.5304.87/sandbox/features.gni
+@@ -9,7 +9,8 @@
+ use_seccomp_bpf = (is_linux || is_chromeos || is_android) &&
+                   (current_cpu == "x86" || current_cpu == "x64" ||
+                    current_cpu == "arm" || current_cpu == "arm64" ||
+-                   current_cpu == "mipsel" || current_cpu == "mips64el")
++                   current_cpu == "mipsel" || current_cpu == "mips64el" ||
++                   current_cpu == "riscv64")
+ 
+ # SSBD (Speculative Store Bypass Disable) is a mitigation of Spectre Variant 4.
+ # As Spectre Variant 4 can be mitigated by site isolation, opt-out SSBD on site
+Index: chromium-107.0.5304.87/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
++++ chromium-107.0.5304.87/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
+@@ -56,6 +56,12 @@
+ #define MAX_PUBLIC_SYSCALL __NR_syscalls
+ #define MAX_SYSCALL MAX_PUBLIC_SYSCALL
+ 
++#elif defined(__riscv)
++
++#define MIN_SYSCALL 0u
++#define MAX_PUBLIC_SYSCALL 1024u
++#define MAX_SYSCALL MAX_PUBLIC_SYSCALL
++
+ #else
+ #error "Unsupported architecture"
+ #endif
+Index: chromium-107.0.5304.87/sandbox/linux/bpf_dsl/seccomp_macros.h
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/bpf_dsl/seccomp_macros.h
++++ chromium-107.0.5304.87/sandbox/linux/bpf_dsl/seccomp_macros.h
+@@ -343,6 +343,46 @@ struct regs_struct {
+ #define SECCOMP_PT_PARM4(_regs) (_regs).regs[3]
+ #define SECCOMP_PT_PARM5(_regs) (_regs).regs[4]
+ #define SECCOMP_PT_PARM6(_regs) (_regs).regs[5]
++
++#elif defined(__riscv)
++struct regs_struct {
++  unsigned long regs[32];
++};
++
++#define SECCOMP_ARCH AUDIT_ARCH_RISCV64
++
++#define SECCOMP_REG(_ctx, _reg) ((_ctx)->uc_mcontext.__gregs[_reg])
++
++#define SECCOMP_RESULT(_ctx) SECCOMP_REG(_ctx, REG_A0)
++#define SECCOMP_SYSCALL(_ctx) SECCOMP_REG(_ctx, REG_A0+7)
++#define SECCOMP_IP(_ctx) (_ctx)->uc_mcontext.__gregs[REG_PC]
++#define SECCOMP_PARM1(_ctx) SECCOMP_REG(_ctx, REG_A0)
++#define SECCOMP_PARM2(_ctx) SECCOMP_REG(_ctx, REG_A0+1)
++#define SECCOMP_PARM3(_ctx) SECCOMP_REG(_ctx, REG_A0+2)
++#define SECCOMP_PARM4(_ctx) SECCOMP_REG(_ctx, REG_A0+3)
++#define SECCOMP_PARM5(_ctx) SECCOMP_REG(_ctx, REG_A0+4)
++#define SECCOMP_PARM6(_ctx) SECCOMP_REG(_ctx, REG_A0+5)
++
++#define SECCOMP_NR_IDX (offsetof(struct arch_seccomp_data, nr))
++#define SECCOMP_ARCH_IDX (offsetof(struct arch_seccomp_data, arch))
++#define SECCOMP_IP_MSB_IDX \
++  (offsetof(struct arch_seccomp_data, instruction_pointer) + 4)
++#define SECCOMP_IP_LSB_IDX \
++  (offsetof(struct arch_seccomp_data, instruction_pointer) + 0)
++#define SECCOMP_ARG_MSB_IDX(nr) \
++  (offsetof(struct arch_seccomp_data, args) + 8 * (nr) + 4)
++#define SECCOMP_ARG_LSB_IDX(nr) \
++  (offsetof(struct arch_seccomp_data, args) + 8 * (nr) + 0)
++
++#define SECCOMP_PT_RESULT(_regs) (_regs).regs[REG_A0]
++#define SECCOMP_PT_SYSCALL(_regs) (_regs).regs[REG_A0+7]
++#define SECCOMP_PT_IP(_regs) (_regs).regs[REG_PC]
++#define SECCOMP_PT_PARM1(_regs) (_regs).regs[REG_A0]
++#define SECCOMP_PT_PARM2(_regs) (_regs).regs[REG_A0+1]
++#define SECCOMP_PT_PARM3(_regs) (_regs).regs[REG_A0+2]
++#define SECCOMP_PT_PARM4(_regs) (_regs).regs[REG_A0+3]
++#define SECCOMP_PT_PARM5(_regs) (_regs).regs[REG_A0+4]
++#define SECCOMP_PT_PARM6(_regs) (_regs).regs[REG_A0+5]
+ #else
+ #error Unsupported target platform
+ 
+Index: chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
++++ chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
+@@ -61,6 +61,9 @@ bool IsBaselinePolicyAllowed(int sysno)
+ #if defined(__mips__)
+          SyscallSets::IsMipsPrivate(sysno) ||
+ #endif
++#if defined(__riscv)
++         SyscallSets::IsRiscvPrivate(sysno) ||
++#endif
+          SyscallSets::IsAllowedOperationOnFd(sysno);
+   // clang-format on
+ }
+@@ -198,7 +201,7 @@ ResultExpr EvaluateSyscallImpl(int fs_de
+     return RestrictFcntlCommands();
+ #endif
+ 
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+   // fork() is never used as a system call (clone() is used instead), but we
+   // have seen it in fallback code on Android.
+   if (sysno == __NR_fork) {
+@@ -253,7 +256,7 @@ ResultExpr EvaluateSyscallImpl(int fs_de
+   }
+ 
+ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+   if (sysno == __NR_mmap)
+     return RestrictMmapFlags();
+ #endif
+@@ -274,7 +277,7 @@ ResultExpr EvaluateSyscallImpl(int fs_de
+     return RestrictPrctl();
+ 
+ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+   if (sysno == __NR_socketpair) {
+     // Only allow AF_UNIX, PF_UNIX. Crash if anything else is seen.
+     static_assert(AF_UNIX == PF_UNIX,
+Index: chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
++++ chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
+@@ -37,6 +37,7 @@
+ 
+ #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \
+     !defined(__arm__) && !defined(__aarch64__) &&             \
++    !defined(__riscv) &&                                      \
+     !defined(PTRACE_GET_THREAD_AREA)
+ // Also include asm/ptrace-abi.h since ptrace.h in older libc (for instance
+ // the one in Ubuntu 16.04 LTS) is missing PTRACE_GET_THREAD_AREA.
+@@ -443,7 +444,7 @@ ResultExpr RestrictPtrace() {
+ #endif
+   return Switch(request)
+       .CASES((
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+                  PTRACE_GETREGS, PTRACE_GETFPREGS, PTRACE_GET_THREAD_AREA,
+                  PTRACE_GETREGSET,
+ #endif
+Index: chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
++++ chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+@@ -103,7 +103,7 @@ bool SyscallSets::IsUmask(int sysno) {
+ // Both EPERM and ENOENT are valid errno unless otherwise noted in comment.
+ bool SyscallSets::IsFileSystem(int sysno) {
+   switch (sysno) {
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_access:  // EPERM not a valid errno.
+     case __NR_chmod:
+     case __NR_chown:
+@@ -136,7 +136,7 @@ bool SyscallSets::IsFileSystem(int sysno
+     case __NR_faccessat2:
+     case __NR_fchmodat:
+     case __NR_fchownat:  // Should be called chownat ?
+-#if defined(__x86_64__) || defined(__aarch64__)
++#if defined(__x86_64__) || defined(__aarch64__) || defined(__riscv)
+     case __NR_newfstatat:  // fstatat(). EPERM not a valid errno.
+ #elif defined(__i386__) || defined(__arm__) || \
+     (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+@@ -226,7 +226,7 @@ bool SyscallSets::IsAllowedFileSystemAcc
+     case __NR_oldfstat:
+ #endif
+ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_sync_file_range:  // EPERM not a valid errno.
+ #elif defined(__arm__)
+     case __NR_arm_sync_file_range:  // EPERM not a valid errno.
+@@ -245,7 +245,7 @@ bool SyscallSets::IsDeniedFileSystemAcce
+ #if defined(__i386__) || defined(__arm__)
+     case __NR_fchown32:
+ #endif
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_getdents:    // EPERM not a valid errno.
+ #endif
+     case __NR_getdents64:  // EPERM not a valid errno.
+@@ -324,7 +324,7 @@ bool SyscallSets::IsProcessPrivilegeChan
+ bool SyscallSets::IsProcessGroupOrSession(int sysno) {
+   switch (sysno) {
+     case __NR_setpgid:
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_getpgrp:
+ #endif
+     case __NR_setsid:
+@@ -358,7 +358,7 @@ bool SyscallSets::IsAllowedSignalHandlin
+     case __NR_rt_sigqueueinfo:
+     case __NR_rt_sigsuspend:
+     case __NR_rt_tgsigqueueinfo:
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_signalfd:
+ #endif
+     case __NR_signalfd4:
+@@ -382,12 +382,12 @@ bool SyscallSets::IsAllowedOperationOnFd
+   switch (sysno) {
+     case __NR_close:
+     case __NR_dup:
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_dup2:
+ #endif
+     case __NR_dup3:
+ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_shutdown:
+ #endif
+       return true;
+@@ -426,7 +426,7 @@ bool SyscallSets::IsAllowedProcessStartO
+       return true;
+     case __NR_clone:  // Should be parameter-restricted.
+     case __NR_setns:  // Privileged.
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_fork:
+ #endif
+ #if defined(__i386__) || defined(__x86_64__)
+@@ -437,7 +437,7 @@ bool SyscallSets::IsAllowedProcessStartO
+ #endif
+     case __NR_set_tid_address:
+     case __NR_unshare:
+-#if !defined(__mips__) && !defined(__aarch64__)
++#if !defined(__mips__) && !defined(__aarch64__) && !defined(__riscv)
+     case __NR_vfork:
+ #endif
+     default:
+@@ -462,7 +462,7 @@ bool SyscallSets::IsAllowedFutex(int sys
+ 
+ bool SyscallSets::IsAllowedEpoll(int sysno) {
+   switch (sysno) {
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_epoll_create:
+     case __NR_epoll_wait:
+ #endif
+@@ -483,14 +483,14 @@ bool SyscallSets::IsAllowedEpoll(int sys
+ 
+ bool SyscallSets::IsAllowedGetOrModifySocket(int sysno) {
+   switch (sysno) {
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_pipe:
+ #endif
+     case __NR_pipe2:
+       return true;
+     default:
+ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_socketpair:  // We will want to inspect its argument.
+ #endif
+       return false;
+@@ -500,7 +500,7 @@ bool SyscallSets::IsAllowedGetOrModifySo
+ bool SyscallSets::IsDeniedGetOrModifySocket(int sysno) {
+   switch (sysno) {
+ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_accept:
+     case __NR_accept4:
+     case __NR_bind:
+@@ -554,7 +554,7 @@ bool SyscallSets::IsAllowedAddressSpaceA
+     case __NR_mincore:
+     case __NR_mlockall:
+ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_mmap:
+ #endif
+ #if defined(__i386__) || defined(__arm__) || \
+@@ -587,7 +587,7 @@ bool SyscallSets::IsAllowedGeneralIo(int
+     (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+     case __NR__llseek:
+ #endif
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_poll:
+ #endif
+     case __NR_ppoll:
+@@ -608,7 +608,7 @@ bool SyscallSets::IsAllowedGeneralIo(int
+     case __NR_recv:
+ #endif
+ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_recvfrom:  // Could specify source.
+     case __NR_recvmsg:   // Could specify source.
+ #endif
+@@ -623,7 +623,7 @@ bool SyscallSets::IsAllowedGeneralIo(int
+     case __NR_send:
+ #endif
+ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_sendmsg:  // Could specify destination.
+     case __NR_sendto:   // Could specify destination.
+ #endif
+@@ -672,7 +672,7 @@ bool SyscallSets::IsSeccomp(int sysno) {
+ bool SyscallSets::IsAllowedBasicScheduler(int sysno) {
+   switch (sysno) {
+     case __NR_sched_yield:
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_pause:
+ #endif
+     case __NR_nanosleep:
+@@ -756,7 +756,7 @@ bool SyscallSets::IsNuma(int sysno) {
+     case __NR_getcpu:
+     case __NR_mbind:
+ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_migrate_pages:
+ #endif
+     case __NR_move_pages:
+@@ -791,7 +791,7 @@ bool SyscallSets::IsGlobalProcessEnviron
+   switch (sysno) {
+     case __NR_acct:  // Privileged.
+ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_getrlimit:
+ #endif
+ #if defined(__i386__) || defined(__arm__)
+@@ -826,7 +826,7 @@ bool SyscallSets::IsDebug(int sysno) {
+ 
+ bool SyscallSets::IsGlobalSystemStatus(int sysno) {
+   switch (sysno) {
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR__sysctl:
+     case __NR_sysfs:
+ #endif
+@@ -844,7 +844,7 @@ bool SyscallSets::IsGlobalSystemStatus(i
+ 
+ bool SyscallSets::IsEventFd(int sysno) {
+   switch (sysno) {
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_eventfd:
+ #endif
+     case __NR_eventfd2:
+@@ -896,7 +896,8 @@ bool SyscallSets::IsKeyManagement(int sy
+ }
+ 
+ #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \
+-    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
++    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
++    defined(__riscv)
+ bool SyscallSets::IsSystemVSemaphores(int sysno) {
+   switch (sysno) {
+     case __NR_semctl:
+@@ -916,7 +917,8 @@ bool SyscallSets::IsSystemVSemaphores(in
+ 
+ #if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
+     defined(__aarch64__) ||                                         \
+-    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
++    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
++    defined(__riscv)
+ // These give a lot of ambient authority and bypass the setuid sandbox.
+ bool SyscallSets::IsSystemVSharedMemory(int sysno) {
+   switch (sysno) {
+@@ -932,7 +934,8 @@ bool SyscallSets::IsSystemVSharedMemory(
+ #endif
+ 
+ #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \
+-    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
++    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
++    defined(__riscv)
+ bool SyscallSets::IsSystemVMessageQueue(int sysno) {
+   switch (sysno) {
+     case __NR_msgctl:
+@@ -963,7 +966,8 @@ bool SyscallSets::IsSystemVIpc(int sysno
+ 
+ bool SyscallSets::IsAnySystemV(int sysno) {
+ #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \
+-    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
++    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
++    defined(__riscv)
+   return IsSystemVMessageQueue(sysno) || IsSystemVSemaphores(sysno) ||
+          IsSystemVSharedMemory(sysno);
+ #elif defined(__i386__) || \
+@@ -1000,7 +1004,7 @@ bool SyscallSets::IsAdvancedScheduler(in
+ bool SyscallSets::IsInotify(int sysno) {
+   switch (sysno) {
+     case __NR_inotify_add_watch:
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_inotify_init:
+ #endif
+     case __NR_inotify_init1:
+@@ -1138,7 +1142,7 @@ bool SyscallSets::IsMisc(int sysno) {
+ #if defined(__x86_64__)
+     case __NR_tuxcall:
+ #endif
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_vserver:
+ #endif
+       return true;
+@@ -1173,6 +1177,17 @@ bool SyscallSets::IsArmPrivate(int sysno
+ }
+ #endif  // defined(__arm__)
+ 
++#if defined(__riscv)
++bool SyscallSets::IsRiscvPrivate(int sysno) {
++  switch (sysno) {
++    case __NR_riscv_flush_icache:
++      return true;
++    default:
++      return false;
++  }
++}
++#endif  // defined(__riscv)
++
+ #if defined(__mips__)
+ bool SyscallSets::IsMipsPrivate(int sysno) {
+   switch (sysno) {
+Index: chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h
++++ chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h
+@@ -52,7 +52,7 @@ class SANDBOX_EXPORT SyscallSets {
+ #endif
+ 
+ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+   static bool IsNetworkSocketInformation(int sysno);
+ #endif
+ 
+@@ -79,18 +79,21 @@ class SANDBOX_EXPORT SyscallSets {
+   static bool IsAsyncIo(int sysno);
+   static bool IsKeyManagement(int sysno);
+ #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \
+-    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
++    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
++    defined(__riscv)
+   static bool IsSystemVSemaphores(int sysno);
+ #endif
+ #if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
+     defined(__aarch64__) ||                                         \
+-    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
++    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
++    defined(__riscv)
+   // These give a lot of ambient authority and bypass the setuid sandbox.
+   static bool IsSystemVSharedMemory(int sysno);
+ #endif
+ 
+ #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \
+-    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
++    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
++    defined(__riscv)
+   static bool IsSystemVMessageQueue(int sysno);
+ #endif
+ 
+@@ -117,6 +120,9 @@ class SANDBOX_EXPORT SyscallSets {
+   static bool IsMipsPrivate(int sysno);
+   static bool IsMipsMisc(int sysno);
+ #endif  // defined(__mips__)
++#if defined(__riscv)
++  static bool IsRiscvPrivate(int sysno);
++#endif
+   static bool IsGoogle3Threading(int sysno);
+ };
+ 
+Index: chromium-107.0.5304.87/sandbox/linux/seccomp-bpf/syscall.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/seccomp-bpf/syscall.cc
++++ chromium-107.0.5304.87/sandbox/linux/seccomp-bpf/syscall.cc
+@@ -18,7 +18,7 @@ namespace sandbox {
+ namespace {
+ 
+ #if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \
+-    defined(ARCH_CPU_MIPS_FAMILY)
++    defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_RISCV_FAMILY)
+ // Number that's not currently used by any Linux kernel ABIs.
+ const int kInvalidSyscallNumber = 0x351d3;
+ #else
+@@ -308,6 +308,28 @@ asm(// We need to be able to tell the ke
+     "2:ret\n"
+     ".cfi_endproc\n"
+     ".size SyscallAsm, .-SyscallAsm\n"
++#elif defined(__riscv)
++    ".text\n"
++    ".align 2\n"
++    ".type SyscallAsm, %function\n"
++    "SyscallAsm:\n"
++    ".cfi_startproc\n"
++    "bgez a0,1f\n"
++    "la a0,2f\n"
++    "j 2f\n"
++    "1:mv a7, a0\n"
++    "ld a0, (t0)\n"
++    "ld a1, 8(t0)\n"
++    "ld a2, 16(t0)\n"
++    "ld a3, 24(t0)\n"
++    "ld a4, 32(t0)\n"
++    "ld a5, 40(t0)\n"
++    "ld a6, 48(t0)\n"
++    // Enter the kernel
++    "scall\n"
++    "2:ret\n"
++    ".cfi_endproc\n"
++    ".size SyscallAsm, .-SyscallAsm\n"
+ #endif
+     );  // asm
+ 
+@@ -425,6 +447,18 @@ intptr_t Syscall::Call(int nr,
+     ret = inout;
+   }
+ 
++#elif defined(__riscv)
++  intptr_t ret;
++  {
++    register intptr_t inout __asm__("a0") = nr;
++    register const intptr_t* data __asm__("t0") = args;
++    asm volatile("jal SyscallAsm\n"
++                 : "+r"(inout)
++                 : "r"(data)
++                 : "memory", "a1", "a2", "a3", "a4", "a5", "a6");
++    ret = inout;
++  }
++
+ #else
+ #error "Unimplemented architecture"
+ #endif
+Index: chromium-107.0.5304.87/sandbox/linux/services/credentials.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/services/credentials.cc
++++ chromium-107.0.5304.87/sandbox/linux/services/credentials.cc
+@@ -80,7 +80,7 @@ bool ChrootToSafeEmptyDir() {
+   pid_t pid = -1;
+   alignas(16) char stack_buf[PTHREAD_STACK_MIN];
+ #if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \
+-    defined(ARCH_CPU_MIPS_FAMILY)
++    defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_RISCV_FAMILY)
+   // The stack grows downward.
+   void* stack = stack_buf + sizeof(stack_buf);
+ #else
+Index: chromium-107.0.5304.87/sandbox/linux/services/syscall_wrappers.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/services/syscall_wrappers.cc
++++ chromium-107.0.5304.87/sandbox/linux/services/syscall_wrappers.cc
+@@ -61,7 +61,7 @@ long sys_clone(unsigned long flags,
+ #if defined(ARCH_CPU_X86_64)
+   return syscall(__NR_clone, flags, child_stack, ptid, ctid, tls);
+ #elif defined(ARCH_CPU_X86) || defined(ARCH_CPU_ARM_FAMILY) || \
+-    defined(ARCH_CPU_MIPS_FAMILY)
++    defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_RISCV_FAMILY)
+   // CONFIG_CLONE_BACKWARDS defined.
+   return syscall(__NR_clone, flags, child_stack, ptid, tls, ctid);
+ #endif
+Index: chromium-107.0.5304.87/sandbox/linux/syscall_broker/broker_process.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/syscall_broker/broker_process.cc
++++ chromium-107.0.5304.87/sandbox/linux/syscall_broker/broker_process.cc
+@@ -117,44 +117,46 @@ bool BrokerProcess::IsSyscallBrokerable(
+   // and are default disabled in Android. So, we should refuse to broker them
+   // to be consistent with the platform's restrictions.
+   switch (sysno) {
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_access:
+ #endif
+     case __NR_faccessat:
+     case __NR_faccessat2:
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_ACCESS);
+ 
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_mkdir:
+ #endif
+     case __NR_mkdirat:
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_MKDIR);
+ 
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_open:
+ #endif
+     case __NR_openat:
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_OPEN);
+ 
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_readlink:
+ #endif
+     case __NR_readlinkat:
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_READLINK);
+ 
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_rename:
+ #endif
++#ifdef __NR_renameat
+     case __NR_renameat:
++#endif
+     case __NR_renameat2:
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_RENAME);
+ 
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_rmdir:
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_RMDIR);
+ #endif
+ 
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_stat:
+     case __NR_lstat:
+ #endif
+@@ -164,7 +166,7 @@ bool BrokerProcess::IsSyscallBrokerable(
+ #if defined(__NR_fstatat64)
+     case __NR_fstatat64:
+ #endif
+-#if defined(__x86_64__) || defined(__aarch64__)
++#if defined(__x86_64__) || defined(__aarch64__) || defined(__riscv)
+     case __NR_newfstatat:
+ #endif
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_STAT);
+@@ -179,7 +181,7 @@ bool BrokerProcess::IsSyscallBrokerable(
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_STAT);
+ #endif
+ 
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_unlink:
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_UNLINK);
+ #endif
+Index: chromium-107.0.5304.87/sandbox/linux/system_headers/linux_seccomp.h
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/system_headers/linux_seccomp.h
++++ chromium-107.0.5304.87/sandbox/linux/system_headers/linux_seccomp.h
+@@ -38,6 +38,9 @@
+ #ifndef EM_AARCH64
+ #define EM_AARCH64 183
+ #endif
++#ifndef EM_RISCV
++#define EM_RISCV 243
++#endif
+ 
+ #ifndef __AUDIT_ARCH_64BIT
+ #define __AUDIT_ARCH_64BIT 0x80000000
+@@ -70,6 +73,9 @@
+ #ifndef AUDIT_ARCH_AARCH64
+ #define AUDIT_ARCH_AARCH64 (EM_AARCH64 | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE)
+ #endif
++#ifndef AUDIT_ARCH_RISCV64
++#define AUDIT_ARCH_RISCV64 (EM_RISCV|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
++#endif
+ 
+ // For prctl.h
+ #ifndef PR_SET_SECCOMP
+Index: chromium-107.0.5304.87/sandbox/linux/system_headers/linux_signal.h
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/system_headers/linux_signal.h
++++ chromium-107.0.5304.87/sandbox/linux/system_headers/linux_signal.h
+@@ -13,7 +13,7 @@
+ // (not undefined, but defined different values and in different memory
+ // layouts). So, fill the gap here.
+ #if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+ 
+ #define LINUX_SIGHUP 1
+ #define LINUX_SIGINT 2
+Index: chromium-107.0.5304.87/sandbox/linux/system_headers/linux_stat.h
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/system_headers/linux_stat.h
++++ chromium-107.0.5304.87/sandbox/linux/system_headers/linux_stat.h
+@@ -150,7 +150,7 @@ struct kernel_stat {
+   int st_blocks;
+   int st_pad4[14];
+ };
+-#elif defined(__aarch64__)
++#elif defined(__aarch64__) || defined(__riscv)
+ struct kernel_stat {
+   unsigned long st_dev;
+   unsigned long st_ino;
+Index: chromium-107.0.5304.87/sandbox/linux/system_headers/linux_syscalls.h
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/system_headers/linux_syscalls.h
++++ chromium-107.0.5304.87/sandbox/linux/system_headers/linux_syscalls.h
+@@ -35,5 +35,9 @@
+ #include "sandbox/linux/system_headers/arm64_linux_syscalls.h"
+ #endif
+ 
++#if defined(__riscv) && __riscv_xlen == 64
++#include "sandbox/linux/system_headers/riscv64_linux_syscalls.h"
++#endif
++
+ #endif  // SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SYSCALLS_H_
+ 
+Index: chromium-107.0.5304.87/sandbox/linux/system_headers/riscv64_linux_syscalls.h
+===================================================================
+--- /dev/null
++++ chromium-107.0.5304.87/sandbox/linux/system_headers/riscv64_linux_syscalls.h
+@@ -0,0 +1,1222 @@
++// Copyright 2014 The Chromium Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#ifndef SANDBOX_LINUX_SYSTEM_HEADERS_RISCV64_LINUX_SYSCALLS_H_
++#define SANDBOX_LINUX_SYSTEM_HEADERS_RISCV64_LINUX_SYSCALLS_H_
++
++#include <asm-generic/unistd.h>
++
++#if !defined(__NR_io_setup)
++#define __NR_io_setup 0
++#endif
++
++#if !defined(__NR_io_destroy)
++#define __NR_io_destroy 1
++#endif
++
++#if !defined(__NR_io_submit)
++#define __NR_io_submit 2
++#endif
++
++#if !defined(__NR_io_cancel)
++#define __NR_io_cancel 3
++#endif
++
++#if !defined(__NR_io_getevents)
++#define __NR_io_getevents 4
++#endif
++
++#if !defined(__NR_setxattr)
++#define __NR_setxattr 5
++#endif
++
++#if !defined(__NR_lsetxattr)
++#define __NR_lsetxattr 6
++#endif
++
++#if !defined(__NR_fsetxattr)
++#define __NR_fsetxattr 7
++#endif
++
++#if !defined(__NR_getxattr)
++#define __NR_getxattr 8
++#endif
++
++#if !defined(__NR_lgetxattr)
++#define __NR_lgetxattr 9
++#endif
++
++#if !defined(__NR_fgetxattr)
++#define __NR_fgetxattr 10
++#endif
++
++#if !defined(__NR_listxattr)
++#define __NR_listxattr 11
++#endif
++
++#if !defined(__NR_llistxattr)
++#define __NR_llistxattr 12
++#endif
++
++#if !defined(__NR_flistxattr)
++#define __NR_flistxattr 13
++#endif
++
++#if !defined(__NR_removexattr)
++#define __NR_removexattr 14
++#endif
++
++#if !defined(__NR_lremovexattr)
++#define __NR_lremovexattr 15
++#endif
++
++#if !defined(__NR_fremovexattr)
++#define __NR_fremovexattr 16
++#endif
++
++#if !defined(__NR_getcwd)
++#define __NR_getcwd 17
++#endif
++
++#if !defined(__NR_lookup_dcookie)
++#define __NR_lookup_dcookie 18
++#endif
++
++#if !defined(__NR_eventfd2)
++#define __NR_eventfd2 19
++#endif
++
++#if !defined(__NR_epoll_create1)
++#define __NR_epoll_create1 20
++#endif
++
++#if !defined(__NR_epoll_ctl)
++#define __NR_epoll_ctl 21
++#endif
++
++#if !defined(__NR_epoll_pwait)
++#define __NR_epoll_pwait 22
++#endif
++
++#if !defined(__NR_dup)
++#define __NR_dup 23
++#endif
++
++#if !defined(__NR_dup3)
++#define __NR_dup3 24
++#endif
++
++#if !defined(__NR_fcntl)
++#define __NR_fcntl 25
++#endif
++
++#if !defined(__NR_inotify_init1)
++#define __NR_inotify_init1 26
++#endif
++
++#if !defined(__NR_inotify_add_watch)
++#define __NR_inotify_add_watch 27
++#endif
++
++#if !defined(__NR_inotify_rm_watch)
++#define __NR_inotify_rm_watch 28
++#endif
++
++#if !defined(__NR_ioctl)
++#define __NR_ioctl 29
++#endif
++
++#if !defined(__NR_ioprio_set)
++#define __NR_ioprio_set 30
++#endif
++
++#if !defined(__NR_ioprio_get)
++#define __NR_ioprio_get 31
++#endif
++
++#if !defined(__NR_flock)
++#define __NR_flock 32
++#endif
++
++#if !defined(__NR_mknodat)
++#define __NR_mknodat 33
++#endif
++
++#if !defined(__NR_mkdirat)
++#define __NR_mkdirat 34
++#endif
++
++#if !defined(__NR_unlinkat)
++#define __NR_unlinkat 35
++#endif
++
++#if !defined(__NR_symlinkat)
++#define __NR_symlinkat 36
++#endif
++
++#if !defined(__NR_linkat)
++#define __NR_linkat 37
++#endif
++
++#if !defined(__NR_renameat)
++#define __NR_renameat 38
++#endif
++
++#if !defined(__NR_umount2)
++#define __NR_umount2 39
++#endif
++
++#if !defined(__NR_mount)
++#define __NR_mount 40
++#endif
++
++#if !defined(__NR_pivot_root)
++#define __NR_pivot_root 41
++#endif
++
++#if !defined(__NR_nfsservctl)
++#define __NR_nfsservctl 42
++#endif
++
++#if !defined(__NR_statfs)
++#define __NR_statfs 43
++#endif
++
++#if !defined(__NR_fstatfs)
++#define __NR_fstatfs 44
++#endif
++
++#if !defined(__NR_truncate)
++#define __NR_truncate 45
++#endif
++
++#if !defined(__NR_ftruncate)
++#define __NR_ftruncate 46
++#endif
++
++#if !defined(__NR_fallocate)
++#define __NR_fallocate 47
++#endif
++
++#if !defined(__NR_faccessat)
++#define __NR_faccessat 48
++#endif
++
++#if !defined(__NR_chdir)
++#define __NR_chdir 49
++#endif
++
++#if !defined(__NR_fchdir)
++#define __NR_fchdir 50
++#endif
++
++#if !defined(__NR_chroot)
++#define __NR_chroot 51
++#endif
++
++#if !defined(__NR_fchmod)
++#define __NR_fchmod 52
++#endif
++
++#if !defined(__NR_fchmodat)
++#define __NR_fchmodat 53
++#endif
++
++#if !defined(__NR_fchownat)
++#define __NR_fchownat 54
++#endif
++
++#if !defined(__NR_fchown)
++#define __NR_fchown 55
++#endif
++
++#if !defined(__NR_openat)
++#define __NR_openat 56
++#endif
++
++#if !defined(__NR_close)
++#define __NR_close 57
++#endif
++
++#if !defined(__NR_vhangup)
++#define __NR_vhangup 58
++#endif
++
++#if !defined(__NR_pipe2)
++#define __NR_pipe2 59
++#endif
++
++#if !defined(__NR_quotactl)
++#define __NR_quotactl 60
++#endif
++
++#if !defined(__NR_getdents64)
++#define __NR_getdents64 61
++#endif
++
++#if !defined(__NR_lseek)
++#define __NR_lseek 62
++#endif
++
++#if !defined(__NR_read)
++#define __NR_read 63
++#endif
++
++#if !defined(__NR_write)
++#define __NR_write 64
++#endif
++
++#if !defined(__NR_readv)
++#define __NR_readv 65
++#endif
++
++#if !defined(__NR_writev)
++#define __NR_writev 66
++#endif
++
++#if !defined(__NR_pread64)
++#define __NR_pread64 67
++#endif
++
++#if !defined(__NR_pwrite64)
++#define __NR_pwrite64 68
++#endif
++
++#if !defined(__NR_preadv)
++#define __NR_preadv 69
++#endif
++
++#if !defined(__NR_pwritev)
++#define __NR_pwritev 70
++#endif
++
++#if !defined(__NR_sendfile)
++#define __NR_sendfile 71
++#endif
++
++#if !defined(__NR_pselect6)
++#define __NR_pselect6 72
++#endif
++
++#if !defined(__NR_ppoll)
++#define __NR_ppoll 73
++#endif
++
++#if !defined(__NR_signalfd4)
++#define __NR_signalfd4 74
++#endif
++
++#if !defined(__NR_vmsplice)
++#define __NR_vmsplice 75
++#endif
++
++#if !defined(__NR_splice)
++#define __NR_splice 76
++#endif
++
++#if !defined(__NR_tee)
++#define __NR_tee 77
++#endif
++
++#if !defined(__NR_readlinkat)
++#define __NR_readlinkat 78
++#endif
++
++#if !defined(__NR_newfstatat)
++#define __NR_newfstatat 79
++#endif
++
++#if !defined(__NR_fstat)
++#define __NR_fstat 80
++#endif
++
++#if !defined(__NR_sync)
++#define __NR_sync 81
++#endif
++
++#if !defined(__NR_fsync)
++#define __NR_fsync 82
++#endif
++
++#if !defined(__NR_fdatasync)
++#define __NR_fdatasync 83
++#endif
++
++#if !defined(__NR_sync_file_range)
++#define __NR_sync_file_range 84
++#endif
++
++#if !defined(__NR_timerfd_create)
++#define __NR_timerfd_create 85
++#endif
++
++#if !defined(__NR_timerfd_settime)
++#define __NR_timerfd_settime 86
++#endif
++
++#if !defined(__NR_timerfd_gettime)
++#define __NR_timerfd_gettime 87
++#endif
++
++#if !defined(__NR_utimensat)
++#define __NR_utimensat 88
++#endif
++
++#if !defined(__NR_acct)
++#define __NR_acct 89
++#endif
++
++#if !defined(__NR_capget)
++#define __NR_capget 90
++#endif
++
++#if !defined(__NR_capset)
++#define __NR_capset 91
++#endif
++
++#if !defined(__NR_personality)
++#define __NR_personality 92
++#endif
++
++#if !defined(__NR_exit)
++#define __NR_exit 93
++#endif
++
++#if !defined(__NR_exit_group)
++#define __NR_exit_group 94
++#endif
++
++#if !defined(__NR_waitid)
++#define __NR_waitid 95
++#endif
++
++#if !defined(__NR_set_tid_address)
++#define __NR_set_tid_address 96
++#endif
++
++#if !defined(__NR_unshare)
++#define __NR_unshare 97
++#endif
++
++#if !defined(__NR_futex)
++#define __NR_futex 98
++#endif
++
++#if !defined(__NR_set_robust_list)
++#define __NR_set_robust_list 99
++#endif
++
++#if !defined(__NR_get_robust_list)
++#define __NR_get_robust_list 100
++#endif
++
++#if !defined(__NR_nanosleep)
++#define __NR_nanosleep 101
++#endif
++
++#if !defined(__NR_getitimer)
++#define __NR_getitimer 102
++#endif
++
++#if !defined(__NR_setitimer)
++#define __NR_setitimer 103
++#endif
++
++#if !defined(__NR_kexec_load)
++#define __NR_kexec_load 104
++#endif
++
++#if !defined(__NR_init_module)
++#define __NR_init_module 105
++#endif
++
++#if !defined(__NR_delete_module)
++#define __NR_delete_module 106
++#endif
++
++#if !defined(__NR_timer_create)
++#define __NR_timer_create 107
++#endif
++
++#if !defined(__NR_timer_gettime)
++#define __NR_timer_gettime 108
++#endif
++
++#if !defined(__NR_timer_getoverrun)
++#define __NR_timer_getoverrun 109
++#endif
++
++#if !defined(__NR_timer_settime)
++#define __NR_timer_settime 110
++#endif
++
++#if !defined(__NR_timer_delete)
++#define __NR_timer_delete 111
++#endif
++
++#if !defined(__NR_clock_settime)
++#define __NR_clock_settime 112
++#endif
++
++#if !defined(__NR_clock_gettime)
++#define __NR_clock_gettime 113
++#endif
++
++#if !defined(__NR_clock_getres)
++#define __NR_clock_getres 114
++#endif
++
++#if !defined(__NR_clock_nanosleep)
++#define __NR_clock_nanosleep 115
++#endif
++
++#if !defined(__NR_syslog)
++#define __NR_syslog 116
++#endif
++
++#if !defined(__NR_ptrace)
++#define __NR_ptrace 117
++#endif
++
++#if !defined(__NR_sched_setparam)
++#define __NR_sched_setparam 118
++#endif
++
++#if !defined(__NR_sched_setscheduler)
++#define __NR_sched_setscheduler 119
++#endif
++
++#if !defined(__NR_sched_getscheduler)
++#define __NR_sched_getscheduler 120
++#endif
++
++#if !defined(__NR_sched_getparam)
++#define __NR_sched_getparam 121
++#endif
++
++#if !defined(__NR_sched_setaffinity)
++#define __NR_sched_setaffinity 122
++#endif
++
++#if !defined(__NR_sched_getaffinity)
++#define __NR_sched_getaffinity 123
++#endif
++
++#if !defined(__NR_sched_yield)
++#define __NR_sched_yield 124
++#endif
++
++#if !defined(__NR_sched_get_priority_max)
++#define __NR_sched_get_priority_max 125
++#endif
++
++#if !defined(__NR_sched_get_priority_min)
++#define __NR_sched_get_priority_min 126
++#endif
++
++#if !defined(__NR_sched_rr_get_interval)
++#define __NR_sched_rr_get_interval 127
++#endif
++
++#if !defined(__NR_restart_syscall)
++#define __NR_restart_syscall 128
++#endif
++
++#if !defined(__NR_kill)
++#define __NR_kill 129
++#endif
++
++#if !defined(__NR_tkill)
++#define __NR_tkill 130
++#endif
++
++#if !defined(__NR_tgkill)
++#define __NR_tgkill 131
++#endif
++
++#if !defined(__NR_sigaltstack)
++#define __NR_sigaltstack 132
++#endif
++
++#if !defined(__NR_rt_sigsuspend)
++#define __NR_rt_sigsuspend 133
++#endif
++
++#if !defined(__NR_rt_sigaction)
++#define __NR_rt_sigaction 134
++#endif
++
++#if !defined(__NR_rt_sigprocmask)
++#define __NR_rt_sigprocmask 135
++#endif
++
++#if !defined(__NR_rt_sigpending)
++#define __NR_rt_sigpending 136
++#endif
++
++#if !defined(__NR_rt_sigtimedwait)
++#define __NR_rt_sigtimedwait 137
++#endif
++
++#if !defined(__NR_rt_sigqueueinfo)
++#define __NR_rt_sigqueueinfo 138
++#endif
++
++#if !defined(__NR_rt_sigreturn)
++#define __NR_rt_sigreturn 139
++#endif
++
++#if !defined(__NR_setpriority)
++#define __NR_setpriority 140
++#endif
++
++#if !defined(__NR_getpriority)
++#define __NR_getpriority 141
++#endif
++
++#if !defined(__NR_reboot)
++#define __NR_reboot 142
++#endif
++
++#if !defined(__NR_setregid)
++#define __NR_setregid 143
++#endif
++
++#if !defined(__NR_setgid)
++#define __NR_setgid 144
++#endif
++
++#if !defined(__NR_setreuid)
++#define __NR_setreuid 145
++#endif
++
++#if !defined(__NR_setuid)
++#define __NR_setuid 146
++#endif
++
++#if !defined(__NR_setresuid)
++#define __NR_setresuid 147
++#endif
++
++#if !defined(__NR_getresuid)
++#define __NR_getresuid 148
++#endif
++
++#if !defined(__NR_setresgid)
++#define __NR_setresgid 149
++#endif
++
++#if !defined(__NR_getresgid)
++#define __NR_getresgid 150
++#endif
++
++#if !defined(__NR_setfsuid)
++#define __NR_setfsuid 151
++#endif
++
++#if !defined(__NR_setfsgid)
++#define __NR_setfsgid 152
++#endif
++
++#if !defined(__NR_times)
++#define __NR_times 153
++#endif
++
++#if !defined(__NR_setpgid)
++#define __NR_setpgid 154
++#endif
++
++#if !defined(__NR_getpgid)
++#define __NR_getpgid 155
++#endif
++
++#if !defined(__NR_getsid)
++#define __NR_getsid 156
++#endif
++
++#if !defined(__NR_setsid)
++#define __NR_setsid 157
++#endif
++
++#if !defined(__NR_getgroups)
++#define __NR_getgroups 158
++#endif
++
++#if !defined(__NR_setgroups)
++#define __NR_setgroups 159
++#endif
++
++#if !defined(__NR_uname)
++#define __NR_uname 160
++#endif
++
++#if !defined(__NR_sethostname)
++#define __NR_sethostname 161
++#endif
++
++#if !defined(__NR_setdomainname)
++#define __NR_setdomainname 162
++#endif
++
++#if !defined(__NR_getrlimit)
++#define __NR_getrlimit 163
++#endif
++
++#if !defined(__NR_setrlimit)
++#define __NR_setrlimit 164
++#endif
++
++#if !defined(__NR_getrusage)
++#define __NR_getrusage 165
++#endif
++
++#if !defined(__NR_umask)
++#define __NR_umask 166
++#endif
++
++#if !defined(__NR_prctl)
++#define __NR_prctl 167
++#endif
++
++#if !defined(__NR_getcpu)
++#define __NR_getcpu 168
++#endif
++
++#if !defined(__NR_gettimeofday)
++#define __NR_gettimeofday 169
++#endif
++
++#if !defined(__NR_settimeofday)
++#define __NR_settimeofday 170
++#endif
++
++#if !defined(__NR_adjtimex)
++#define __NR_adjtimex 171
++#endif
++
++#if !defined(__NR_getpid)
++#define __NR_getpid 172
++#endif
++
++#if !defined(__NR_getppid)
++#define __NR_getppid 173
++#endif
++
++#if !defined(__NR_getuid)
++#define __NR_getuid 174
++#endif
++
++#if !defined(__NR_geteuid)
++#define __NR_geteuid 175
++#endif
++
++#if !defined(__NR_getgid)
++#define __NR_getgid 176
++#endif
++
++#if !defined(__NR_getegid)
++#define __NR_getegid 177
++#endif
++
++#if !defined(__NR_gettid)
++#define __NR_gettid 178
++#endif
++
++#if !defined(__NR_sysinfo)
++#define __NR_sysinfo 179
++#endif
++
++#if !defined(__NR_mq_open)
++#define __NR_mq_open 180
++#endif
++
++#if !defined(__NR_mq_unlink)
++#define __NR_mq_unlink 181
++#endif
++
++#if !defined(__NR_mq_timedsend)
++#define __NR_mq_timedsend 182
++#endif
++
++#if !defined(__NR_mq_timedreceive)
++#define __NR_mq_timedreceive 183
++#endif
++
++#if !defined(__NR_mq_notify)
++#define __NR_mq_notify 184
++#endif
++
++#if !defined(__NR_mq_getsetattr)
++#define __NR_mq_getsetattr 185
++#endif
++
++#if !defined(__NR_msgget)
++#define __NR_msgget 186
++#endif
++
++#if !defined(__NR_msgctl)
++#define __NR_msgctl 187
++#endif
++
++#if !defined(__NR_msgrcv)
++#define __NR_msgrcv 188
++#endif
++
++#if !defined(__NR_msgsnd)
++#define __NR_msgsnd 189
++#endif
++
++#if !defined(__NR_semget)
++#define __NR_semget 190
++#endif
++
++#if !defined(__NR_semctl)
++#define __NR_semctl 191
++#endif
++
++#if !defined(__NR_semtimedop)
++#define __NR_semtimedop 192
++#endif
++
++#if !defined(__NR_semop)
++#define __NR_semop 193
++#endif
++
++#if !defined(__NR_shmget)
++#define __NR_shmget 194
++#endif
++
++#if !defined(__NR_shmctl)
++#define __NR_shmctl 195
++#endif
++
++#if !defined(__NR_shmat)
++#define __NR_shmat 196
++#endif
++
++#if !defined(__NR_shmdt)
++#define __NR_shmdt 197
++#endif
++
++#if !defined(__NR_socket)
++#define __NR_socket 198
++#endif
++
++#if !defined(__NR_socketpair)
++#define __NR_socketpair 199
++#endif
++
++#if !defined(__NR_bind)
++#define __NR_bind 200
++#endif
++
++#if !defined(__NR_listen)
++#define __NR_listen 201
++#endif
++
++#if !defined(__NR_accept)
++#define __NR_accept 202
++#endif
++
++#if !defined(__NR_connect)
++#define __NR_connect 203
++#endif
++
++#if !defined(__NR_getsockname)
++#define __NR_getsockname 204
++#endif
++
++#if !defined(__NR_getpeername)
++#define __NR_getpeername 205
++#endif
++
++#if !defined(__NR_sendto)
++#define __NR_sendto 206
++#endif
++
++#if !defined(__NR_recvfrom)
++#define __NR_recvfrom 207
++#endif
++
++#if !defined(__NR_setsockopt)
++#define __NR_setsockopt 208
++#endif
++
++#if !defined(__NR_getsockopt)
++#define __NR_getsockopt 209
++#endif
++
++#if !defined(__NR_shutdown)
++#define __NR_shutdown 210
++#endif
++
++#if !defined(__NR_sendmsg)
++#define __NR_sendmsg 211
++#endif
++
++#if !defined(__NR_recvmsg)
++#define __NR_recvmsg 212
++#endif
++
++#if !defined(__NR_readahead)
++#define __NR_readahead 213
++#endif
++
++#if !defined(__NR_brk)
++#define __NR_brk 214
++#endif
++
++#if !defined(__NR_munmap)
++#define __NR_munmap 215
++#endif
++
++#if !defined(__NR_mremap)
++#define __NR_mremap 216
++#endif
++
++#if !defined(__NR_add_key)
++#define __NR_add_key 217
++#endif
++
++#if !defined(__NR_request_key)
++#define __NR_request_key 218
++#endif
++
++#if !defined(__NR_keyctl)
++#define __NR_keyctl 219
++#endif
++
++#if !defined(__NR_clone)
++#define __NR_clone 220
++#endif
++
++#if !defined(__NR_execve)
++#define __NR_execve 221
++#endif
++
++#if !defined(__NR_mmap)
++#define __NR_mmap 222
++#endif
++
++#if !defined(__NR_fadvise64)
++#define __NR_fadvise64 223
++#endif
++
++#if !defined(__NR_swapon)
++#define __NR_swapon 224
++#endif
++
++#if !defined(__NR_swapoff)
++#define __NR_swapoff 225
++#endif
++
++#if !defined(__NR_mprotect)
++#define __NR_mprotect 226
++#endif
++
++#if !defined(__NR_msync)
++#define __NR_msync 227
++#endif
++
++#if !defined(__NR_mlock)
++#define __NR_mlock 228
++#endif
++
++#if !defined(__NR_munlock)
++#define __NR_munlock 229
++#endif
++
++#if !defined(__NR_mlockall)
++#define __NR_mlockall 230
++#endif
++
++#if !defined(__NR_munlockall)
++#define __NR_munlockall 231
++#endif
++
++#if !defined(__NR_mincore)
++#define __NR_mincore 232
++#endif
++
++#if !defined(__NR_madvise)
++#define __NR_madvise 233
++#endif
++
++#if !defined(__NR_remap_file_pages)
++#define __NR_remap_file_pages 234
++#endif
++
++#if !defined(__NR_mbind)
++#define __NR_mbind 235
++#endif
++
++#if !defined(__NR_get_mempolicy)
++#define __NR_get_mempolicy 236
++#endif
++
++#if !defined(__NR_set_mempolicy)
++#define __NR_set_mempolicy 237
++#endif
++
++#if !defined(__NR_migrate_pages)
++#define __NR_migrate_pages 238
++#endif
++
++#if !defined(__NR_move_pages)
++#define __NR_move_pages 239
++#endif
++
++#if !defined(__NR_rt_tgsigqueueinfo)
++#define __NR_rt_tgsigqueueinfo 240
++#endif
++
++#if !defined(__NR_perf_event_open)
++#define __NR_perf_event_open 241
++#endif
++
++#if !defined(__NR_accept4)
++#define __NR_accept4 242
++#endif
++
++#if !defined(__NR_recvmmsg)
++#define __NR_recvmmsg 243
++#endif
++
++#if !defined(__NR_riscv_flush_icache)
++#define __NR_riscv_flush_icache 259
++#endif
++
++#if !defined(__NR_wait4)
++#define __NR_wait4 260
++#endif
++
++#if !defined(__NR_prlimit64)
++#define __NR_prlimit64 261
++#endif
++
++#if !defined(__NR_fanotify_init)
++#define __NR_fanotify_init 262
++#endif
++
++#if !defined(__NR_fanotify_mark)
++#define __NR_fanotify_mark 263
++#endif
++
++#if !defined(__NR_name_to_handle_at)
++#define __NR_name_to_handle_at 264
++#endif
++
++#if !defined(__NR_open_by_handle_at)
++#define __NR_open_by_handle_at 265
++#endif
++
++#if !defined(__NR_clock_adjtime)
++#define __NR_clock_adjtime 266
++#endif
++
++#if !defined(__NR_syncfs)
++#define __NR_syncfs 267
++#endif
++
++#if !defined(__NR_setns)
++#define __NR_setns 268
++#endif
++
++#if !defined(__NR_sendmmsg)
++#define __NR_sendmmsg 269
++#endif
++
++#if !defined(__NR_process_vm_readv)
++#define __NR_process_vm_readv 270
++#endif
++
++#if !defined(__NR_process_vm_writev)
++#define __NR_process_vm_writev 271
++#endif
++
++#if !defined(__NR_kcmp)
++#define __NR_kcmp 272
++#endif
++
++#if !defined(__NR_finit_module)
++#define __NR_finit_module 273
++#endif
++
++#if !defined(__NR_sched_setattr)
++#define __NR_sched_setattr 274
++#endif
++
++#if !defined(__NR_sched_getattr)
++#define __NR_sched_getattr 275
++#endif
++
++#if !defined(__NR_renameat2)
++#define __NR_renameat2 276
++#endif
++
++#if !defined(__NR_seccomp)
++#define __NR_seccomp 277
++#endif
++
++#if !defined(__NR_getrandom)
++#define __NR_getrandom 278
++#endif
++
++#if !defined(__NR_memfd_create)
++#define __NR_memfd_create 279
++#endif
++
++#if !defined(__NR_bpf)
++#define __NR_bpf 280
++#endif
++
++#if !defined(__NR_execveat)
++#define __NR_execveat 281
++#endif
++
++#if !defined(__NR_userfaultfd)
++#define __NR_userfaultfd 282
++#endif
++
++#if !defined(__NR_membarrier)
++#define __NR_membarrier 283
++#endif
++
++#if !defined(__NR_mlock2)
++#define __NR_mlock2 284
++#endif
++
++#if !defined(__NR_copy_file_range)
++#define __NR_copy_file_range 285
++#endif
++
++#if !defined(__NR_preadv2)
++#define __NR_preadv2 286
++#endif
++
++#if !defined(__NR_pwritev2)
++#define __NR_pwritev2 287
++#endif
++
++#if !defined(__NR_pkey_mprotect)
++#define __NR_pkey_mprotect 288
++#endif
++
++#if !defined(__NR_pkey_alloc)
++#define __NR_pkey_alloc 289
++#endif
++
++#if !defined(__NR_pkey_free)
++#define __NR_pkey_free 290
++#endif
++
++#if !defined(__NR_statx)
++#define __NR_statx 291
++#endif
++
++#if !defined(__NR_io_pgetevents)
++#define __NR_io_pgetevents 292
++#endif
++
++#if !defined(__NR_rseq)
++#define __NR_rseq 293
++#endif
++
++#if !defined(__NR_kexec_file_load)
++#define __NR_kexec_file_load 294
++#endif
++
++#if !defined(__NR_pidfd_send_signal)
++#define __NR_pidfd_send_signal 424
++#endif
++
++#if !defined(__NR_io_uring_setup)
++#define __NR_io_uring_setup 425
++#endif
++
++#if !defined(__NR_io_uring_enter)
++#define __NR_io_uring_enter 426
++#endif
++
++#if !defined(__NR_io_uring_register)
++#define __NR_io_uring_register 427
++#endif
++
++#if !defined(__NR_open_tree)
++#define __NR_open_tree 428
++#endif
++
++#if !defined(__NR_move_mount)
++#define __NR_move_mount 429
++#endif
++
++#if !defined(__NR_fsopen)
++#define __NR_fsopen 430
++#endif
++
++#if !defined(__NR_fsconfig)
++#define __NR_fsconfig 431
++#endif
++
++#if !defined(__NR_fsmount)
++#define __NR_fsmount 432
++#endif
++
++#if !defined(__NR_fspick)
++#define __NR_fspick 433
++#endif
++
++#if !defined(__NR_pidfd_open)
++#define __NR_pidfd_open 434
++#endif
++
++#if !defined(__NR_clone3)
++#define __NR_clone3 435
++#endif
++
++#if !defined(__NR_close_range)
++#define __NR_close_range 436
++#endif
++
++#if !defined(__NR_openat2)
++#define __NR_openat2 437
++#endif
++
++#if !defined(__NR_pidfd_getfd)
++#define __NR_pidfd_getfd 438
++#endif
++
++#if !defined(__NR_faccessat2)
++#define __NR_faccessat2 439
++#endif
++
++#if !defined(__NR_process_madvise)
++#define __NR_process_madvise 440
++#endif
++
++#if !defined(__NR_epoll_pwait2)
++#define __NR_epoll_pwait2 441
++#endif
++
++#if !defined(__NR_mount_setattr)
++#define __NR_mount_setattr 442
++#endif
++
++#if !defined(__NR_quotactl_path)
++#define __NR_quotactl_path 443
++#endif
++
++#if !defined(__NR_landlock_create_ruleset)
++#define __NR_landlock_create_ruleset 444
++#endif
++
++#if !defined(__NR_landlock_add_rule)
++#define __NR_landlock_add_rule 445
++#endif
++
++#if !defined(__NR_landlock_restrict_self)
++#define __NR_landlock_restrict_self 446
++#endif
++
++#endif  // SANDBOX_LINUX_SYSTEM_HEADERS_RISCV64_LINUX_SYSCALLS_H_
+Index: chromium-107.0.5304.87/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc
++++ chromium-107.0.5304.87/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc
+@@ -38,7 +38,7 @@ ResultExpr CrosAmdGpuProcessPolicy::Eval
+     case __NR_sched_setscheduler:
+     case __NR_sysinfo:
+     case __NR_uname:
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_readlink:
+     case __NR_stat:
+ #endif
+Index: chromium-107.0.5304.87/sandbox/policy/linux/bpf_gpu_policy_linux.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/policy/linux/bpf_gpu_policy_linux.cc
++++ chromium-107.0.5304.87/sandbox/policy/linux/bpf_gpu_policy_linux.cc
+@@ -73,7 +73,7 @@ ResultExpr GpuProcessPolicy::EvaluateSys
+     (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+     case __NR_ftruncate64:
+ #endif
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_getdents:
+ #endif
+     case __NR_getdents64:
+
diff --git a/srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch.args b/srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch.args
new file mode 100644
index 000000000000..d5f38e354e7f
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch.args
@@ -0,0 +1 @@
+-Np1 --directory=src/3rdparty/chromium/
diff --git a/srcpkgs/qt6-webengine/patches/0100-chromium-revert-9d080c0.patch b/srcpkgs/qt6-webengine/patches/0100-chromium-revert-9d080c0.patch
deleted file mode 100644
index adca364a4060..000000000000
--- a/srcpkgs/qt6-webengine/patches/0100-chromium-revert-9d080c0.patch
+++ /dev/null
@@ -1,154 +0,0 @@
-Revert 9d080c0934b848ee4a05013c78641e612fcc1e03
-
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/build/config/sanitizers/BUILD.gn
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/build/config/sanitizers/BUILD.gn
-@@ -271,11 +271,11 @@ config("asan_flags") {
-   if (is_asan) {
-     cflags += [ "-fsanitize=address" ]
-     if (is_win) {
--      if (!defined(asan_win_blocklist_path)) {
--        asan_win_blocklist_path =
-+      if (!defined(asan_win_blacklist_path)) {
-+        asan_win_blacklist_path =
-             rebase_path("//tools/memory/asan/blocklist_win.txt", root_build_dir)
-       }
--      cflags += [ "-fsanitize-ignorelist=$asan_win_blocklist_path" ]
-+      cflags += [ "-fsanitize-blacklist=$asan_win_blacklist_path" ]
-     }
-   }
- }
-@@ -305,13 +305,13 @@ config("link_shared_library") {
- config("cfi_flags") {
-   cflags = []
-   if (is_cfi && current_toolchain == default_toolchain) {
--    if (!defined(cfi_ignorelist_path)) {
--      cfi_ignorelist_path =
-+    if (!defined(cfi_blacklist_path)) {
-+      cfi_blacklist_path =
-           rebase_path("//tools/cfi/ignores.txt", root_build_dir)
-     }
-     cflags += [
-       "-fsanitize=cfi-vcall",
--      "-fsanitize-ignorelist=$cfi_ignorelist_path",
-+      "-fsanitize-blacklist=$cfi_blacklist_path",
-     ]
- 
-     if (use_cfi_cast) {
-@@ -408,14 +408,14 @@ config("msan_flags") {
-   if (is_msan) {
-     assert(is_linux || is_chromeos,
-            "msan only supported on linux x86_64/ChromeOS")
--    if (!defined(msan_ignorelist_path)) {
--      msan_ignorelist_path =
--          rebase_path("//tools/msan/ignorelist.txt", root_build_dir)
-+    if (!defined(msan_blacklist_path)) {
-+      msan_blacklist_path =
-+          rebase_path("//tools/msan/blacklist.txt", root_build_dir)
-     }
-     cflags = [
-       "-fsanitize=memory",
-       "-fsanitize-memory-track-origins=$msan_track_origins",
--      "-fsanitize-ignorelist=$msan_ignorelist_path",
-+      "-fsanitize-blacklist=$msan_blacklist_path",
-     ]
-   }
- }
-@@ -423,13 +423,13 @@ config("msan_flags") {
- config("tsan_flags") {
-   if (is_tsan) {
-     assert(is_linux || is_chromeos, "tsan only supported on linux x86_64")
--    if (!defined(tsan_ignorelist_path)) {
--      tsan_ignorelist_path =
-+    if (!defined(tsan_blacklist_path)) {
-+      tsan_blacklist_path =
-           rebase_path("//tools/memory/tsan_v2/ignores.txt", root_build_dir)
-     }
-     cflags = [
-       "-fsanitize=thread",
--      "-fsanitize-ignorelist=$tsan_ignorelist_path",
-+      "-fsanitize-blacklist=$tsan_blacklist_path",
-     ]
-   }
- }
-@@ -437,8 +437,8 @@ config("tsan_flags") {
- config("ubsan_flags") {
-   cflags = []
-   if (is_ubsan) {
--    if (!defined(ubsan_ignorelist_path)) {
--      ubsan_ignorelist_path =
-+    if (!defined(ubsan_blacklist_path)) {
-+      ubsan_blacklist_path =
-           rebase_path("//tools/ubsan/ignorelist.txt", root_build_dir)
-     }
-     cflags += [
-@@ -455,7 +455,7 @@ config("ubsan_flags") {
-       "-fsanitize=signed-integer-overflow",
-       "-fsanitize=unreachable",
-       "-fsanitize=vla-bound",
--      "-fsanitize-ignorelist=$ubsan_ignorelist_path",
-+      "-fsanitize-blacklist=$ubsan_blacklist_path",
-     ]
-     if (!is_clang) {
-       # These exposes too much illegal C++14 code to compile on anything stricter than clang:
-@@ -496,8 +496,8 @@ config("ubsan_no_recover") {
- 
- config("ubsan_security_flags") {
-   if (is_ubsan_security) {
--    if (!defined(ubsan_security_ignorelist_path)) {
--      ubsan_security_ignorelist_path =
-+    if (!defined(ubsan_security_blacklist_path)) {
-+      ubsan_security_blacklist_path =
-           rebase_path("//tools/ubsan/security_ignorelist.txt", root_build_dir)
-     }
-     cflags = [
-@@ -505,7 +505,7 @@ config("ubsan_security_flags") {
-       "-fsanitize=shift",
-       "-fsanitize=signed-integer-overflow",
-       "-fsanitize=vla-bound",
--      "-fsanitize-ignorelist=$ubsan_security_ignorelist_path",
-+      "-fsanitize-blacklist=$ubsan_security_blacklist_path",
-     ]
-   }
- }
-@@ -518,13 +518,13 @@ config("ubsan_null_flags") {
- 
- config("ubsan_vptr_flags") {
-   if (is_ubsan_vptr) {
--    if (!defined(ubsan_vptr_ignorelist_path)) {
--      ubsan_vptr_ignorelist_path =
-+    if (!defined(ubsan_vptr_blacklist_path)) {
-+      ubsan_vptr_blacklist_path =
-           rebase_path("//tools/ubsan/vptr_ignorelist.txt", root_build_dir)
-     }
-     cflags = [
-       "-fsanitize=vptr",
--      "-fsanitize-ignorelist=$ubsan_vptr_ignorelist_path",
-+      "-fsanitize-blacklist=$ubsan_vptr_blacklist_path",
-     ]
-     if (!is_clang) {
-       # Clang specific flag:
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/build_overrides/build.gni
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/build_overrides/build.gni
-@@ -43,15 +43,15 @@ declare_args() {
- # Allows different projects to specify their own suppression/ignore lists for
- # sanitizer tools.
- # asan_suppressions_file = "path/to/asan_suppressions.cc"
--# asan_win_ignorelist_path = "path/to/asan/blocklist_win.txt"
-+# asan_win_blacklist_path = "path/to/asan/blocklist_win.txt"
- # lsan_suppressions_file = "path/to/lsan_suppressions.cc"
- # tsan_suppressions_file = "path/to/tsan_suppressions.cc"
--# tsan_ignorelist_path = "path/to/tsan/ignores.txt"
--# msan_ignorelist_path = "path/to/msan/ignorelist.txt"
--# ubsan_ignorelist_path = "path/to/ubsan/ignorelist.txt"
--# ubsan_vptr_ignorelist_path = "path/to/ubsan/vptr_ignorelist.txt"
--# ubsan_security_ignorelist_path = "path/to/ubsan/security_ignorelist.txt"
--# cfi_ignorelist_path = "path/to/cfi/ignores.txt"
-+# tsan_blacklist_path = "path/to/tsan/ignores.txt"
-+# msan_blacklist_path = "path/to/msan/blacklist.txt"
-+# ubsan_blacklist_path = "path/to/ubsan/blacklist.txt"
-+# ubsan_vptr_blacklist_path = "path/to/ubsan/vptr_blacklist.txt"
-+# ubsan_security_blacklist_path = "path/to/ubsan/security_blacklist.txt"
-+# cfi_blacklist_path = "path/to/cfi/ignores.txt"
- 
- if (host_os == "mac" || is_apple) {
-   # Needed for is_apple when targeting macOS or iOS, independent of host.
diff --git a/srcpkgs/qt6-webengine/patches/0101-chromium-102-fenced_frame_utils-include.patch b/srcpkgs/qt6-webengine/patches/0101-chromium-102-fenced_frame_utils-include.patch
deleted file mode 100644
index f41c7984840d..000000000000
--- a/srcpkgs/qt6-webengine/patches/0101-chromium-102-fenced_frame_utils-include.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-From 7c135a291184b59a59643ed6a8c40b4405ac0175 Mon Sep 17 00:00:00 2001
-From: Stephan Hartmann <stha09@googlemail.com>
-Date: Wed, 27 Apr 2022 16:01:01 +0000
-Subject: [PATCH] IWYU: add cstring for std::strlen in fenced_frame_utils
-
----
- third_party/blink/common/fenced_frame/fenced_frame_utils.cc | 2 ++
- 1 file changed, 2 insertions(+)
-
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/blink/common/fenced_frame/fenced_frame_utils.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/blink/common/fenced_frame/fenced_frame_utils.cc
-@@ -6,6 +6,8 @@
- 
- #include <cstring>
- 
-+#include <cstring>
-+
- #include "base/guid.h"
- #include "base/strings/string_util.h"
- 
diff --git a/srcpkgs/qt6-webengine/patches/0102-chromium-102-regex_pattern-array.patch b/srcpkgs/qt6-webengine/patches/0102-chromium-102-regex_pattern-array.patch
deleted file mode 100644
index 420ef941a386..000000000000
--- a/srcpkgs/qt6-webengine/patches/0102-chromium-102-regex_pattern-array.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/components/autofill/core/browser/BUILD.gn
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/components/autofill/core/browser/BUILD.gn
-@@ -34,6 +34,11 @@ action("regex_patterns_inl_h") {
- }
- 
- jumbo_static_library("browser") {
-+  if (is_clang) {
-+    cflags = [
-+      "-fbracket-depth=1000",
-+    ]
-+  }
-   sources = [
-     "address_normalization_manager.cc",
-     "address_normalization_manager.h",
diff --git a/srcpkgs/qt6-webengine/patches/0103-chromium-i686-vaapi-fpermissive.patch b/srcpkgs/qt6-webengine/patches/0103-chromium-i686-vaapi-fpermissive.patch
deleted file mode 100644
index 708d567a04dc..000000000000
--- a/srcpkgs/qt6-webengine/patches/0103-chromium-i686-vaapi-fpermissive.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/media/gpu/vaapi/BUILD.gn
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/gpu/vaapi/BUILD.gn
-@@ -14,6 +14,12 @@ import("//ui/gl/features.gni")
- assert(is_linux || is_chromeos)
- assert(use_vaapi)
- 
-+config("vaapi_permissive") {
-+  if (target_cpu == "x86") {
-+    cflags = [ "-fpermissive" ]
-+  }
-+}
-+
- generate_stubs("libva_stubs") {
-   extra_header = "va_stub_header.fragment"
-   sigs = [ "va.sigs" ]
-@@ -89,6 +95,7 @@ source_set("vaapi") {
-   configs += [
-     "//build/config/linux/libva",
-     "//third_party/libvpx:libvpx_config",
-+    ":vaapi_permissive",
-   ]
- 
-   deps = [
diff --git a/srcpkgs/qt6-webengine/patches/0104-chromium-libxml-unbundle.patch b/srcpkgs/qt6-webengine/patches/0104-chromium-libxml-unbundle.patch
deleted file mode 100644
index baca484abc4a..000000000000
--- a/srcpkgs/qt6-webengine/patches/0104-chromium-libxml-unbundle.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/build/linux/unbundle/libxml.gn
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/build/linux/unbundle/libxml.gn
-@@ -19,6 +19,7 @@ static_library("libxml_utils") {
-     ":xml_reader",
-     ":xml_writer",
-     "//base/test:test_support",
-+    "//services/data_decoder:lib",
-     "//services/data_decoder:xml_parser_fuzzer_deps",
-   ]
-   sources = [
diff --git a/srcpkgs/qt6-webengine/patches/0107-chromium-cross-build.patch b/srcpkgs/qt6-webengine/patches/0107-chromium-cross-build.patch
index 44954dfbb1e5..7fbfabcd79b7 100644
--- a/srcpkgs/qt6-webengine/patches/0107-chromium-cross-build.patch
+++ b/srcpkgs/qt6-webengine/patches/0107-chromium-cross-build.patch
@@ -11,10 +11,10 @@
    # Normally, Android builds are lightly optimized, even for debug builds, to
    # keep binary size down. Setting this flag to true disables such optimization
    android_full_debug = false
-@@ -970,8 +974,13 @@ config("compiler_cpu_abi") {
-       }
+@@ -1003,8 +1003,13 @@
      } else if (current_cpu == "arm64") {
-       if (is_clang && !is_android && !is_nacl && !is_fuchsia) {
+       if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
+           !(is_chromeos_lacros && is_chromeos_device)) {
 -        cflags += [ "--target=aarch64-linux-gnu" ]
 -        ldflags += [ "--target=aarch64-linux-gnu" ]
 +        if (is_musl) {
diff --git a/srcpkgs/qt6-webengine/patches/0117-chromium-musl-resolver.patch b/srcpkgs/qt6-webengine/patches/0117-chromium-musl-resolver.patch
index 176524adc083..5f090c810579 100644
--- a/srcpkgs/qt6-webengine/patches/0117-chromium-musl-resolver.patch
+++ b/srcpkgs/qt6-webengine/patches/0117-chromium-musl-resolver.patch
@@ -27,17 +27,6 @@
  }
  
  bool ScopedResState::IsValid() const {
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/net/dns/host_resolver_manager.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/net/dns/host_resolver_manager.cc
-@@ -3158,7 +3158,7 @@ HostResolverManager::HostResolverManager
-   if (system_dns_config_notifier_)
-     system_dns_config_notifier_->AddObserver(this);
- #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_OPENBSD) && \
--    !BUILDFLAG(IS_ANDROID)
-+    !BUILDFLAG(IS_ANDROID) && !(BUILDFLAG(IS_LINUX) && !defined(__GLIBC__))
-   EnsureDnsReloaderInit();
- #endif
- 
 --- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/net/dns/dns_reloader.cc
 +++ qt6-webengine-6.4.2/src/3rdparty/chromium/net/dns/dns_reloader.cc
 @@ -7,7 +7,8 @@
@@ -50,8 +39,18 @@
  
  #include <resolv.h>
  
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/net/dns/host_resolver_proc.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/net/dns/host_resolver_proc.cc
+--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/net/dns/host_resolver_system_task.cc
++++ qt6-webengine-6.4.2/src/3rdparty/chromium/net/dns/host_resolver_system_task.cc
+@@ -310,8 +310,7 @@
+ }
+ 
+ void EnsureSystemHostResolverCallReady() {
+-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_OPENBSD) && \
+-    !BUILDFLAG(IS_ANDROID)
++#if defined(__GLIBC__)
+   EnsureDnsReloaderInit();
+ #elif BUILDFLAG(IS_WIN)
+   EnsureWinsockInit();
 @@ -192,7 +192,8 @@ int SystemHostResolverCall(const std::st
                                                  base::BlockingType::WILL_BLOCK);
  
diff --git a/srcpkgs/qt6-webengine/patches/0124-chromium-enable-i686.patch b/srcpkgs/qt6-webengine/patches/0124-chromium-enable-i686.patch
deleted file mode 100644
index 11d8de7c23f8..000000000000
--- a/srcpkgs/qt6-webengine/patches/0124-chromium-enable-i686.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/BUILD.gn
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/BUILD.gn
-@@ -1537,14 +1537,6 @@ if (!is_ios && !use_qt) {
-   }
- }
- 
--# TODO(cassew): Add more OS's that don't support x86.
--is_valid_x86_target =
--    target_os != "ios" && target_os != "mac" &&
--    (target_os != "linux" || use_libfuzzer || !build_with_chromium)
--assert(
--    is_valid_x86_target || target_cpu != "x86",
--    "'target_cpu=x86' is not supported for 'target_os=$target_os'. Consider omitting 'target_cpu' (default) or using 'target_cpu=x64' instead.")
--
- group("chromium_builder_perf") {
-   testonly = true
- 
diff --git a/srcpkgs/qt6-webengine/patches/0129-chromium-sandbox-shed_getparam.patch b/srcpkgs/qt6-webengine/patches/0129-chromium-sandbox-shed_getparam.patch
index 80d91c77e8ba..31f403bc10fe 100644
--- a/srcpkgs/qt6-webengine/patches/0129-chromium-sandbox-shed_getparam.patch
+++ b/srcpkgs/qt6-webengine/patches/0129-chromium-sandbox-shed_getparam.patch
@@ -1,20 +1,15 @@
 Allow SYS_sched_getparam and SYS_sched_getscheduler
 musl uses them for pthread_getschedparam()
 
-source: https://git.alpinelinux.org/aports/commit/community/chromium?id=54af9f8ac24f52d382c5758e2445bf0206eff40e
-
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
-@@ -97,10 +97,10 @@ ResultExpr RendererProcessPolicy::Evalua
+--- a/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
++++ b/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
+@@ -94,6 +94,9 @@
+     case __NR_pwrite64:
+     case __NR_sched_get_priority_max:
+     case __NR_sched_get_priority_min:
++    case __NR_sched_getparam:
++    case __NR_sched_getscheduler:
++    case __NR_sched_setscheduler:
      case __NR_sysinfo:
      case __NR_times:
      case __NR_uname:
--      return Allow();
--    case __NR_sched_getaffinity:
-     case __NR_sched_getparam:
-     case __NR_sched_getscheduler:
-+      return Allow();
-+    case __NR_sched_getaffinity:
-     case __NR_sched_setscheduler:
-       return RestrictSchedTarget(GetPolicyPid(), sysno);
-     case __NR_prlimit64:
diff --git a/srcpkgs/qt6-webengine/patches/0155-systypes.patch b/srcpkgs/qt6-webengine/patches/0155-systypes.patch
new file mode 100644
index 000000000000..f4e71e939cd1
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0155-systypes.patch
@@ -0,0 +1,11 @@
+--- a/src/3rdparty/chromium/base/third_party/symbolize/symbolize.h
++++ b/src/3rdparty/chromium/base/third_party/symbolize/symbolize.h
+@@ -58,6 +58,8 @@
+ #include "config.h"
+ #include "glog/logging.h"
+ 
++#include <sys/types.h>
++
+ #ifdef HAVE_SYMBOLIZE
+ 
+ #if defined(__ELF__)  // defined by gcc
diff --git a/srcpkgs/qt6-webengine/patches/0200-chromium-sndio.patch b/srcpkgs/qt6-webengine/patches/0200-chromium-sndio.patch
deleted file mode 100644
index d769b531497b..000000000000
--- a/srcpkgs/qt6-webengine/patches/0200-chromium-sndio.patch
+++ /dev/null
@@ -1,849 +0,0 @@
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/media/BUILD.gn
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/BUILD.gn
-@@ -78,6 +78,9 @@ config("media_config") {
-       defines += [ "DLOPEN_PULSEAUDIO" ]
-     }
-   }
-+  if (use_sndio) {
-+    defines += [ "USE_SNDIO" ]
-+  }
-   if (use_cras) {
-     defines += [ "USE_CRAS" ]
-   }
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/media/audio/BUILD.gn
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/BUILD.gn
-@@ -245,6 +245,17 @@ source_set("audio") {
-     sources += [ "linux/audio_manager_linux.cc" ]
-   }
- 
-+  if (use_sndio) {
-+    libs += [ "sndio" ]
-+    sources += [
-+      "sndio/audio_manager_sndio.cc",
-+      "sndio/sndio_input.cc",
-+      "sndio/sndio_input.h",
-+      "sndio/sndio_output.cc",
-+      "sndio/sndio_output.h"
-+    ]
-+  }
-+
-   if (use_alsa) {
-     libs += [ "asound" ]
-     sources += [
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/media/audio/linux/audio_manager_linux.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/linux/audio_manager_linux.cc
-@@ -25,6 +25,11 @@
- #include "media/audio/pulse/audio_manager_pulse.h"
- #include "media/audio/pulse/pulse_util.h"
- #endif
-+#if defined(USE_SNDIO)
-+#include "media/audio/sndio/audio_manager_sndio.h"
-+#include "media/audio/sndio/sndio_input.h"
-+#include "media/audio/sndio/sndio_output.h"
-+#endif
- 
- namespace media {
- 
---- /dev/null
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/sndio/audio_manager_sndio.cc
-@@ -0,0 +1,148 @@
-+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+#include "media/audio/sndio/audio_manager_sndio.h"
-+
-+#include "base/metrics/histogram_macros.h"
-+#include "base/memory/ptr_util.h"
-+#include "media/audio/audio_device_description.h"
-+#include "media/audio/audio_output_dispatcher.h"
-+#include "media/audio/sndio/sndio_input.h"
-+#include "media/audio/sndio/sndio_output.h"
-+#include "media/base/limits.h"
-+#include "media/base/media_switches.h"
-+
-+namespace media {
-+
-+
-+// Maximum number of output streams that can be open simultaneously.
-+static const int kMaxOutputStreams = 4;
-+
-+// Default sample rate for input and output streams.
-+static const int kDefaultSampleRate = 48000;
-+
-+void AddDefaultDevice(AudioDeviceNames* device_names) {
-+  DCHECK(device_names->empty());
-+  device_names->push_front(AudioDeviceName::CreateDefault());
-+}
-+
-+bool AudioManagerSndio::HasAudioOutputDevices() {
-+  return true;
-+}
-+
-+bool AudioManagerSndio::HasAudioInputDevices() {
-+  return true;
-+}
-+
-+void AudioManagerSndio::GetAudioInputDeviceNames(
-+    AudioDeviceNames* device_names) {
-+  DCHECK(device_names->empty());
-+  AddDefaultDevice(device_names);
-+}
-+
-+void AudioManagerSndio::GetAudioOutputDeviceNames(
-+    AudioDeviceNames* device_names) {
-+  AddDefaultDevice(device_names);
-+}
-+
-+const char* AudioManagerSndio::GetName() {
-+  return "SNDIO";
-+}
-+
-+AudioParameters AudioManagerSndio::GetInputStreamParameters(
-+    const std::string& device_id) {
-+  static const int kDefaultInputBufferSize = 1024;
-+
-+  int user_buffer_size = GetUserBufferSize();
-+  int buffer_size = user_buffer_size ?
-+      user_buffer_size : kDefaultInputBufferSize;
-+
-+  return AudioParameters(
-+      AudioParameters::AUDIO_PCM_LOW_LATENCY, CHANNEL_LAYOUT_STEREO,
-+      kDefaultSampleRate, buffer_size);
-+}
-+
-+AudioManagerSndio::AudioManagerSndio(std::unique_ptr<AudioThread> audio_thread,
-+                                         AudioLogFactory* audio_log_factory)
-+    : AudioManagerBase(std::move(audio_thread),
-+                       audio_log_factory) {
-+  DLOG(WARNING) << "AudioManagerSndio";
-+  SetMaxOutputStreamsAllowed(kMaxOutputStreams);
-+}
-+
-+AudioManagerSndio::~AudioManagerSndio() {
-+  Shutdown();
-+}
-+
-+AudioOutputStream* AudioManagerSndio::MakeLinearOutputStream(
-+    const AudioParameters& params,
-+    const LogCallback& log_callback) {
-+  DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format());
-+  return MakeOutputStream(params);
-+}
-+
-+AudioOutputStream* AudioManagerSndio::MakeLowLatencyOutputStream(
-+    const AudioParameters& params,
-+    const std::string& device_id,
-+    const LogCallback& log_callback) {
-+  DLOG_IF(ERROR, !device_id.empty()) << "Not implemented!";
-+  DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format());
-+  return MakeOutputStream(params);
-+}
-+
-+AudioInputStream* AudioManagerSndio::MakeLinearInputStream(
-+    const AudioParameters& params,
-+    const std::string& device_id,
-+    const LogCallback& log_callback) {
-+  DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format());
-+  return MakeInputStream(params);
-+}
-+
-+AudioInputStream* AudioManagerSndio::MakeLowLatencyInputStream(
-+    const AudioParameters& params,
-+    const std::string& device_id,
-+    const LogCallback& log_callback) {
-+  DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format());
-+  return MakeInputStream(params);
-+}
-+
-+AudioParameters AudioManagerSndio::GetPreferredOutputStreamParameters(
-+    const std::string& output_device_id,
-+    const AudioParameters& input_params) {
-+  // TODO(tommi): Support |output_device_id|.
-+  DLOG_IF(ERROR, !output_device_id.empty()) << "Not implemented!";
-+  static const int kDefaultOutputBufferSize = 2048;
-+
-+  ChannelLayout channel_layout = CHANNEL_LAYOUT_STEREO;
-+  int sample_rate = kDefaultSampleRate;
-+  int buffer_size = kDefaultOutputBufferSize;
-+  if (input_params.IsValid()) {
-+    sample_rate = input_params.sample_rate();
-+    channel_layout = input_params.channel_layout();
-+    buffer_size = std::min(buffer_size, input_params.frames_per_buffer());
-+  }
-+
-+  int user_buffer_size = GetUserBufferSize();
-+  if (user_buffer_size)
-+    buffer_size = user_buffer_size;
-+
-+  return AudioParameters(
-+      AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout,
-+      sample_rate, buffer_size);
-+}
-+
-+AudioInputStream* AudioManagerSndio::MakeInputStream(
-+    const AudioParameters& params) {
-+  DLOG(WARNING) << "MakeInputStream";
-+  return new SndioAudioInputStream(this,
-+             AudioDeviceDescription::kDefaultDeviceId, params);
-+}
-+
-+AudioOutputStream* AudioManagerSndio::MakeOutputStream(
-+    const AudioParameters& params) {
-+  DLOG(WARNING) << "MakeOutputStream";
-+  return new SndioAudioOutputStream(params, this);
-+}
-+
-+}  // namespace media
---- /dev/null
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/sndio/audio_manager_sndio.h
-@@ -0,0 +1,65 @@
-+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+#ifndef MEDIA_AUDIO_SNDIO_AUDIO_MANAGER_SNDIO_H_
-+#define MEDIA_AUDIO_SNDIO_AUDIO_MANAGER_SNDIO_H_
-+
-+#include <set>
-+
-+#include "base/compiler_specific.h"
-+#include "base/macros.h"
-+#include "base/memory/ref_counted.h"
-+#include "base/threading/thread.h"
-+#include "media/audio/audio_manager_base.h"
-+
-+namespace media {
-+
-+class MEDIA_EXPORT AudioManagerSndio : public AudioManagerBase {
-+ public:
-+  AudioManagerSndio(std::unique_ptr<AudioThread> audio_thread,
-+                   AudioLogFactory* audio_log_factory);
-+  ~AudioManagerSndio() override;
-+
-+  // Implementation of AudioManager.
-+  bool HasAudioOutputDevices() override;
-+  bool HasAudioInputDevices() override;
-+  void GetAudioInputDeviceNames(AudioDeviceNames* device_names) override;
-+  void GetAudioOutputDeviceNames(AudioDeviceNames* device_names) override;
-+  AudioParameters GetInputStreamParameters(
-+      const std::string& device_id) override;
-+  const char* GetName() override;
-+
-+  // Implementation of AudioManagerBase.
-+  AudioOutputStream* MakeLinearOutputStream(
-+      const AudioParameters& params,
-+      const LogCallback& log_callback) override;
-+  AudioOutputStream* MakeLowLatencyOutputStream(
-+      const AudioParameters& params,
-+      const std::string& device_id,
-+      const LogCallback& log_callback) override;
-+  AudioInputStream* MakeLinearInputStream(
-+      const AudioParameters& params,
-+      const std::string& device_id,
-+      const LogCallback& log_callback) override;
-+  AudioInputStream* MakeLowLatencyInputStream(
-+      const AudioParameters& params,
-+      const std::string& device_id,
-+      const LogCallback& log_callback) override;
-+
-+ protected:
-+  AudioParameters GetPreferredOutputStreamParameters(
-+      const std::string& output_device_id,
-+      const AudioParameters& input_params) override;
-+
-+ private:
-+  // Called by MakeLinearOutputStream and MakeLowLatencyOutputStream.
-+  AudioOutputStream* MakeOutputStream(const AudioParameters& params);
-+  AudioInputStream* MakeInputStream(const AudioParameters& params);
-+
-+  DISALLOW_COPY_AND_ASSIGN(AudioManagerSndio);
-+};
-+
-+}  // namespace media
-+
-+#endif  // MEDIA_AUDIO_SNDIO_AUDIO_MANAGER_SNDIO_H_
---- /dev/null
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/sndio/sndio_input.cc
-@@ -0,0 +1,200 @@
-+// Copyright 2013 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+#include "base/bind.h"
-+#include "base/logging.h"
-+#include "base/macros.h"
-+#include "media/base/audio_timestamp_helper.h"
-+#include "media/audio/sndio/audio_manager_sndio.h"
-+#include "media/audio/audio_manager.h"
-+#include "media/audio/sndio/sndio_input.h"
-+
-+namespace media {
-+
-+static const SampleFormat kSampleFormat = kSampleFormatS16;
-+
-+void SndioAudioInputStream::OnMoveCallback(void *arg, int delta)
-+{
-+  SndioAudioInputStream* self = static_cast<SndioAudioInputStream*>(arg);
-+
-+  self->hw_delay += delta;
-+}
-+
-+void *SndioAudioInputStream::ThreadEntry(void *arg) {
-+  SndioAudioInputStream* self = static_cast<SndioAudioInputStream*>(arg);
-+
-+  self->ThreadLoop();
-+  return NULL;
-+}
-+
-+SndioAudioInputStream::SndioAudioInputStream(AudioManagerBase* manager,
-+                                             const std::string& device_name,
-+                                             const AudioParameters& params)
-+    : manager(manager),
-+      params(params),
-+      audio_bus(AudioBus::Create(params)),
-+      state(kClosed) {
-+}
-+
-+SndioAudioInputStream::~SndioAudioInputStream() {
-+  if (state != kClosed)
-+    Close();
-+}
-+
-+bool SndioAudioInputStream::Open() {
-+  struct sio_par par;
-+  int sig;
-+
-+  if (state != kClosed)
-+    return false;
-+
-+  if (params.format() != AudioParameters::AUDIO_PCM_LINEAR &&
-+      params.format() != AudioParameters::AUDIO_PCM_LOW_LATENCY) {
-+    LOG(WARNING) << "Unsupported audio format.";
-+    return false;
-+  }
-+
-+  sio_initpar(&par);
-+  par.rate = params.sample_rate();
-+  par.rchan = params.channels();
-+  par.bits = SampleFormatToBitsPerChannel(kSampleFormat);
-+  par.bps = par.bits / 8;
-+  par.sig = sig = par.bits != 8 ? 1 : 0;
-+  par.le = SIO_LE_NATIVE;
-+  par.appbufsz = params.frames_per_buffer();
-+
-+  hdl = sio_open(SIO_DEVANY, SIO_REC, 0);
-+
-+  if (hdl == NULL) {
-+    LOG(ERROR) << "Couldn't open audio device.";
-+    return false;
-+  }
-+
-+  if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par)) {
-+    LOG(ERROR) << "Couldn't set audio parameters.";
-+    goto bad_close;
-+  }
-+
-+  if (par.rate  != (unsigned int)params.sample_rate() ||
-+      par.rchan != (unsigned int)params.channels() ||
-+      par.bits  != (unsigned int)SampleFormatToBitsPerChannel(kSampleFormat) ||
-+      par.sig   != (unsigned int)sig ||
-+      (par.bps > 1 && par.le != SIO_LE_NATIVE) ||
-+      (par.bits != par.bps * 8)) {
-+    LOG(ERROR) << "Unsupported audio parameters.";
-+    goto bad_close;
-+  }
-+  state = kStopped;
-+  buffer = new char[audio_bus->frames() * params.GetBytesPerFrame(kSampleFormat)];
-+  sio_onmove(hdl, &OnMoveCallback, this);
-+  return true;
-+bad_close:
-+  sio_close(hdl);
-+  return false;
-+}
-+
-+void SndioAudioInputStream::Start(AudioInputCallback* cb) {
-+
-+  StartAgc();
-+
-+  state = kRunning;
-+  hw_delay = 0;
-+  callback = cb;
-+  sio_start(hdl);
-+  if (pthread_create(&thread, NULL, &ThreadEntry, this) != 0) {
-+    LOG(ERROR) << "Failed to create real-time thread for recording.";
-+    sio_stop(hdl);
-+    state = kStopped;
-+  }
-+}
-+
-+void SndioAudioInputStream::Stop() {
-+
-+  if (state == kStopped)
-+    return;
-+
-+  state = kStopWait;
-+  pthread_join(thread, NULL);
-+  sio_stop(hdl);
-+  state = kStopped;
-+
-+  StopAgc();
-+}
-+
-+void SndioAudioInputStream::Close() {
-+
-+  if (state == kClosed)
-+    return;
-+
-+  if (state == kRunning)
-+    Stop();
-+
-+  state = kClosed;
-+  delete [] buffer;
-+  sio_close(hdl);
-+
-+  manager->ReleaseInputStream(this);
-+}
-+
-+double SndioAudioInputStream::GetMaxVolume() {
-+  // Not supported
-+  return 0.0;
-+}
-+
-+void SndioAudioInputStream::SetVolume(double volume) {
-+  // Not supported. Do nothing.
-+}
-+
-+double SndioAudioInputStream::GetVolume() {
-+  // Not supported.
-+  return 0.0;
-+}
-+
-+bool SndioAudioInputStream::IsMuted() {
-+  // Not supported.
-+  return false;
-+}
-+
-+void SndioAudioInputStream::SetOutputDeviceForAec(
-+    const std::string& output_device_id) {
-+  // Not supported.
-+}
-+
-+void SndioAudioInputStream::ThreadLoop(void) {
-+  size_t todo, n;
-+  char *data;
-+  unsigned int nframes;
-+  double normalized_volume = 0.0;
-+
-+  nframes = audio_bus->frames();
-+
-+  while (state == kRunning && !sio_eof(hdl)) {
-+
-+    GetAgcVolume(&normalized_volume);
-+
-+    // read one block
-+    todo = nframes * params.GetBytesPerFrame(kSampleFormat);
-+    data = buffer;
-+    while (todo > 0) {
-+      n = sio_read(hdl, data, todo);
-+      if (n == 0)
-+        return;	// unrecoverable I/O error
-+      todo -= n;
-+      data += n;
-+    }
-+    hw_delay -= nframes;
-+
-+    // convert frames count to TimeDelta
-+    const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay,
-+      params.sample_rate());
-+
-+    // push into bus
-+    audio_bus->FromInterleaved<SignedInt16SampleTypeTraits>(reinterpret_cast<int16_t*>(buffer), nframes);
-+
-+    // invoke callback
-+    callback->OnData(audio_bus.get(), base::TimeTicks::Now() - delay, 1.);
-+  }
-+}
-+
-+}  // namespace media
---- /dev/null
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/sndio/sndio_input.h
-@@ -0,0 +1,91 @@
-+// Copyright 2013 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+#ifndef MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_
-+#define MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_
-+
-+#include <stdint.h>
-+#include <string>
-+#include <sndio.h>
-+
-+#include "base/compiler_specific.h"
-+#include "base/macros.h"
-+#include "base/memory/weak_ptr.h"
-+#include "base/time/time.h"
-+#include "media/audio/agc_audio_stream.h"
-+#include "media/audio/audio_io.h"
-+#include "media/audio/audio_device_description.h"
-+#include "media/base/audio_parameters.h"
-+
-+namespace media {
-+
-+class AudioManagerBase;
-+
-+// Implementation of AudioOutputStream using sndio(7)
-+class SndioAudioInputStream : public AgcAudioStream<AudioInputStream> {
-+ public:
-+  // Pass this to the constructor if you want to attempt auto-selection
-+  // of the audio recording device.
-+  static const char kAutoSelectDevice[];
-+
-+  // Create a PCM Output stream for the SNDIO device identified by
-+  // |device_name|. If unsure of what to use for |device_name|, use
-+  // |kAutoSelectDevice|.
-+  SndioAudioInputStream(AudioManagerBase* audio_manager,
-+                     const std::string& device_name,
-+                     const AudioParameters& params);
-+
-+  ~SndioAudioInputStream() override;
-+
-+  // Implementation of AudioInputStream.
-+  bool Open() override;
-+  void Start(AudioInputCallback* callback) override;
-+  void Stop() override;
-+  void Close() override;
-+  double GetMaxVolume() override;
-+  void SetVolume(double volume) override;
-+  double GetVolume() override;
-+  bool IsMuted() override;
-+  void SetOutputDeviceForAec(const std::string& output_device_id) override;
-+
-+ private:
-+
-+  enum StreamState {
-+    kClosed,            // Not opened yet
-+    kStopped,           // Device opened, but not started yet
-+    kRunning,           // Started, device playing
-+    kStopWait           // Stopping, waiting for the real-time thread to exit
-+  };
-+
-+  // C-style call-backs
-+  static void OnMoveCallback(void *arg, int delta);
-+  static void* ThreadEntry(void *arg);
-+
-+  // Continuously moves data from the device to the consumer
-+  void ThreadLoop();
-+  // Our creator, the audio manager needs to be notified when we close.
-+  AudioManagerBase* manager;
-+  // Parameters of the source
-+  AudioParameters params;
-+  // We store data here for consumer
-+  std::unique_ptr<AudioBus> audio_bus;
-+  // Call-back that consumes recorded data
-+  AudioInputCallback* callback;  // Valid during a recording session.
-+  // Handle of the audio device
-+  struct sio_hdl* hdl;
-+  // Current state of the stream
-+  enum StreamState state;
-+  // High priority thread running ThreadLoop()
-+  pthread_t thread;
-+  // Number of frames buffered in the hardware
-+  int hw_delay;
-+  // Temporary buffer where data is stored sndio-compatible format
-+  char* buffer;
-+
-+  DISALLOW_COPY_AND_ASSIGN(SndioAudioInputStream);
-+};
-+
-+}  // namespace media
-+
-+#endif  // MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_
---- /dev/null
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/sndio/sndio_output.cc
-@@ -0,0 +1,183 @@
-+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+#include "base/logging.h"
-+#include "base/time/time.h"
-+#include "base/time/default_tick_clock.h"
-+#include "media/audio/audio_manager_base.h"
-+#include "media/base/audio_timestamp_helper.h"
-+#include "media/audio/sndio/sndio_output.h"
-+
-+namespace media {
-+
-+static const SampleFormat kSampleFormat = kSampleFormatS16;
-+
-+void SndioAudioOutputStream::OnMoveCallback(void *arg, int delta) {
-+  SndioAudioOutputStream* self = static_cast<SndioAudioOutputStream*>(arg);
-+
-+  self->hw_delay -= delta;
-+}
-+
-+void SndioAudioOutputStream::OnVolCallback(void *arg, unsigned int vol) {
-+  SndioAudioOutputStream* self = static_cast<SndioAudioOutputStream*>(arg);
-+
-+  self->vol = vol;
-+}
-+
-+void *SndioAudioOutputStream::ThreadEntry(void *arg) {
-+  SndioAudioOutputStream* self = static_cast<SndioAudioOutputStream*>(arg);
-+
-+  self->ThreadLoop();
-+  return NULL;
-+}
-+
-+SndioAudioOutputStream::SndioAudioOutputStream(const AudioParameters& params,
-+                                               AudioManagerBase* manager)
-+    : manager(manager),
-+      params(params),
-+      audio_bus(AudioBus::Create(params)),
-+      state(kClosed),
-+      mutex(PTHREAD_MUTEX_INITIALIZER) {
-+}
-+
-+SndioAudioOutputStream::~SndioAudioOutputStream() {
-+  if (state != kClosed)
-+    Close();
-+}
-+
-+bool SndioAudioOutputStream::Open() {
-+  struct sio_par par;
-+  int sig;
-+
-+  if (params.format() != AudioParameters::AUDIO_PCM_LINEAR &&
-+      params.format() != AudioParameters::AUDIO_PCM_LOW_LATENCY) {
-+    LOG(WARNING) << "Unsupported audio format.";
-+    return false;
-+  }
-+  sio_initpar(&par);
-+  par.rate = params.sample_rate();
-+  par.pchan = params.channels();
-+  par.bits = SampleFormatToBitsPerChannel(kSampleFormat);
-+  par.bps = par.bits / 8;
-+  par.sig = sig = par.bits != 8 ? 1 : 0;
-+  par.le = SIO_LE_NATIVE;
-+  par.appbufsz = params.frames_per_buffer();
-+
-+  hdl = sio_open(SIO_DEVANY, SIO_PLAY, 0);
-+  if (hdl == NULL) {
-+    LOG(ERROR) << "Couldn't open audio device.";
-+    return false;
-+  }
-+  if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par)) {
-+    LOG(ERROR) << "Couldn't set audio parameters.";
-+    goto bad_close;
-+  }
-+  if (par.rate  != (unsigned int)params.sample_rate() ||
-+      par.pchan != (unsigned int)params.channels() ||
-+      par.bits  != (unsigned int)SampleFormatToBitsPerChannel(kSampleFormat) ||
-+      par.sig   != (unsigned int)sig ||
-+      (par.bps > 1 && par.le != SIO_LE_NATIVE) ||
-+      (par.bits != par.bps * 8)) {
-+    LOG(ERROR) << "Unsupported audio parameters.";
-+    goto bad_close;
-+  }
-+  state = kStopped;
-+  volpending = 0;
-+  vol = 0;
-+  buffer = new char[audio_bus->frames() * params.GetBytesPerFrame(kSampleFormat)];
-+  sio_onmove(hdl, &OnMoveCallback, this);
-+  sio_onvol(hdl, &OnVolCallback, this);
-+  return true;
-+ bad_close:
-+  sio_close(hdl);
-+  return false;
-+}
-+
-+void SndioAudioOutputStream::Close() {
-+  if (state == kClosed)
-+    return;
-+  if (state == kRunning)
-+    Stop();
-+  state = kClosed;
-+  delete [] buffer;
-+  sio_close(hdl);
-+  manager->ReleaseOutputStream(this);  // Calls the destructor
-+}
-+
-+void SndioAudioOutputStream::Start(AudioSourceCallback* callback) {
-+  state = kRunning;
-+  hw_delay = 0;
-+  source = callback;
-+  sio_start(hdl);
-+  if (pthread_create(&thread, NULL, &ThreadEntry, this) != 0) {
-+    LOG(ERROR) << "Failed to create real-time thread.";
-+    sio_stop(hdl);
-+    state = kStopped;
-+  }
-+}
-+
-+void SndioAudioOutputStream::Stop() {
-+  if (state == kStopped)
-+    return;
-+  state = kStopWait;
-+  pthread_join(thread, NULL);
-+  sio_stop(hdl);
-+  state = kStopped;
-+}
-+
-+void SndioAudioOutputStream::SetVolume(double v) {
-+  pthread_mutex_lock(&mutex);
-+  vol = v * SIO_MAXVOL;
-+  volpending = 1;
-+  pthread_mutex_unlock(&mutex);
-+}
-+
-+void SndioAudioOutputStream::GetVolume(double* v) {
-+  pthread_mutex_lock(&mutex);
-+  *v = vol * (1. / SIO_MAXVOL);
-+  pthread_mutex_unlock(&mutex);
-+}
-+
-+// This stream is always used with sub second buffer sizes, where it's
-+// sufficient to simply always flush upon Start().
-+void SndioAudioOutputStream::Flush() {}
-+
-+void SndioAudioOutputStream::ThreadLoop(void) {
-+  int avail, count, result;
-+
-+  while (state == kRunning) {
-+    // Update volume if needed
-+    pthread_mutex_lock(&mutex);
-+    if (volpending) {
-+      volpending = 0;
-+      sio_setvol(hdl, vol);
-+    }
-+    pthread_mutex_unlock(&mutex);
-+
-+    // Get data to play
-+    const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay,
-+	params.sample_rate());
-+    count = source->OnMoreData(delay, base::TimeTicks::Now(), 0, audio_bus.get());
-+    audio_bus->ToInterleaved<SignedInt16SampleTypeTraits>(count, reinterpret_cast<int16_t*>(buffer));
-+    if (count == 0) {
-+      // We have to submit something to the device
-+      count = audio_bus->frames();
-+      memset(buffer, 0, count * params.GetBytesPerFrame(kSampleFormat));
-+      LOG(WARNING) << "No data to play, running empty cycle.";
-+    }
-+
-+    // Submit data to the device
-+    avail = count * params.GetBytesPerFrame(kSampleFormat);
-+    result = sio_write(hdl, buffer, avail);
-+    if (result == 0) {
-+      LOG(WARNING) << "Audio device disconnected.";
-+      break;
-+    }
-+
-+    // Update hardware pointer
-+    hw_delay += count;
-+  }
-+}
-+
-+}  // namespace media
---- /dev/null
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/sndio/sndio_output.h
-@@ -0,0 +1,86 @@
-+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+#ifndef MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_
-+#define MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_
-+
-+#include <pthread.h>
-+#include <sndio.h>
-+
-+#include "base/time/tick_clock.h"
-+#include "base/time/time.h"
-+#include "media/audio/audio_io.h"
-+
-+namespace media {
-+
-+class AudioManagerBase;
-+
-+// Implementation of AudioOutputStream using sndio(7)
-+class SndioAudioOutputStream : public AudioOutputStream {
-+ public:
-+  // The manager is creating this object
-+  SndioAudioOutputStream(const AudioParameters& params,
-+                         AudioManagerBase* manager);
-+  virtual ~SndioAudioOutputStream();
-+
-+  // Implementation of AudioOutputStream.
-+  bool Open() override;
-+  void Close() override;
-+  void Start(AudioSourceCallback* callback) override;
-+  void Stop() override;
-+  void SetVolume(double volume) override;
-+  void GetVolume(double* volume) override;
-+  void Flush() override;
-+
-+  friend void sndio_onmove(void *arg, int delta);
-+  friend void sndio_onvol(void *arg, unsigned int vol);
-+  friend void *sndio_threadstart(void *arg);
-+
-+ private:
-+  enum StreamState {
-+    kClosed,            // Not opened yet
-+    kStopped,           // Device opened, but not started yet
-+    kRunning,           // Started, device playing
-+    kStopWait           // Stopping, waiting for the real-time thread to exit
-+  };
-+
-+  // C-style call-backs
-+  static void OnMoveCallback(void *arg, int delta);
-+  static void OnVolCallback(void *arg, unsigned int vol);
-+  static void* ThreadEntry(void *arg);
-+
-+  // Continuously moves data from the producer to the device
-+  void ThreadLoop(void);
-+
-+  // Our creator, the audio manager needs to be notified when we close.
-+  AudioManagerBase* manager;
-+  // Parameters of the source
-+  AudioParameters params;
-+  // Source stores data here
-+  std::unique_ptr<AudioBus> audio_bus;
-+  // Call-back that produces data to play
-+  AudioSourceCallback* source;
-+  // Handle of the audio device
-+  struct sio_hdl* hdl;
-+  // Current state of the stream
-+  enum StreamState state;
-+  // High priority thread running ThreadLoop()
-+  pthread_t thread;
-+  // Protects vol, volpending and hw_delay
-+  pthread_mutex_t mutex;
-+  // Current volume in the 0..SIO_MAXVOL range
-+  int vol;
-+  // Set to 1 if volumes must be refreshed in the realtime thread
-+  int volpending;
-+  // Number of frames buffered in the hardware
-+  int hw_delay;
-+  // Temporary buffer where data is stored sndio-compatible format
-+  char* buffer;
-+
-+  DISALLOW_COPY_AND_ASSIGN(SndioAudioOutputStream);
-+};
-+
-+}  // namespace media
-+
-+#endif  // MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/media/media_options.gni
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/media_options.gni
-@@ -133,6 +133,9 @@ declare_args() {
-   # Enables runtime selection of ALSA library for audio.
-   use_alsa = false
- 
-+  # Enable runtime selection of sndio(7)
-+  use_sndio = false
-+
-   # Alsa should be used on non-Android, non-Mac POSIX systems.
-   # Alsa should be used on desktop Chromecast and audio-only Chromecast builds.
-   if (is_posix && !is_android && !is_mac &&
diff --git a/srcpkgs/qt6-webengine/patches/0300-chromium-musl-hacks.patch b/srcpkgs/qt6-webengine/patches/0300-chromium-musl-hacks.patch
index 525aeb8a63d2..e0b91a09a84f 100644
--- a/srcpkgs/qt6-webengine/patches/0300-chromium-musl-hacks.patch
+++ b/srcpkgs/qt6-webengine/patches/0300-chromium-musl-hacks.patch
@@ -36,17 +36,3 @@
    s.OutputToStream(&os);
  #else
    os << "StackTrace::OutputToStream not implemented.";
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/net/socket/udp_socket_posix.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/net/socket/udp_socket_posix.cc
-@@ -1157,7 +1157,11 @@ SendResult UDPSocketPosixSender::Interna
-     msg_iov->push_back({const_cast<char*>(buffer->data()), buffer->length()});
-   msgvec->reserve(buffers.size());
-   for (size_t j = 0; j < buffers.size(); j++)
-+#ifdef __GLIBC__
-     msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, nullptr, 0, 0}, 0});
-+#else
-+    msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, 0, 0, 0}, 0});
-+#endif
-   int result = HANDLE_EINTR(Sendmmsg(fd, &msgvec[0], buffers.size(), 0));
-   SendResult send_result(0, 0, std::move(buffers));
-   if (result < 0) {
diff --git a/srcpkgs/qt6-webengine/patches/0301-chromium-musl-sandbox.patch b/srcpkgs/qt6-webengine/patches/0301-chromium-musl-sandbox.patch
deleted file mode 100644
index 4afbec5b98ef..000000000000
--- a/srcpkgs/qt6-webengine/patches/0301-chromium-musl-sandbox.patch
+++ /dev/null
@@ -1,86 +0,0 @@
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
-@@ -134,6 +134,7 @@ namespace sandbox {
- ResultExpr RestrictCloneToThreadsAndEPERMFork() {
-   const Arg<unsigned long> flags(0);
- 
-+#ifdef __GLIBC__
-   // TODO(mdempsky): Extend DSL to support (flags & ~mask1) == mask2.
-   const uint64_t kAndroidCloneMask = CLONE_VM | CLONE_FS | CLONE_FILES |
-                                      CLONE_SIGHAND | CLONE_THREAD |
-@@ -160,6 +161,16 @@ ResultExpr RestrictCloneToThreadsAndEPER
-   return If(IsAndroid() ? android_test : glibc_test, Allow())
-       .ElseIf(is_fork_or_clone_vfork, Error(EPERM))
-       .Else(CrashSIGSYSClone());
-+#else
-+  const int required = CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND |
-+                       CLONE_THREAD | CLONE_SYSVSEM;
-+  const int safe = CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID |
-+                   CLONE_DETACHED;
-+  const BoolExpr thread_clone_ok = (flags&~safe)==required;
-+  return If(thread_clone_ok, Allow())
-+      .ElseIf((flags & (CLONE_VM | CLONE_THREAD)) == 0, Error(EPERM))
-+      .Else(CrashSIGSYSClone());
-+#endif
- }
- 
- #ifndef PR_PAC_RESET_KEYS
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
-@@ -424,6 +424,9 @@ bool SyscallSets::IsAllowedProcessStartO
- #if defined(__i386__)
-     case __NR_waitpid:
- #endif
-+#if !defined(__GLIBC__)
-+    case __NR_set_tid_address:
-+#endif
-       return true;
-     case __NR_clone:  // Should be parameter-restricted.
-     case __NR_setns:  // Privileged.
-@@ -436,7 +439,9 @@ bool SyscallSets::IsAllowedProcessStartO
- #if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
-     case __NR_set_thread_area:
- #endif
-+#if defined(__GLIBC__)
-     case __NR_set_tid_address:
-+#endif
-     case __NR_unshare:
- #if !defined(__mips__) && !defined(__aarch64__)
-     case __NR_vfork:
-@@ -550,6 +555,9 @@ bool SyscallSets::IsAllowedAddressSpaceA
-     case __NR_mlock:
-     case __NR_munlock:
-     case __NR_munmap:
-+#ifndef __GLIBC__
-+    case __NR_mremap:
-+#endif
-       return true;
-     case __NR_madvise:
-     case __NR_mincore:
-@@ -567,7 +575,9 @@ bool SyscallSets::IsAllowedAddressSpaceA
-     case __NR_modify_ldt:
- #endif
-     case __NR_mprotect:
-+#ifdef __GLIBC__
-     case __NR_mremap:
-+#endif
-     case __NR_msync:
-     case __NR_munlockall:
-     case __NR_readahead:
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
-@@ -99,9 +99,14 @@ ResultExpr RendererProcessPolicy::Evalua
-     case __NR_uname:
-     case __NR_sched_getparam:
-     case __NR_sched_getscheduler:
-+#ifndef __GLIBC__
-+    case __NR_sched_setscheduler:
-+#endif
-       return Allow();
-     case __NR_sched_getaffinity:
-+#ifdef __GLIBC__
-     case __NR_sched_setscheduler:
-+#endif
-       return RestrictSchedTarget(GetPolicyPid(), sysno);
-     case __NR_prlimit64:
-       // See crbug.com/662450 and setrlimit comment above.
diff --git a/srcpkgs/qt6-webengine/patches/0302-chromium-no-mallinfo.patch b/srcpkgs/qt6-webengine/patches/0302-chromium-no-mallinfo.patch
index 519930e7bef0..13b9c2c3164f 100644
--- a/srcpkgs/qt6-webengine/patches/0302-chromium-no-mallinfo.patch
+++ b/srcpkgs/qt6-webengine/patches/0302-chromium-no-mallinfo.patch
@@ -35,17 +35,23 @@
  #endif
 --- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc
 +++ qt6-webengine-6.4.2/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc
-@@ -174,7 +174,8 @@ void ReportAppleAllocStats(size_t* total
+@@ -185,7 +185,6 @@
+ #define MALLINFO2_FOUND_IN_LIBC
+   struct mallinfo2 info = mallinfo2();
+ #endif
+-#endif  // defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ #if !defined(MALLINFO2_FOUND_IN_LIBC)
+   struct mallinfo info = mallinfo();
+ #endif
+@@ -205,6 +204,7 @@
+     sys_alloc_dump->AddScalar(MemoryAllocatorDump::kNameSize,
+                               MemoryAllocatorDump::kUnitsBytes, info.uordblks);
+   }
++#endif  // defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ }
+ #endif
  
- #if (BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(IS_ANDROID)) || \
-     (!BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && !BUILDFLAG(IS_WIN) &&    \
--     !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_FUCHSIA))
-+     !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_FUCHSIA) && \
-+     !(BUILDFLAG(IS_LINUX) && !defined(__GLIBC__)))
- void ReportMallinfoStats(ProcessMemoryDump* pmd,
-                          size_t* total_virtual_size,
-                          size_t* resident_size,
-@@ -339,7 +340,7 @@ bool MallocDumpProvider::OnMemoryDump(co
+@@ -339,7 +340,7 @@
                       &allocated_objects_count);
  #elif BUILDFLAG(IS_FUCHSIA)
  // TODO(fuchsia): Port, see https://crbug.com/706592.
@@ -54,14 +60,3 @@
    ReportMallinfoStats(/*pmd=*/nullptr, &total_virtual_size, &resident_size,
                        &allocated_objects_size, &allocated_objects_count);
  #endif
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/tflite/src/tensorflow/lite/profiling/memory_info.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/tflite/src/tensorflow/lite/profiling/memory_info.cc
-@@ -35,7 +35,7 @@ bool MemoryUsage::IsSupported() {
- 
- MemoryUsage GetMemoryUsage() {
-   MemoryUsage result;
--#ifdef __linux__
-+#if defined(__linux__) && defined(__GLIBC__)
-   rusage res;
-   if (getrusage(RUSAGE_SELF, &res) == 0) {
-     result.max_rss_kb = res.ru_maxrss;
diff --git a/srcpkgs/qt6-webengine/template b/srcpkgs/qt6-webengine/template
index 96846feaee83..4e22cb6e8863 100644
--- a/srcpkgs/qt6-webengine/template
+++ b/srcpkgs/qt6-webengine/template
@@ -1,7 +1,7 @@
 # Template file for 'qt6-webengine'
 pkgname=qt6-webengine
-version=6.4.2
-revision=2
+version=6.5.0
+revision=1
 build_style=cmake
 configure_args="
  -DQT_FEATURE_webengine_system_ffmpeg=ON
@@ -32,7 +32,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only, GPL-2.0-only, LGPL-3.0-only, BSD-3-Clause"
 homepage="https://www.qt.io"
 distfiles="https://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtwebengine-everywhere-src-${version}.tar.xz"
-checksum=ffa945518d1cc8d9ee73523e8d9c2090844f5a2d9c7eac05c4ad079472a119c9
+checksum=2a10da34a71b307e9ff11ec086455dd20b83d5b0ee6bda499c4ba9221e306f07
 
 if [ "$XBPS_LIBC" = "musl" ]; then
 	hostmakedepends+=" musl-legacy-compat"
@@ -164,7 +164,7 @@ qt6-webengine-devel_package() {
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }
 

From bdad6a51227fc184e97d11109da7ea14209d0e12 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:36 +0200
Subject: [PATCH 03/26] qt6-webchannel: update to 6.5.0.

---
 srcpkgs/qt6-webchannel/patches/no-cmake-test.patch | 7 -------
 srcpkgs/qt6-webchannel/template                    | 8 ++++----
 2 files changed, 4 insertions(+), 11 deletions(-)
 delete mode 100644 srcpkgs/qt6-webchannel/patches/no-cmake-test.patch

diff --git a/srcpkgs/qt6-webchannel/patches/no-cmake-test.patch b/srcpkgs/qt6-webchannel/patches/no-cmake-test.patch
deleted file mode 100644
index c02028772a2d..000000000000
--- a/srcpkgs/qt6-webchannel/patches/no-cmake-test.patch
+++ /dev/null
@@ -1,7 +0,0 @@
---- a/tests/auto/CMakeLists.txt
-+++ b/tests/auto/CMakeLists.txt
-@@ -1,4 +1,3 @@
--add_subdirectory(cmake)
- add_subdirectory(webchannel)
- if(TARGET Qt::Quick)
-     add_subdirectory(qml)
diff --git a/srcpkgs/qt6-webchannel/template b/srcpkgs/qt6-webchannel/template
index 8f4b58cab240..9c3def385a7b 100644
--- a/srcpkgs/qt6-webchannel/template
+++ b/srcpkgs/qt6-webchannel/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-webchannel'
 pkgname=qt6-webchannel
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtwebchannel-everywhere-src-${version}.tar.xz"
-checksum=06657b2b2509f26c733b7c40da0dbb8571a215b97f99685a6fc3bc51dcbebd87
+checksum=d9553d646df3681b8e09c7609bf7eda0cde69b562f180fa50451a987ed00f1bf
 
 pre_check() {
 	export QML2_IMPORT_PATH="$wrksrc/build/lib/qt6/qml"
@@ -27,13 +27,13 @@ qt6-webchannel-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove usr/lib/qt6/qml/QtWebChannel/plugins.qmltypes
 		vmove usr/lib/qt6/qml/QtWebChannel/qmldir
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 16580a987667851aec216af8bfd3f064444294f8 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:35 +0200
Subject: [PATCH 04/26] qt6-wayland: update to 6.5.0.

---
 srcpkgs/qt6-wayland/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-wayland/template b/srcpkgs/qt6-wayland/template
index 3b45f98bc7ce..da0c31b4acd5 100644
--- a/srcpkgs/qt6-wayland/template
+++ b/srcpkgs/qt6-wayland/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-wayland'
 pkgname=qt6-wayland
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="qt6-base perl pkg-config wayland-devel qt6-declarative-host-tools"
@@ -14,7 +14,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only with Qt-GPL-exception-1.0, LGPL-3.0-only, GPL-2.0-or-later"
 homepage="https://www.qt.io"
 distfiles="https://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtwayland-everywhere-src-${version}.tar.xz"
-checksum=24cf1a0af751ab1637b4815d5c5f3704483d5fa7bedbd3519e6fc020d8be135f
+checksum=ccc57fa277fc5f1c1c2c4733eae80a60996b67a067233c47809e542aa31759a3
 
 subpackages="qt6-wayland-tools qt6-wayland-devel"
 
@@ -43,11 +43,11 @@ qt6-wayland-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 6453096cb17ebf0df8dc8dcf8f5787bb3962fe92 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:34 +0200
Subject: [PATCH 05/26] qt6-virtualkeyboard: update to 6.5.0.

---
 srcpkgs/qt6-virtualkeyboard/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-virtualkeyboard/template b/srcpkgs/qt6-virtualkeyboard/template
index 3de6238c411f..cf7b6f2ec830 100644
--- a/srcpkgs/qt6-virtualkeyboard/template
+++ b/srcpkgs/qt6-virtualkeyboard/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-virtualkeyboard'
 pkgname=qt6-virtualkeyboard
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl pkg-config qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtvirtualkeyboard-everywhere-src-${version}.tar.xz"
-checksum=9c3c830f6e17896efaca5fdc7c191088eedd70b07490b38835856579346a4f28
+checksum=7b45de78240817e9f4b57af821e4781655463a4f5f396bbc5df0580a7d2a0fa7
 
 if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args="-DQT_BUILD_TESTS=ON"
@@ -34,11 +34,11 @@ qt6-virtualkeyboard-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 8a0722fff2dd441703ac41b31c743e7dbaa01ee3 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:32 +0200
Subject: [PATCH 06/26] qt6-translations: update to 6.5.0.

---
 srcpkgs/qt6-translations/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/qt6-translations/template b/srcpkgs/qt6-translations/template
index 5669ab56dc20..866f504f3b9d 100644
--- a/srcpkgs/qt6-translations/template
+++ b/srcpkgs/qt6-translations/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-translations'
 pkgname=qt6-translations
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="qt6-base qt6-tools perl"
@@ -10,4 +10,4 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qttranslations-everywhere-src-${version}.tar.xz"
-checksum=bbe0291502c2604b72fef730e1935bd22f8b921d8c473250f298a723b2a9c496
+checksum=fc85d0fd8393f518653ccada1014177a56df6e73f30f3b64eea0c2e4a0067a3d

From 34fa1dd55234c9f322526f74a6c2868e31c8b3e8 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:31 +0200
Subject: [PATCH 07/26] qt6-tools: update to 6.5.0.

---
 srcpkgs/qt6-tools/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/qt6-tools/template b/srcpkgs/qt6-tools/template
index d5ad1618e3a7..c0ec27cf612c 100644
--- a/srcpkgs/qt6-tools/template
+++ b/srcpkgs/qt6-tools/template
@@ -1,7 +1,7 @@
 # Template file for 'qt6-tools'
 pkgname=qt6-tools
-version=6.4.2
-revision=2
+version=6.5.0
+revision=1
 build_style=cmake
 configure_args="-DEXTERNAL_GUMBO=ON -DLITEHTML_UTF8=ON -DUSE_ICU=ON
  -DQT_BUILD_SHARED_LIBS=ON -DQT_FEATURE_assistant=ON
@@ -16,7 +16,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only with Qt-GPL-exception-1.0, LGPL-3.0-only, GPL-2.0-or-later"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qttools-everywhere-src-${version}.tar.xz"
-checksum=a31387916184e4a5ef522d3ea841e8e931cc0f88be0824a7a354a572d5826c68
+checksum=49c33d96b0a44988be954269b8ce3d1a495b439726e03a6be7c0d50a686369c4
 
 if [ "$CROSS_BUILD" ]; then
 	configure_args+=" -DQT_FORCE_BUILD_TOOLS=TRUE"

From 53721b1a548405a084d21d39992cf456f1b1ebff Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:29 +0200
Subject: [PATCH 08/26] qt6-svg: update to 6.5.0.

---
 srcpkgs/qt6-svg/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-svg/template b/srcpkgs/qt6-svg/template
index 06c1fcc306c9..aba275a34c86 100644
--- a/srcpkgs/qt6-svg/template
+++ b/srcpkgs/qt6-svg/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-svg'
 pkgname=qt6-svg
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="qt6-base perl"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only with Qt-GPL-exception-1.0, GPL-2.0-or-later, LGPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtsvg-everywhere-src-${version}.tar.xz"
-checksum=b746af3cb1793621d8ed7eae38d9ad5a15541dc2742031069f2ae3fe87590314
+checksum=64ca7e61f44d51e28bcbb4e0509299b53a9a7e38879e00a7fe91643196067a4f
 
 if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args="-DQT_BUILD_TESTS=ON"
@@ -31,11 +31,11 @@ qt6-svg-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From b00a282bd0147c3aa7b4ea54f9c41372cca8ca9a Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:28 +0200
Subject: [PATCH 09/26] qt6-shadertools: update to 6.5.0.

---
 srcpkgs/qt6-shadertools/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-shadertools/template b/srcpkgs/qt6-shadertools/template
index fbb2fba7181f..b11b281680ad 100644
--- a/srcpkgs/qt6-shadertools/template
+++ b/srcpkgs/qt6-shadertools/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-shadertools'
 pkgname=qt6-shadertools
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base"
@@ -11,7 +11,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtshadertools-everywhere-src-${version}.tar.xz"
-checksum=fa65bff84d4e9c2cb4cbf6fb098207e0e23d863dbe675eb277034a29c226a217
+checksum=86618d037f3071f1f7ac5eb7ab76ae4e6f51cfddded0a402bb9aa7f3f79f5775
 
 if [ "$CROSS_BUILD" ]; then
 	configure_args="-DQT_FORCE_BUILD_TOOLS=true"
@@ -31,12 +31,12 @@ qt6-shadertools-devel_package() {
 	pkg_install() {
 		local _f
 		vmove usr/include
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 		for _f in ${DESTDIR}/usr/lib/cmake/*; do
 			case "$_f" in
 			*ToolsTools) ;;

From 4055beedd584709527611f912b5e10afdc8e0d13 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:27 +0200
Subject: [PATCH 10/26] qt6-serialport: update to 6.5.0.

---
 srcpkgs/qt6-serialport/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-serialport/template b/srcpkgs/qt6-serialport/template
index c100f9686fcf..77166598d01f 100644
--- a/srcpkgs/qt6-serialport/template
+++ b/srcpkgs/qt6-serialport/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-serialport'
 pkgname=qt6-serialport
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base pkg-config"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtserialport-everywhere-src-${version}.tar.xz"
-checksum=336d95919037800184b3c3de8ccb6f62954b20f3756c05adce8d5010504340fa
+checksum=9209a9f5978a4adf3a150582270432fe3b635d05513ad1a57bff5ca4954a4dff
 
 qt6-serialport-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision} qt6-base-devel>=${version}_1"
@@ -18,11 +18,11 @@ qt6-serialport-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 2a478887ef053e55c08b3ea71668a8bfac69f169 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:26 +0200
Subject: [PATCH 11/26] qt6-sensors: update to 6.5.0.

---
 srcpkgs/qt6-sensors/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/qt6-sensors/template b/srcpkgs/qt6-sensors/template
index 1dd0d0f3df13..5e6a1e2a7776 100644
--- a/srcpkgs/qt6-sensors/template
+++ b/srcpkgs/qt6-sensors/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-sensors'
 pkgname=qt6-sensors
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-declarative-host-tools pkg-config"
@@ -10,7 +10,7 @@ maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtsensors-everywhere-src-${version}.tar.xz"
-checksum=455619ff28a39f4caba49c9e1952fbcfafc8ffc893b437d653d5465a077ee656
+checksum=5ee434e2f4917c2d2e9b1de6cb1347c644a8c92338284efeb96202a557e72ea6
 
 post_install() {
 	rm -rf ${DESTDIR}/usr/tests
@@ -23,7 +23,7 @@ qt6-sensors-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove usr/lib/qt6/qml/QtSensors/plugins.qmltypes

From da7e5aea96338eb2663b047fd0f753685efa06de Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:24 +0200
Subject: [PATCH 12/26] qt6-scxml: update to 6.5.0.

---
 srcpkgs/qt6-scxml/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-scxml/template b/srcpkgs/qt6-scxml/template
index 0e53ba7cf506..8f81d750b1b1 100644
--- a/srcpkgs/qt6-scxml/template
+++ b/srcpkgs/qt6-scxml/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-scxml'
 pkgname=qt6-scxml
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtscxml-everywhere-src-${version}.tar.xz"
-checksum=13b0d43459394bed2481967a1feff02b63228a82c1136a62941c0eb83ef54e7f
+checksum=f121843cb8cf4a76d621be371e80265ac28254f3c4c123b051e907c1c915766e
 
 subpackages="qt6-scxml-tools qt6-scxml-devel"
 if [ "$CROSS_BUILD" ]; then
@@ -41,11 +41,11 @@ qt6-scxml-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 7447d87bf7d7494a070f5d05be1365cd85b8d251 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:23 +0200
Subject: [PATCH 13/26] qt6-remoteobjects: update to 6.5.0.

---
 srcpkgs/qt6-remoteobjects/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/qt6-remoteobjects/template b/srcpkgs/qt6-remoteobjects/template
index 062736349442..b37d82bed03d 100644
--- a/srcpkgs/qt6-remoteobjects/template
+++ b/srcpkgs/qt6-remoteobjects/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-remoteobjects'
 pkgname=qt6-remoteobjects
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-declarative-host-tools pkg-config"
@@ -13,7 +13,7 @@ maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtremoteobjects-everywhere-src-${version}.tar.xz"
-checksum=583c53640020d5d068eef7ae180d750120bb49e30249c2febdd173c5a7428812
+checksum=ff40b6e7afa84e44190d3b6357462569525b1e1fb0e8bfd8de16a8680825c2ae
 
 if [ "$CROSS_BUILD" ]; then
 	hostmakedepends+=" qt6-remoteobjects"
@@ -35,7 +35,7 @@ qt6-remoteobjects-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove usr/lib/qt6/qml/QtRemoteObjects/plugins.qmltypes

From fa344adb436ac978b22a77adc756efa2642fbcd3 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:22 +0200
Subject: [PATCH 14/26] qt6-quicktimeline: update to 6.5.0.

---
 srcpkgs/qt6-quicktimeline/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/qt6-quicktimeline/template b/srcpkgs/qt6-quicktimeline/template
index f2c8e16e621e..3d24a392ff40 100644
--- a/srcpkgs/qt6-quicktimeline/template
+++ b/srcpkgs/qt6-quicktimeline/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-quicktimeline'
 pkgname=qt6-quicktimeline
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version/rc/-rc}/submodules/qtquicktimeline-everywhere-src-${version/rc/-rc}.tar.xz"
-checksum=3088abb7f478362a354ea1509d1c3c3403e3f5adfb84f3e5cf30a1f2eff09a5e
+checksum=578b3e929662b443cd4e51cb0de71e91f4ff55a512d66e0b1ea2999b5657cfbf
 
 if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args="-DQT_BUILD_TESTS=ON"

From ed077e932a9483c1cf6233aed6e43cdf97635327 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:21 +0200
Subject: [PATCH 15/26] qt6-quick3d: update to 6.5.0.

---
 srcpkgs/qt6-quick3d/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-quick3d/template b/srcpkgs/qt6-quick3d/template
index e5ef91c9053c..e01cea81bebe 100644
--- a/srcpkgs/qt6-quick3d/template
+++ b/srcpkgs/qt6-quick3d/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-quick3d'
 pkgname=qt6-quick3d
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-declarative-host-tools qt6-shadertools"
@@ -11,7 +11,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtquick3d-everywhere-src-${version}.tar.xz"
-checksum=953d3b6ca6dc00563ceea33d51f25e22b1788ab5aa861941100f6a1b652926a7
+checksum=9b590429ca98b5cc8cec4df2efa3775e9f11ed8260d123e95f3c0fc37f3772a5
 
 subpackages="qt6-quick3d-tools qt6-quick3d-devel"
 if [ "$CROSS_BUILD" ]; then
@@ -50,11 +50,11 @@ qt6-quick3d-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 281a72d116faad230eb428f3f9704c30f0fa83ef Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:11 +0200
Subject: [PATCH 16/26] qt6-qt5compat: update to 6.5.0.

---
 srcpkgs/qt6-qt5compat/template | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/qt6-qt5compat/template b/srcpkgs/qt6-qt5compat/template
index ed167695b5cd..3b3d2b5dfacf 100644
--- a/srcpkgs/qt6-qt5compat/template
+++ b/srcpkgs/qt6-qt5compat/template
@@ -1,7 +1,7 @@
 # Template file for 'qt6-qt5compat'
 pkgname=qt6-qt5compat
-version=6.4.2
-revision=2
+version=6.5.0
+revision=1
 build_style=cmake
 configure_args="-DQT_FEATURE_textcodec=ON -DQT_FEATURE_codecs=ON
  -DQT_FEATURE_iconv=ON -DQT_FEATURE_big_codecs=ON"
@@ -12,7 +12,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only with Qt-GPL-exception-1.0, LGPL-3.0-only, GPL-2.0-or-later"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qt5compat-everywhere-src-${version}.tar.xz"
-checksum=f51f505c8e985b51b7d733e27d782c6fce181beef53364acb0368cc892c4b792
+checksum=a9e2f53a193fc2e131b01a2f6e7a1fbfe31309c2413fdc213e5a81c558c21261
 
 if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args="-DQT_BUILD_TESTS=ON"
@@ -28,11 +28,11 @@ qt6-qt5compat-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From d836724c23f3223bb577fe148ab5124d1d787f7d Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:07 +0200
Subject: [PATCH 17/26] qt6-networkauth: update to 6.5.0.

---
 srcpkgs/qt6-networkauth/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-networkauth/template b/srcpkgs/qt6-networkauth/template
index 35d7161a3288..03bda38ed1fc 100644
--- a/srcpkgs/qt6-networkauth/template
+++ b/srcpkgs/qt6-networkauth/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-networkauth'
 pkgname=qt6-networkauth
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtnetworkauth-everywhere-src-${version}.tar.xz"
-checksum=deab17bd957d0a493bd7757bc71270918147596fb9661a886b3f1d305047c2ee
+checksum=dbcc522ab2136ebe6c9be5c7f156a3bcefa92cd19a462e33a00e94068a24413e
 
 if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args="-DQT_BUILD_TESTS=ON"
@@ -22,11 +22,11 @@ qt6-networkauth-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 078576eb5db42abe09c5037cfd462a3458a30613 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:06 +0200
Subject: [PATCH 18/26] qt6-multimedia: update to 6.5.0.

---
 srcpkgs/qt6-multimedia/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/qt6-multimedia/template b/srcpkgs/qt6-multimedia/template
index d89e7d54eb5a..c622b7c9e8fc 100644
--- a/srcpkgs/qt6-multimedia/template
+++ b/srcpkgs/qt6-multimedia/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-multimedia'
 pkgname=qt6-multimedia
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 configure_args="-DQT_FEATURE_gstreamer=ON"
@@ -12,7 +12,7 @@ maintainer="John <me@johnnynator.dev>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtmultimedia-everywhere-src-${version}.tar.xz"
-checksum=7f2b70deeada911c8e660e2801286657f297a5d1d543d1f6bfa856f28972c776
+checksum=9480d0c73abdd01aec4899e340938cec046a3f404b9f9ed945288be574dca146
 
 if [ "$XBPS_MACHINE" = "i686" ]; then
 	CXXFLAGS="-DPFFFT_SIMD_DISABLE=1"
@@ -39,7 +39,7 @@ qt6-multimedia-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove usr/lib/qt6/qml/QtMultimedia/plugins.qmltypes

From 3a7acb6e1a388775c9b50d7da0b78013dd7d6bcc Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:04 +0200
Subject: [PATCH 19/26] qt6-lottie: update to 6.5.0.

---
 srcpkgs/qt6-lottie/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-lottie/template b/srcpkgs/qt6-lottie/template
index 0e246987d078..8a37fae7f2dc 100644
--- a/srcpkgs/qt6-lottie/template
+++ b/srcpkgs/qt6-lottie/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-lottie'
 pkgname=qt6-lottie
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtlottie-everywhere-src-${version}.tar.xz"
-checksum=accc8869c72095ce5b373a30c362d21235145a79f9e270480712f861d1de1c56
+checksum=8425ecdeb9286a6c51985bdaf3936026610d04dc31eec06fee79df6442b7e246
 
 if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args="-DQT_BUILD_TESTS=ON"
@@ -30,10 +30,10 @@ qt6-lottie-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 60193842b5fa08e5edc79c782bdef484290a3f60 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:04 +0200
Subject: [PATCH 20/26] qt6-location: update to 6.5.0.

---
 srcpkgs/qt6-location/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-location/template b/srcpkgs/qt6-location/template
index 429e9e02db12..89ff6498c679 100644
--- a/srcpkgs/qt6-location/template
+++ b/srcpkgs/qt6-location/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-location'
 pkgname=qt6-location
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtpositioning-everywhere-src-${version}.tar.xz"
-checksum=7f01baf5ba877af5b211c9d32e6075019f00d9d7a2ba81bb0f10ca759e9aef82
+checksum=0da7121ebfd9d2ba985ab1f2c8a3af70027c35732177ec0fc72ff7e82835c886
 
 pre_check() {
 	export QML2_IMPORT_PATH="$wrksrc/build/lib/qt6/qml"
@@ -26,11 +26,11 @@ qt6-location-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 2c76485f39ca0315744419808dae0bc95a8d8de6 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:02 +0200
Subject: [PATCH 21/26] qt6-imageformats: update to 6.5.0.

---
 srcpkgs/qt6-imageformats/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/qt6-imageformats/template b/srcpkgs/qt6-imageformats/template
index 3ed63f6e98cd..253ff125e09e 100644
--- a/srcpkgs/qt6-imageformats/template
+++ b/srcpkgs/qt6-imageformats/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-imageformats'
 pkgname=qt6-imageformats
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base"
@@ -10,4 +10,4 @@ maintainer="John <me@johnnynator.dev>"
 license="LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtimageformats-everywhere-src-${version}.tar.xz"
-checksum=fc5f999ae0779a67d5507956d4dd315386eb81cf6ccba632de039bb9eee11707
+checksum=f9f810cd3ac7e60132c0da33f34fcfce42e3e764d6cad3020c2f3b1b42046f78

From a37495b1d4f3d54116b48cf7f8fc9aaa8e2b4df0 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:01 +0200
Subject: [PATCH 22/26] qt6-declarative: update to 6.5.0.

---
 .../patches/qml-broken-test.patch             | 64 -------------------
 srcpkgs/qt6-declarative/template              |  8 +--
 2 files changed, 4 insertions(+), 68 deletions(-)
 delete mode 100644 srcpkgs/qt6-declarative/patches/qml-broken-test.patch

diff --git a/srcpkgs/qt6-declarative/patches/qml-broken-test.patch b/srcpkgs/qt6-declarative/patches/qml-broken-test.patch
deleted file mode 100644
index b16412fcd5e5..000000000000
--- a/srcpkgs/qt6-declarative/patches/qml-broken-test.patch
+++ /dev/null
@@ -1,64 +0,0 @@
---- qt6-declarative-6.4.2.orig/tests/auto/quickcontrols2/controls/data/tst_rangeslider.qml
-+++ qt6-declarative-6.4.2/tests/auto/quickcontrols2/controls/data/tst_rangeslider.qml
-@@ -602,61 +602,6 @@ TestCase {
-     }
- 
-     function test_overlappingHandles() {
--        var control = createTemporaryObject(sliderComponent, testCase)
--        verify(control)
--
--        // By default, we force the second handle to be after the first in
--        // terms of stacking order *and* z value.
--        compare(control.second.handle.z, 1)
--        compare(control.first.handle.z, 0)
--        control.first.value = 0
--        control.second.value = 0
--
--        // When both handles overlap, only the handle with the higher Z value
--        // should be hovered.
--        mouseMove(control, control.second.handle.x, control.second.handle.y)
--        compare(control.second.hovered, true)
--        compare(control.first.hovered, false)
--
--        // Both are at the same position, so it doesn't matter whose coordinates we use.
--        mousePress(control, control.first.handle.x, control.first.handle.y, Qt.LeftButton)
--        verify(control.second.pressed)
--        compare(control.second.handle.z, 1)
--        compare(control.first.handle.z, 0)
--
--        // Move the second handle out of the way.
--        mouseMove(control, control.width, control.first.handle.y)
--        mouseRelease(control, control.width, control.first.handle.y, Qt.LeftButton)
--        verify(!control.second.pressed)
--        compare(control.second.value, 1.0)
--        compare(control.second.handle.z, 1)
--        compare(control.first.handle.z, 0)
--
--        // The first handle should not be hovered.
--        compare(control.first.hovered, false)
--
--        // Move the first handle on top of the second.
--        mousePress(control, control.first.handle.x, control.first.handle.y, Qt.LeftButton)
--        verify(control.first.pressed)
--        compare(control.first.handle.z, 1)
--        compare(control.second.handle.z, 0)
--
--        mouseMove(control, control.width, control.first.handle.y)
--        mouseRelease(control, control.width, control.first.handle.y, Qt.LeftButton)
--        verify(!control.first.pressed)
--        compare(control.first.handle.z, 1)
--        compare(control.second.handle.z, 0)
--
--        // The most recently pressed handle (the first) should have the higher z value.
--        mousePress(control, control.first.handle.x, control.first.handle.y, Qt.LeftButton)
--        verify(control.first.pressed)
--        compare(control.first.handle.z, 1)
--        compare(control.second.handle.z, 0)
--
--        mouseRelease(control, control.first.handle.x, control.first.handle.y, Qt.LeftButton)
--        verify(!control.first.pressed)
--        compare(control.first.handle.z, 1)
--        compare(control.second.handle.z, 0)
-     }
- 
-     function test_keys_data() {
diff --git a/srcpkgs/qt6-declarative/template b/srcpkgs/qt6-declarative/template
index a3d921f9ea19..22e58f1578e3 100644
--- a/srcpkgs/qt6-declarative/template
+++ b/srcpkgs/qt6-declarative/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-declarative'
 pkgname=qt6-declarative
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 configure_args="-DQT_BUILD_TESTS=ON"
@@ -11,7 +11,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only with Qt-GPL-exception-1.0, LGPL-3.0-only, GPL-2.0-or-later"
 homepage="https://www.qt.io"
 distfiles="https://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtdeclarative-everywhere-src-${version}.tar.xz"
-checksum=a4bdd983de4e9cbca0f85b767dbdd8598711554e370a06da8f509ded4430f5bd
+checksum=f7d631cd8ebc1491dad0f30f1b5326ae812bee4ad706e61157816a82bf588c97
 replaces="qt6-quickcontrols2>=0"
 
 if [ "$CROSS_BUILD" ]; then
@@ -96,13 +96,13 @@ qt6-declarative-devel_package() {
 	replaces="qt6-quickcontrols2-devel>=0"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.a"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 		for _f in ${DESTDIR}/usr/lib/cmake/*; do
 			case "$_f" in
 			*Tools) ;;

From 9fc3aab3b8c40ff09834a213223d5646dcab648f Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:35:55 +0200
Subject: [PATCH 23/26] qt6-connectivity: update to 6.5.0.

---
 srcpkgs/qt6-connectivity/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-connectivity/template b/srcpkgs/qt6-connectivity/template
index 66fce5c0397b..5705416ba440 100644
--- a/srcpkgs/qt6-connectivity/template
+++ b/srcpkgs/qt6-connectivity/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-connectivity'
 pkgname=qt6-connectivity
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="GPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtconnectivity-everywhere-src-${version}.tar.xz"
-checksum=8c9b44b239e42b4c4d6fca5f427904e688890b2a1bfb6bcbe5e6e2afcdc5d7af
+checksum=e7636653bab986361a77b23451d966c85591428c0422741890ef0fb197698f06
 
 qt6-connectivity-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision}
@@ -19,11 +19,11 @@ qt6-connectivity-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From aa49efddc50a79ad99c8f1fa02e639712115dcf8 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:35:54 +0200
Subject: [PATCH 24/26] qt6-charts: update to 6.5.0.

---
 srcpkgs/qt6-charts/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-charts/template b/srcpkgs/qt6-charts/template
index 57ce88143367..2c00ac9a44a1 100644
--- a/srcpkgs/qt6-charts/template
+++ b/srcpkgs/qt6-charts/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-charts'
 pkgname=qt6-charts
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtcharts-everywhere-src-${version}.tar.xz"
-checksum=a1a7c0e08c8870cf97d1c3a2eb3f37681aaed00a63b5b2f70bdf2da878d0a9aa
+checksum=fccd1d50a7f56de011f7668e0e90f022316bd4065fa7f91b078579403e2e26a8
 
 pre_check() {
 	export QML2_IMPORT_PATH="$wrksrc/build/lib/qt6/qml"
@@ -26,11 +26,11 @@ qt6-charts-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 8c34dc705a6e8227d9414f79c211591eb0f2c32c Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:35:53 +0200
Subject: [PATCH 25/26] qt6-base: update to 6.5.0.

---
 srcpkgs/qt6-base/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/qt6-base/template b/srcpkgs/qt6-base/template
index dfde60bdb438..fe1f013db5a6 100644
--- a/srcpkgs/qt6-base/template
+++ b/srcpkgs/qt6-base/template
@@ -1,7 +1,7 @@
 # Template file for 'qt6-base'
 pkgname=qt6-base
-version=6.4.2
-revision=3
+version=6.5.0
+revision=1
 build_style=cmake
 configure_args="-DINSTALL_DATADIR=share/qt6
  -DINSTALL_ARCHDATADIR=lib/qt6
@@ -32,7 +32,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only WITH Qt-GPL-exception-1.0, LGPL-3.0-only, GPL-2.0-or-later"
 homepage="https://www.qt.io"
 distfiles="https://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtbase-everywhere-src-${version}.tar.xz"
-checksum=a88bc6cedbb34878a49a622baa79cace78cfbad4f95fdbd3656ddb21c705525d
+checksum=fde1aa7b4fbe64ec1b4fc576a57f4688ad1453d2fab59cbadd948a10a6eaf5ef
 python_version=3
 
 if [ "$CROSS_BUILD" ]; then

From 789c9371a41fb64b40ed13fb70a616828ba9827e Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:35:44 +0200
Subject: [PATCH 26/26] qt6-3d: update to 6.5.0.

---
 srcpkgs/qt6-3d/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/qt6-3d/template b/srcpkgs/qt6-3d/template
index 95519668d1cc..4b7fbee0562e 100644
--- a/srcpkgs/qt6-3d/template
+++ b/srcpkgs/qt6-3d/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-3d'
 pkgname=qt6-3d
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-declarative-host-tools"
@@ -11,7 +11,7 @@ maintainer="John <me@johnnynator.dev>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qt3d-everywhere-src-${version}.tar.xz"
-checksum=456c24c3d3840273e720b79fe8fed452fa889b54cbae6b45db1d1ded4da37341
+checksum=20b250023244f21dfbec5c007bac805d4494fa463a6dd27538afb1a81b230816
 
 qt6-3d-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision}"

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] Qt6: Update to 6.5.0
  2023-04-05 22:13 [PR PATCH] Qt6: Update to 6.5.0 Johnnynator
  2023-04-05 22:31 ` [PR PATCH] [Updated] " Johnnynator
@ 2023-04-06 11:23 ` Johnnynator
  2023-04-06 13:21 ` Johnnynator
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Johnnynator @ 2023-04-06 11:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2193 bytes --]

There is an updated pull request by Johnnynator against master on the void-packages repository

https://github.com/Johnnynator/void-packages qt6.5.0
https://github.com/void-linux/void-packages/pull/43293

Qt6: Update to 6.5.0
- qt6-websockets: update to 6.5.0.
- qt6-webengine: update to 6.5.0.
- qt6-webchannel: update to 6.5.0.
- qt6-wayland: update to 6.5.0.
- qt6-virtualkeyboard: update to 6.5.0.
- qt6-translations: update to 6.5.0.
- qt6-tools: update to 6.5.0.
- qt6-svg: update to 6.5.0.
- qt6-shadertools: update to 6.5.0.
- qt6-serialport: update to 6.5.0.
- qt6-sensors: update to 6.5.0.
- qt6-scxml: update to 6.5.0.
- qt6-remoteobjects: update to 6.5.0.
- qt6-quicktimeline: update to 6.5.0.
- qt6-quick3d: update to 6.5.0.
- qt6-qt5compat: update to 6.5.0.
- qt6-networkauth: update to 6.5.0.
- qt6-multimedia: update to 6.5.0.
- qt6-lottie: update to 6.5.0.
- qt6-location: update to 6.5.0.
- qt6-imageformats: update to 6.5.0.
- qt6-declarative: update to 6.5.0.
- qt6-connectivity: update to 6.5.0.
- qt6-charts: update to 6.5.0.
- qt6-base: update to 6.5.0.
- qt6-3d: update to 6.5.0.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86_64
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  -  - [x] riscv64
  -  - [ ] x86_64-musl
  -  - [ ] aarch64

[ci skip]
[skip ci]

A patch file from https://github.com/void-linux/void-packages/pull/43293.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-qt6.5.0-43293.patch --]
[-- Type: text/x-diff, Size: 184241 bytes --]

From d5e5e61d7063bd8d75a929d8ae68e31236c89e84 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:37:45 +0200
Subject: [PATCH 01/27] qt6-websockets: update to 6.5.0.

---
 srcpkgs/qt6-websockets/patches/no-cmake-test.patch | 7 -------
 srcpkgs/qt6-websockets/template                    | 8 ++++----
 2 files changed, 4 insertions(+), 11 deletions(-)
 delete mode 100644 srcpkgs/qt6-websockets/patches/no-cmake-test.patch

diff --git a/srcpkgs/qt6-websockets/patches/no-cmake-test.patch b/srcpkgs/qt6-websockets/patches/no-cmake-test.patch
deleted file mode 100644
index 8829f9fab1df..000000000000
--- a/srcpkgs/qt6-websockets/patches/no-cmake-test.patch
+++ /dev/null
@@ -1,7 +0,0 @@
---- a/tests/auto/CMakeLists.txt
-+++ b/tests/auto/CMakeLists.txt
-@@ -1,4 +1,3 @@
--add_subdirectory(cmake)
- add_subdirectory(websockets)
- if(TARGET Qt::Quick)
-     add_subdirectory(qml)
diff --git a/srcpkgs/qt6-websockets/template b/srcpkgs/qt6-websockets/template
index 467083fcd44c..3e02fb127fd6 100644
--- a/srcpkgs/qt6-websockets/template
+++ b/srcpkgs/qt6-websockets/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-websockets'
 pkgname=qt6-websockets
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base qt6-declarative-host-tools"
@@ -12,7 +12,7 @@ maintainer="John <me@johnnynator.dev>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtwebsockets-everywhere-src-${version}.tar.xz"
-checksum=71cf857582db20c20103a56f67d51c33c4ab0b72448209c963d3b449a527c626
+checksum=bc087bd656bb34da120ccab6e927036a219f75fd88f1543744c426bfca616308
 
 pre_check() {
 	export QML2_IMPORT_PATH="$wrksrc/build/lib/qt6/qml"
@@ -28,11 +28,11 @@ qt6-websockets-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From e888a1445f6388e4296bbad5d7c600e9730a2529 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:37:44 +0200
Subject: [PATCH 02/27] qt6-webengine: update to 6.5.0.

---
 .../patches/0004-riscv-angle.patch            |   28 +
 .../patches/0004-riscv-angle.patch.args       |    1 +
 .../patches/0005-riscv-crashpad.patch         |  778 +++++++
 .../patches/0005-riscv-crashpad.patch.args    |    1 +
 .../patches/0006-riscv-dav1d.patch            |   44 +
 .../patches/0006-riscv-dav1d.patch.args       |    1 +
 .../patches/0007-riscv-sandbox.patch          | 1956 +++++++++++++++++
 .../patches/0007-riscv-sandbox.patch.args     |    1 +
 .../0100-chromium-revert-9d080c0.patch        |  154 --
 ...omium-102-fenced_frame_utils-include.patch |   20 -
 ...102-chromium-102-regex_pattern-array.patch |   14 -
 ...0103-chromium-i686-vaapi-fpermissive.patch |   23 -
 .../0104-chromium-libxml-unbundle.patch       |   10 -
 .../patches/0107-chromium-cross-build.patch   |    6 +-
 .../patches/0117-chromium-musl-resolver.patch |   25 +-
 .../patches/0124-chromium-enable-i686.patch   |   17 -
 .../0129-chromium-sandbox-shed_getparam.patch |   23 +-
 .../qt6-webengine/patches/0155-systypes.patch |   11 +
 .../patches/0200-chromium-sndio.patch         |  849 -------
 .../patches/0300-chromium-musl-hacks.patch    |   14 -
 .../patches/0301-chromium-musl-sandbox.patch  |   86 -
 .../patches/0302-chromium-no-mallinfo.patch   |   37 +-
 srcpkgs/qt6-webengine/template                |    8 +-
 23 files changed, 2865 insertions(+), 1242 deletions(-)
 create mode 100644 srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch.args
 create mode 100644 srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch.args
 create mode 100644 srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch.args
 create mode 100644 srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch.args
 delete mode 100644 srcpkgs/qt6-webengine/patches/0100-chromium-revert-9d080c0.patch
 delete mode 100644 srcpkgs/qt6-webengine/patches/0101-chromium-102-fenced_frame_utils-include.patch
 delete mode 100644 srcpkgs/qt6-webengine/patches/0102-chromium-102-regex_pattern-array.patch
 delete mode 100644 srcpkgs/qt6-webengine/patches/0103-chromium-i686-vaapi-fpermissive.patch
 delete mode 100644 srcpkgs/qt6-webengine/patches/0104-chromium-libxml-unbundle.patch
 delete mode 100644 srcpkgs/qt6-webengine/patches/0124-chromium-enable-i686.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0155-systypes.patch
 delete mode 100644 srcpkgs/qt6-webengine/patches/0200-chromium-sndio.patch
 delete mode 100644 srcpkgs/qt6-webengine/patches/0301-chromium-musl-sandbox.patch

diff --git a/srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch b/srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch
new file mode 100644
index 000000000000..1aceb6f2d229
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch
@@ -0,0 +1,28 @@
+Index: chromium-111.0.5563.64/third_party/angle/gni/angle.gni
+===================================================================
+--- chromium-111.0.5563.64.orig/third_party/angle/gni/angle.gni
++++ chromium-111.0.5563.64/third_party/angle/gni/angle.gni
+@@ -105,7 +105,8 @@ declare_args() {
+ 
+   if (current_cpu == "arm64" || current_cpu == "x64" ||
+       current_cpu == "mips64el" || current_cpu == "s390x" ||
+-      current_cpu == "ppc64" || current_cpu == "loong64") {
++      current_cpu == "ppc64" || current_cpu == "loong64" ||
++      current_cpu == "riscv64") {
+     angle_64bit_current_cpu = true
+   } else if (current_cpu == "arm" || current_cpu == "x86" ||
+              current_cpu == "mipsel" || current_cpu == "s390" ||
+Index: chromium-111.0.5563.64/third_party/angle/src/common/platform.h
+===================================================================
+--- chromium-111.0.5563.64.orig/third_party/angle/src/common/platform.h
++++ chromium-111.0.5563.64/third_party/angle/src/common/platform.h
+@@ -108,7 +108,7 @@
+ #endif
+ 
+ // Mips and arm devices need to include stddef for size_t.
+-#if defined(__mips__) || defined(__arm__) || defined(__aarch64__)
++#if defined(__mips__) || defined(__arm__) || defined(__aarch64__) || defined(__riscv)
+ #    include <stddef.h>
+ #endif
+ 
+
diff --git a/srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch.args b/srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch.args
new file mode 100644
index 000000000000..d5f38e354e7f
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch.args
@@ -0,0 +1 @@
+-Np1 --directory=src/3rdparty/chromium/
diff --git a/srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch b/srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch
new file mode 100644
index 000000000000..012a38c38865
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch
@@ -0,0 +1,778 @@
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_context.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/minidump/minidump_context.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_context.h
+@@ -637,6 +637,41 @@ struct MinidumpContextMIPS64 {
+   uint64_t fir;
+ };
+ 
++//! \brief 64bit RISC-V-specifc flags for MinidumpContextRISCV64::context_flags.
++//! Based on minidump_cpu_riscv64.h from breakpad
++enum MinidumpContextRISCV64Flags : uint32_t {
++  //! \brief Identifies the context structure as RISCV64.
++  kMinidumpContextRISCV64 = 0x00080000,
++
++  //! \brief Indicates the validity of integer registers.
++  //!
++  //! Registers `x1`-`x31` and pc are valid.
++  kMinidumpContextRISCV64Integer = kMinidumpContextRISCV64 | 0x00000002,
++
++  //! \brief Indicates the validity of floating point registers.
++  //!
++  //! Floating point registers `f0`-`f31`, and `fcsr` are valid
++  kMinidumpContextRISCV64FloatingPoint = kMinidumpContextRISCV64 | 0x00000004,
++
++  //! \brief Indicates the validity of all registers.
++  kMinidumpContextRISCV64All = kMinidumpContextRISCV64Integer |
++                              kMinidumpContextRISCV64FloatingPoint,
++};
++
++//! \brief A 64bit RISCV CPU context (register state) carried in a minidump file.
++struct MinidumpContextRISCV64 {
++  uint64_t context_flags;
++
++  //! \brief General purpose registers.
++  uint64_t regs[32];
++
++  //! \brief FPU registers.
++  uint64_t fpregs[32];
++
++  //! \brief FPU status register.
++  uint64_t fcsr;
++};
++
+ }  // namespace crashpad
+ 
+ #endif  // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_H_
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
+@@ -102,6 +102,13 @@ MinidumpContextWriter::CreateFromSnapsho
+       break;
+     }
+ 
++    case kCPUArchitectureRISCV64: {
++      context = std::make_unique<MinidumpContextRISCV64Writer>();
++      reinterpret_cast<MinidumpContextRISCV64Writer*>(context.get())
++          ->InitializeFromSnapshot(context_snapshot->riscv64);
++      break;
++    }
++
+     default: {
+       LOG(ERROR) << "unknown context architecture "
+                  << context_snapshot->architecture;
+@@ -555,5 +562,42 @@ size_t MinidumpContextMIPS64Writer::Cont
+   DCHECK_GE(state(), kStateFrozen);
+   return sizeof(context_);
+ }
++
++MinidumpContextRISCV64Writer::MinidumpContextRISCV64Writer()
++    : MinidumpContextWriter(), context_() {
++  context_.context_flags = kMinidumpContextRISCV64;
++}
++
++MinidumpContextRISCV64Writer::~MinidumpContextRISCV64Writer() = default;
++
++void MinidumpContextRISCV64Writer::InitializeFromSnapshot(
++    const CPUContextRISCV64* context_snapshot) {
++  DCHECK_EQ(state(), kStateMutable);
++  DCHECK_EQ(context_.context_flags, kMinidumpContextRISCV64);
++
++  context_.context_flags = kMinidumpContextRISCV64All;
++
++  static_assert(sizeof(context_.regs) == sizeof(context_snapshot->regs),
++                "GPRs size mismatch");
++  memcpy(context_.regs, context_snapshot->regs, sizeof(context_.regs));
++
++  static_assert(sizeof(context_.fpregs) == sizeof(context_snapshot->fpregs),
++                "FPRs size mismatch");
++  memcpy(context_.fpregs,
++         context_snapshot->fpregs,
++         sizeof(context_.fpregs));
++  context_.fcsr = context_snapshot->fcsr;
++}
++
++bool MinidumpContextRISCV64Writer::WriteObject(
++    FileWriterInterface* file_writer) {
++  DCHECK_EQ(state(), kStateWritable);
++  return file_writer->Write(&context_, sizeof(context_));
++}
++
++size_t MinidumpContextRISCV64Writer::ContextSize() const {
++  DCHECK_GE(state(), kStateFrozen);
++  return sizeof(context_);
++}
+ 
+ }  // namespace crashpad
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
+@@ -369,6 +369,49 @@ class MinidumpContextMIPS64Writer final
+   MinidumpContextMIPS64 context_;
+ };
+ 
++//! \brief The writer for a MinidumpContextRISCV64 structure in a minidump file.
++class MinidumpContextRISCV64Writer final : public MinidumpContextWriter {
++ public:
++  MinidumpContextRISCV64Writer();
++
++  MinidumpContextRISCV64Writer(const MinidumpContextRISCV64Writer&) = delete;
++  MinidumpContextRISCV64Writer& operator=(const MinidumpContextRISCV64Writer&) =
++      delete;
++
++  ~MinidumpContextRISCV64Writer() override;
++
++  //! \brief Initializes the MinidumpContextRISCV based on \a context_snapshot.
++  //!
++  //! \param[in] context_snapshot The context snapshot to use as source data.
++  //!
++  //! \note Valid in #kStateMutable. No mutation of context() may be done before
++  //!     calling this method, and it is not normally necessary to alter
++  //!     context() after calling this method.
++  void InitializeFromSnapshot(const CPUContextRISCV64* context_snapshot);
++
++  //! \brief Returns a pointer to the context structure that this object will
++  //!     write.
++  //!
++  //! \attention This returns a non-`const` pointer to this object’s private
++  //!     data so that a caller can populate the context structure directly.
++  //!     This is done because providing setter interfaces to each field in the
++  //!     context structure would be unwieldy and cumbersome. Care must be taken
++  //!     to populate the context structure correctly. The context structure
++  //!     must only be modified while this object is in the #kStateMutable
++  //!     state.
++  MinidumpContextRISCV64* context() { return &context_; }
++
++ protected:
++  // MinidumpWritable:
++  bool WriteObject(FileWriterInterface* file_writer) override;
++
++  // MinidumpContextWriter:
++  size_t ContextSize() const override;
++
++ private:
++  MinidumpContextRISCV64 context_;
++};
++
+ }  // namespace crashpad
+ 
+ #endif  // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_WRITER_H_
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
+@@ -175,6 +175,10 @@ std::string MinidumpMiscInfoDebugBuildSt
+   static constexpr char kCPU[] = "mips";
+ #elif defined(ARCH_CPU_MIPS64EL)
+   static constexpr char kCPU[] = "mips64";
++#elif defined(ARCH_CPU_RISCV32)
++  static constexpr char kCPU[] = "riscv32";
++#elif defined(ARCH_CPU_RISCV64)
++  static constexpr char kCPU[] = "riscv64";
+ #else
+ #error define kCPU for this CPU
+ #endif
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/capture_memory.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/capture_memory.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/capture_memory.cc
+@@ -117,6 +117,16 @@ void CaptureMemory::PointedToByContext(c
+   for (size_t i = 0; i < std::size(context.mipsel->regs); ++i) {
+     MaybeCaptureMemoryAround(delegate, context.mipsel->regs[i]);
+   }
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++  if (context.architecture == kCPUArchitectureRISCV64) {
++    for (size_t i = 0; i < std::size(context.riscv64->regs); ++i) {
++      MaybeCaptureMemoryAround(delegate, context.riscv64->regs[i]);
++    }
++  } else {
++    for (size_t i = 0; i < std::size(context.riscv32->regs); ++i) {
++      MaybeCaptureMemoryAround(delegate, context.riscv32->regs[i]);
++    }
++  }
+ #else
+ #error Port.
+ #endif
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
+@@ -43,7 +43,13 @@ enum CPUArchitecture {
+   kCPUArchitectureMIPSEL,
+ 
+   //! \brief 64-bit MIPSEL.
+-  kCPUArchitectureMIPS64EL
++  kCPUArchitectureMIPS64EL,
++
++  //! \brief 32-bit RISCV.
++  kCPUArchitectureRISCV32,
++
++  //! \brief 64-bit RISCV.
++  kCPUArchitectureRISCV64
+ };
+ 
+ }  // namespace crashpad
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/cpu_context.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/cpu_context.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/cpu_context.cc
+@@ -226,10 +226,12 @@ bool CPUContext::Is64Bit() const {
+     case kCPUArchitectureX86_64:
+     case kCPUArchitectureARM64:
+     case kCPUArchitectureMIPS64EL:
++    case kCPUArchitectureRISCV64:
+       return true;
+     case kCPUArchitectureX86:
+     case kCPUArchitectureARM:
+     case kCPUArchitectureMIPSEL:
++    case kCPUArchitectureRISCV32:
+       return false;
+     default:
+       NOTREACHED();
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/cpu_context.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/cpu_context.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/cpu_context.h
+@@ -362,6 +362,20 @@ struct CPUContextMIPS64 {
+   uint64_t fir;
+ };
+ 
++//! \brief A context structure carrying RISCV32 CPU state.
++struct CPUContextRISCV32 {
++  uint32_t regs[32];
++  uint64_t fpregs[32];
++  uint32_t fcsr;
++};
++
++//! \brief A context structure carrying RISCV64 CPU state.
++struct CPUContextRISCV64 {
++  uint64_t regs[32];
++  uint64_t fpregs[32];
++  uint32_t fcsr;
++};
++
+ //! \brief A context structure capable of carrying the context of any supported
+ //!     CPU architecture.
+ struct CPUContext {
+@@ -402,6 +416,8 @@ struct CPUContext {
+     CPUContextARM64* arm64;
+     CPUContextMIPS* mipsel;
+     CPUContextMIPS64* mips64;
++    CPUContextRISCV32* riscv32;
++    CPUContextRISCV64* riscv64;
+   };
+ };
+ 
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
+@@ -266,6 +266,30 @@ void InitializeCPUContextARM64_OnlyFPSIM
+   context->fpcr = float_context.fpcr;
+ }
+ 
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++
++template <typename Traits>
++void InitializeCPUContextRISCV(
++    const typename Traits::SignalThreadContext& thread_context,
++    const typename Traits::SignalFloatContext& float_context,
++    typename Traits::CPUContext* context) {
++  static_assert(sizeof(context->regs) == sizeof(thread_context),
++                "registers size mismatch");
++  static_assert(sizeof(context->fpregs) == sizeof(float_context.f),
++                "fp registers size mismatch");
++  memcpy(&context->regs, &thread_context, sizeof(context->regs));
++  memcpy(&context->fpregs, &float_context.f, sizeof(context->fpregs));
++  context->fcsr = float_context.fcsr;
++}
++template void InitializeCPUContextRISCV<ContextTraits32>(
++    const ContextTraits32::SignalThreadContext& thread_context,
++    const ContextTraits32::SignalFloatContext& float_context,
++    ContextTraits32::CPUContext* context);
++template void InitializeCPUContextRISCV<ContextTraits64>(
++    const ContextTraits64::SignalThreadContext& thread_context,
++    const ContextTraits64::SignalFloatContext& float_context,
++    ContextTraits64::CPUContext* context);
++
+ #endif  // ARCH_CPU_X86_FAMILY
+ 
+ }  // namespace internal
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
+@@ -174,6 +174,22 @@ void InitializeCPUContextMIPS(
+ 
+ #endif  // ARCH_CPU_MIPS_FAMILY || DOXYGEN
+ 
++#if defined(ARCH_CPU_RISCV_FAMILY) || DOXYGEN
++
++//! \brief Initializes a CPUContextRISCV structure from native context
++//!     structures on Linux.
++//!
++//! \param[in] thread_context The native thread context.
++//! \param[in] float_context The native float context.
++//! \param[out] context The CPUContextRISCV structure to initialize.
++template <typename Traits>
++void InitializeCPUContextRISCV(
++    const typename Traits::SignalThreadContext& thread_context,
++    const typename Traits::SignalFloatContext& float_context,
++    typename Traits::CPUContext* context);
++
++#endif  // ARCH_CPU_RISCV_FAMILY || DOXYGEN
++
+ }  // namespace internal
+ }  // namespace crashpad
+ 
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
+@@ -325,6 +325,61 @@ bool ExceptionSnapshotLinux::ReadContext
+       reader, context_address, context_.mips64);
+ }
+ 
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++
++template <typename Traits>
++static bool ReadContext(ProcessReaderLinux* reader,
++                        LinuxVMAddress context_address,
++                        typename Traits::CPUContext* dest_context) {
++  const ProcessMemory* memory = reader->Memory();
++
++  LinuxVMAddress gregs_address = context_address +
++                                 offsetof(UContext<Traits>, mcontext) +
++                                 offsetof(typename Traits::MContext, gregs);
++
++  typename Traits::SignalThreadContext thread_context;
++  if (!memory->Read(gregs_address, sizeof(thread_context), &thread_context)) {
++    LOG(ERROR) << "Couldn't read gregs";
++    return false;
++  }
++
++  LinuxVMAddress fpregs_address = context_address +
++                                  offsetof(UContext<Traits>, mcontext) +
++                                  offsetof(typename Traits::MContext, fpregs);
++
++  typename Traits::SignalFloatContext fp_context;
++  if (!memory->Read(fpregs_address, sizeof(fp_context), &fp_context)) {
++    LOG(ERROR) << "Couldn't read fpregs";
++    return false;
++  }
++
++  InitializeCPUContextRISCV<Traits>(thread_context, fp_context, dest_context);
++
++  return true;
++}
++
++template <>
++bool ExceptionSnapshotLinux::ReadContext<ContextTraits32>(
++    ProcessReaderLinux* reader,
++    LinuxVMAddress context_address) {
++  context_.architecture = kCPUArchitectureRISCV32;
++  context_.riscv32 = &context_union_.riscv32;
++
++  return internal::ReadContext<ContextTraits32>(
++      reader, context_address, context_.riscv32);
++}
++
++template <>
++bool ExceptionSnapshotLinux::ReadContext<ContextTraits64>(
++    ProcessReaderLinux* reader,
++    LinuxVMAddress context_address) {
++  context_.architecture = kCPUArchitectureRISCV64;
++  context_.riscv64 = &context_union_.riscv64;
++
++  return internal::ReadContext<ContextTraits64>(
++      reader, context_address, context_.riscv64);
++}
++
+ #endif  // ARCH_CPU_X86_FAMILY
+ 
+ bool ExceptionSnapshotLinux::Initialize(
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
+@@ -89,6 +89,9 @@ class ExceptionSnapshotLinux final : pub
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+     CPUContextMIPS mipsel;
+     CPUContextMIPS64 mips64;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++    CPUContextRISCV32 riscv32;
++    CPUContextRISCV64 riscv64;
+ #endif
+   } context_union_;
+   CPUContext context_;
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
+@@ -127,6 +127,9 @@ void ProcessReaderLinux::Thread::Initial
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+   stack_pointer = reader->Is64Bit() ? thread_info.thread_context.t64.regs[29]
+                                     : thread_info.thread_context.t32.regs[29];
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++  stack_pointer = reader->Is64Bit() ? thread_info.thread_context.t64.sp
++                                    : thread_info.thread_context.t32.sp;
+ #else
+ #error Port.
+ #endif
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
+@@ -422,6 +422,67 @@ static_assert(offsetof(UContext<ContextT
+               "context offset mismatch");
+ #endif
+ 
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++
++struct MContext32 {
++  uint32_t gregs[32];
++  uint64_t fpregs[32];
++  unsigned int fcsr;
++};
++
++struct MContext64 {
++  uint64_t gregs[32];
++  uint64_t fpregs[32];
++  unsigned int fcsr;
++};
++
++struct ContextTraits32 : public Traits32 {
++  using MContext = MContext32;
++  using SignalThreadContext = ThreadContext::t32_t;
++  using SignalFloatContext = FloatContext::f32_t;
++  using CPUContext = CPUContextRISCV32;
++};
++
++struct ContextTraits64 : public Traits64 {
++  using MContext = MContext64;
++  using SignalThreadContext = ThreadContext::t64_t;
++  using SignalFloatContext = FloatContext::f64_t;
++  using CPUContext = CPUContextRISCV64;
++};
++
++template <typename Traits>
++struct UContext {
++  typename Traits::ULong flags;
++  typename Traits::Address link;
++  SignalStack<Traits> stack;
++  Sigset<Traits> sigmask;
++  char padding[128 - sizeof(sigmask)];
++  typename Traits::Char_64Only padding2[8];
++  typename Traits::MContext mcontext;
++};
++
++#if defined(ARCH_CPU_RISCV32)
++static_assert(offsetof(UContext<ContextTraits32>, mcontext) ==
++                  offsetof(ucontext_t, uc_mcontext),
++              "context offset mismatch");
++static_assert(offsetof(UContext<ContextTraits32>, mcontext.gregs) ==
++                  offsetof(ucontext_t, uc_mcontext.__gregs),
++              "context offset mismatch");
++static_assert(offsetof(UContext<ContextTraits32>, mcontext.fpregs) ==
++                  offsetof(ucontext_t, uc_mcontext.__fpregs),
++              "context offset mismatch");
++#elif defined(ARCH_CPU_RISCV64)
++static_assert(offsetof(UContext<ContextTraits64>, mcontext) ==
++                  offsetof(ucontext_t, uc_mcontext),
++              "context offset mismatch");
++static_assert(offsetof(UContext<ContextTraits64>, mcontext.gregs) ==
++                  offsetof(ucontext_t, uc_mcontext.__gregs),
++              "context offset mismatch");
++static_assert(offsetof(UContext<ContextTraits64>, mcontext.fpregs) ==
++                  offsetof(ucontext_t, uc_mcontext.__fpregs),
++              "context offset mismatch");
++#endif
++
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
+@@ -205,6 +205,9 @@ CPUArchitecture SystemSnapshotLinux::Get
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+   return process_reader_->Is64Bit() ? kCPUArchitectureMIPS64EL
+                                     : kCPUArchitectureMIPSEL;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++  return process_reader_->Is64Bit() ? kCPUArchitectureRISCV64
++                                    : kCPUArchitectureRISCV32;
+ #else
+ #error port to your architecture
+ #endif
+@@ -220,6 +223,9 @@ uint32_t SystemSnapshotLinux::CPURevisio
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+   // Not implementable on MIPS
+   return 0;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++  // Not implementable on RISCV
++  return 0;
+ #else
+ #error port to your architecture
+ #endif
+@@ -240,6 +246,9 @@ std::string SystemSnapshotLinux::CPUVend
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+   // Not implementable on MIPS
+   return std::string();
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++  // Not implementable on RISCV
++  return std::string();
+ #else
+ #error port to your architecture
+ #endif
+@@ -373,6 +382,9 @@ bool SystemSnapshotLinux::NXEnabled() co
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+   // Not implementable on MIPS
+   return false;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++  // Not implementable on RISCV
++  return false;
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
+@@ -190,6 +190,22 @@ bool ThreadSnapshotLinux::Initialize(
+         thread.thread_info.float_context.f32,
+         context_.mipsel);
+   }
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++  if (process_reader->Is64Bit()) {
++    context_.architecture = kCPUArchitectureRISCV64;
++    context_.riscv64 = &context_union_.riscv64;
++    InitializeCPUContextRISCV<ContextTraits64>(
++	thread.thread_info.thread_context.t64,
++	thread.thread_info.float_context.f64,
++	context_.riscv64);
++  } else {
++    context_.architecture = kCPUArchitectureRISCV32;
++    context_.riscv32 = &context_union_.riscv32;
++    InitializeCPUContextRISCV<ContextTraits32>(
++	thread.thread_info.thread_context.t32,
++	thread.thread_info.float_context.f32,
++	context_.riscv32);
++  }
+ #else
+ #error Port.
+ #endif
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
+@@ -74,6 +74,9 @@ class ThreadSnapshotLinux final : public
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+     CPUContextMIPS mipsel;
+     CPUContextMIPS64 mips64;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++    CPUContextRISCV32 riscv32;
++    CPUContextRISCV64 riscv64;
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/util/linux/ptracer.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/util/linux/ptracer.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/util/linux/ptracer.cc
+@@ -398,6 +398,51 @@ bool GetThreadArea64(pid_t tid,
+   return true;
+ }
+ 
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++
++template <typename Destination>
++bool GetRegisterSet(pid_t tid, int set, Destination* dest, bool can_log) {
++  iovec iov;
++  iov.iov_base = dest;
++  iov.iov_len = sizeof(*dest);
++  if (ptrace(PTRACE_GETREGSET, tid, reinterpret_cast<void*>(set), &iov) != 0) {
++    PLOG_IF(ERROR, can_log) << "ptrace";
++    return false;
++  }
++  if (iov.iov_len != sizeof(*dest)) {
++    LOG_IF(ERROR, can_log) << "Unexpected registers size";
++    return false;
++  }
++  return true;
++}
++
++bool GetFloatingPointRegisters32(pid_t tid,
++                                 FloatContext* context,
++                                 bool can_log) {
++  return false;
++}
++
++bool GetFloatingPointRegisters64(pid_t tid,
++                                 FloatContext* context,
++                                 bool can_log) {
++  return GetRegisterSet(tid, NT_PRFPREG, &context->f64.f, can_log);
++}
++
++bool GetThreadArea32(pid_t tid,
++                     const ThreadContext& context,
++                     LinuxVMAddress* address,
++                     bool can_log) {
++  return false;
++}
++
++bool GetThreadArea64(pid_t tid,
++                     const ThreadContext& context,
++                     LinuxVMAddress* address,
++                     bool can_log) {
++  *address = context.t64.tp;
++  return true;
++}
++
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/util/linux/thread_info.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/util/linux/thread_info.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/util/linux/thread_info.h
+@@ -79,6 +79,40 @@ union ThreadContext {
+     uint32_t cp0_status;
+     uint32_t cp0_cause;
+     uint32_t padding1_;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++    // Reflects user_regs_struct in asm/ptrace.h.
++    uint32_t pc;
++    uint32_t ra;
++    uint32_t sp;
++    uint32_t gp;
++    uint32_t tp;
++    uint32_t t0;
++    uint32_t t1;
++    uint32_t t2;
++    uint32_t s0;
++    uint32_t s1;
++    uint32_t a0;
++    uint32_t a1;
++    uint32_t a2;
++    uint32_t a3;
++    uint32_t a4;
++    uint32_t a5;
++    uint32_t a6;
++    uint32_t a7;
++    uint32_t s2;
++    uint32_t s3;
++    uint32_t s4;
++    uint32_t s5;
++    uint32_t s6;
++    uint32_t s7;
++    uint32_t s8;
++    uint32_t s9;
++    uint32_t s10;
++    uint32_t s11;
++    uint32_t t3;
++    uint32_t t4;
++    uint32_t t5;
++    uint32_t t6;
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+@@ -132,6 +166,40 @@ union ThreadContext {
+     uint64_t cp0_badvaddr;
+     uint64_t cp0_status;
+     uint64_t cp0_cause;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++    // Reflects user_regs_struct in asm/ptrace.h.
++    uint64_t pc;
++    uint64_t ra;
++    uint64_t sp;
++    uint64_t gp;
++    uint64_t tp;
++    uint64_t t0;
++    uint64_t t1;
++    uint64_t t2;
++    uint64_t s0;
++    uint64_t s1;
++    uint64_t a0;
++    uint64_t a1;
++    uint64_t a2;
++    uint64_t a3;
++    uint64_t a4;
++    uint64_t a5;
++    uint64_t a6;
++    uint64_t a7;
++    uint64_t s2;
++    uint64_t s3;
++    uint64_t s4;
++    uint64_t s5;
++    uint64_t s6;
++    uint64_t s7;
++    uint64_t s8;
++    uint64_t s9;
++    uint64_t s10;
++    uint64_t s11;
++    uint64_t t3;
++    uint64_t t4;
++    uint64_t t5;
++    uint64_t t6;
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+@@ -143,11 +211,12 @@ union ThreadContext {
+   using NativeThreadContext = user_regs;
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+ // No appropriate NativeThreadsContext type available for MIPS
++#elif defined(ARCH_CPU_RISCV_FAMILY)
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY || ARCH_CPU_ARM64
+ 
+-#if !defined(ARCH_CPU_MIPS_FAMILY)
++#if !defined(ARCH_CPU_MIPS_FAMILY) && !defined(ARCH_CPU_RISCV_FAMILY)
+ #if defined(ARCH_CPU_32_BITS)
+   static_assert(sizeof(t32_t) == sizeof(NativeThreadContext), "Size mismatch");
+ #else  // ARCH_CPU_64_BITS
+@@ -218,6 +287,9 @@ union FloatContext {
+     } fpregs[32];
+     uint32_t fpcsr;
+     uint32_t fpu_id;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++    uint64_t f[32];
++    uint32_t fcsr;
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+@@ -252,6 +324,9 @@ union FloatContext {
+     double fpregs[32];
+     uint32_t fpcsr;
+     uint32_t fpu_id;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++    uint64_t f[32];
++    uint32_t fcsr;
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+@@ -281,6 +356,7 @@ union FloatContext {
+   static_assert(sizeof(f64) == sizeof(user_fpsimd_struct), "Size mismatch");
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+ // No appropriate floating point context native type for available MIPS.
++#elif defined(ARCH_CPU_RISCV_FAMILY)
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
+@@ -237,6 +237,8 @@ std::string UserAgent() {
+ #elif defined(ARCH_CPU_BIG_ENDIAN)
+     static constexpr char arch[] = "aarch64_be";
+ #endif
++#elif defined(ARCH_CPU_RISCV64)
++    static constexpr char arch[] = "riscv64";
+ #else
+ #error Port
+ #endif
+
diff --git a/srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch.args b/srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch.args
new file mode 100644
index 000000000000..d5f38e354e7f
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch.args
@@ -0,0 +1 @@
+-Np1 --directory=src/3rdparty/chromium/
diff --git a/srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch b/srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch
new file mode 100644
index 000000000000..12ad07275bd3
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch
@@ -0,0 +1,44 @@
+Index: chromium-102.0.5005.61/third_party/dav1d/config/linux/riscv64/config.h
+===================================================================
+--- /dev/null
++++ chromium-102.0.5005.61/third_party/dav1d/config/linux/riscv64/config.h
+@@ -0,0 +1,38 @@
++/*
++ * Autogenerated by the Meson build system.
++ * Do not edit, your changes will be lost.
++ */
++
++#pragma once
++
++#define ARCH_AARCH64 0
++
++#define ARCH_ARM 0
++
++#define ARCH_PPC64LE 0
++
++#define ARCH_X86 0
++
++#define ARCH_X86_32 0
++
++#define ARCH_X86_64 0
++
++#define CONFIG_16BPC 1
++
++#define CONFIG_8BPC 1
++
++// #define CONFIG_LOG 1 -- Logging is controlled by Chromium
++
++#define ENDIANNESS_BIG 0
++
++#define HAVE_ASM 0
++
++#define HAVE_AS_FUNC 0
++
++#define HAVE_CLOCK_GETTIME 1
++
++#define HAVE_GETAUXVAL 1
++
++#define HAVE_POSIX_MEMALIGN 1
++
++#define HAVE_UNISTD_H 1
+
diff --git a/srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch.args b/srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch.args
new file mode 100644
index 000000000000..d5f38e354e7f
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch.args
@@ -0,0 +1 @@
+-Np1 --directory=src/3rdparty/chromium/
diff --git a/srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch b/srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch
new file mode 100644
index 000000000000..098bd95a8de6
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch
@@ -0,0 +1,1956 @@
+Index: chromium-107.0.5304.87/sandbox/features.gni
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/features.gni
++++ chromium-107.0.5304.87/sandbox/features.gni
+@@ -9,7 +9,8 @@
+ use_seccomp_bpf = (is_linux || is_chromeos || is_android) &&
+                   (current_cpu == "x86" || current_cpu == "x64" ||
+                    current_cpu == "arm" || current_cpu == "arm64" ||
+-                   current_cpu == "mipsel" || current_cpu == "mips64el")
++                   current_cpu == "mipsel" || current_cpu == "mips64el" ||
++                   current_cpu == "riscv64")
+ 
+ # SSBD (Speculative Store Bypass Disable) is a mitigation of Spectre Variant 4.
+ # As Spectre Variant 4 can be mitigated by site isolation, opt-out SSBD on site
+Index: chromium-107.0.5304.87/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
++++ chromium-107.0.5304.87/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
+@@ -56,6 +56,12 @@
+ #define MAX_PUBLIC_SYSCALL __NR_syscalls
+ #define MAX_SYSCALL MAX_PUBLIC_SYSCALL
+ 
++#elif defined(__riscv)
++
++#define MIN_SYSCALL 0u
++#define MAX_PUBLIC_SYSCALL 1024u
++#define MAX_SYSCALL MAX_PUBLIC_SYSCALL
++
+ #else
+ #error "Unsupported architecture"
+ #endif
+Index: chromium-107.0.5304.87/sandbox/linux/bpf_dsl/seccomp_macros.h
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/bpf_dsl/seccomp_macros.h
++++ chromium-107.0.5304.87/sandbox/linux/bpf_dsl/seccomp_macros.h
+@@ -343,6 +343,46 @@ struct regs_struct {
+ #define SECCOMP_PT_PARM4(_regs) (_regs).regs[3]
+ #define SECCOMP_PT_PARM5(_regs) (_regs).regs[4]
+ #define SECCOMP_PT_PARM6(_regs) (_regs).regs[5]
++
++#elif defined(__riscv)
++struct regs_struct {
++  unsigned long regs[32];
++};
++
++#define SECCOMP_ARCH AUDIT_ARCH_RISCV64
++
++#define SECCOMP_REG(_ctx, _reg) ((_ctx)->uc_mcontext.__gregs[_reg])
++
++#define SECCOMP_RESULT(_ctx) SECCOMP_REG(_ctx, REG_A0)
++#define SECCOMP_SYSCALL(_ctx) SECCOMP_REG(_ctx, REG_A0+7)
++#define SECCOMP_IP(_ctx) (_ctx)->uc_mcontext.__gregs[REG_PC]
++#define SECCOMP_PARM1(_ctx) SECCOMP_REG(_ctx, REG_A0)
++#define SECCOMP_PARM2(_ctx) SECCOMP_REG(_ctx, REG_A0+1)
++#define SECCOMP_PARM3(_ctx) SECCOMP_REG(_ctx, REG_A0+2)
++#define SECCOMP_PARM4(_ctx) SECCOMP_REG(_ctx, REG_A0+3)
++#define SECCOMP_PARM5(_ctx) SECCOMP_REG(_ctx, REG_A0+4)
++#define SECCOMP_PARM6(_ctx) SECCOMP_REG(_ctx, REG_A0+5)
++
++#define SECCOMP_NR_IDX (offsetof(struct arch_seccomp_data, nr))
++#define SECCOMP_ARCH_IDX (offsetof(struct arch_seccomp_data, arch))
++#define SECCOMP_IP_MSB_IDX \
++  (offsetof(struct arch_seccomp_data, instruction_pointer) + 4)
++#define SECCOMP_IP_LSB_IDX \
++  (offsetof(struct arch_seccomp_data, instruction_pointer) + 0)
++#define SECCOMP_ARG_MSB_IDX(nr) \
++  (offsetof(struct arch_seccomp_data, args) + 8 * (nr) + 4)
++#define SECCOMP_ARG_LSB_IDX(nr) \
++  (offsetof(struct arch_seccomp_data, args) + 8 * (nr) + 0)
++
++#define SECCOMP_PT_RESULT(_regs) (_regs).regs[REG_A0]
++#define SECCOMP_PT_SYSCALL(_regs) (_regs).regs[REG_A0+7]
++#define SECCOMP_PT_IP(_regs) (_regs).regs[REG_PC]
++#define SECCOMP_PT_PARM1(_regs) (_regs).regs[REG_A0]
++#define SECCOMP_PT_PARM2(_regs) (_regs).regs[REG_A0+1]
++#define SECCOMP_PT_PARM3(_regs) (_regs).regs[REG_A0+2]
++#define SECCOMP_PT_PARM4(_regs) (_regs).regs[REG_A0+3]
++#define SECCOMP_PT_PARM5(_regs) (_regs).regs[REG_A0+4]
++#define SECCOMP_PT_PARM6(_regs) (_regs).regs[REG_A0+5]
+ #else
+ #error Unsupported target platform
+ 
+Index: chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
++++ chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
+@@ -61,6 +61,9 @@ bool IsBaselinePolicyAllowed(int sysno)
+ #if defined(__mips__)
+          SyscallSets::IsMipsPrivate(sysno) ||
+ #endif
++#if defined(__riscv)
++         SyscallSets::IsRiscvPrivate(sysno) ||
++#endif
+          SyscallSets::IsAllowedOperationOnFd(sysno);
+   // clang-format on
+ }
+@@ -198,7 +201,7 @@ ResultExpr EvaluateSyscallImpl(int fs_de
+     return RestrictFcntlCommands();
+ #endif
+ 
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+   // fork() is never used as a system call (clone() is used instead), but we
+   // have seen it in fallback code on Android.
+   if (sysno == __NR_fork) {
+@@ -253,7 +256,7 @@ ResultExpr EvaluateSyscallImpl(int fs_de
+   }
+ 
+ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+   if (sysno == __NR_mmap)
+     return RestrictMmapFlags();
+ #endif
+@@ -274,7 +277,7 @@ ResultExpr EvaluateSyscallImpl(int fs_de
+     return RestrictPrctl();
+ 
+ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+   if (sysno == __NR_socketpair) {
+     // Only allow AF_UNIX, PF_UNIX. Crash if anything else is seen.
+     static_assert(AF_UNIX == PF_UNIX,
+Index: chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
++++ chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
+@@ -37,6 +37,7 @@
+ 
+ #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \
+     !defined(__arm__) && !defined(__aarch64__) &&             \
++    !defined(__riscv) &&                                      \
+     !defined(PTRACE_GET_THREAD_AREA)
+ // Also include asm/ptrace-abi.h since ptrace.h in older libc (for instance
+ // the one in Ubuntu 16.04 LTS) is missing PTRACE_GET_THREAD_AREA.
+@@ -443,7 +444,7 @@ ResultExpr RestrictPtrace() {
+ #endif
+   return Switch(request)
+       .CASES((
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+                  PTRACE_GETREGS, PTRACE_GETFPREGS, PTRACE_GET_THREAD_AREA,
+                  PTRACE_GETREGSET,
+ #endif
+Index: chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
++++ chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+@@ -103,7 +103,7 @@ bool SyscallSets::IsUmask(int sysno) {
+ // Both EPERM and ENOENT are valid errno unless otherwise noted in comment.
+ bool SyscallSets::IsFileSystem(int sysno) {
+   switch (sysno) {
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_access:  // EPERM not a valid errno.
+     case __NR_chmod:
+     case __NR_chown:
+@@ -136,7 +136,7 @@ bool SyscallSets::IsFileSystem(int sysno
+     case __NR_faccessat2:
+     case __NR_fchmodat:
+     case __NR_fchownat:  // Should be called chownat ?
+-#if defined(__x86_64__) || defined(__aarch64__)
++#if defined(__x86_64__) || defined(__aarch64__) || defined(__riscv)
+     case __NR_newfstatat:  // fstatat(). EPERM not a valid errno.
+ #elif defined(__i386__) || defined(__arm__) || \
+     (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+@@ -226,7 +226,7 @@ bool SyscallSets::IsAllowedFileSystemAcc
+     case __NR_oldfstat:
+ #endif
+ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_sync_file_range:  // EPERM not a valid errno.
+ #elif defined(__arm__)
+     case __NR_arm_sync_file_range:  // EPERM not a valid errno.
+@@ -245,7 +245,7 @@ bool SyscallSets::IsDeniedFileSystemAcce
+ #if defined(__i386__) || defined(__arm__)
+     case __NR_fchown32:
+ #endif
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_getdents:    // EPERM not a valid errno.
+ #endif
+     case __NR_getdents64:  // EPERM not a valid errno.
+@@ -324,7 +324,7 @@ bool SyscallSets::IsProcessPrivilegeChan
+ bool SyscallSets::IsProcessGroupOrSession(int sysno) {
+   switch (sysno) {
+     case __NR_setpgid:
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_getpgrp:
+ #endif
+     case __NR_setsid:
+@@ -358,7 +358,7 @@ bool SyscallSets::IsAllowedSignalHandlin
+     case __NR_rt_sigqueueinfo:
+     case __NR_rt_sigsuspend:
+     case __NR_rt_tgsigqueueinfo:
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_signalfd:
+ #endif
+     case __NR_signalfd4:
+@@ -382,12 +382,12 @@ bool SyscallSets::IsAllowedOperationOnFd
+   switch (sysno) {
+     case __NR_close:
+     case __NR_dup:
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_dup2:
+ #endif
+     case __NR_dup3:
+ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_shutdown:
+ #endif
+       return true;
+@@ -426,7 +426,7 @@ bool SyscallSets::IsAllowedProcessStartO
+       return true;
+     case __NR_clone:  // Should be parameter-restricted.
+     case __NR_setns:  // Privileged.
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_fork:
+ #endif
+ #if defined(__i386__) || defined(__x86_64__)
+@@ -437,7 +437,7 @@ bool SyscallSets::IsAllowedProcessStartO
+ #endif
+     case __NR_set_tid_address:
+     case __NR_unshare:
+-#if !defined(__mips__) && !defined(__aarch64__)
++#if !defined(__mips__) && !defined(__aarch64__) && !defined(__riscv)
+     case __NR_vfork:
+ #endif
+     default:
+@@ -462,7 +462,7 @@ bool SyscallSets::IsAllowedFutex(int sys
+ 
+ bool SyscallSets::IsAllowedEpoll(int sysno) {
+   switch (sysno) {
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_epoll_create:
+     case __NR_epoll_wait:
+ #endif
+@@ -483,14 +483,14 @@ bool SyscallSets::IsAllowedEpoll(int sys
+ 
+ bool SyscallSets::IsAllowedGetOrModifySocket(int sysno) {
+   switch (sysno) {
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_pipe:
+ #endif
+     case __NR_pipe2:
+       return true;
+     default:
+ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_socketpair:  // We will want to inspect its argument.
+ #endif
+       return false;
+@@ -500,7 +500,7 @@ bool SyscallSets::IsAllowedGetOrModifySo
+ bool SyscallSets::IsDeniedGetOrModifySocket(int sysno) {
+   switch (sysno) {
+ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_accept:
+     case __NR_accept4:
+     case __NR_bind:
+@@ -554,7 +554,7 @@ bool SyscallSets::IsAllowedAddressSpaceA
+     case __NR_mincore:
+     case __NR_mlockall:
+ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_mmap:
+ #endif
+ #if defined(__i386__) || defined(__arm__) || \
+@@ -587,7 +587,7 @@ bool SyscallSets::IsAllowedGeneralIo(int
+     (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+     case __NR__llseek:
+ #endif
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_poll:
+ #endif
+     case __NR_ppoll:
+@@ -608,7 +608,7 @@ bool SyscallSets::IsAllowedGeneralIo(int
+     case __NR_recv:
+ #endif
+ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_recvfrom:  // Could specify source.
+     case __NR_recvmsg:   // Could specify source.
+ #endif
+@@ -623,7 +623,7 @@ bool SyscallSets::IsAllowedGeneralIo(int
+     case __NR_send:
+ #endif
+ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_sendmsg:  // Could specify destination.
+     case __NR_sendto:   // Could specify destination.
+ #endif
+@@ -672,7 +672,7 @@ bool SyscallSets::IsSeccomp(int sysno) {
+ bool SyscallSets::IsAllowedBasicScheduler(int sysno) {
+   switch (sysno) {
+     case __NR_sched_yield:
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_pause:
+ #endif
+     case __NR_nanosleep:
+@@ -756,7 +756,7 @@ bool SyscallSets::IsNuma(int sysno) {
+     case __NR_getcpu:
+     case __NR_mbind:
+ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_migrate_pages:
+ #endif
+     case __NR_move_pages:
+@@ -791,7 +791,7 @@ bool SyscallSets::IsGlobalProcessEnviron
+   switch (sysno) {
+     case __NR_acct:  // Privileged.
+ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_getrlimit:
+ #endif
+ #if defined(__i386__) || defined(__arm__)
+@@ -826,7 +826,7 @@ bool SyscallSets::IsDebug(int sysno) {
+ 
+ bool SyscallSets::IsGlobalSystemStatus(int sysno) {
+   switch (sysno) {
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR__sysctl:
+     case __NR_sysfs:
+ #endif
+@@ -844,7 +844,7 @@ bool SyscallSets::IsGlobalSystemStatus(i
+ 
+ bool SyscallSets::IsEventFd(int sysno) {
+   switch (sysno) {
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_eventfd:
+ #endif
+     case __NR_eventfd2:
+@@ -896,7 +896,8 @@ bool SyscallSets::IsKeyManagement(int sy
+ }
+ 
+ #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \
+-    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
++    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
++    defined(__riscv)
+ bool SyscallSets::IsSystemVSemaphores(int sysno) {
+   switch (sysno) {
+     case __NR_semctl:
+@@ -916,7 +917,8 @@ bool SyscallSets::IsSystemVSemaphores(in
+ 
+ #if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
+     defined(__aarch64__) ||                                         \
+-    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
++    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
++    defined(__riscv)
+ // These give a lot of ambient authority and bypass the setuid sandbox.
+ bool SyscallSets::IsSystemVSharedMemory(int sysno) {
+   switch (sysno) {
+@@ -932,7 +934,8 @@ bool SyscallSets::IsSystemVSharedMemory(
+ #endif
+ 
+ #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \
+-    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
++    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
++    defined(__riscv)
+ bool SyscallSets::IsSystemVMessageQueue(int sysno) {
+   switch (sysno) {
+     case __NR_msgctl:
+@@ -963,7 +966,8 @@ bool SyscallSets::IsSystemVIpc(int sysno
+ 
+ bool SyscallSets::IsAnySystemV(int sysno) {
+ #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \
+-    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
++    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
++    defined(__riscv)
+   return IsSystemVMessageQueue(sysno) || IsSystemVSemaphores(sysno) ||
+          IsSystemVSharedMemory(sysno);
+ #elif defined(__i386__) || \
+@@ -1000,7 +1004,7 @@ bool SyscallSets::IsAdvancedScheduler(in
+ bool SyscallSets::IsInotify(int sysno) {
+   switch (sysno) {
+     case __NR_inotify_add_watch:
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_inotify_init:
+ #endif
+     case __NR_inotify_init1:
+@@ -1138,7 +1142,7 @@ bool SyscallSets::IsMisc(int sysno) {
+ #if defined(__x86_64__)
+     case __NR_tuxcall:
+ #endif
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_vserver:
+ #endif
+       return true;
+@@ -1173,6 +1177,17 @@ bool SyscallSets::IsArmPrivate(int sysno
+ }
+ #endif  // defined(__arm__)
+ 
++#if defined(__riscv)
++bool SyscallSets::IsRiscvPrivate(int sysno) {
++  switch (sysno) {
++    case __NR_riscv_flush_icache:
++      return true;
++    default:
++      return false;
++  }
++}
++#endif  // defined(__riscv)
++
+ #if defined(__mips__)
+ bool SyscallSets::IsMipsPrivate(int sysno) {
+   switch (sysno) {
+Index: chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h
++++ chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h
+@@ -52,7 +52,7 @@ class SANDBOX_EXPORT SyscallSets {
+ #endif
+ 
+ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+   static bool IsNetworkSocketInformation(int sysno);
+ #endif
+ 
+@@ -79,18 +79,21 @@ class SANDBOX_EXPORT SyscallSets {
+   static bool IsAsyncIo(int sysno);
+   static bool IsKeyManagement(int sysno);
+ #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \
+-    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
++    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
++    defined(__riscv)
+   static bool IsSystemVSemaphores(int sysno);
+ #endif
+ #if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
+     defined(__aarch64__) ||                                         \
+-    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
++    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
++    defined(__riscv)
+   // These give a lot of ambient authority and bypass the setuid sandbox.
+   static bool IsSystemVSharedMemory(int sysno);
+ #endif
+ 
+ #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \
+-    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
++    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
++    defined(__riscv)
+   static bool IsSystemVMessageQueue(int sysno);
+ #endif
+ 
+@@ -117,6 +120,9 @@ class SANDBOX_EXPORT SyscallSets {
+   static bool IsMipsPrivate(int sysno);
+   static bool IsMipsMisc(int sysno);
+ #endif  // defined(__mips__)
++#if defined(__riscv)
++  static bool IsRiscvPrivate(int sysno);
++#endif
+   static bool IsGoogle3Threading(int sysno);
+ };
+ 
+Index: chromium-107.0.5304.87/sandbox/linux/seccomp-bpf/syscall.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/seccomp-bpf/syscall.cc
++++ chromium-107.0.5304.87/sandbox/linux/seccomp-bpf/syscall.cc
+@@ -18,7 +18,7 @@ namespace sandbox {
+ namespace {
+ 
+ #if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \
+-    defined(ARCH_CPU_MIPS_FAMILY)
++    defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_RISCV_FAMILY)
+ // Number that's not currently used by any Linux kernel ABIs.
+ const int kInvalidSyscallNumber = 0x351d3;
+ #else
+@@ -308,6 +308,28 @@ asm(// We need to be able to tell the ke
+     "2:ret\n"
+     ".cfi_endproc\n"
+     ".size SyscallAsm, .-SyscallAsm\n"
++#elif defined(__riscv)
++    ".text\n"
++    ".align 2\n"
++    ".type SyscallAsm, %function\n"
++    "SyscallAsm:\n"
++    ".cfi_startproc\n"
++    "bgez a0,1f\n"
++    "la a0,2f\n"
++    "j 2f\n"
++    "1:mv a7, a0\n"
++    "ld a0, (t0)\n"
++    "ld a1, 8(t0)\n"
++    "ld a2, 16(t0)\n"
++    "ld a3, 24(t0)\n"
++    "ld a4, 32(t0)\n"
++    "ld a5, 40(t0)\n"
++    "ld a6, 48(t0)\n"
++    // Enter the kernel
++    "scall\n"
++    "2:ret\n"
++    ".cfi_endproc\n"
++    ".size SyscallAsm, .-SyscallAsm\n"
+ #endif
+     );  // asm
+ 
+@@ -425,6 +447,18 @@ intptr_t Syscall::Call(int nr,
+     ret = inout;
+   }
+ 
++#elif defined(__riscv)
++  intptr_t ret;
++  {
++    register intptr_t inout __asm__("a0") = nr;
++    register const intptr_t* data __asm__("t0") = args;
++    asm volatile("jal SyscallAsm\n"
++                 : "+r"(inout)
++                 : "r"(data)
++                 : "memory", "a1", "a2", "a3", "a4", "a5", "a6");
++    ret = inout;
++  }
++
+ #else
+ #error "Unimplemented architecture"
+ #endif
+Index: chromium-107.0.5304.87/sandbox/linux/services/credentials.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/services/credentials.cc
++++ chromium-107.0.5304.87/sandbox/linux/services/credentials.cc
+@@ -80,7 +80,7 @@ bool ChrootToSafeEmptyDir() {
+   pid_t pid = -1;
+   alignas(16) char stack_buf[PTHREAD_STACK_MIN];
+ #if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \
+-    defined(ARCH_CPU_MIPS_FAMILY)
++    defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_RISCV_FAMILY)
+   // The stack grows downward.
+   void* stack = stack_buf + sizeof(stack_buf);
+ #else
+Index: chromium-107.0.5304.87/sandbox/linux/services/syscall_wrappers.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/services/syscall_wrappers.cc
++++ chromium-107.0.5304.87/sandbox/linux/services/syscall_wrappers.cc
+@@ -61,7 +61,7 @@ long sys_clone(unsigned long flags,
+ #if defined(ARCH_CPU_X86_64)
+   return syscall(__NR_clone, flags, child_stack, ptid, ctid, tls);
+ #elif defined(ARCH_CPU_X86) || defined(ARCH_CPU_ARM_FAMILY) || \
+-    defined(ARCH_CPU_MIPS_FAMILY)
++    defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_RISCV_FAMILY)
+   // CONFIG_CLONE_BACKWARDS defined.
+   return syscall(__NR_clone, flags, child_stack, ptid, tls, ctid);
+ #endif
+Index: chromium-107.0.5304.87/sandbox/linux/syscall_broker/broker_process.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/syscall_broker/broker_process.cc
++++ chromium-107.0.5304.87/sandbox/linux/syscall_broker/broker_process.cc
+@@ -117,44 +117,46 @@ bool BrokerProcess::IsSyscallBrokerable(
+   // and are default disabled in Android. So, we should refuse to broker them
+   // to be consistent with the platform's restrictions.
+   switch (sysno) {
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_access:
+ #endif
+     case __NR_faccessat:
+     case __NR_faccessat2:
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_ACCESS);
+ 
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_mkdir:
+ #endif
+     case __NR_mkdirat:
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_MKDIR);
+ 
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_open:
+ #endif
+     case __NR_openat:
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_OPEN);
+ 
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_readlink:
+ #endif
+     case __NR_readlinkat:
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_READLINK);
+ 
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_rename:
+ #endif
++#ifdef __NR_renameat
+     case __NR_renameat:
++#endif
+     case __NR_renameat2:
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_RENAME);
+ 
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_rmdir:
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_RMDIR);
+ #endif
+ 
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_stat:
+     case __NR_lstat:
+ #endif
+@@ -164,7 +166,7 @@ bool BrokerProcess::IsSyscallBrokerable(
+ #if defined(__NR_fstatat64)
+     case __NR_fstatat64:
+ #endif
+-#if defined(__x86_64__) || defined(__aarch64__)
++#if defined(__x86_64__) || defined(__aarch64__) || defined(__riscv)
+     case __NR_newfstatat:
+ #endif
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_STAT);
+@@ -179,7 +181,7 @@ bool BrokerProcess::IsSyscallBrokerable(
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_STAT);
+ #endif
+ 
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_unlink:
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_UNLINK);
+ #endif
+Index: chromium-107.0.5304.87/sandbox/linux/system_headers/linux_seccomp.h
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/system_headers/linux_seccomp.h
++++ chromium-107.0.5304.87/sandbox/linux/system_headers/linux_seccomp.h
+@@ -38,6 +38,9 @@
+ #ifndef EM_AARCH64
+ #define EM_AARCH64 183
+ #endif
++#ifndef EM_RISCV
++#define EM_RISCV 243
++#endif
+ 
+ #ifndef __AUDIT_ARCH_64BIT
+ #define __AUDIT_ARCH_64BIT 0x80000000
+@@ -70,6 +73,9 @@
+ #ifndef AUDIT_ARCH_AARCH64
+ #define AUDIT_ARCH_AARCH64 (EM_AARCH64 | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE)
+ #endif
++#ifndef AUDIT_ARCH_RISCV64
++#define AUDIT_ARCH_RISCV64 (EM_RISCV|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
++#endif
+ 
+ // For prctl.h
+ #ifndef PR_SET_SECCOMP
+Index: chromium-107.0.5304.87/sandbox/linux/system_headers/linux_signal.h
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/system_headers/linux_signal.h
++++ chromium-107.0.5304.87/sandbox/linux/system_headers/linux_signal.h
+@@ -13,7 +13,7 @@
+ // (not undefined, but defined different values and in different memory
+ // layouts). So, fill the gap here.
+ #if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+ 
+ #define LINUX_SIGHUP 1
+ #define LINUX_SIGINT 2
+Index: chromium-107.0.5304.87/sandbox/linux/system_headers/linux_stat.h
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/system_headers/linux_stat.h
++++ chromium-107.0.5304.87/sandbox/linux/system_headers/linux_stat.h
+@@ -150,7 +150,7 @@ struct kernel_stat {
+   int st_blocks;
+   int st_pad4[14];
+ };
+-#elif defined(__aarch64__)
++#elif defined(__aarch64__) || defined(__riscv)
+ struct kernel_stat {
+   unsigned long st_dev;
+   unsigned long st_ino;
+Index: chromium-107.0.5304.87/sandbox/linux/system_headers/linux_syscalls.h
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/system_headers/linux_syscalls.h
++++ chromium-107.0.5304.87/sandbox/linux/system_headers/linux_syscalls.h
+@@ -35,5 +35,9 @@
+ #include "sandbox/linux/system_headers/arm64_linux_syscalls.h"
+ #endif
+ 
++#if defined(__riscv) && __riscv_xlen == 64
++#include "sandbox/linux/system_headers/riscv64_linux_syscalls.h"
++#endif
++
+ #endif  // SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SYSCALLS_H_
+ 
+Index: chromium-107.0.5304.87/sandbox/linux/system_headers/riscv64_linux_syscalls.h
+===================================================================
+--- /dev/null
++++ chromium-107.0.5304.87/sandbox/linux/system_headers/riscv64_linux_syscalls.h
+@@ -0,0 +1,1222 @@
++// Copyright 2014 The Chromium Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#ifndef SANDBOX_LINUX_SYSTEM_HEADERS_RISCV64_LINUX_SYSCALLS_H_
++#define SANDBOX_LINUX_SYSTEM_HEADERS_RISCV64_LINUX_SYSCALLS_H_
++
++#include <asm-generic/unistd.h>
++
++#if !defined(__NR_io_setup)
++#define __NR_io_setup 0
++#endif
++
++#if !defined(__NR_io_destroy)
++#define __NR_io_destroy 1
++#endif
++
++#if !defined(__NR_io_submit)
++#define __NR_io_submit 2
++#endif
++
++#if !defined(__NR_io_cancel)
++#define __NR_io_cancel 3
++#endif
++
++#if !defined(__NR_io_getevents)
++#define __NR_io_getevents 4
++#endif
++
++#if !defined(__NR_setxattr)
++#define __NR_setxattr 5
++#endif
++
++#if !defined(__NR_lsetxattr)
++#define __NR_lsetxattr 6
++#endif
++
++#if !defined(__NR_fsetxattr)
++#define __NR_fsetxattr 7
++#endif
++
++#if !defined(__NR_getxattr)
++#define __NR_getxattr 8
++#endif
++
++#if !defined(__NR_lgetxattr)
++#define __NR_lgetxattr 9
++#endif
++
++#if !defined(__NR_fgetxattr)
++#define __NR_fgetxattr 10
++#endif
++
++#if !defined(__NR_listxattr)
++#define __NR_listxattr 11
++#endif
++
++#if !defined(__NR_llistxattr)
++#define __NR_llistxattr 12
++#endif
++
++#if !defined(__NR_flistxattr)
++#define __NR_flistxattr 13
++#endif
++
++#if !defined(__NR_removexattr)
++#define __NR_removexattr 14
++#endif
++
++#if !defined(__NR_lremovexattr)
++#define __NR_lremovexattr 15
++#endif
++
++#if !defined(__NR_fremovexattr)
++#define __NR_fremovexattr 16
++#endif
++
++#if !defined(__NR_getcwd)
++#define __NR_getcwd 17
++#endif
++
++#if !defined(__NR_lookup_dcookie)
++#define __NR_lookup_dcookie 18
++#endif
++
++#if !defined(__NR_eventfd2)
++#define __NR_eventfd2 19
++#endif
++
++#if !defined(__NR_epoll_create1)
++#define __NR_epoll_create1 20
++#endif
++
++#if !defined(__NR_epoll_ctl)
++#define __NR_epoll_ctl 21
++#endif
++
++#if !defined(__NR_epoll_pwait)
++#define __NR_epoll_pwait 22
++#endif
++
++#if !defined(__NR_dup)
++#define __NR_dup 23
++#endif
++
++#if !defined(__NR_dup3)
++#define __NR_dup3 24
++#endif
++
++#if !defined(__NR_fcntl)
++#define __NR_fcntl 25
++#endif
++
++#if !defined(__NR_inotify_init1)
++#define __NR_inotify_init1 26
++#endif
++
++#if !defined(__NR_inotify_add_watch)
++#define __NR_inotify_add_watch 27
++#endif
++
++#if !defined(__NR_inotify_rm_watch)
++#define __NR_inotify_rm_watch 28
++#endif
++
++#if !defined(__NR_ioctl)
++#define __NR_ioctl 29
++#endif
++
++#if !defined(__NR_ioprio_set)
++#define __NR_ioprio_set 30
++#endif
++
++#if !defined(__NR_ioprio_get)
++#define __NR_ioprio_get 31
++#endif
++
++#if !defined(__NR_flock)
++#define __NR_flock 32
++#endif
++
++#if !defined(__NR_mknodat)
++#define __NR_mknodat 33
++#endif
++
++#if !defined(__NR_mkdirat)
++#define __NR_mkdirat 34
++#endif
++
++#if !defined(__NR_unlinkat)
++#define __NR_unlinkat 35
++#endif
++
++#if !defined(__NR_symlinkat)
++#define __NR_symlinkat 36
++#endif
++
++#if !defined(__NR_linkat)
++#define __NR_linkat 37
++#endif
++
++#if !defined(__NR_renameat)
++#define __NR_renameat 38
++#endif
++
++#if !defined(__NR_umount2)
++#define __NR_umount2 39
++#endif
++
++#if !defined(__NR_mount)
++#define __NR_mount 40
++#endif
++
++#if !defined(__NR_pivot_root)
++#define __NR_pivot_root 41
++#endif
++
++#if !defined(__NR_nfsservctl)
++#define __NR_nfsservctl 42
++#endif
++
++#if !defined(__NR_statfs)
++#define __NR_statfs 43
++#endif
++
++#if !defined(__NR_fstatfs)
++#define __NR_fstatfs 44
++#endif
++
++#if !defined(__NR_truncate)
++#define __NR_truncate 45
++#endif
++
++#if !defined(__NR_ftruncate)
++#define __NR_ftruncate 46
++#endif
++
++#if !defined(__NR_fallocate)
++#define __NR_fallocate 47
++#endif
++
++#if !defined(__NR_faccessat)
++#define __NR_faccessat 48
++#endif
++
++#if !defined(__NR_chdir)
++#define __NR_chdir 49
++#endif
++
++#if !defined(__NR_fchdir)
++#define __NR_fchdir 50
++#endif
++
++#if !defined(__NR_chroot)
++#define __NR_chroot 51
++#endif
++
++#if !defined(__NR_fchmod)
++#define __NR_fchmod 52
++#endif
++
++#if !defined(__NR_fchmodat)
++#define __NR_fchmodat 53
++#endif
++
++#if !defined(__NR_fchownat)
++#define __NR_fchownat 54
++#endif
++
++#if !defined(__NR_fchown)
++#define __NR_fchown 55
++#endif
++
++#if !defined(__NR_openat)
++#define __NR_openat 56
++#endif
++
++#if !defined(__NR_close)
++#define __NR_close 57
++#endif
++
++#if !defined(__NR_vhangup)
++#define __NR_vhangup 58
++#endif
++
++#if !defined(__NR_pipe2)
++#define __NR_pipe2 59
++#endif
++
++#if !defined(__NR_quotactl)
++#define __NR_quotactl 60
++#endif
++
++#if !defined(__NR_getdents64)
++#define __NR_getdents64 61
++#endif
++
++#if !defined(__NR_lseek)
++#define __NR_lseek 62
++#endif
++
++#if !defined(__NR_read)
++#define __NR_read 63
++#endif
++
++#if !defined(__NR_write)
++#define __NR_write 64
++#endif
++
++#if !defined(__NR_readv)
++#define __NR_readv 65
++#endif
++
++#if !defined(__NR_writev)
++#define __NR_writev 66
++#endif
++
++#if !defined(__NR_pread64)
++#define __NR_pread64 67
++#endif
++
++#if !defined(__NR_pwrite64)
++#define __NR_pwrite64 68
++#endif
++
++#if !defined(__NR_preadv)
++#define __NR_preadv 69
++#endif
++
++#if !defined(__NR_pwritev)
++#define __NR_pwritev 70
++#endif
++
++#if !defined(__NR_sendfile)
++#define __NR_sendfile 71
++#endif
++
++#if !defined(__NR_pselect6)
++#define __NR_pselect6 72
++#endif
++
++#if !defined(__NR_ppoll)
++#define __NR_ppoll 73
++#endif
++
++#if !defined(__NR_signalfd4)
++#define __NR_signalfd4 74
++#endif
++
++#if !defined(__NR_vmsplice)
++#define __NR_vmsplice 75
++#endif
++
++#if !defined(__NR_splice)
++#define __NR_splice 76
++#endif
++
++#if !defined(__NR_tee)
++#define __NR_tee 77
++#endif
++
++#if !defined(__NR_readlinkat)
++#define __NR_readlinkat 78
++#endif
++
++#if !defined(__NR_newfstatat)
++#define __NR_newfstatat 79
++#endif
++
++#if !defined(__NR_fstat)
++#define __NR_fstat 80
++#endif
++
++#if !defined(__NR_sync)
++#define __NR_sync 81
++#endif
++
++#if !defined(__NR_fsync)
++#define __NR_fsync 82
++#endif
++
++#if !defined(__NR_fdatasync)
++#define __NR_fdatasync 83
++#endif
++
++#if !defined(__NR_sync_file_range)
++#define __NR_sync_file_range 84
++#endif
++
++#if !defined(__NR_timerfd_create)
++#define __NR_timerfd_create 85
++#endif
++
++#if !defined(__NR_timerfd_settime)
++#define __NR_timerfd_settime 86
++#endif
++
++#if !defined(__NR_timerfd_gettime)
++#define __NR_timerfd_gettime 87
++#endif
++
++#if !defined(__NR_utimensat)
++#define __NR_utimensat 88
++#endif
++
++#if !defined(__NR_acct)
++#define __NR_acct 89
++#endif
++
++#if !defined(__NR_capget)
++#define __NR_capget 90
++#endif
++
++#if !defined(__NR_capset)
++#define __NR_capset 91
++#endif
++
++#if !defined(__NR_personality)
++#define __NR_personality 92
++#endif
++
++#if !defined(__NR_exit)
++#define __NR_exit 93
++#endif
++
++#if !defined(__NR_exit_group)
++#define __NR_exit_group 94
++#endif
++
++#if !defined(__NR_waitid)
++#define __NR_waitid 95
++#endif
++
++#if !defined(__NR_set_tid_address)
++#define __NR_set_tid_address 96
++#endif
++
++#if !defined(__NR_unshare)
++#define __NR_unshare 97
++#endif
++
++#if !defined(__NR_futex)
++#define __NR_futex 98
++#endif
++
++#if !defined(__NR_set_robust_list)
++#define __NR_set_robust_list 99
++#endif
++
++#if !defined(__NR_get_robust_list)
++#define __NR_get_robust_list 100
++#endif
++
++#if !defined(__NR_nanosleep)
++#define __NR_nanosleep 101
++#endif
++
++#if !defined(__NR_getitimer)
++#define __NR_getitimer 102
++#endif
++
++#if !defined(__NR_setitimer)
++#define __NR_setitimer 103
++#endif
++
++#if !defined(__NR_kexec_load)
++#define __NR_kexec_load 104
++#endif
++
++#if !defined(__NR_init_module)
++#define __NR_init_module 105
++#endif
++
++#if !defined(__NR_delete_module)
++#define __NR_delete_module 106
++#endif
++
++#if !defined(__NR_timer_create)
++#define __NR_timer_create 107
++#endif
++
++#if !defined(__NR_timer_gettime)
++#define __NR_timer_gettime 108
++#endif
++
++#if !defined(__NR_timer_getoverrun)
++#define __NR_timer_getoverrun 109
++#endif
++
++#if !defined(__NR_timer_settime)
++#define __NR_timer_settime 110
++#endif
++
++#if !defined(__NR_timer_delete)
++#define __NR_timer_delete 111
++#endif
++
++#if !defined(__NR_clock_settime)
++#define __NR_clock_settime 112
++#endif
++
++#if !defined(__NR_clock_gettime)
++#define __NR_clock_gettime 113
++#endif
++
++#if !defined(__NR_clock_getres)
++#define __NR_clock_getres 114
++#endif
++
++#if !defined(__NR_clock_nanosleep)
++#define __NR_clock_nanosleep 115
++#endif
++
++#if !defined(__NR_syslog)
++#define __NR_syslog 116
++#endif
++
++#if !defined(__NR_ptrace)
++#define __NR_ptrace 117
++#endif
++
++#if !defined(__NR_sched_setparam)
++#define __NR_sched_setparam 118
++#endif
++
++#if !defined(__NR_sched_setscheduler)
++#define __NR_sched_setscheduler 119
++#endif
++
++#if !defined(__NR_sched_getscheduler)
++#define __NR_sched_getscheduler 120
++#endif
++
++#if !defined(__NR_sched_getparam)
++#define __NR_sched_getparam 121
++#endif
++
++#if !defined(__NR_sched_setaffinity)
++#define __NR_sched_setaffinity 122
++#endif
++
++#if !defined(__NR_sched_getaffinity)
++#define __NR_sched_getaffinity 123
++#endif
++
++#if !defined(__NR_sched_yield)
++#define __NR_sched_yield 124
++#endif
++
++#if !defined(__NR_sched_get_priority_max)
++#define __NR_sched_get_priority_max 125
++#endif
++
++#if !defined(__NR_sched_get_priority_min)
++#define __NR_sched_get_priority_min 126
++#endif
++
++#if !defined(__NR_sched_rr_get_interval)
++#define __NR_sched_rr_get_interval 127
++#endif
++
++#if !defined(__NR_restart_syscall)
++#define __NR_restart_syscall 128
++#endif
++
++#if !defined(__NR_kill)
++#define __NR_kill 129
++#endif
++
++#if !defined(__NR_tkill)
++#define __NR_tkill 130
++#endif
++
++#if !defined(__NR_tgkill)
++#define __NR_tgkill 131
++#endif
++
++#if !defined(__NR_sigaltstack)
++#define __NR_sigaltstack 132
++#endif
++
++#if !defined(__NR_rt_sigsuspend)
++#define __NR_rt_sigsuspend 133
++#endif
++
++#if !defined(__NR_rt_sigaction)
++#define __NR_rt_sigaction 134
++#endif
++
++#if !defined(__NR_rt_sigprocmask)
++#define __NR_rt_sigprocmask 135
++#endif
++
++#if !defined(__NR_rt_sigpending)
++#define __NR_rt_sigpending 136
++#endif
++
++#if !defined(__NR_rt_sigtimedwait)
++#define __NR_rt_sigtimedwait 137
++#endif
++
++#if !defined(__NR_rt_sigqueueinfo)
++#define __NR_rt_sigqueueinfo 138
++#endif
++
++#if !defined(__NR_rt_sigreturn)
++#define __NR_rt_sigreturn 139
++#endif
++
++#if !defined(__NR_setpriority)
++#define __NR_setpriority 140
++#endif
++
++#if !defined(__NR_getpriority)
++#define __NR_getpriority 141
++#endif
++
++#if !defined(__NR_reboot)
++#define __NR_reboot 142
++#endif
++
++#if !defined(__NR_setregid)
++#define __NR_setregid 143
++#endif
++
++#if !defined(__NR_setgid)
++#define __NR_setgid 144
++#endif
++
++#if !defined(__NR_setreuid)
++#define __NR_setreuid 145
++#endif
++
++#if !defined(__NR_setuid)
++#define __NR_setuid 146
++#endif
++
++#if !defined(__NR_setresuid)
++#define __NR_setresuid 147
++#endif
++
++#if !defined(__NR_getresuid)
++#define __NR_getresuid 148
++#endif
++
++#if !defined(__NR_setresgid)
++#define __NR_setresgid 149
++#endif
++
++#if !defined(__NR_getresgid)
++#define __NR_getresgid 150
++#endif
++
++#if !defined(__NR_setfsuid)
++#define __NR_setfsuid 151
++#endif
++
++#if !defined(__NR_setfsgid)
++#define __NR_setfsgid 152
++#endif
++
++#if !defined(__NR_times)
++#define __NR_times 153
++#endif
++
++#if !defined(__NR_setpgid)
++#define __NR_setpgid 154
++#endif
++
++#if !defined(__NR_getpgid)
++#define __NR_getpgid 155
++#endif
++
++#if !defined(__NR_getsid)
++#define __NR_getsid 156
++#endif
++
++#if !defined(__NR_setsid)
++#define __NR_setsid 157
++#endif
++
++#if !defined(__NR_getgroups)
++#define __NR_getgroups 158
++#endif
++
++#if !defined(__NR_setgroups)
++#define __NR_setgroups 159
++#endif
++
++#if !defined(__NR_uname)
++#define __NR_uname 160
++#endif
++
++#if !defined(__NR_sethostname)
++#define __NR_sethostname 161
++#endif
++
++#if !defined(__NR_setdomainname)
++#define __NR_setdomainname 162
++#endif
++
++#if !defined(__NR_getrlimit)
++#define __NR_getrlimit 163
++#endif
++
++#if !defined(__NR_setrlimit)
++#define __NR_setrlimit 164
++#endif
++
++#if !defined(__NR_getrusage)
++#define __NR_getrusage 165
++#endif
++
++#if !defined(__NR_umask)
++#define __NR_umask 166
++#endif
++
++#if !defined(__NR_prctl)
++#define __NR_prctl 167
++#endif
++
++#if !defined(__NR_getcpu)
++#define __NR_getcpu 168
++#endif
++
++#if !defined(__NR_gettimeofday)
++#define __NR_gettimeofday 169
++#endif
++
++#if !defined(__NR_settimeofday)
++#define __NR_settimeofday 170
++#endif
++
++#if !defined(__NR_adjtimex)
++#define __NR_adjtimex 171
++#endif
++
++#if !defined(__NR_getpid)
++#define __NR_getpid 172
++#endif
++
++#if !defined(__NR_getppid)
++#define __NR_getppid 173
++#endif
++
++#if !defined(__NR_getuid)
++#define __NR_getuid 174
++#endif
++
++#if !defined(__NR_geteuid)
++#define __NR_geteuid 175
++#endif
++
++#if !defined(__NR_getgid)
++#define __NR_getgid 176
++#endif
++
++#if !defined(__NR_getegid)
++#define __NR_getegid 177
++#endif
++
++#if !defined(__NR_gettid)
++#define __NR_gettid 178
++#endif
++
++#if !defined(__NR_sysinfo)
++#define __NR_sysinfo 179
++#endif
++
++#if !defined(__NR_mq_open)
++#define __NR_mq_open 180
++#endif
++
++#if !defined(__NR_mq_unlink)
++#define __NR_mq_unlink 181
++#endif
++
++#if !defined(__NR_mq_timedsend)
++#define __NR_mq_timedsend 182
++#endif
++
++#if !defined(__NR_mq_timedreceive)
++#define __NR_mq_timedreceive 183
++#endif
++
++#if !defined(__NR_mq_notify)
++#define __NR_mq_notify 184
++#endif
++
++#if !defined(__NR_mq_getsetattr)
++#define __NR_mq_getsetattr 185
++#endif
++
++#if !defined(__NR_msgget)
++#define __NR_msgget 186
++#endif
++
++#if !defined(__NR_msgctl)
++#define __NR_msgctl 187
++#endif
++
++#if !defined(__NR_msgrcv)
++#define __NR_msgrcv 188
++#endif
++
++#if !defined(__NR_msgsnd)
++#define __NR_msgsnd 189
++#endif
++
++#if !defined(__NR_semget)
++#define __NR_semget 190
++#endif
++
++#if !defined(__NR_semctl)
++#define __NR_semctl 191
++#endif
++
++#if !defined(__NR_semtimedop)
++#define __NR_semtimedop 192
++#endif
++
++#if !defined(__NR_semop)
++#define __NR_semop 193
++#endif
++
++#if !defined(__NR_shmget)
++#define __NR_shmget 194
++#endif
++
++#if !defined(__NR_shmctl)
++#define __NR_shmctl 195
++#endif
++
++#if !defined(__NR_shmat)
++#define __NR_shmat 196
++#endif
++
++#if !defined(__NR_shmdt)
++#define __NR_shmdt 197
++#endif
++
++#if !defined(__NR_socket)
++#define __NR_socket 198
++#endif
++
++#if !defined(__NR_socketpair)
++#define __NR_socketpair 199
++#endif
++
++#if !defined(__NR_bind)
++#define __NR_bind 200
++#endif
++
++#if !defined(__NR_listen)
++#define __NR_listen 201
++#endif
++
++#if !defined(__NR_accept)
++#define __NR_accept 202
++#endif
++
++#if !defined(__NR_connect)
++#define __NR_connect 203
++#endif
++
++#if !defined(__NR_getsockname)
++#define __NR_getsockname 204
++#endif
++
++#if !defined(__NR_getpeername)
++#define __NR_getpeername 205
++#endif
++
++#if !defined(__NR_sendto)
++#define __NR_sendto 206
++#endif
++
++#if !defined(__NR_recvfrom)
++#define __NR_recvfrom 207
++#endif
++
++#if !defined(__NR_setsockopt)
++#define __NR_setsockopt 208
++#endif
++
++#if !defined(__NR_getsockopt)
++#define __NR_getsockopt 209
++#endif
++
++#if !defined(__NR_shutdown)
++#define __NR_shutdown 210
++#endif
++
++#if !defined(__NR_sendmsg)
++#define __NR_sendmsg 211
++#endif
++
++#if !defined(__NR_recvmsg)
++#define __NR_recvmsg 212
++#endif
++
++#if !defined(__NR_readahead)
++#define __NR_readahead 213
++#endif
++
++#if !defined(__NR_brk)
++#define __NR_brk 214
++#endif
++
++#if !defined(__NR_munmap)
++#define __NR_munmap 215
++#endif
++
++#if !defined(__NR_mremap)
++#define __NR_mremap 216
++#endif
++
++#if !defined(__NR_add_key)
++#define __NR_add_key 217
++#endif
++
++#if !defined(__NR_request_key)
++#define __NR_request_key 218
++#endif
++
++#if !defined(__NR_keyctl)
++#define __NR_keyctl 219
++#endif
++
++#if !defined(__NR_clone)
++#define __NR_clone 220
++#endif
++
++#if !defined(__NR_execve)
++#define __NR_execve 221
++#endif
++
++#if !defined(__NR_mmap)
++#define __NR_mmap 222
++#endif
++
++#if !defined(__NR_fadvise64)
++#define __NR_fadvise64 223
++#endif
++
++#if !defined(__NR_swapon)
++#define __NR_swapon 224
++#endif
++
++#if !defined(__NR_swapoff)
++#define __NR_swapoff 225
++#endif
++
++#if !defined(__NR_mprotect)
++#define __NR_mprotect 226
++#endif
++
++#if !defined(__NR_msync)
++#define __NR_msync 227
++#endif
++
++#if !defined(__NR_mlock)
++#define __NR_mlock 228
++#endif
++
++#if !defined(__NR_munlock)
++#define __NR_munlock 229
++#endif
++
++#if !defined(__NR_mlockall)
++#define __NR_mlockall 230
++#endif
++
++#if !defined(__NR_munlockall)
++#define __NR_munlockall 231
++#endif
++
++#if !defined(__NR_mincore)
++#define __NR_mincore 232
++#endif
++
++#if !defined(__NR_madvise)
++#define __NR_madvise 233
++#endif
++
++#if !defined(__NR_remap_file_pages)
++#define __NR_remap_file_pages 234
++#endif
++
++#if !defined(__NR_mbind)
++#define __NR_mbind 235
++#endif
++
++#if !defined(__NR_get_mempolicy)
++#define __NR_get_mempolicy 236
++#endif
++
++#if !defined(__NR_set_mempolicy)
++#define __NR_set_mempolicy 237
++#endif
++
++#if !defined(__NR_migrate_pages)
++#define __NR_migrate_pages 238
++#endif
++
++#if !defined(__NR_move_pages)
++#define __NR_move_pages 239
++#endif
++
++#if !defined(__NR_rt_tgsigqueueinfo)
++#define __NR_rt_tgsigqueueinfo 240
++#endif
++
++#if !defined(__NR_perf_event_open)
++#define __NR_perf_event_open 241
++#endif
++
++#if !defined(__NR_accept4)
++#define __NR_accept4 242
++#endif
++
++#if !defined(__NR_recvmmsg)
++#define __NR_recvmmsg 243
++#endif
++
++#if !defined(__NR_riscv_flush_icache)
++#define __NR_riscv_flush_icache 259
++#endif
++
++#if !defined(__NR_wait4)
++#define __NR_wait4 260
++#endif
++
++#if !defined(__NR_prlimit64)
++#define __NR_prlimit64 261
++#endif
++
++#if !defined(__NR_fanotify_init)
++#define __NR_fanotify_init 262
++#endif
++
++#if !defined(__NR_fanotify_mark)
++#define __NR_fanotify_mark 263
++#endif
++
++#if !defined(__NR_name_to_handle_at)
++#define __NR_name_to_handle_at 264
++#endif
++
++#if !defined(__NR_open_by_handle_at)
++#define __NR_open_by_handle_at 265
++#endif
++
++#if !defined(__NR_clock_adjtime)
++#define __NR_clock_adjtime 266
++#endif
++
++#if !defined(__NR_syncfs)
++#define __NR_syncfs 267
++#endif
++
++#if !defined(__NR_setns)
++#define __NR_setns 268
++#endif
++
++#if !defined(__NR_sendmmsg)
++#define __NR_sendmmsg 269
++#endif
++
++#if !defined(__NR_process_vm_readv)
++#define __NR_process_vm_readv 270
++#endif
++
++#if !defined(__NR_process_vm_writev)
++#define __NR_process_vm_writev 271
++#endif
++
++#if !defined(__NR_kcmp)
++#define __NR_kcmp 272
++#endif
++
++#if !defined(__NR_finit_module)
++#define __NR_finit_module 273
++#endif
++
++#if !defined(__NR_sched_setattr)
++#define __NR_sched_setattr 274
++#endif
++
++#if !defined(__NR_sched_getattr)
++#define __NR_sched_getattr 275
++#endif
++
++#if !defined(__NR_renameat2)
++#define __NR_renameat2 276
++#endif
++
++#if !defined(__NR_seccomp)
++#define __NR_seccomp 277
++#endif
++
++#if !defined(__NR_getrandom)
++#define __NR_getrandom 278
++#endif
++
++#if !defined(__NR_memfd_create)
++#define __NR_memfd_create 279
++#endif
++
++#if !defined(__NR_bpf)
++#define __NR_bpf 280
++#endif
++
++#if !defined(__NR_execveat)
++#define __NR_execveat 281
++#endif
++
++#if !defined(__NR_userfaultfd)
++#define __NR_userfaultfd 282
++#endif
++
++#if !defined(__NR_membarrier)
++#define __NR_membarrier 283
++#endif
++
++#if !defined(__NR_mlock2)
++#define __NR_mlock2 284
++#endif
++
++#if !defined(__NR_copy_file_range)
++#define __NR_copy_file_range 285
++#endif
++
++#if !defined(__NR_preadv2)
++#define __NR_preadv2 286
++#endif
++
++#if !defined(__NR_pwritev2)
++#define __NR_pwritev2 287
++#endif
++
++#if !defined(__NR_pkey_mprotect)
++#define __NR_pkey_mprotect 288
++#endif
++
++#if !defined(__NR_pkey_alloc)
++#define __NR_pkey_alloc 289
++#endif
++
++#if !defined(__NR_pkey_free)
++#define __NR_pkey_free 290
++#endif
++
++#if !defined(__NR_statx)
++#define __NR_statx 291
++#endif
++
++#if !defined(__NR_io_pgetevents)
++#define __NR_io_pgetevents 292
++#endif
++
++#if !defined(__NR_rseq)
++#define __NR_rseq 293
++#endif
++
++#if !defined(__NR_kexec_file_load)
++#define __NR_kexec_file_load 294
++#endif
++
++#if !defined(__NR_pidfd_send_signal)
++#define __NR_pidfd_send_signal 424
++#endif
++
++#if !defined(__NR_io_uring_setup)
++#define __NR_io_uring_setup 425
++#endif
++
++#if !defined(__NR_io_uring_enter)
++#define __NR_io_uring_enter 426
++#endif
++
++#if !defined(__NR_io_uring_register)
++#define __NR_io_uring_register 427
++#endif
++
++#if !defined(__NR_open_tree)
++#define __NR_open_tree 428
++#endif
++
++#if !defined(__NR_move_mount)
++#define __NR_move_mount 429
++#endif
++
++#if !defined(__NR_fsopen)
++#define __NR_fsopen 430
++#endif
++
++#if !defined(__NR_fsconfig)
++#define __NR_fsconfig 431
++#endif
++
++#if !defined(__NR_fsmount)
++#define __NR_fsmount 432
++#endif
++
++#if !defined(__NR_fspick)
++#define __NR_fspick 433
++#endif
++
++#if !defined(__NR_pidfd_open)
++#define __NR_pidfd_open 434
++#endif
++
++#if !defined(__NR_clone3)
++#define __NR_clone3 435
++#endif
++
++#if !defined(__NR_close_range)
++#define __NR_close_range 436
++#endif
++
++#if !defined(__NR_openat2)
++#define __NR_openat2 437
++#endif
++
++#if !defined(__NR_pidfd_getfd)
++#define __NR_pidfd_getfd 438
++#endif
++
++#if !defined(__NR_faccessat2)
++#define __NR_faccessat2 439
++#endif
++
++#if !defined(__NR_process_madvise)
++#define __NR_process_madvise 440
++#endif
++
++#if !defined(__NR_epoll_pwait2)
++#define __NR_epoll_pwait2 441
++#endif
++
++#if !defined(__NR_mount_setattr)
++#define __NR_mount_setattr 442
++#endif
++
++#if !defined(__NR_quotactl_path)
++#define __NR_quotactl_path 443
++#endif
++
++#if !defined(__NR_landlock_create_ruleset)
++#define __NR_landlock_create_ruleset 444
++#endif
++
++#if !defined(__NR_landlock_add_rule)
++#define __NR_landlock_add_rule 445
++#endif
++
++#if !defined(__NR_landlock_restrict_self)
++#define __NR_landlock_restrict_self 446
++#endif
++
++#endif  // SANDBOX_LINUX_SYSTEM_HEADERS_RISCV64_LINUX_SYSCALLS_H_
+Index: chromium-107.0.5304.87/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc
++++ chromium-107.0.5304.87/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc
+@@ -38,7 +38,7 @@ ResultExpr CrosAmdGpuProcessPolicy::Eval
+     case __NR_sched_setscheduler:
+     case __NR_sysinfo:
+     case __NR_uname:
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_readlink:
+     case __NR_stat:
+ #endif
+Index: chromium-107.0.5304.87/sandbox/policy/linux/bpf_gpu_policy_linux.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/policy/linux/bpf_gpu_policy_linux.cc
++++ chromium-107.0.5304.87/sandbox/policy/linux/bpf_gpu_policy_linux.cc
+@@ -73,7 +73,7 @@ ResultExpr GpuProcessPolicy::EvaluateSys
+     (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+     case __NR_ftruncate64:
+ #endif
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_getdents:
+ #endif
+     case __NR_getdents64:
+
diff --git a/srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch.args b/srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch.args
new file mode 100644
index 000000000000..d5f38e354e7f
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch.args
@@ -0,0 +1 @@
+-Np1 --directory=src/3rdparty/chromium/
diff --git a/srcpkgs/qt6-webengine/patches/0100-chromium-revert-9d080c0.patch b/srcpkgs/qt6-webengine/patches/0100-chromium-revert-9d080c0.patch
deleted file mode 100644
index adca364a4060..000000000000
--- a/srcpkgs/qt6-webengine/patches/0100-chromium-revert-9d080c0.patch
+++ /dev/null
@@ -1,154 +0,0 @@
-Revert 9d080c0934b848ee4a05013c78641e612fcc1e03
-
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/build/config/sanitizers/BUILD.gn
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/build/config/sanitizers/BUILD.gn
-@@ -271,11 +271,11 @@ config("asan_flags") {
-   if (is_asan) {
-     cflags += [ "-fsanitize=address" ]
-     if (is_win) {
--      if (!defined(asan_win_blocklist_path)) {
--        asan_win_blocklist_path =
-+      if (!defined(asan_win_blacklist_path)) {
-+        asan_win_blacklist_path =
-             rebase_path("//tools/memory/asan/blocklist_win.txt", root_build_dir)
-       }
--      cflags += [ "-fsanitize-ignorelist=$asan_win_blocklist_path" ]
-+      cflags += [ "-fsanitize-blacklist=$asan_win_blacklist_path" ]
-     }
-   }
- }
-@@ -305,13 +305,13 @@ config("link_shared_library") {
- config("cfi_flags") {
-   cflags = []
-   if (is_cfi && current_toolchain == default_toolchain) {
--    if (!defined(cfi_ignorelist_path)) {
--      cfi_ignorelist_path =
-+    if (!defined(cfi_blacklist_path)) {
-+      cfi_blacklist_path =
-           rebase_path("//tools/cfi/ignores.txt", root_build_dir)
-     }
-     cflags += [
-       "-fsanitize=cfi-vcall",
--      "-fsanitize-ignorelist=$cfi_ignorelist_path",
-+      "-fsanitize-blacklist=$cfi_blacklist_path",
-     ]
- 
-     if (use_cfi_cast) {
-@@ -408,14 +408,14 @@ config("msan_flags") {
-   if (is_msan) {
-     assert(is_linux || is_chromeos,
-            "msan only supported on linux x86_64/ChromeOS")
--    if (!defined(msan_ignorelist_path)) {
--      msan_ignorelist_path =
--          rebase_path("//tools/msan/ignorelist.txt", root_build_dir)
-+    if (!defined(msan_blacklist_path)) {
-+      msan_blacklist_path =
-+          rebase_path("//tools/msan/blacklist.txt", root_build_dir)
-     }
-     cflags = [
-       "-fsanitize=memory",
-       "-fsanitize-memory-track-origins=$msan_track_origins",
--      "-fsanitize-ignorelist=$msan_ignorelist_path",
-+      "-fsanitize-blacklist=$msan_blacklist_path",
-     ]
-   }
- }
-@@ -423,13 +423,13 @@ config("msan_flags") {
- config("tsan_flags") {
-   if (is_tsan) {
-     assert(is_linux || is_chromeos, "tsan only supported on linux x86_64")
--    if (!defined(tsan_ignorelist_path)) {
--      tsan_ignorelist_path =
-+    if (!defined(tsan_blacklist_path)) {
-+      tsan_blacklist_path =
-           rebase_path("//tools/memory/tsan_v2/ignores.txt", root_build_dir)
-     }
-     cflags = [
-       "-fsanitize=thread",
--      "-fsanitize-ignorelist=$tsan_ignorelist_path",
-+      "-fsanitize-blacklist=$tsan_blacklist_path",
-     ]
-   }
- }
-@@ -437,8 +437,8 @@ config("tsan_flags") {
- config("ubsan_flags") {
-   cflags = []
-   if (is_ubsan) {
--    if (!defined(ubsan_ignorelist_path)) {
--      ubsan_ignorelist_path =
-+    if (!defined(ubsan_blacklist_path)) {
-+      ubsan_blacklist_path =
-           rebase_path("//tools/ubsan/ignorelist.txt", root_build_dir)
-     }
-     cflags += [
-@@ -455,7 +455,7 @@ config("ubsan_flags") {
-       "-fsanitize=signed-integer-overflow",
-       "-fsanitize=unreachable",
-       "-fsanitize=vla-bound",
--      "-fsanitize-ignorelist=$ubsan_ignorelist_path",
-+      "-fsanitize-blacklist=$ubsan_blacklist_path",
-     ]
-     if (!is_clang) {
-       # These exposes too much illegal C++14 code to compile on anything stricter than clang:
-@@ -496,8 +496,8 @@ config("ubsan_no_recover") {
- 
- config("ubsan_security_flags") {
-   if (is_ubsan_security) {
--    if (!defined(ubsan_security_ignorelist_path)) {
--      ubsan_security_ignorelist_path =
-+    if (!defined(ubsan_security_blacklist_path)) {
-+      ubsan_security_blacklist_path =
-           rebase_path("//tools/ubsan/security_ignorelist.txt", root_build_dir)
-     }
-     cflags = [
-@@ -505,7 +505,7 @@ config("ubsan_security_flags") {
-       "-fsanitize=shift",
-       "-fsanitize=signed-integer-overflow",
-       "-fsanitize=vla-bound",
--      "-fsanitize-ignorelist=$ubsan_security_ignorelist_path",
-+      "-fsanitize-blacklist=$ubsan_security_blacklist_path",
-     ]
-   }
- }
-@@ -518,13 +518,13 @@ config("ubsan_null_flags") {
- 
- config("ubsan_vptr_flags") {
-   if (is_ubsan_vptr) {
--    if (!defined(ubsan_vptr_ignorelist_path)) {
--      ubsan_vptr_ignorelist_path =
-+    if (!defined(ubsan_vptr_blacklist_path)) {
-+      ubsan_vptr_blacklist_path =
-           rebase_path("//tools/ubsan/vptr_ignorelist.txt", root_build_dir)
-     }
-     cflags = [
-       "-fsanitize=vptr",
--      "-fsanitize-ignorelist=$ubsan_vptr_ignorelist_path",
-+      "-fsanitize-blacklist=$ubsan_vptr_blacklist_path",
-     ]
-     if (!is_clang) {
-       # Clang specific flag:
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/build_overrides/build.gni
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/build_overrides/build.gni
-@@ -43,15 +43,15 @@ declare_args() {
- # Allows different projects to specify their own suppression/ignore lists for
- # sanitizer tools.
- # asan_suppressions_file = "path/to/asan_suppressions.cc"
--# asan_win_ignorelist_path = "path/to/asan/blocklist_win.txt"
-+# asan_win_blacklist_path = "path/to/asan/blocklist_win.txt"
- # lsan_suppressions_file = "path/to/lsan_suppressions.cc"
- # tsan_suppressions_file = "path/to/tsan_suppressions.cc"
--# tsan_ignorelist_path = "path/to/tsan/ignores.txt"
--# msan_ignorelist_path = "path/to/msan/ignorelist.txt"
--# ubsan_ignorelist_path = "path/to/ubsan/ignorelist.txt"
--# ubsan_vptr_ignorelist_path = "path/to/ubsan/vptr_ignorelist.txt"
--# ubsan_security_ignorelist_path = "path/to/ubsan/security_ignorelist.txt"
--# cfi_ignorelist_path = "path/to/cfi/ignores.txt"
-+# tsan_blacklist_path = "path/to/tsan/ignores.txt"
-+# msan_blacklist_path = "path/to/msan/blacklist.txt"
-+# ubsan_blacklist_path = "path/to/ubsan/blacklist.txt"
-+# ubsan_vptr_blacklist_path = "path/to/ubsan/vptr_blacklist.txt"
-+# ubsan_security_blacklist_path = "path/to/ubsan/security_blacklist.txt"
-+# cfi_blacklist_path = "path/to/cfi/ignores.txt"
- 
- if (host_os == "mac" || is_apple) {
-   # Needed for is_apple when targeting macOS or iOS, independent of host.
diff --git a/srcpkgs/qt6-webengine/patches/0101-chromium-102-fenced_frame_utils-include.patch b/srcpkgs/qt6-webengine/patches/0101-chromium-102-fenced_frame_utils-include.patch
deleted file mode 100644
index f41c7984840d..000000000000
--- a/srcpkgs/qt6-webengine/patches/0101-chromium-102-fenced_frame_utils-include.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-From 7c135a291184b59a59643ed6a8c40b4405ac0175 Mon Sep 17 00:00:00 2001
-From: Stephan Hartmann <stha09@googlemail.com>
-Date: Wed, 27 Apr 2022 16:01:01 +0000
-Subject: [PATCH] IWYU: add cstring for std::strlen in fenced_frame_utils
-
----
- third_party/blink/common/fenced_frame/fenced_frame_utils.cc | 2 ++
- 1 file changed, 2 insertions(+)
-
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/blink/common/fenced_frame/fenced_frame_utils.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/blink/common/fenced_frame/fenced_frame_utils.cc
-@@ -6,6 +6,8 @@
- 
- #include <cstring>
- 
-+#include <cstring>
-+
- #include "base/guid.h"
- #include "base/strings/string_util.h"
- 
diff --git a/srcpkgs/qt6-webengine/patches/0102-chromium-102-regex_pattern-array.patch b/srcpkgs/qt6-webengine/patches/0102-chromium-102-regex_pattern-array.patch
deleted file mode 100644
index 420ef941a386..000000000000
--- a/srcpkgs/qt6-webengine/patches/0102-chromium-102-regex_pattern-array.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/components/autofill/core/browser/BUILD.gn
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/components/autofill/core/browser/BUILD.gn
-@@ -34,6 +34,11 @@ action("regex_patterns_inl_h") {
- }
- 
- jumbo_static_library("browser") {
-+  if (is_clang) {
-+    cflags = [
-+      "-fbracket-depth=1000",
-+    ]
-+  }
-   sources = [
-     "address_normalization_manager.cc",
-     "address_normalization_manager.h",
diff --git a/srcpkgs/qt6-webengine/patches/0103-chromium-i686-vaapi-fpermissive.patch b/srcpkgs/qt6-webengine/patches/0103-chromium-i686-vaapi-fpermissive.patch
deleted file mode 100644
index 708d567a04dc..000000000000
--- a/srcpkgs/qt6-webengine/patches/0103-chromium-i686-vaapi-fpermissive.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/media/gpu/vaapi/BUILD.gn
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/gpu/vaapi/BUILD.gn
-@@ -14,6 +14,12 @@ import("//ui/gl/features.gni")
- assert(is_linux || is_chromeos)
- assert(use_vaapi)
- 
-+config("vaapi_permissive") {
-+  if (target_cpu == "x86") {
-+    cflags = [ "-fpermissive" ]
-+  }
-+}
-+
- generate_stubs("libva_stubs") {
-   extra_header = "va_stub_header.fragment"
-   sigs = [ "va.sigs" ]
-@@ -89,6 +95,7 @@ source_set("vaapi") {
-   configs += [
-     "//build/config/linux/libva",
-     "//third_party/libvpx:libvpx_config",
-+    ":vaapi_permissive",
-   ]
- 
-   deps = [
diff --git a/srcpkgs/qt6-webengine/patches/0104-chromium-libxml-unbundle.patch b/srcpkgs/qt6-webengine/patches/0104-chromium-libxml-unbundle.patch
deleted file mode 100644
index baca484abc4a..000000000000
--- a/srcpkgs/qt6-webengine/patches/0104-chromium-libxml-unbundle.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/build/linux/unbundle/libxml.gn
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/build/linux/unbundle/libxml.gn
-@@ -19,6 +19,7 @@ static_library("libxml_utils") {
-     ":xml_reader",
-     ":xml_writer",
-     "//base/test:test_support",
-+    "//services/data_decoder:lib",
-     "//services/data_decoder:xml_parser_fuzzer_deps",
-   ]
-   sources = [
diff --git a/srcpkgs/qt6-webengine/patches/0107-chromium-cross-build.patch b/srcpkgs/qt6-webengine/patches/0107-chromium-cross-build.patch
index 44954dfbb1e5..7fbfabcd79b7 100644
--- a/srcpkgs/qt6-webengine/patches/0107-chromium-cross-build.patch
+++ b/srcpkgs/qt6-webengine/patches/0107-chromium-cross-build.patch
@@ -11,10 +11,10 @@
    # Normally, Android builds are lightly optimized, even for debug builds, to
    # keep binary size down. Setting this flag to true disables such optimization
    android_full_debug = false
-@@ -970,8 +974,13 @@ config("compiler_cpu_abi") {
-       }
+@@ -1003,8 +1003,13 @@
      } else if (current_cpu == "arm64") {
-       if (is_clang && !is_android && !is_nacl && !is_fuchsia) {
+       if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
+           !(is_chromeos_lacros && is_chromeos_device)) {
 -        cflags += [ "--target=aarch64-linux-gnu" ]
 -        ldflags += [ "--target=aarch64-linux-gnu" ]
 +        if (is_musl) {
diff --git a/srcpkgs/qt6-webengine/patches/0117-chromium-musl-resolver.patch b/srcpkgs/qt6-webengine/patches/0117-chromium-musl-resolver.patch
index 176524adc083..5f090c810579 100644
--- a/srcpkgs/qt6-webengine/patches/0117-chromium-musl-resolver.patch
+++ b/srcpkgs/qt6-webengine/patches/0117-chromium-musl-resolver.patch
@@ -27,17 +27,6 @@
  }
  
  bool ScopedResState::IsValid() const {
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/net/dns/host_resolver_manager.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/net/dns/host_resolver_manager.cc
-@@ -3158,7 +3158,7 @@ HostResolverManager::HostResolverManager
-   if (system_dns_config_notifier_)
-     system_dns_config_notifier_->AddObserver(this);
- #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_OPENBSD) && \
--    !BUILDFLAG(IS_ANDROID)
-+    !BUILDFLAG(IS_ANDROID) && !(BUILDFLAG(IS_LINUX) && !defined(__GLIBC__))
-   EnsureDnsReloaderInit();
- #endif
- 
 --- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/net/dns/dns_reloader.cc
 +++ qt6-webengine-6.4.2/src/3rdparty/chromium/net/dns/dns_reloader.cc
 @@ -7,7 +7,8 @@
@@ -50,8 +39,18 @@
  
  #include <resolv.h>
  
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/net/dns/host_resolver_proc.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/net/dns/host_resolver_proc.cc
+--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/net/dns/host_resolver_system_task.cc
++++ qt6-webengine-6.4.2/src/3rdparty/chromium/net/dns/host_resolver_system_task.cc
+@@ -310,8 +310,7 @@
+ }
+ 
+ void EnsureSystemHostResolverCallReady() {
+-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_OPENBSD) && \
+-    !BUILDFLAG(IS_ANDROID)
++#if defined(__GLIBC__)
+   EnsureDnsReloaderInit();
+ #elif BUILDFLAG(IS_WIN)
+   EnsureWinsockInit();
 @@ -192,7 +192,8 @@ int SystemHostResolverCall(const std::st
                                                  base::BlockingType::WILL_BLOCK);
  
diff --git a/srcpkgs/qt6-webengine/patches/0124-chromium-enable-i686.patch b/srcpkgs/qt6-webengine/patches/0124-chromium-enable-i686.patch
deleted file mode 100644
index 11d8de7c23f8..000000000000
--- a/srcpkgs/qt6-webengine/patches/0124-chromium-enable-i686.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/BUILD.gn
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/BUILD.gn
-@@ -1537,14 +1537,6 @@ if (!is_ios && !use_qt) {
-   }
- }
- 
--# TODO(cassew): Add more OS's that don't support x86.
--is_valid_x86_target =
--    target_os != "ios" && target_os != "mac" &&
--    (target_os != "linux" || use_libfuzzer || !build_with_chromium)
--assert(
--    is_valid_x86_target || target_cpu != "x86",
--    "'target_cpu=x86' is not supported for 'target_os=$target_os'. Consider omitting 'target_cpu' (default) or using 'target_cpu=x64' instead.")
--
- group("chromium_builder_perf") {
-   testonly = true
- 
diff --git a/srcpkgs/qt6-webengine/patches/0129-chromium-sandbox-shed_getparam.patch b/srcpkgs/qt6-webengine/patches/0129-chromium-sandbox-shed_getparam.patch
index 80d91c77e8ba..31f403bc10fe 100644
--- a/srcpkgs/qt6-webengine/patches/0129-chromium-sandbox-shed_getparam.patch
+++ b/srcpkgs/qt6-webengine/patches/0129-chromium-sandbox-shed_getparam.patch
@@ -1,20 +1,15 @@
 Allow SYS_sched_getparam and SYS_sched_getscheduler
 musl uses them for pthread_getschedparam()
 
-source: https://git.alpinelinux.org/aports/commit/community/chromium?id=54af9f8ac24f52d382c5758e2445bf0206eff40e
-
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
-@@ -97,10 +97,10 @@ ResultExpr RendererProcessPolicy::Evalua
+--- a/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
++++ b/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
+@@ -94,6 +94,9 @@
+     case __NR_pwrite64:
+     case __NR_sched_get_priority_max:
+     case __NR_sched_get_priority_min:
++    case __NR_sched_getparam:
++    case __NR_sched_getscheduler:
++    case __NR_sched_setscheduler:
      case __NR_sysinfo:
      case __NR_times:
      case __NR_uname:
--      return Allow();
--    case __NR_sched_getaffinity:
-     case __NR_sched_getparam:
-     case __NR_sched_getscheduler:
-+      return Allow();
-+    case __NR_sched_getaffinity:
-     case __NR_sched_setscheduler:
-       return RestrictSchedTarget(GetPolicyPid(), sysno);
-     case __NR_prlimit64:
diff --git a/srcpkgs/qt6-webengine/patches/0155-systypes.patch b/srcpkgs/qt6-webengine/patches/0155-systypes.patch
new file mode 100644
index 000000000000..f4e71e939cd1
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0155-systypes.patch
@@ -0,0 +1,11 @@
+--- a/src/3rdparty/chromium/base/third_party/symbolize/symbolize.h
++++ b/src/3rdparty/chromium/base/third_party/symbolize/symbolize.h
+@@ -58,6 +58,8 @@
+ #include "config.h"
+ #include "glog/logging.h"
+ 
++#include <sys/types.h>
++
+ #ifdef HAVE_SYMBOLIZE
+ 
+ #if defined(__ELF__)  // defined by gcc
diff --git a/srcpkgs/qt6-webengine/patches/0200-chromium-sndio.patch b/srcpkgs/qt6-webengine/patches/0200-chromium-sndio.patch
deleted file mode 100644
index d769b531497b..000000000000
--- a/srcpkgs/qt6-webengine/patches/0200-chromium-sndio.patch
+++ /dev/null
@@ -1,849 +0,0 @@
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/media/BUILD.gn
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/BUILD.gn
-@@ -78,6 +78,9 @@ config("media_config") {
-       defines += [ "DLOPEN_PULSEAUDIO" ]
-     }
-   }
-+  if (use_sndio) {
-+    defines += [ "USE_SNDIO" ]
-+  }
-   if (use_cras) {
-     defines += [ "USE_CRAS" ]
-   }
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/media/audio/BUILD.gn
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/BUILD.gn
-@@ -245,6 +245,17 @@ source_set("audio") {
-     sources += [ "linux/audio_manager_linux.cc" ]
-   }
- 
-+  if (use_sndio) {
-+    libs += [ "sndio" ]
-+    sources += [
-+      "sndio/audio_manager_sndio.cc",
-+      "sndio/sndio_input.cc",
-+      "sndio/sndio_input.h",
-+      "sndio/sndio_output.cc",
-+      "sndio/sndio_output.h"
-+    ]
-+  }
-+
-   if (use_alsa) {
-     libs += [ "asound" ]
-     sources += [
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/media/audio/linux/audio_manager_linux.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/linux/audio_manager_linux.cc
-@@ -25,6 +25,11 @@
- #include "media/audio/pulse/audio_manager_pulse.h"
- #include "media/audio/pulse/pulse_util.h"
- #endif
-+#if defined(USE_SNDIO)
-+#include "media/audio/sndio/audio_manager_sndio.h"
-+#include "media/audio/sndio/sndio_input.h"
-+#include "media/audio/sndio/sndio_output.h"
-+#endif
- 
- namespace media {
- 
---- /dev/null
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/sndio/audio_manager_sndio.cc
-@@ -0,0 +1,148 @@
-+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+#include "media/audio/sndio/audio_manager_sndio.h"
-+
-+#include "base/metrics/histogram_macros.h"
-+#include "base/memory/ptr_util.h"
-+#include "media/audio/audio_device_description.h"
-+#include "media/audio/audio_output_dispatcher.h"
-+#include "media/audio/sndio/sndio_input.h"
-+#include "media/audio/sndio/sndio_output.h"
-+#include "media/base/limits.h"
-+#include "media/base/media_switches.h"
-+
-+namespace media {
-+
-+
-+// Maximum number of output streams that can be open simultaneously.
-+static const int kMaxOutputStreams = 4;
-+
-+// Default sample rate for input and output streams.
-+static const int kDefaultSampleRate = 48000;
-+
-+void AddDefaultDevice(AudioDeviceNames* device_names) {
-+  DCHECK(device_names->empty());
-+  device_names->push_front(AudioDeviceName::CreateDefault());
-+}
-+
-+bool AudioManagerSndio::HasAudioOutputDevices() {
-+  return true;
-+}
-+
-+bool AudioManagerSndio::HasAudioInputDevices() {
-+  return true;
-+}
-+
-+void AudioManagerSndio::GetAudioInputDeviceNames(
-+    AudioDeviceNames* device_names) {
-+  DCHECK(device_names->empty());
-+  AddDefaultDevice(device_names);
-+}
-+
-+void AudioManagerSndio::GetAudioOutputDeviceNames(
-+    AudioDeviceNames* device_names) {
-+  AddDefaultDevice(device_names);
-+}
-+
-+const char* AudioManagerSndio::GetName() {
-+  return "SNDIO";
-+}
-+
-+AudioParameters AudioManagerSndio::GetInputStreamParameters(
-+    const std::string& device_id) {
-+  static const int kDefaultInputBufferSize = 1024;
-+
-+  int user_buffer_size = GetUserBufferSize();
-+  int buffer_size = user_buffer_size ?
-+      user_buffer_size : kDefaultInputBufferSize;
-+
-+  return AudioParameters(
-+      AudioParameters::AUDIO_PCM_LOW_LATENCY, CHANNEL_LAYOUT_STEREO,
-+      kDefaultSampleRate, buffer_size);
-+}
-+
-+AudioManagerSndio::AudioManagerSndio(std::unique_ptr<AudioThread> audio_thread,
-+                                         AudioLogFactory* audio_log_factory)
-+    : AudioManagerBase(std::move(audio_thread),
-+                       audio_log_factory) {
-+  DLOG(WARNING) << "AudioManagerSndio";
-+  SetMaxOutputStreamsAllowed(kMaxOutputStreams);
-+}
-+
-+AudioManagerSndio::~AudioManagerSndio() {
-+  Shutdown();
-+}
-+
-+AudioOutputStream* AudioManagerSndio::MakeLinearOutputStream(
-+    const AudioParameters& params,
-+    const LogCallback& log_callback) {
-+  DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format());
-+  return MakeOutputStream(params);
-+}
-+
-+AudioOutputStream* AudioManagerSndio::MakeLowLatencyOutputStream(
-+    const AudioParameters& params,
-+    const std::string& device_id,
-+    const LogCallback& log_callback) {
-+  DLOG_IF(ERROR, !device_id.empty()) << "Not implemented!";
-+  DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format());
-+  return MakeOutputStream(params);
-+}
-+
-+AudioInputStream* AudioManagerSndio::MakeLinearInputStream(
-+    const AudioParameters& params,
-+    const std::string& device_id,
-+    const LogCallback& log_callback) {
-+  DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format());
-+  return MakeInputStream(params);
-+}
-+
-+AudioInputStream* AudioManagerSndio::MakeLowLatencyInputStream(
-+    const AudioParameters& params,
-+    const std::string& device_id,
-+    const LogCallback& log_callback) {
-+  DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format());
-+  return MakeInputStream(params);
-+}
-+
-+AudioParameters AudioManagerSndio::GetPreferredOutputStreamParameters(
-+    const std::string& output_device_id,
-+    const AudioParameters& input_params) {
-+  // TODO(tommi): Support |output_device_id|.
-+  DLOG_IF(ERROR, !output_device_id.empty()) << "Not implemented!";
-+  static const int kDefaultOutputBufferSize = 2048;
-+
-+  ChannelLayout channel_layout = CHANNEL_LAYOUT_STEREO;
-+  int sample_rate = kDefaultSampleRate;
-+  int buffer_size = kDefaultOutputBufferSize;
-+  if (input_params.IsValid()) {
-+    sample_rate = input_params.sample_rate();
-+    channel_layout = input_params.channel_layout();
-+    buffer_size = std::min(buffer_size, input_params.frames_per_buffer());
-+  }
-+
-+  int user_buffer_size = GetUserBufferSize();
-+  if (user_buffer_size)
-+    buffer_size = user_buffer_size;
-+
-+  return AudioParameters(
-+      AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout,
-+      sample_rate, buffer_size);
-+}
-+
-+AudioInputStream* AudioManagerSndio::MakeInputStream(
-+    const AudioParameters& params) {
-+  DLOG(WARNING) << "MakeInputStream";
-+  return new SndioAudioInputStream(this,
-+             AudioDeviceDescription::kDefaultDeviceId, params);
-+}
-+
-+AudioOutputStream* AudioManagerSndio::MakeOutputStream(
-+    const AudioParameters& params) {
-+  DLOG(WARNING) << "MakeOutputStream";
-+  return new SndioAudioOutputStream(params, this);
-+}
-+
-+}  // namespace media
---- /dev/null
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/sndio/audio_manager_sndio.h
-@@ -0,0 +1,65 @@
-+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+#ifndef MEDIA_AUDIO_SNDIO_AUDIO_MANAGER_SNDIO_H_
-+#define MEDIA_AUDIO_SNDIO_AUDIO_MANAGER_SNDIO_H_
-+
-+#include <set>
-+
-+#include "base/compiler_specific.h"
-+#include "base/macros.h"
-+#include "base/memory/ref_counted.h"
-+#include "base/threading/thread.h"
-+#include "media/audio/audio_manager_base.h"
-+
-+namespace media {
-+
-+class MEDIA_EXPORT AudioManagerSndio : public AudioManagerBase {
-+ public:
-+  AudioManagerSndio(std::unique_ptr<AudioThread> audio_thread,
-+                   AudioLogFactory* audio_log_factory);
-+  ~AudioManagerSndio() override;
-+
-+  // Implementation of AudioManager.
-+  bool HasAudioOutputDevices() override;
-+  bool HasAudioInputDevices() override;
-+  void GetAudioInputDeviceNames(AudioDeviceNames* device_names) override;
-+  void GetAudioOutputDeviceNames(AudioDeviceNames* device_names) override;
-+  AudioParameters GetInputStreamParameters(
-+      const std::string& device_id) override;
-+  const char* GetName() override;
-+
-+  // Implementation of AudioManagerBase.
-+  AudioOutputStream* MakeLinearOutputStream(
-+      const AudioParameters& params,
-+      const LogCallback& log_callback) override;
-+  AudioOutputStream* MakeLowLatencyOutputStream(
-+      const AudioParameters& params,
-+      const std::string& device_id,
-+      const LogCallback& log_callback) override;
-+  AudioInputStream* MakeLinearInputStream(
-+      const AudioParameters& params,
-+      const std::string& device_id,
-+      const LogCallback& log_callback) override;
-+  AudioInputStream* MakeLowLatencyInputStream(
-+      const AudioParameters& params,
-+      const std::string& device_id,
-+      const LogCallback& log_callback) override;
-+
-+ protected:
-+  AudioParameters GetPreferredOutputStreamParameters(
-+      const std::string& output_device_id,
-+      const AudioParameters& input_params) override;
-+
-+ private:
-+  // Called by MakeLinearOutputStream and MakeLowLatencyOutputStream.
-+  AudioOutputStream* MakeOutputStream(const AudioParameters& params);
-+  AudioInputStream* MakeInputStream(const AudioParameters& params);
-+
-+  DISALLOW_COPY_AND_ASSIGN(AudioManagerSndio);
-+};
-+
-+}  // namespace media
-+
-+#endif  // MEDIA_AUDIO_SNDIO_AUDIO_MANAGER_SNDIO_H_
---- /dev/null
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/sndio/sndio_input.cc
-@@ -0,0 +1,200 @@
-+// Copyright 2013 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+#include "base/bind.h"
-+#include "base/logging.h"
-+#include "base/macros.h"
-+#include "media/base/audio_timestamp_helper.h"
-+#include "media/audio/sndio/audio_manager_sndio.h"
-+#include "media/audio/audio_manager.h"
-+#include "media/audio/sndio/sndio_input.h"
-+
-+namespace media {
-+
-+static const SampleFormat kSampleFormat = kSampleFormatS16;
-+
-+void SndioAudioInputStream::OnMoveCallback(void *arg, int delta)
-+{
-+  SndioAudioInputStream* self = static_cast<SndioAudioInputStream*>(arg);
-+
-+  self->hw_delay += delta;
-+}
-+
-+void *SndioAudioInputStream::ThreadEntry(void *arg) {
-+  SndioAudioInputStream* self = static_cast<SndioAudioInputStream*>(arg);
-+
-+  self->ThreadLoop();
-+  return NULL;
-+}
-+
-+SndioAudioInputStream::SndioAudioInputStream(AudioManagerBase* manager,
-+                                             const std::string& device_name,
-+                                             const AudioParameters& params)
-+    : manager(manager),
-+      params(params),
-+      audio_bus(AudioBus::Create(params)),
-+      state(kClosed) {
-+}
-+
-+SndioAudioInputStream::~SndioAudioInputStream() {
-+  if (state != kClosed)
-+    Close();
-+}
-+
-+bool SndioAudioInputStream::Open() {
-+  struct sio_par par;
-+  int sig;
-+
-+  if (state != kClosed)
-+    return false;
-+
-+  if (params.format() != AudioParameters::AUDIO_PCM_LINEAR &&
-+      params.format() != AudioParameters::AUDIO_PCM_LOW_LATENCY) {
-+    LOG(WARNING) << "Unsupported audio format.";
-+    return false;
-+  }
-+
-+  sio_initpar(&par);
-+  par.rate = params.sample_rate();
-+  par.rchan = params.channels();
-+  par.bits = SampleFormatToBitsPerChannel(kSampleFormat);
-+  par.bps = par.bits / 8;
-+  par.sig = sig = par.bits != 8 ? 1 : 0;
-+  par.le = SIO_LE_NATIVE;
-+  par.appbufsz = params.frames_per_buffer();
-+
-+  hdl = sio_open(SIO_DEVANY, SIO_REC, 0);
-+
-+  if (hdl == NULL) {
-+    LOG(ERROR) << "Couldn't open audio device.";
-+    return false;
-+  }
-+
-+  if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par)) {
-+    LOG(ERROR) << "Couldn't set audio parameters.";
-+    goto bad_close;
-+  }
-+
-+  if (par.rate  != (unsigned int)params.sample_rate() ||
-+      par.rchan != (unsigned int)params.channels() ||
-+      par.bits  != (unsigned int)SampleFormatToBitsPerChannel(kSampleFormat) ||
-+      par.sig   != (unsigned int)sig ||
-+      (par.bps > 1 && par.le != SIO_LE_NATIVE) ||
-+      (par.bits != par.bps * 8)) {
-+    LOG(ERROR) << "Unsupported audio parameters.";
-+    goto bad_close;
-+  }
-+  state = kStopped;
-+  buffer = new char[audio_bus->frames() * params.GetBytesPerFrame(kSampleFormat)];
-+  sio_onmove(hdl, &OnMoveCallback, this);
-+  return true;
-+bad_close:
-+  sio_close(hdl);
-+  return false;
-+}
-+
-+void SndioAudioInputStream::Start(AudioInputCallback* cb) {
-+
-+  StartAgc();
-+
-+  state = kRunning;
-+  hw_delay = 0;
-+  callback = cb;
-+  sio_start(hdl);
-+  if (pthread_create(&thread, NULL, &ThreadEntry, this) != 0) {
-+    LOG(ERROR) << "Failed to create real-time thread for recording.";
-+    sio_stop(hdl);
-+    state = kStopped;
-+  }
-+}
-+
-+void SndioAudioInputStream::Stop() {
-+
-+  if (state == kStopped)
-+    return;
-+
-+  state = kStopWait;
-+  pthread_join(thread, NULL);
-+  sio_stop(hdl);
-+  state = kStopped;
-+
-+  StopAgc();
-+}
-+
-+void SndioAudioInputStream::Close() {
-+
-+  if (state == kClosed)
-+    return;
-+
-+  if (state == kRunning)
-+    Stop();
-+
-+  state = kClosed;
-+  delete [] buffer;
-+  sio_close(hdl);
-+
-+  manager->ReleaseInputStream(this);
-+}
-+
-+double SndioAudioInputStream::GetMaxVolume() {
-+  // Not supported
-+  return 0.0;
-+}
-+
-+void SndioAudioInputStream::SetVolume(double volume) {
-+  // Not supported. Do nothing.
-+}
-+
-+double SndioAudioInputStream::GetVolume() {
-+  // Not supported.
-+  return 0.0;
-+}
-+
-+bool SndioAudioInputStream::IsMuted() {
-+  // Not supported.
-+  return false;
-+}
-+
-+void SndioAudioInputStream::SetOutputDeviceForAec(
-+    const std::string& output_device_id) {
-+  // Not supported.
-+}
-+
-+void SndioAudioInputStream::ThreadLoop(void) {
-+  size_t todo, n;
-+  char *data;
-+  unsigned int nframes;
-+  double normalized_volume = 0.0;
-+
-+  nframes = audio_bus->frames();
-+
-+  while (state == kRunning && !sio_eof(hdl)) {
-+
-+    GetAgcVolume(&normalized_volume);
-+
-+    // read one block
-+    todo = nframes * params.GetBytesPerFrame(kSampleFormat);
-+    data = buffer;
-+    while (todo > 0) {
-+      n = sio_read(hdl, data, todo);
-+      if (n == 0)
-+        return;	// unrecoverable I/O error
-+      todo -= n;
-+      data += n;
-+    }
-+    hw_delay -= nframes;
-+
-+    // convert frames count to TimeDelta
-+    const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay,
-+      params.sample_rate());
-+
-+    // push into bus
-+    audio_bus->FromInterleaved<SignedInt16SampleTypeTraits>(reinterpret_cast<int16_t*>(buffer), nframes);
-+
-+    // invoke callback
-+    callback->OnData(audio_bus.get(), base::TimeTicks::Now() - delay, 1.);
-+  }
-+}
-+
-+}  // namespace media
---- /dev/null
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/sndio/sndio_input.h
-@@ -0,0 +1,91 @@
-+// Copyright 2013 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+#ifndef MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_
-+#define MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_
-+
-+#include <stdint.h>
-+#include <string>
-+#include <sndio.h>
-+
-+#include "base/compiler_specific.h"
-+#include "base/macros.h"
-+#include "base/memory/weak_ptr.h"
-+#include "base/time/time.h"
-+#include "media/audio/agc_audio_stream.h"
-+#include "media/audio/audio_io.h"
-+#include "media/audio/audio_device_description.h"
-+#include "media/base/audio_parameters.h"
-+
-+namespace media {
-+
-+class AudioManagerBase;
-+
-+// Implementation of AudioOutputStream using sndio(7)
-+class SndioAudioInputStream : public AgcAudioStream<AudioInputStream> {
-+ public:
-+  // Pass this to the constructor if you want to attempt auto-selection
-+  // of the audio recording device.
-+  static const char kAutoSelectDevice[];
-+
-+  // Create a PCM Output stream for the SNDIO device identified by
-+  // |device_name|. If unsure of what to use for |device_name|, use
-+  // |kAutoSelectDevice|.
-+  SndioAudioInputStream(AudioManagerBase* audio_manager,
-+                     const std::string& device_name,
-+                     const AudioParameters& params);
-+
-+  ~SndioAudioInputStream() override;
-+
-+  // Implementation of AudioInputStream.
-+  bool Open() override;
-+  void Start(AudioInputCallback* callback) override;
-+  void Stop() override;
-+  void Close() override;
-+  double GetMaxVolume() override;
-+  void SetVolume(double volume) override;
-+  double GetVolume() override;
-+  bool IsMuted() override;
-+  void SetOutputDeviceForAec(const std::string& output_device_id) override;
-+
-+ private:
-+
-+  enum StreamState {
-+    kClosed,            // Not opened yet
-+    kStopped,           // Device opened, but not started yet
-+    kRunning,           // Started, device playing
-+    kStopWait           // Stopping, waiting for the real-time thread to exit
-+  };
-+
-+  // C-style call-backs
-+  static void OnMoveCallback(void *arg, int delta);
-+  static void* ThreadEntry(void *arg);
-+
-+  // Continuously moves data from the device to the consumer
-+  void ThreadLoop();
-+  // Our creator, the audio manager needs to be notified when we close.
-+  AudioManagerBase* manager;
-+  // Parameters of the source
-+  AudioParameters params;
-+  // We store data here for consumer
-+  std::unique_ptr<AudioBus> audio_bus;
-+  // Call-back that consumes recorded data
-+  AudioInputCallback* callback;  // Valid during a recording session.
-+  // Handle of the audio device
-+  struct sio_hdl* hdl;
-+  // Current state of the stream
-+  enum StreamState state;
-+  // High priority thread running ThreadLoop()
-+  pthread_t thread;
-+  // Number of frames buffered in the hardware
-+  int hw_delay;
-+  // Temporary buffer where data is stored sndio-compatible format
-+  char* buffer;
-+
-+  DISALLOW_COPY_AND_ASSIGN(SndioAudioInputStream);
-+};
-+
-+}  // namespace media
-+
-+#endif  // MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_
---- /dev/null
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/sndio/sndio_output.cc
-@@ -0,0 +1,183 @@
-+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+#include "base/logging.h"
-+#include "base/time/time.h"
-+#include "base/time/default_tick_clock.h"
-+#include "media/audio/audio_manager_base.h"
-+#include "media/base/audio_timestamp_helper.h"
-+#include "media/audio/sndio/sndio_output.h"
-+
-+namespace media {
-+
-+static const SampleFormat kSampleFormat = kSampleFormatS16;
-+
-+void SndioAudioOutputStream::OnMoveCallback(void *arg, int delta) {
-+  SndioAudioOutputStream* self = static_cast<SndioAudioOutputStream*>(arg);
-+
-+  self->hw_delay -= delta;
-+}
-+
-+void SndioAudioOutputStream::OnVolCallback(void *arg, unsigned int vol) {
-+  SndioAudioOutputStream* self = static_cast<SndioAudioOutputStream*>(arg);
-+
-+  self->vol = vol;
-+}
-+
-+void *SndioAudioOutputStream::ThreadEntry(void *arg) {
-+  SndioAudioOutputStream* self = static_cast<SndioAudioOutputStream*>(arg);
-+
-+  self->ThreadLoop();
-+  return NULL;
-+}
-+
-+SndioAudioOutputStream::SndioAudioOutputStream(const AudioParameters& params,
-+                                               AudioManagerBase* manager)
-+    : manager(manager),
-+      params(params),
-+      audio_bus(AudioBus::Create(params)),
-+      state(kClosed),
-+      mutex(PTHREAD_MUTEX_INITIALIZER) {
-+}
-+
-+SndioAudioOutputStream::~SndioAudioOutputStream() {
-+  if (state != kClosed)
-+    Close();
-+}
-+
-+bool SndioAudioOutputStream::Open() {
-+  struct sio_par par;
-+  int sig;
-+
-+  if (params.format() != AudioParameters::AUDIO_PCM_LINEAR &&
-+      params.format() != AudioParameters::AUDIO_PCM_LOW_LATENCY) {
-+    LOG(WARNING) << "Unsupported audio format.";
-+    return false;
-+  }
-+  sio_initpar(&par);
-+  par.rate = params.sample_rate();
-+  par.pchan = params.channels();
-+  par.bits = SampleFormatToBitsPerChannel(kSampleFormat);
-+  par.bps = par.bits / 8;
-+  par.sig = sig = par.bits != 8 ? 1 : 0;
-+  par.le = SIO_LE_NATIVE;
-+  par.appbufsz = params.frames_per_buffer();
-+
-+  hdl = sio_open(SIO_DEVANY, SIO_PLAY, 0);
-+  if (hdl == NULL) {
-+    LOG(ERROR) << "Couldn't open audio device.";
-+    return false;
-+  }
-+  if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par)) {
-+    LOG(ERROR) << "Couldn't set audio parameters.";
-+    goto bad_close;
-+  }
-+  if (par.rate  != (unsigned int)params.sample_rate() ||
-+      par.pchan != (unsigned int)params.channels() ||
-+      par.bits  != (unsigned int)SampleFormatToBitsPerChannel(kSampleFormat) ||
-+      par.sig   != (unsigned int)sig ||
-+      (par.bps > 1 && par.le != SIO_LE_NATIVE) ||
-+      (par.bits != par.bps * 8)) {
-+    LOG(ERROR) << "Unsupported audio parameters.";
-+    goto bad_close;
-+  }
-+  state = kStopped;
-+  volpending = 0;
-+  vol = 0;
-+  buffer = new char[audio_bus->frames() * params.GetBytesPerFrame(kSampleFormat)];
-+  sio_onmove(hdl, &OnMoveCallback, this);
-+  sio_onvol(hdl, &OnVolCallback, this);
-+  return true;
-+ bad_close:
-+  sio_close(hdl);
-+  return false;
-+}
-+
-+void SndioAudioOutputStream::Close() {
-+  if (state == kClosed)
-+    return;
-+  if (state == kRunning)
-+    Stop();
-+  state = kClosed;
-+  delete [] buffer;
-+  sio_close(hdl);
-+  manager->ReleaseOutputStream(this);  // Calls the destructor
-+}
-+
-+void SndioAudioOutputStream::Start(AudioSourceCallback* callback) {
-+  state = kRunning;
-+  hw_delay = 0;
-+  source = callback;
-+  sio_start(hdl);
-+  if (pthread_create(&thread, NULL, &ThreadEntry, this) != 0) {
-+    LOG(ERROR) << "Failed to create real-time thread.";
-+    sio_stop(hdl);
-+    state = kStopped;
-+  }
-+}
-+
-+void SndioAudioOutputStream::Stop() {
-+  if (state == kStopped)
-+    return;
-+  state = kStopWait;
-+  pthread_join(thread, NULL);
-+  sio_stop(hdl);
-+  state = kStopped;
-+}
-+
-+void SndioAudioOutputStream::SetVolume(double v) {
-+  pthread_mutex_lock(&mutex);
-+  vol = v * SIO_MAXVOL;
-+  volpending = 1;
-+  pthread_mutex_unlock(&mutex);
-+}
-+
-+void SndioAudioOutputStream::GetVolume(double* v) {
-+  pthread_mutex_lock(&mutex);
-+  *v = vol * (1. / SIO_MAXVOL);
-+  pthread_mutex_unlock(&mutex);
-+}
-+
-+// This stream is always used with sub second buffer sizes, where it's
-+// sufficient to simply always flush upon Start().
-+void SndioAudioOutputStream::Flush() {}
-+
-+void SndioAudioOutputStream::ThreadLoop(void) {
-+  int avail, count, result;
-+
-+  while (state == kRunning) {
-+    // Update volume if needed
-+    pthread_mutex_lock(&mutex);
-+    if (volpending) {
-+      volpending = 0;
-+      sio_setvol(hdl, vol);
-+    }
-+    pthread_mutex_unlock(&mutex);
-+
-+    // Get data to play
-+    const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay,
-+	params.sample_rate());
-+    count = source->OnMoreData(delay, base::TimeTicks::Now(), 0, audio_bus.get());
-+    audio_bus->ToInterleaved<SignedInt16SampleTypeTraits>(count, reinterpret_cast<int16_t*>(buffer));
-+    if (count == 0) {
-+      // We have to submit something to the device
-+      count = audio_bus->frames();
-+      memset(buffer, 0, count * params.GetBytesPerFrame(kSampleFormat));
-+      LOG(WARNING) << "No data to play, running empty cycle.";
-+    }
-+
-+    // Submit data to the device
-+    avail = count * params.GetBytesPerFrame(kSampleFormat);
-+    result = sio_write(hdl, buffer, avail);
-+    if (result == 0) {
-+      LOG(WARNING) << "Audio device disconnected.";
-+      break;
-+    }
-+
-+    // Update hardware pointer
-+    hw_delay += count;
-+  }
-+}
-+
-+}  // namespace media
---- /dev/null
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/sndio/sndio_output.h
-@@ -0,0 +1,86 @@
-+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+#ifndef MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_
-+#define MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_
-+
-+#include <pthread.h>
-+#include <sndio.h>
-+
-+#include "base/time/tick_clock.h"
-+#include "base/time/time.h"
-+#include "media/audio/audio_io.h"
-+
-+namespace media {
-+
-+class AudioManagerBase;
-+
-+// Implementation of AudioOutputStream using sndio(7)
-+class SndioAudioOutputStream : public AudioOutputStream {
-+ public:
-+  // The manager is creating this object
-+  SndioAudioOutputStream(const AudioParameters& params,
-+                         AudioManagerBase* manager);
-+  virtual ~SndioAudioOutputStream();
-+
-+  // Implementation of AudioOutputStream.
-+  bool Open() override;
-+  void Close() override;
-+  void Start(AudioSourceCallback* callback) override;
-+  void Stop() override;
-+  void SetVolume(double volume) override;
-+  void GetVolume(double* volume) override;
-+  void Flush() override;
-+
-+  friend void sndio_onmove(void *arg, int delta);
-+  friend void sndio_onvol(void *arg, unsigned int vol);
-+  friend void *sndio_threadstart(void *arg);
-+
-+ private:
-+  enum StreamState {
-+    kClosed,            // Not opened yet
-+    kStopped,           // Device opened, but not started yet
-+    kRunning,           // Started, device playing
-+    kStopWait           // Stopping, waiting for the real-time thread to exit
-+  };
-+
-+  // C-style call-backs
-+  static void OnMoveCallback(void *arg, int delta);
-+  static void OnVolCallback(void *arg, unsigned int vol);
-+  static void* ThreadEntry(void *arg);
-+
-+  // Continuously moves data from the producer to the device
-+  void ThreadLoop(void);
-+
-+  // Our creator, the audio manager needs to be notified when we close.
-+  AudioManagerBase* manager;
-+  // Parameters of the source
-+  AudioParameters params;
-+  // Source stores data here
-+  std::unique_ptr<AudioBus> audio_bus;
-+  // Call-back that produces data to play
-+  AudioSourceCallback* source;
-+  // Handle of the audio device
-+  struct sio_hdl* hdl;
-+  // Current state of the stream
-+  enum StreamState state;
-+  // High priority thread running ThreadLoop()
-+  pthread_t thread;
-+  // Protects vol, volpending and hw_delay
-+  pthread_mutex_t mutex;
-+  // Current volume in the 0..SIO_MAXVOL range
-+  int vol;
-+  // Set to 1 if volumes must be refreshed in the realtime thread
-+  int volpending;
-+  // Number of frames buffered in the hardware
-+  int hw_delay;
-+  // Temporary buffer where data is stored sndio-compatible format
-+  char* buffer;
-+
-+  DISALLOW_COPY_AND_ASSIGN(SndioAudioOutputStream);
-+};
-+
-+}  // namespace media
-+
-+#endif  // MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/media/media_options.gni
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/media_options.gni
-@@ -133,6 +133,9 @@ declare_args() {
-   # Enables runtime selection of ALSA library for audio.
-   use_alsa = false
- 
-+  # Enable runtime selection of sndio(7)
-+  use_sndio = false
-+
-   # Alsa should be used on non-Android, non-Mac POSIX systems.
-   # Alsa should be used on desktop Chromecast and audio-only Chromecast builds.
-   if (is_posix && !is_android && !is_mac &&
diff --git a/srcpkgs/qt6-webengine/patches/0300-chromium-musl-hacks.patch b/srcpkgs/qt6-webengine/patches/0300-chromium-musl-hacks.patch
index 525aeb8a63d2..e0b91a09a84f 100644
--- a/srcpkgs/qt6-webengine/patches/0300-chromium-musl-hacks.patch
+++ b/srcpkgs/qt6-webengine/patches/0300-chromium-musl-hacks.patch
@@ -36,17 +36,3 @@
    s.OutputToStream(&os);
  #else
    os << "StackTrace::OutputToStream not implemented.";
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/net/socket/udp_socket_posix.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/net/socket/udp_socket_posix.cc
-@@ -1157,7 +1157,11 @@ SendResult UDPSocketPosixSender::Interna
-     msg_iov->push_back({const_cast<char*>(buffer->data()), buffer->length()});
-   msgvec->reserve(buffers.size());
-   for (size_t j = 0; j < buffers.size(); j++)
-+#ifdef __GLIBC__
-     msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, nullptr, 0, 0}, 0});
-+#else
-+    msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, 0, 0, 0}, 0});
-+#endif
-   int result = HANDLE_EINTR(Sendmmsg(fd, &msgvec[0], buffers.size(), 0));
-   SendResult send_result(0, 0, std::move(buffers));
-   if (result < 0) {
diff --git a/srcpkgs/qt6-webengine/patches/0301-chromium-musl-sandbox.patch b/srcpkgs/qt6-webengine/patches/0301-chromium-musl-sandbox.patch
deleted file mode 100644
index 4afbec5b98ef..000000000000
--- a/srcpkgs/qt6-webengine/patches/0301-chromium-musl-sandbox.patch
+++ /dev/null
@@ -1,86 +0,0 @@
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
-@@ -134,6 +134,7 @@ namespace sandbox {
- ResultExpr RestrictCloneToThreadsAndEPERMFork() {
-   const Arg<unsigned long> flags(0);
- 
-+#ifdef __GLIBC__
-   // TODO(mdempsky): Extend DSL to support (flags & ~mask1) == mask2.
-   const uint64_t kAndroidCloneMask = CLONE_VM | CLONE_FS | CLONE_FILES |
-                                      CLONE_SIGHAND | CLONE_THREAD |
-@@ -160,6 +161,16 @@ ResultExpr RestrictCloneToThreadsAndEPER
-   return If(IsAndroid() ? android_test : glibc_test, Allow())
-       .ElseIf(is_fork_or_clone_vfork, Error(EPERM))
-       .Else(CrashSIGSYSClone());
-+#else
-+  const int required = CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND |
-+                       CLONE_THREAD | CLONE_SYSVSEM;
-+  const int safe = CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID |
-+                   CLONE_DETACHED;
-+  const BoolExpr thread_clone_ok = (flags&~safe)==required;
-+  return If(thread_clone_ok, Allow())
-+      .ElseIf((flags & (CLONE_VM | CLONE_THREAD)) == 0, Error(EPERM))
-+      .Else(CrashSIGSYSClone());
-+#endif
- }
- 
- #ifndef PR_PAC_RESET_KEYS
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
-@@ -424,6 +424,9 @@ bool SyscallSets::IsAllowedProcessStartO
- #if defined(__i386__)
-     case __NR_waitpid:
- #endif
-+#if !defined(__GLIBC__)
-+    case __NR_set_tid_address:
-+#endif
-       return true;
-     case __NR_clone:  // Should be parameter-restricted.
-     case __NR_setns:  // Privileged.
-@@ -436,7 +439,9 @@ bool SyscallSets::IsAllowedProcessStartO
- #if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
-     case __NR_set_thread_area:
- #endif
-+#if defined(__GLIBC__)
-     case __NR_set_tid_address:
-+#endif
-     case __NR_unshare:
- #if !defined(__mips__) && !defined(__aarch64__)
-     case __NR_vfork:
-@@ -550,6 +555,9 @@ bool SyscallSets::IsAllowedAddressSpaceA
-     case __NR_mlock:
-     case __NR_munlock:
-     case __NR_munmap:
-+#ifndef __GLIBC__
-+    case __NR_mremap:
-+#endif
-       return true;
-     case __NR_madvise:
-     case __NR_mincore:
-@@ -567,7 +575,9 @@ bool SyscallSets::IsAllowedAddressSpaceA
-     case __NR_modify_ldt:
- #endif
-     case __NR_mprotect:
-+#ifdef __GLIBC__
-     case __NR_mremap:
-+#endif
-     case __NR_msync:
-     case __NR_munlockall:
-     case __NR_readahead:
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
-@@ -99,9 +99,14 @@ ResultExpr RendererProcessPolicy::Evalua
-     case __NR_uname:
-     case __NR_sched_getparam:
-     case __NR_sched_getscheduler:
-+#ifndef __GLIBC__
-+    case __NR_sched_setscheduler:
-+#endif
-       return Allow();
-     case __NR_sched_getaffinity:
-+#ifdef __GLIBC__
-     case __NR_sched_setscheduler:
-+#endif
-       return RestrictSchedTarget(GetPolicyPid(), sysno);
-     case __NR_prlimit64:
-       // See crbug.com/662450 and setrlimit comment above.
diff --git a/srcpkgs/qt6-webengine/patches/0302-chromium-no-mallinfo.patch b/srcpkgs/qt6-webengine/patches/0302-chromium-no-mallinfo.patch
index 519930e7bef0..13b9c2c3164f 100644
--- a/srcpkgs/qt6-webengine/patches/0302-chromium-no-mallinfo.patch
+++ b/srcpkgs/qt6-webengine/patches/0302-chromium-no-mallinfo.patch
@@ -35,17 +35,23 @@
  #endif
 --- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc
 +++ qt6-webengine-6.4.2/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc
-@@ -174,7 +174,8 @@ void ReportAppleAllocStats(size_t* total
+@@ -185,7 +185,6 @@
+ #define MALLINFO2_FOUND_IN_LIBC
+   struct mallinfo2 info = mallinfo2();
+ #endif
+-#endif  // defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ #if !defined(MALLINFO2_FOUND_IN_LIBC)
+   struct mallinfo info = mallinfo();
+ #endif
+@@ -205,6 +204,7 @@
+     sys_alloc_dump->AddScalar(MemoryAllocatorDump::kNameSize,
+                               MemoryAllocatorDump::kUnitsBytes, info.uordblks);
+   }
++#endif  // defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ }
+ #endif
  
- #if (BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(IS_ANDROID)) || \
-     (!BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && !BUILDFLAG(IS_WIN) &&    \
--     !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_FUCHSIA))
-+     !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_FUCHSIA) && \
-+     !(BUILDFLAG(IS_LINUX) && !defined(__GLIBC__)))
- void ReportMallinfoStats(ProcessMemoryDump* pmd,
-                          size_t* total_virtual_size,
-                          size_t* resident_size,
-@@ -339,7 +340,7 @@ bool MallocDumpProvider::OnMemoryDump(co
+@@ -339,7 +340,7 @@
                       &allocated_objects_count);
  #elif BUILDFLAG(IS_FUCHSIA)
  // TODO(fuchsia): Port, see https://crbug.com/706592.
@@ -54,14 +60,3 @@
    ReportMallinfoStats(/*pmd=*/nullptr, &total_virtual_size, &resident_size,
                        &allocated_objects_size, &allocated_objects_count);
  #endif
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/tflite/src/tensorflow/lite/profiling/memory_info.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/tflite/src/tensorflow/lite/profiling/memory_info.cc
-@@ -35,7 +35,7 @@ bool MemoryUsage::IsSupported() {
- 
- MemoryUsage GetMemoryUsage() {
-   MemoryUsage result;
--#ifdef __linux__
-+#if defined(__linux__) && defined(__GLIBC__)
-   rusage res;
-   if (getrusage(RUSAGE_SELF, &res) == 0) {
-     result.max_rss_kb = res.ru_maxrss;
diff --git a/srcpkgs/qt6-webengine/template b/srcpkgs/qt6-webengine/template
index 96846feaee83..4e22cb6e8863 100644
--- a/srcpkgs/qt6-webengine/template
+++ b/srcpkgs/qt6-webengine/template
@@ -1,7 +1,7 @@
 # Template file for 'qt6-webengine'
 pkgname=qt6-webengine
-version=6.4.2
-revision=2
+version=6.5.0
+revision=1
 build_style=cmake
 configure_args="
  -DQT_FEATURE_webengine_system_ffmpeg=ON
@@ -32,7 +32,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only, GPL-2.0-only, LGPL-3.0-only, BSD-3-Clause"
 homepage="https://www.qt.io"
 distfiles="https://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtwebengine-everywhere-src-${version}.tar.xz"
-checksum=ffa945518d1cc8d9ee73523e8d9c2090844f5a2d9c7eac05c4ad079472a119c9
+checksum=2a10da34a71b307e9ff11ec086455dd20b83d5b0ee6bda499c4ba9221e306f07
 
 if [ "$XBPS_LIBC" = "musl" ]; then
 	hostmakedepends+=" musl-legacy-compat"
@@ -164,7 +164,7 @@ qt6-webengine-devel_package() {
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }
 

From 01854e4483e2db42d1c75bb651688ba4d4a165b9 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:36 +0200
Subject: [PATCH 03/27] qt6-webchannel: update to 6.5.0.

---
 srcpkgs/qt6-webchannel/patches/no-cmake-test.patch | 7 -------
 srcpkgs/qt6-webchannel/template                    | 8 ++++----
 2 files changed, 4 insertions(+), 11 deletions(-)
 delete mode 100644 srcpkgs/qt6-webchannel/patches/no-cmake-test.patch

diff --git a/srcpkgs/qt6-webchannel/patches/no-cmake-test.patch b/srcpkgs/qt6-webchannel/patches/no-cmake-test.patch
deleted file mode 100644
index c02028772a2d..000000000000
--- a/srcpkgs/qt6-webchannel/patches/no-cmake-test.patch
+++ /dev/null
@@ -1,7 +0,0 @@
---- a/tests/auto/CMakeLists.txt
-+++ b/tests/auto/CMakeLists.txt
-@@ -1,4 +1,3 @@
--add_subdirectory(cmake)
- add_subdirectory(webchannel)
- if(TARGET Qt::Quick)
-     add_subdirectory(qml)
diff --git a/srcpkgs/qt6-webchannel/template b/srcpkgs/qt6-webchannel/template
index 8f4b58cab240..9c3def385a7b 100644
--- a/srcpkgs/qt6-webchannel/template
+++ b/srcpkgs/qt6-webchannel/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-webchannel'
 pkgname=qt6-webchannel
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtwebchannel-everywhere-src-${version}.tar.xz"
-checksum=06657b2b2509f26c733b7c40da0dbb8571a215b97f99685a6fc3bc51dcbebd87
+checksum=d9553d646df3681b8e09c7609bf7eda0cde69b562f180fa50451a987ed00f1bf
 
 pre_check() {
 	export QML2_IMPORT_PATH="$wrksrc/build/lib/qt6/qml"
@@ -27,13 +27,13 @@ qt6-webchannel-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove usr/lib/qt6/qml/QtWebChannel/plugins.qmltypes
 		vmove usr/lib/qt6/qml/QtWebChannel/qmldir
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From b291435768032529f4ae44e62c1a84c2fc07eaca Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:35 +0200
Subject: [PATCH 04/27] qt6-wayland: update to 6.5.0.

---
 srcpkgs/qt6-wayland/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-wayland/template b/srcpkgs/qt6-wayland/template
index 3b45f98bc7ce..da0c31b4acd5 100644
--- a/srcpkgs/qt6-wayland/template
+++ b/srcpkgs/qt6-wayland/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-wayland'
 pkgname=qt6-wayland
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="qt6-base perl pkg-config wayland-devel qt6-declarative-host-tools"
@@ -14,7 +14,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only with Qt-GPL-exception-1.0, LGPL-3.0-only, GPL-2.0-or-later"
 homepage="https://www.qt.io"
 distfiles="https://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtwayland-everywhere-src-${version}.tar.xz"
-checksum=24cf1a0af751ab1637b4815d5c5f3704483d5fa7bedbd3519e6fc020d8be135f
+checksum=ccc57fa277fc5f1c1c2c4733eae80a60996b67a067233c47809e542aa31759a3
 
 subpackages="qt6-wayland-tools qt6-wayland-devel"
 
@@ -43,11 +43,11 @@ qt6-wayland-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From a341f771a53f588fbbd352ac68e11b312348d0f9 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:34 +0200
Subject: [PATCH 05/27] qt6-virtualkeyboard: update to 6.5.0.

---
 srcpkgs/qt6-virtualkeyboard/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-virtualkeyboard/template b/srcpkgs/qt6-virtualkeyboard/template
index 3de6238c411f..cf7b6f2ec830 100644
--- a/srcpkgs/qt6-virtualkeyboard/template
+++ b/srcpkgs/qt6-virtualkeyboard/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-virtualkeyboard'
 pkgname=qt6-virtualkeyboard
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl pkg-config qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtvirtualkeyboard-everywhere-src-${version}.tar.xz"
-checksum=9c3c830f6e17896efaca5fdc7c191088eedd70b07490b38835856579346a4f28
+checksum=7b45de78240817e9f4b57af821e4781655463a4f5f396bbc5df0580a7d2a0fa7
 
 if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args="-DQT_BUILD_TESTS=ON"
@@ -34,11 +34,11 @@ qt6-virtualkeyboard-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 26f2bf2ca02de5706e81ebd84b35bf308f07e340 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:32 +0200
Subject: [PATCH 06/27] qt6-translations: update to 6.5.0.

---
 srcpkgs/qt6-translations/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/qt6-translations/template b/srcpkgs/qt6-translations/template
index 5669ab56dc20..866f504f3b9d 100644
--- a/srcpkgs/qt6-translations/template
+++ b/srcpkgs/qt6-translations/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-translations'
 pkgname=qt6-translations
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="qt6-base qt6-tools perl"
@@ -10,4 +10,4 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qttranslations-everywhere-src-${version}.tar.xz"
-checksum=bbe0291502c2604b72fef730e1935bd22f8b921d8c473250f298a723b2a9c496
+checksum=fc85d0fd8393f518653ccada1014177a56df6e73f30f3b64eea0c2e4a0067a3d

From 4c2f03487c87f9754b75e4027291eb8b1c0d7df9 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:31 +0200
Subject: [PATCH 07/27] qt6-tools: update to 6.5.0.

---
 srcpkgs/qt6-tools/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/qt6-tools/template b/srcpkgs/qt6-tools/template
index d5ad1618e3a7..c0ec27cf612c 100644
--- a/srcpkgs/qt6-tools/template
+++ b/srcpkgs/qt6-tools/template
@@ -1,7 +1,7 @@
 # Template file for 'qt6-tools'
 pkgname=qt6-tools
-version=6.4.2
-revision=2
+version=6.5.0
+revision=1
 build_style=cmake
 configure_args="-DEXTERNAL_GUMBO=ON -DLITEHTML_UTF8=ON -DUSE_ICU=ON
  -DQT_BUILD_SHARED_LIBS=ON -DQT_FEATURE_assistant=ON
@@ -16,7 +16,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only with Qt-GPL-exception-1.0, LGPL-3.0-only, GPL-2.0-or-later"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qttools-everywhere-src-${version}.tar.xz"
-checksum=a31387916184e4a5ef522d3ea841e8e931cc0f88be0824a7a354a572d5826c68
+checksum=49c33d96b0a44988be954269b8ce3d1a495b439726e03a6be7c0d50a686369c4
 
 if [ "$CROSS_BUILD" ]; then
 	configure_args+=" -DQT_FORCE_BUILD_TOOLS=TRUE"

From 1e2fc6b9309712c506deedc938b300b83d9f6f32 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:29 +0200
Subject: [PATCH 08/27] qt6-svg: update to 6.5.0.

---
 srcpkgs/qt6-svg/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-svg/template b/srcpkgs/qt6-svg/template
index 06c1fcc306c9..aba275a34c86 100644
--- a/srcpkgs/qt6-svg/template
+++ b/srcpkgs/qt6-svg/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-svg'
 pkgname=qt6-svg
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="qt6-base perl"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only with Qt-GPL-exception-1.0, GPL-2.0-or-later, LGPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtsvg-everywhere-src-${version}.tar.xz"
-checksum=b746af3cb1793621d8ed7eae38d9ad5a15541dc2742031069f2ae3fe87590314
+checksum=64ca7e61f44d51e28bcbb4e0509299b53a9a7e38879e00a7fe91643196067a4f
 
 if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args="-DQT_BUILD_TESTS=ON"
@@ -31,11 +31,11 @@ qt6-svg-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 7db2414955b7df80ab9723a0135e6849899e2ddc Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:28 +0200
Subject: [PATCH 09/27] qt6-shadertools: update to 6.5.0.

---
 srcpkgs/qt6-shadertools/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-shadertools/template b/srcpkgs/qt6-shadertools/template
index fbb2fba7181f..b11b281680ad 100644
--- a/srcpkgs/qt6-shadertools/template
+++ b/srcpkgs/qt6-shadertools/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-shadertools'
 pkgname=qt6-shadertools
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base"
@@ -11,7 +11,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtshadertools-everywhere-src-${version}.tar.xz"
-checksum=fa65bff84d4e9c2cb4cbf6fb098207e0e23d863dbe675eb277034a29c226a217
+checksum=86618d037f3071f1f7ac5eb7ab76ae4e6f51cfddded0a402bb9aa7f3f79f5775
 
 if [ "$CROSS_BUILD" ]; then
 	configure_args="-DQT_FORCE_BUILD_TOOLS=true"
@@ -31,12 +31,12 @@ qt6-shadertools-devel_package() {
 	pkg_install() {
 		local _f
 		vmove usr/include
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 		for _f in ${DESTDIR}/usr/lib/cmake/*; do
 			case "$_f" in
 			*ToolsTools) ;;

From 11f2c5dc309ad2293810f6d8c8dac145f0dd2490 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:27 +0200
Subject: [PATCH 10/27] qt6-serialport: update to 6.5.0.

---
 srcpkgs/qt6-serialport/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-serialport/template b/srcpkgs/qt6-serialport/template
index c100f9686fcf..77166598d01f 100644
--- a/srcpkgs/qt6-serialport/template
+++ b/srcpkgs/qt6-serialport/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-serialport'
 pkgname=qt6-serialport
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base pkg-config"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtserialport-everywhere-src-${version}.tar.xz"
-checksum=336d95919037800184b3c3de8ccb6f62954b20f3756c05adce8d5010504340fa
+checksum=9209a9f5978a4adf3a150582270432fe3b635d05513ad1a57bff5ca4954a4dff
 
 qt6-serialport-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision} qt6-base-devel>=${version}_1"
@@ -18,11 +18,11 @@ qt6-serialport-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From e9e812ef678b95ecf9184519be5d1735fc355380 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:26 +0200
Subject: [PATCH 11/27] qt6-sensors: update to 6.5.0.

---
 srcpkgs/qt6-sensors/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/qt6-sensors/template b/srcpkgs/qt6-sensors/template
index 1dd0d0f3df13..5e6a1e2a7776 100644
--- a/srcpkgs/qt6-sensors/template
+++ b/srcpkgs/qt6-sensors/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-sensors'
 pkgname=qt6-sensors
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-declarative-host-tools pkg-config"
@@ -10,7 +10,7 @@ maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtsensors-everywhere-src-${version}.tar.xz"
-checksum=455619ff28a39f4caba49c9e1952fbcfafc8ffc893b437d653d5465a077ee656
+checksum=5ee434e2f4917c2d2e9b1de6cb1347c644a8c92338284efeb96202a557e72ea6
 
 post_install() {
 	rm -rf ${DESTDIR}/usr/tests
@@ -23,7 +23,7 @@ qt6-sensors-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove usr/lib/qt6/qml/QtSensors/plugins.qmltypes

From c99f45ed8eb606ba1d065cffd8b1e055d863f1e3 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:24 +0200
Subject: [PATCH 12/27] qt6-scxml: update to 6.5.0.

---
 srcpkgs/qt6-scxml/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-scxml/template b/srcpkgs/qt6-scxml/template
index 0e53ba7cf506..8f81d750b1b1 100644
--- a/srcpkgs/qt6-scxml/template
+++ b/srcpkgs/qt6-scxml/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-scxml'
 pkgname=qt6-scxml
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtscxml-everywhere-src-${version}.tar.xz"
-checksum=13b0d43459394bed2481967a1feff02b63228a82c1136a62941c0eb83ef54e7f
+checksum=f121843cb8cf4a76d621be371e80265ac28254f3c4c123b051e907c1c915766e
 
 subpackages="qt6-scxml-tools qt6-scxml-devel"
 if [ "$CROSS_BUILD" ]; then
@@ -41,11 +41,11 @@ qt6-scxml-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 2516bcd6e7d282380ba76054d4ac179b5a450aa7 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:23 +0200
Subject: [PATCH 13/27] qt6-remoteobjects: update to 6.5.0.

---
 srcpkgs/qt6-remoteobjects/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/qt6-remoteobjects/template b/srcpkgs/qt6-remoteobjects/template
index 062736349442..b37d82bed03d 100644
--- a/srcpkgs/qt6-remoteobjects/template
+++ b/srcpkgs/qt6-remoteobjects/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-remoteobjects'
 pkgname=qt6-remoteobjects
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-declarative-host-tools pkg-config"
@@ -13,7 +13,7 @@ maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtremoteobjects-everywhere-src-${version}.tar.xz"
-checksum=583c53640020d5d068eef7ae180d750120bb49e30249c2febdd173c5a7428812
+checksum=ff40b6e7afa84e44190d3b6357462569525b1e1fb0e8bfd8de16a8680825c2ae
 
 if [ "$CROSS_BUILD" ]; then
 	hostmakedepends+=" qt6-remoteobjects"
@@ -35,7 +35,7 @@ qt6-remoteobjects-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove usr/lib/qt6/qml/QtRemoteObjects/plugins.qmltypes

From 95b662216aae3e671f5d760b27de65b679e1034c Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:22 +0200
Subject: [PATCH 14/27] qt6-quicktimeline: update to 6.5.0.

---
 srcpkgs/qt6-quicktimeline/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/qt6-quicktimeline/template b/srcpkgs/qt6-quicktimeline/template
index f2c8e16e621e..3d24a392ff40 100644
--- a/srcpkgs/qt6-quicktimeline/template
+++ b/srcpkgs/qt6-quicktimeline/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-quicktimeline'
 pkgname=qt6-quicktimeline
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version/rc/-rc}/submodules/qtquicktimeline-everywhere-src-${version/rc/-rc}.tar.xz"
-checksum=3088abb7f478362a354ea1509d1c3c3403e3f5adfb84f3e5cf30a1f2eff09a5e
+checksum=578b3e929662b443cd4e51cb0de71e91f4ff55a512d66e0b1ea2999b5657cfbf
 
 if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args="-DQT_BUILD_TESTS=ON"

From 65224f9f09caef62d86711e16a546432707441a6 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:21 +0200
Subject: [PATCH 15/27] qt6-quick3d: update to 6.5.0.

---
 srcpkgs/qt6-quick3d/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-quick3d/template b/srcpkgs/qt6-quick3d/template
index e5ef91c9053c..e01cea81bebe 100644
--- a/srcpkgs/qt6-quick3d/template
+++ b/srcpkgs/qt6-quick3d/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-quick3d'
 pkgname=qt6-quick3d
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-declarative-host-tools qt6-shadertools"
@@ -11,7 +11,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtquick3d-everywhere-src-${version}.tar.xz"
-checksum=953d3b6ca6dc00563ceea33d51f25e22b1788ab5aa861941100f6a1b652926a7
+checksum=9b590429ca98b5cc8cec4df2efa3775e9f11ed8260d123e95f3c0fc37f3772a5
 
 subpackages="qt6-quick3d-tools qt6-quick3d-devel"
 if [ "$CROSS_BUILD" ]; then
@@ -50,11 +50,11 @@ qt6-quick3d-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 768d70703d719371f22dca5f316e22cbd24c7611 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:11 +0200
Subject: [PATCH 16/27] qt6-qt5compat: update to 6.5.0.

---
 srcpkgs/qt6-qt5compat/template | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/qt6-qt5compat/template b/srcpkgs/qt6-qt5compat/template
index ed167695b5cd..3b3d2b5dfacf 100644
--- a/srcpkgs/qt6-qt5compat/template
+++ b/srcpkgs/qt6-qt5compat/template
@@ -1,7 +1,7 @@
 # Template file for 'qt6-qt5compat'
 pkgname=qt6-qt5compat
-version=6.4.2
-revision=2
+version=6.5.0
+revision=1
 build_style=cmake
 configure_args="-DQT_FEATURE_textcodec=ON -DQT_FEATURE_codecs=ON
  -DQT_FEATURE_iconv=ON -DQT_FEATURE_big_codecs=ON"
@@ -12,7 +12,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only with Qt-GPL-exception-1.0, LGPL-3.0-only, GPL-2.0-or-later"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qt5compat-everywhere-src-${version}.tar.xz"
-checksum=f51f505c8e985b51b7d733e27d782c6fce181beef53364acb0368cc892c4b792
+checksum=a9e2f53a193fc2e131b01a2f6e7a1fbfe31309c2413fdc213e5a81c558c21261
 
 if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args="-DQT_BUILD_TESTS=ON"
@@ -28,11 +28,11 @@ qt6-qt5compat-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 3b80d0d13bf447d0e65c64481220941b439ae281 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:07 +0200
Subject: [PATCH 17/27] qt6-networkauth: update to 6.5.0.

---
 srcpkgs/qt6-networkauth/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-networkauth/template b/srcpkgs/qt6-networkauth/template
index 35d7161a3288..03bda38ed1fc 100644
--- a/srcpkgs/qt6-networkauth/template
+++ b/srcpkgs/qt6-networkauth/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-networkauth'
 pkgname=qt6-networkauth
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtnetworkauth-everywhere-src-${version}.tar.xz"
-checksum=deab17bd957d0a493bd7757bc71270918147596fb9661a886b3f1d305047c2ee
+checksum=dbcc522ab2136ebe6c9be5c7f156a3bcefa92cd19a462e33a00e94068a24413e
 
 if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args="-DQT_BUILD_TESTS=ON"
@@ -22,11 +22,11 @@ qt6-networkauth-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From ab1382db7f046248dca534c5ebb768f6f1105be5 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:06 +0200
Subject: [PATCH 18/27] qt6-multimedia: update to 6.5.0.

---
 srcpkgs/qt6-multimedia/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/qt6-multimedia/template b/srcpkgs/qt6-multimedia/template
index d89e7d54eb5a..c622b7c9e8fc 100644
--- a/srcpkgs/qt6-multimedia/template
+++ b/srcpkgs/qt6-multimedia/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-multimedia'
 pkgname=qt6-multimedia
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 configure_args="-DQT_FEATURE_gstreamer=ON"
@@ -12,7 +12,7 @@ maintainer="John <me@johnnynator.dev>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtmultimedia-everywhere-src-${version}.tar.xz"
-checksum=7f2b70deeada911c8e660e2801286657f297a5d1d543d1f6bfa856f28972c776
+checksum=9480d0c73abdd01aec4899e340938cec046a3f404b9f9ed945288be574dca146
 
 if [ "$XBPS_MACHINE" = "i686" ]; then
 	CXXFLAGS="-DPFFFT_SIMD_DISABLE=1"
@@ -39,7 +39,7 @@ qt6-multimedia-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove usr/lib/qt6/qml/QtMultimedia/plugins.qmltypes

From 9cf433dba108818836494f7926be87cea5827c48 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:04 +0200
Subject: [PATCH 19/27] qt6-lottie: update to 6.5.0.

---
 srcpkgs/qt6-lottie/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-lottie/template b/srcpkgs/qt6-lottie/template
index 0e246987d078..8a37fae7f2dc 100644
--- a/srcpkgs/qt6-lottie/template
+++ b/srcpkgs/qt6-lottie/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-lottie'
 pkgname=qt6-lottie
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtlottie-everywhere-src-${version}.tar.xz"
-checksum=accc8869c72095ce5b373a30c362d21235145a79f9e270480712f861d1de1c56
+checksum=8425ecdeb9286a6c51985bdaf3936026610d04dc31eec06fee79df6442b7e246
 
 if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args="-DQT_BUILD_TESTS=ON"
@@ -30,10 +30,10 @@ qt6-lottie-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 6267603a49d2479a87d097e6ec1f3ba08dce9d96 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:04 +0200
Subject: [PATCH 20/27] qt6-location: update to 6.5.0.

---
 srcpkgs/qt6-location/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-location/template b/srcpkgs/qt6-location/template
index 429e9e02db12..89ff6498c679 100644
--- a/srcpkgs/qt6-location/template
+++ b/srcpkgs/qt6-location/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-location'
 pkgname=qt6-location
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtpositioning-everywhere-src-${version}.tar.xz"
-checksum=7f01baf5ba877af5b211c9d32e6075019f00d9d7a2ba81bb0f10ca759e9aef82
+checksum=0da7121ebfd9d2ba985ab1f2c8a3af70027c35732177ec0fc72ff7e82835c886
 
 pre_check() {
 	export QML2_IMPORT_PATH="$wrksrc/build/lib/qt6/qml"
@@ -26,11 +26,11 @@ qt6-location-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 226fe161d540ee9dcce7b0a62672898e52e06088 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:02 +0200
Subject: [PATCH 21/27] qt6-imageformats: update to 6.5.0.

---
 srcpkgs/qt6-imageformats/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/qt6-imageformats/template b/srcpkgs/qt6-imageformats/template
index 3ed63f6e98cd..253ff125e09e 100644
--- a/srcpkgs/qt6-imageformats/template
+++ b/srcpkgs/qt6-imageformats/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-imageformats'
 pkgname=qt6-imageformats
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base"
@@ -10,4 +10,4 @@ maintainer="John <me@johnnynator.dev>"
 license="LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtimageformats-everywhere-src-${version}.tar.xz"
-checksum=fc5f999ae0779a67d5507956d4dd315386eb81cf6ccba632de039bb9eee11707
+checksum=f9f810cd3ac7e60132c0da33f34fcfce42e3e764d6cad3020c2f3b1b42046f78

From eeb44024162264e36338c57efe2d17a2b3e520d8 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:01 +0200
Subject: [PATCH 22/27] qt6-declarative: update to 6.5.0.

---
 .../patches/qml-broken-test.patch             | 64 -------------------
 srcpkgs/qt6-declarative/template              |  8 +--
 2 files changed, 4 insertions(+), 68 deletions(-)
 delete mode 100644 srcpkgs/qt6-declarative/patches/qml-broken-test.patch

diff --git a/srcpkgs/qt6-declarative/patches/qml-broken-test.patch b/srcpkgs/qt6-declarative/patches/qml-broken-test.patch
deleted file mode 100644
index b16412fcd5e5..000000000000
--- a/srcpkgs/qt6-declarative/patches/qml-broken-test.patch
+++ /dev/null
@@ -1,64 +0,0 @@
---- qt6-declarative-6.4.2.orig/tests/auto/quickcontrols2/controls/data/tst_rangeslider.qml
-+++ qt6-declarative-6.4.2/tests/auto/quickcontrols2/controls/data/tst_rangeslider.qml
-@@ -602,61 +602,6 @@ TestCase {
-     }
- 
-     function test_overlappingHandles() {
--        var control = createTemporaryObject(sliderComponent, testCase)
--        verify(control)
--
--        // By default, we force the second handle to be after the first in
--        // terms of stacking order *and* z value.
--        compare(control.second.handle.z, 1)
--        compare(control.first.handle.z, 0)
--        control.first.value = 0
--        control.second.value = 0
--
--        // When both handles overlap, only the handle with the higher Z value
--        // should be hovered.
--        mouseMove(control, control.second.handle.x, control.second.handle.y)
--        compare(control.second.hovered, true)
--        compare(control.first.hovered, false)
--
--        // Both are at the same position, so it doesn't matter whose coordinates we use.
--        mousePress(control, control.first.handle.x, control.first.handle.y, Qt.LeftButton)
--        verify(control.second.pressed)
--        compare(control.second.handle.z, 1)
--        compare(control.first.handle.z, 0)
--
--        // Move the second handle out of the way.
--        mouseMove(control, control.width, control.first.handle.y)
--        mouseRelease(control, control.width, control.first.handle.y, Qt.LeftButton)
--        verify(!control.second.pressed)
--        compare(control.second.value, 1.0)
--        compare(control.second.handle.z, 1)
--        compare(control.first.handle.z, 0)
--
--        // The first handle should not be hovered.
--        compare(control.first.hovered, false)
--
--        // Move the first handle on top of the second.
--        mousePress(control, control.first.handle.x, control.first.handle.y, Qt.LeftButton)
--        verify(control.first.pressed)
--        compare(control.first.handle.z, 1)
--        compare(control.second.handle.z, 0)
--
--        mouseMove(control, control.width, control.first.handle.y)
--        mouseRelease(control, control.width, control.first.handle.y, Qt.LeftButton)
--        verify(!control.first.pressed)
--        compare(control.first.handle.z, 1)
--        compare(control.second.handle.z, 0)
--
--        // The most recently pressed handle (the first) should have the higher z value.
--        mousePress(control, control.first.handle.x, control.first.handle.y, Qt.LeftButton)
--        verify(control.first.pressed)
--        compare(control.first.handle.z, 1)
--        compare(control.second.handle.z, 0)
--
--        mouseRelease(control, control.first.handle.x, control.first.handle.y, Qt.LeftButton)
--        verify(!control.first.pressed)
--        compare(control.first.handle.z, 1)
--        compare(control.second.handle.z, 0)
-     }
- 
-     function test_keys_data() {
diff --git a/srcpkgs/qt6-declarative/template b/srcpkgs/qt6-declarative/template
index a3d921f9ea19..22e58f1578e3 100644
--- a/srcpkgs/qt6-declarative/template
+++ b/srcpkgs/qt6-declarative/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-declarative'
 pkgname=qt6-declarative
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 configure_args="-DQT_BUILD_TESTS=ON"
@@ -11,7 +11,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only with Qt-GPL-exception-1.0, LGPL-3.0-only, GPL-2.0-or-later"
 homepage="https://www.qt.io"
 distfiles="https://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtdeclarative-everywhere-src-${version}.tar.xz"
-checksum=a4bdd983de4e9cbca0f85b767dbdd8598711554e370a06da8f509ded4430f5bd
+checksum=f7d631cd8ebc1491dad0f30f1b5326ae812bee4ad706e61157816a82bf588c97
 replaces="qt6-quickcontrols2>=0"
 
 if [ "$CROSS_BUILD" ]; then
@@ -96,13 +96,13 @@ qt6-declarative-devel_package() {
 	replaces="qt6-quickcontrols2-devel>=0"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.a"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 		for _f in ${DESTDIR}/usr/lib/cmake/*; do
 			case "$_f" in
 			*Tools) ;;

From 91c8cc32e3dc758e69db53e02b853656f3292f62 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:35:55 +0200
Subject: [PATCH 23/27] qt6-connectivity: update to 6.5.0.

---
 srcpkgs/qt6-connectivity/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-connectivity/template b/srcpkgs/qt6-connectivity/template
index 66fce5c0397b..5705416ba440 100644
--- a/srcpkgs/qt6-connectivity/template
+++ b/srcpkgs/qt6-connectivity/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-connectivity'
 pkgname=qt6-connectivity
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="GPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtconnectivity-everywhere-src-${version}.tar.xz"
-checksum=8c9b44b239e42b4c4d6fca5f427904e688890b2a1bfb6bcbe5e6e2afcdc5d7af
+checksum=e7636653bab986361a77b23451d966c85591428c0422741890ef0fb197698f06
 
 qt6-connectivity-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision}
@@ -19,11 +19,11 @@ qt6-connectivity-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 4370afc8b43adadde3a3d6bd7cb309faa131aee3 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:35:54 +0200
Subject: [PATCH 24/27] qt6-charts: update to 6.5.0.

---
 srcpkgs/qt6-charts/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-charts/template b/srcpkgs/qt6-charts/template
index 57ce88143367..2c00ac9a44a1 100644
--- a/srcpkgs/qt6-charts/template
+++ b/srcpkgs/qt6-charts/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-charts'
 pkgname=qt6-charts
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtcharts-everywhere-src-${version}.tar.xz"
-checksum=a1a7c0e08c8870cf97d1c3a2eb3f37681aaed00a63b5b2f70bdf2da878d0a9aa
+checksum=fccd1d50a7f56de011f7668e0e90f022316bd4065fa7f91b078579403e2e26a8
 
 pre_check() {
 	export QML2_IMPORT_PATH="$wrksrc/build/lib/qt6/qml"
@@ -26,11 +26,11 @@ qt6-charts-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 6041eae4fb6a0d813de9fe42037b09a6b279137c Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:35:53 +0200
Subject: [PATCH 25/27] qt6-base: update to 6.5.0.

---
 srcpkgs/qt6-base/patches/feenableexcept.patch | 13 -------------
 srcpkgs/qt6-base/template                     | 16 +++++++++-------
 2 files changed, 9 insertions(+), 20 deletions(-)
 delete mode 100644 srcpkgs/qt6-base/patches/feenableexcept.patch

diff --git a/srcpkgs/qt6-base/patches/feenableexcept.patch b/srcpkgs/qt6-base/patches/feenableexcept.patch
deleted file mode 100644
index 9b268bc95d3e..000000000000
--- a/srcpkgs/qt6-base/patches/feenableexcept.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- qt6-base-6.4.2.orig/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
-+++ qt6-base-6.4.2/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
-@@ -1502,8 +1502,10 @@ void tst_QLocale::fpExceptions()
-     fenv_t envp;
-     fegetenv(&envp);
-     feclearexcept(FE_ALL_EXCEPT);
-+#ifdef __GLIBC__
-     feenableexcept(FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INVALID);
- #endif
-+#endif
- 
-     QString::number(1000.1245);
-     QString::number(1.1);
diff --git a/srcpkgs/qt6-base/template b/srcpkgs/qt6-base/template
index dfde60bdb438..26c3274641e5 100644
--- a/srcpkgs/qt6-base/template
+++ b/srcpkgs/qt6-base/template
@@ -1,7 +1,7 @@
 # Template file for 'qt6-base'
 pkgname=qt6-base
-version=6.4.2
-revision=3
+version=6.5.0
+revision=1
 build_style=cmake
 configure_args="-DINSTALL_DATADIR=share/qt6
  -DINSTALL_ARCHDATADIR=lib/qt6
@@ -26,13 +26,13 @@ makedepends="zlib-devel libzstd-devel dbus-devel
  libmariadbclient-devel postgresql-libs-devel libatomic-devel
  unixodbc-devel cups-devel libproxy-devel brotli-devel
  sqlite-devel Vulkan-Headers mit-krb5-devel vulkan-loader libb2-devel
- libXevie-devel libXcursor-devel"
+ libXevie-devel xcb-util-cursor-devel"
 short_desc="Cross-platform application and UI framework (QT6)"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only WITH Qt-GPL-exception-1.0, LGPL-3.0-only, GPL-2.0-or-later"
 homepage="https://www.qt.io"
 distfiles="https://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtbase-everywhere-src-${version}.tar.xz"
-checksum=a88bc6cedbb34878a49a622baa79cace78cfbad4f95fdbd3656ddb21c705525d
+checksum=fde1aa7b4fbe64ec1b4fc576a57f4688ad1453d2fab59cbadd948a10a6eaf5ef
 python_version=3
 
 if [ "$CROSS_BUILD" ]; then
@@ -63,7 +63,9 @@ do_check() {
 		tst_qgraphicsview tst_qapplication tst_qfontcombobox
 		tst_qlineedit tst_qmenubar tst_qopenglwidget
 		tst_qx11info tst_qcomplextext
-		tst_qaddpreroutine tst_qtextcursor"
+		tst_qaddpreroutine tst_qtextcursor
+		test_widgets_app_deployment tst_qnetworkinterface
+		tst_qgraphicsproxywidget"
 	# Unknown platform linux-g++ :/
 	failing_tests+=" mockplugins test_import_plugins
 	 test_static_resources test_generating_cpp_exports"
@@ -282,13 +284,13 @@ qt6-base-devel_package() {
 	pkg_install() {
 		local _f
 		vmove usr/include
-		vmove usr/lib/metatypes
 		vmove usr/lib/pkgconfig
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/qt6/mkspecs/modules
 		vmove "usr/lib/*.a"
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 		for _f in ${DESTDIR}/usr/lib/cmake/*; do
 			case "$_f" in
 			*Tools|*HostInfo) ;;

From 245cbc929f3bc1052498d60e6d232e9d575f06ce Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:35:44 +0200
Subject: [PATCH 26/27] qt6-3d: update to 6.5.0.

---
 srcpkgs/qt6-3d/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/qt6-3d/template b/srcpkgs/qt6-3d/template
index 95519668d1cc..4b7fbee0562e 100644
--- a/srcpkgs/qt6-3d/template
+++ b/srcpkgs/qt6-3d/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-3d'
 pkgname=qt6-3d
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-declarative-host-tools"
@@ -11,7 +11,7 @@ maintainer="John <me@johnnynator.dev>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qt3d-everywhere-src-${version}.tar.xz"
-checksum=456c24c3d3840273e720b79fe8fed452fa889b54cbae6b45db1d1ded4da37341
+checksum=20b250023244f21dfbec5c007bac805d4494fa463a6dd27538afb1a81b230816
 
 qt6-3d-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision}"

From 406f56ad8f5f7f4feeae721329d9bda77c6f6715 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Thu, 6 Apr 2023 11:28:32 +0200
Subject: [PATCH 27/27] telegram-desktop: rebuild against qt6.5.0

---
 srcpkgs/telegram-desktop/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/telegram-desktop/template b/srcpkgs/telegram-desktop/template
index aae9f3135100..7943b36f0b8a 100644
--- a/srcpkgs/telegram-desktop/template
+++ b/srcpkgs/telegram-desktop/template
@@ -1,7 +1,7 @@
 # Template file for 'telegram-desktop'
 pkgname=telegram-desktop
 version=4.6.5
-revision=1
+revision=2
 build_style=cmake
 build_helper="qemu"
 configure_args="-DTDESKTOP_API_ID=209235

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] Qt6: Update to 6.5.0
  2023-04-05 22:13 [PR PATCH] Qt6: Update to 6.5.0 Johnnynator
  2023-04-05 22:31 ` [PR PATCH] [Updated] " Johnnynator
  2023-04-06 11:23 ` Johnnynator
@ 2023-04-06 13:21 ` Johnnynator
  2023-05-14 18:35 ` Johnnynator
  2023-05-14 18:35 ` [PR PATCH] [Closed]: " Johnnynator
  4 siblings, 0 replies; 6+ messages in thread
From: Johnnynator @ 2023-04-06 13:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2222 bytes --]

There is an updated pull request by Johnnynator against master on the void-packages repository

https://github.com/Johnnynator/void-packages qt6.5.0
https://github.com/void-linux/void-packages/pull/43293

Qt6: Update to 6.5.0
- qt6-websockets: update to 6.5.0.
- qt6-webengine: update to 6.5.0.
- qt6-webchannel: update to 6.5.0.
- qt6-wayland: update to 6.5.0.
- qt6-virtualkeyboard: update to 6.5.0.
- qt6-translations: update to 6.5.0.
- qt6-tools: update to 6.5.0.
- qt6-svg: update to 6.5.0.
- qt6-shadertools: update to 6.5.0.
- qt6-serialport: update to 6.5.0.
- qt6-sensors: update to 6.5.0.
- qt6-scxml: update to 6.5.0.
- qt6-remoteobjects: update to 6.5.0.
- qt6-quicktimeline: update to 6.5.0.
- qt6-quick3d: update to 6.5.0.
- qt6-qt5compat: update to 6.5.0.
- qt6-networkauth: update to 6.5.0.
- qt6-multimedia: update to 6.5.0.
- qt6-lottie: update to 6.5.0.
- qt6-location: update to 6.5.0.
- qt6-imageformats: update to 6.5.0.
- qt6-declarative: update to 6.5.0.
- qt6-connectivity: update to 6.5.0.
- qt6-charts: update to 6.5.0.
- qt6-base: update to 6.5.0.
- qt6-3d: update to 6.5.0.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86_64
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  -  - [x] riscv64
  -  - [ ] x86_64-musl (webengine broken right now)
  -  - [ ] aarch64

[ci skip]
[skip ci]

A patch file from https://github.com/void-linux/void-packages/pull/43293.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-qt6.5.0-43293.patch --]
[-- Type: text/x-diff, Size: 181613 bytes --]

From 2ad4c96c7bc97463f2eb6ed23b69272626c25626 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:37:45 +0200
Subject: [PATCH 01/27] qt6-websockets: update to 6.5.0.

---
 srcpkgs/qt6-websockets/patches/no-cmake-test.patch | 7 -------
 srcpkgs/qt6-websockets/template                    | 8 ++++----
 2 files changed, 4 insertions(+), 11 deletions(-)
 delete mode 100644 srcpkgs/qt6-websockets/patches/no-cmake-test.patch

diff --git a/srcpkgs/qt6-websockets/patches/no-cmake-test.patch b/srcpkgs/qt6-websockets/patches/no-cmake-test.patch
deleted file mode 100644
index 8829f9fab1df..000000000000
--- a/srcpkgs/qt6-websockets/patches/no-cmake-test.patch
+++ /dev/null
@@ -1,7 +0,0 @@
---- a/tests/auto/CMakeLists.txt
-+++ b/tests/auto/CMakeLists.txt
-@@ -1,4 +1,3 @@
--add_subdirectory(cmake)
- add_subdirectory(websockets)
- if(TARGET Qt::Quick)
-     add_subdirectory(qml)
diff --git a/srcpkgs/qt6-websockets/template b/srcpkgs/qt6-websockets/template
index 467083fcd44c..3e02fb127fd6 100644
--- a/srcpkgs/qt6-websockets/template
+++ b/srcpkgs/qt6-websockets/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-websockets'
 pkgname=qt6-websockets
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base qt6-declarative-host-tools"
@@ -12,7 +12,7 @@ maintainer="John <me@johnnynator.dev>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtwebsockets-everywhere-src-${version}.tar.xz"
-checksum=71cf857582db20c20103a56f67d51c33c4ab0b72448209c963d3b449a527c626
+checksum=bc087bd656bb34da120ccab6e927036a219f75fd88f1543744c426bfca616308
 
 pre_check() {
 	export QML2_IMPORT_PATH="$wrksrc/build/lib/qt6/qml"
@@ -28,11 +28,11 @@ qt6-websockets-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 3f0e7f573513dc427e5416b17d5ea421bf36a0cf Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:37:44 +0200
Subject: [PATCH 02/27] qt6-webengine: update to 6.5.0.

---
 .../patches/0004-riscv-angle.patch            |   28 +
 .../patches/0004-riscv-angle.patch.args       |    1 +
 .../patches/0005-riscv-crashpad.patch         |  778 +++++++
 .../patches/0005-riscv-crashpad.patch.args    |    1 +
 .../patches/0006-riscv-dav1d.patch            |   44 +
 .../patches/0006-riscv-dav1d.patch.args       |    1 +
 .../patches/0007-riscv-sandbox.patch          | 1956 +++++++++++++++++
 .../patches/0007-riscv-sandbox.patch.args     |    1 +
 .../0100-chromium-revert-9d080c0.patch        |  154 --
 ...omium-102-fenced_frame_utils-include.patch |   20 -
 ...102-chromium-102-regex_pattern-array.patch |   14 -
 ...0103-chromium-i686-vaapi-fpermissive.patch |   23 -
 .../0104-chromium-libxml-unbundle.patch       |   10 -
 .../patches/0107-chromium-cross-build.patch   |    6 +-
 .../patches/0117-chromium-musl-resolver.patch |   25 +-
 .../patches/0124-chromium-enable-i686.patch   |   17 -
 .../0129-chromium-sandbox-shed_getparam.patch |   25 +-
 .../qt6-webengine/patches/0155-systypes.patch |   11 +
 .../patches/0200-chromium-sndio.patch         |  849 -------
 .../patches/0300-chromium-musl-hacks.patch    |   14 -
 .../patches/0301-chromium-musl-sandbox.patch  |   17 -
 .../patches/0302-chromium-no-mallinfo.patch   |   37 +-
 srcpkgs/qt6-webengine/template                |    8 +-
 23 files changed, 2867 insertions(+), 1173 deletions(-)
 create mode 100644 srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch.args
 create mode 100644 srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch.args
 create mode 100644 srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch.args
 create mode 100644 srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch.args
 delete mode 100644 srcpkgs/qt6-webengine/patches/0100-chromium-revert-9d080c0.patch
 delete mode 100644 srcpkgs/qt6-webengine/patches/0101-chromium-102-fenced_frame_utils-include.patch
 delete mode 100644 srcpkgs/qt6-webengine/patches/0102-chromium-102-regex_pattern-array.patch
 delete mode 100644 srcpkgs/qt6-webengine/patches/0103-chromium-i686-vaapi-fpermissive.patch
 delete mode 100644 srcpkgs/qt6-webengine/patches/0104-chromium-libxml-unbundle.patch
 delete mode 100644 srcpkgs/qt6-webengine/patches/0124-chromium-enable-i686.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0155-systypes.patch
 delete mode 100644 srcpkgs/qt6-webengine/patches/0200-chromium-sndio.patch

diff --git a/srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch b/srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch
new file mode 100644
index 000000000000..1aceb6f2d229
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch
@@ -0,0 +1,28 @@
+Index: chromium-111.0.5563.64/third_party/angle/gni/angle.gni
+===================================================================
+--- chromium-111.0.5563.64.orig/third_party/angle/gni/angle.gni
++++ chromium-111.0.5563.64/third_party/angle/gni/angle.gni
+@@ -105,7 +105,8 @@ declare_args() {
+ 
+   if (current_cpu == "arm64" || current_cpu == "x64" ||
+       current_cpu == "mips64el" || current_cpu == "s390x" ||
+-      current_cpu == "ppc64" || current_cpu == "loong64") {
++      current_cpu == "ppc64" || current_cpu == "loong64" ||
++      current_cpu == "riscv64") {
+     angle_64bit_current_cpu = true
+   } else if (current_cpu == "arm" || current_cpu == "x86" ||
+              current_cpu == "mipsel" || current_cpu == "s390" ||
+Index: chromium-111.0.5563.64/third_party/angle/src/common/platform.h
+===================================================================
+--- chromium-111.0.5563.64.orig/third_party/angle/src/common/platform.h
++++ chromium-111.0.5563.64/third_party/angle/src/common/platform.h
+@@ -108,7 +108,7 @@
+ #endif
+ 
+ // Mips and arm devices need to include stddef for size_t.
+-#if defined(__mips__) || defined(__arm__) || defined(__aarch64__)
++#if defined(__mips__) || defined(__arm__) || defined(__aarch64__) || defined(__riscv)
+ #    include <stddef.h>
+ #endif
+ 
+
diff --git a/srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch.args b/srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch.args
new file mode 100644
index 000000000000..d5f38e354e7f
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0004-riscv-angle.patch.args
@@ -0,0 +1 @@
+-Np1 --directory=src/3rdparty/chromium/
diff --git a/srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch b/srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch
new file mode 100644
index 000000000000..012a38c38865
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch
@@ -0,0 +1,778 @@
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_context.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/minidump/minidump_context.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_context.h
+@@ -637,6 +637,41 @@ struct MinidumpContextMIPS64 {
+   uint64_t fir;
+ };
+ 
++//! \brief 64bit RISC-V-specifc flags for MinidumpContextRISCV64::context_flags.
++//! Based on minidump_cpu_riscv64.h from breakpad
++enum MinidumpContextRISCV64Flags : uint32_t {
++  //! \brief Identifies the context structure as RISCV64.
++  kMinidumpContextRISCV64 = 0x00080000,
++
++  //! \brief Indicates the validity of integer registers.
++  //!
++  //! Registers `x1`-`x31` and pc are valid.
++  kMinidumpContextRISCV64Integer = kMinidumpContextRISCV64 | 0x00000002,
++
++  //! \brief Indicates the validity of floating point registers.
++  //!
++  //! Floating point registers `f0`-`f31`, and `fcsr` are valid
++  kMinidumpContextRISCV64FloatingPoint = kMinidumpContextRISCV64 | 0x00000004,
++
++  //! \brief Indicates the validity of all registers.
++  kMinidumpContextRISCV64All = kMinidumpContextRISCV64Integer |
++                              kMinidumpContextRISCV64FloatingPoint,
++};
++
++//! \brief A 64bit RISCV CPU context (register state) carried in a minidump file.
++struct MinidumpContextRISCV64 {
++  uint64_t context_flags;
++
++  //! \brief General purpose registers.
++  uint64_t regs[32];
++
++  //! \brief FPU registers.
++  uint64_t fpregs[32];
++
++  //! \brief FPU status register.
++  uint64_t fcsr;
++};
++
+ }  // namespace crashpad
+ 
+ #endif  // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_H_
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
+@@ -102,6 +102,13 @@ MinidumpContextWriter::CreateFromSnapsho
+       break;
+     }
+ 
++    case kCPUArchitectureRISCV64: {
++      context = std::make_unique<MinidumpContextRISCV64Writer>();
++      reinterpret_cast<MinidumpContextRISCV64Writer*>(context.get())
++          ->InitializeFromSnapshot(context_snapshot->riscv64);
++      break;
++    }
++
+     default: {
+       LOG(ERROR) << "unknown context architecture "
+                  << context_snapshot->architecture;
+@@ -555,5 +562,42 @@ size_t MinidumpContextMIPS64Writer::Cont
+   DCHECK_GE(state(), kStateFrozen);
+   return sizeof(context_);
+ }
++
++MinidumpContextRISCV64Writer::MinidumpContextRISCV64Writer()
++    : MinidumpContextWriter(), context_() {
++  context_.context_flags = kMinidumpContextRISCV64;
++}
++
++MinidumpContextRISCV64Writer::~MinidumpContextRISCV64Writer() = default;
++
++void MinidumpContextRISCV64Writer::InitializeFromSnapshot(
++    const CPUContextRISCV64* context_snapshot) {
++  DCHECK_EQ(state(), kStateMutable);
++  DCHECK_EQ(context_.context_flags, kMinidumpContextRISCV64);
++
++  context_.context_flags = kMinidumpContextRISCV64All;
++
++  static_assert(sizeof(context_.regs) == sizeof(context_snapshot->regs),
++                "GPRs size mismatch");
++  memcpy(context_.regs, context_snapshot->regs, sizeof(context_.regs));
++
++  static_assert(sizeof(context_.fpregs) == sizeof(context_snapshot->fpregs),
++                "FPRs size mismatch");
++  memcpy(context_.fpregs,
++         context_snapshot->fpregs,
++         sizeof(context_.fpregs));
++  context_.fcsr = context_snapshot->fcsr;
++}
++
++bool MinidumpContextRISCV64Writer::WriteObject(
++    FileWriterInterface* file_writer) {
++  DCHECK_EQ(state(), kStateWritable);
++  return file_writer->Write(&context_, sizeof(context_));
++}
++
++size_t MinidumpContextRISCV64Writer::ContextSize() const {
++  DCHECK_GE(state(), kStateFrozen);
++  return sizeof(context_);
++}
+ 
+ }  // namespace crashpad
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
+@@ -369,6 +369,49 @@ class MinidumpContextMIPS64Writer final
+   MinidumpContextMIPS64 context_;
+ };
+ 
++//! \brief The writer for a MinidumpContextRISCV64 structure in a minidump file.
++class MinidumpContextRISCV64Writer final : public MinidumpContextWriter {
++ public:
++  MinidumpContextRISCV64Writer();
++
++  MinidumpContextRISCV64Writer(const MinidumpContextRISCV64Writer&) = delete;
++  MinidumpContextRISCV64Writer& operator=(const MinidumpContextRISCV64Writer&) =
++      delete;
++
++  ~MinidumpContextRISCV64Writer() override;
++
++  //! \brief Initializes the MinidumpContextRISCV based on \a context_snapshot.
++  //!
++  //! \param[in] context_snapshot The context snapshot to use as source data.
++  //!
++  //! \note Valid in #kStateMutable. No mutation of context() may be done before
++  //!     calling this method, and it is not normally necessary to alter
++  //!     context() after calling this method.
++  void InitializeFromSnapshot(const CPUContextRISCV64* context_snapshot);
++
++  //! \brief Returns a pointer to the context structure that this object will
++  //!     write.
++  //!
++  //! \attention This returns a non-`const` pointer to this object’s private
++  //!     data so that a caller can populate the context structure directly.
++  //!     This is done because providing setter interfaces to each field in the
++  //!     context structure would be unwieldy and cumbersome. Care must be taken
++  //!     to populate the context structure correctly. The context structure
++  //!     must only be modified while this object is in the #kStateMutable
++  //!     state.
++  MinidumpContextRISCV64* context() { return &context_; }
++
++ protected:
++  // MinidumpWritable:
++  bool WriteObject(FileWriterInterface* file_writer) override;
++
++  // MinidumpContextWriter:
++  size_t ContextSize() const override;
++
++ private:
++  MinidumpContextRISCV64 context_;
++};
++
+ }  // namespace crashpad
+ 
+ #endif  // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_WRITER_H_
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
+@@ -175,6 +175,10 @@ std::string MinidumpMiscInfoDebugBuildSt
+   static constexpr char kCPU[] = "mips";
+ #elif defined(ARCH_CPU_MIPS64EL)
+   static constexpr char kCPU[] = "mips64";
++#elif defined(ARCH_CPU_RISCV32)
++  static constexpr char kCPU[] = "riscv32";
++#elif defined(ARCH_CPU_RISCV64)
++  static constexpr char kCPU[] = "riscv64";
+ #else
+ #error define kCPU for this CPU
+ #endif
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/capture_memory.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/capture_memory.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/capture_memory.cc
+@@ -117,6 +117,16 @@ void CaptureMemory::PointedToByContext(c
+   for (size_t i = 0; i < std::size(context.mipsel->regs); ++i) {
+     MaybeCaptureMemoryAround(delegate, context.mipsel->regs[i]);
+   }
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++  if (context.architecture == kCPUArchitectureRISCV64) {
++    for (size_t i = 0; i < std::size(context.riscv64->regs); ++i) {
++      MaybeCaptureMemoryAround(delegate, context.riscv64->regs[i]);
++    }
++  } else {
++    for (size_t i = 0; i < std::size(context.riscv32->regs); ++i) {
++      MaybeCaptureMemoryAround(delegate, context.riscv32->regs[i]);
++    }
++  }
+ #else
+ #error Port.
+ #endif
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
+@@ -43,7 +43,13 @@ enum CPUArchitecture {
+   kCPUArchitectureMIPSEL,
+ 
+   //! \brief 64-bit MIPSEL.
+-  kCPUArchitectureMIPS64EL
++  kCPUArchitectureMIPS64EL,
++
++  //! \brief 32-bit RISCV.
++  kCPUArchitectureRISCV32,
++
++  //! \brief 64-bit RISCV.
++  kCPUArchitectureRISCV64
+ };
+ 
+ }  // namespace crashpad
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/cpu_context.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/cpu_context.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/cpu_context.cc
+@@ -226,10 +226,12 @@ bool CPUContext::Is64Bit() const {
+     case kCPUArchitectureX86_64:
+     case kCPUArchitectureARM64:
+     case kCPUArchitectureMIPS64EL:
++    case kCPUArchitectureRISCV64:
+       return true;
+     case kCPUArchitectureX86:
+     case kCPUArchitectureARM:
+     case kCPUArchitectureMIPSEL:
++    case kCPUArchitectureRISCV32:
+       return false;
+     default:
+       NOTREACHED();
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/cpu_context.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/cpu_context.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/cpu_context.h
+@@ -362,6 +362,20 @@ struct CPUContextMIPS64 {
+   uint64_t fir;
+ };
+ 
++//! \brief A context structure carrying RISCV32 CPU state.
++struct CPUContextRISCV32 {
++  uint32_t regs[32];
++  uint64_t fpregs[32];
++  uint32_t fcsr;
++};
++
++//! \brief A context structure carrying RISCV64 CPU state.
++struct CPUContextRISCV64 {
++  uint64_t regs[32];
++  uint64_t fpregs[32];
++  uint32_t fcsr;
++};
++
+ //! \brief A context structure capable of carrying the context of any supported
+ //!     CPU architecture.
+ struct CPUContext {
+@@ -402,6 +416,8 @@ struct CPUContext {
+     CPUContextARM64* arm64;
+     CPUContextMIPS* mipsel;
+     CPUContextMIPS64* mips64;
++    CPUContextRISCV32* riscv32;
++    CPUContextRISCV64* riscv64;
+   };
+ };
+ 
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
+@@ -266,6 +266,30 @@ void InitializeCPUContextARM64_OnlyFPSIM
+   context->fpcr = float_context.fpcr;
+ }
+ 
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++
++template <typename Traits>
++void InitializeCPUContextRISCV(
++    const typename Traits::SignalThreadContext& thread_context,
++    const typename Traits::SignalFloatContext& float_context,
++    typename Traits::CPUContext* context) {
++  static_assert(sizeof(context->regs) == sizeof(thread_context),
++                "registers size mismatch");
++  static_assert(sizeof(context->fpregs) == sizeof(float_context.f),
++                "fp registers size mismatch");
++  memcpy(&context->regs, &thread_context, sizeof(context->regs));
++  memcpy(&context->fpregs, &float_context.f, sizeof(context->fpregs));
++  context->fcsr = float_context.fcsr;
++}
++template void InitializeCPUContextRISCV<ContextTraits32>(
++    const ContextTraits32::SignalThreadContext& thread_context,
++    const ContextTraits32::SignalFloatContext& float_context,
++    ContextTraits32::CPUContext* context);
++template void InitializeCPUContextRISCV<ContextTraits64>(
++    const ContextTraits64::SignalThreadContext& thread_context,
++    const ContextTraits64::SignalFloatContext& float_context,
++    ContextTraits64::CPUContext* context);
++
+ #endif  // ARCH_CPU_X86_FAMILY
+ 
+ }  // namespace internal
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
+@@ -174,6 +174,22 @@ void InitializeCPUContextMIPS(
+ 
+ #endif  // ARCH_CPU_MIPS_FAMILY || DOXYGEN
+ 
++#if defined(ARCH_CPU_RISCV_FAMILY) || DOXYGEN
++
++//! \brief Initializes a CPUContextRISCV structure from native context
++//!     structures on Linux.
++//!
++//! \param[in] thread_context The native thread context.
++//! \param[in] float_context The native float context.
++//! \param[out] context The CPUContextRISCV structure to initialize.
++template <typename Traits>
++void InitializeCPUContextRISCV(
++    const typename Traits::SignalThreadContext& thread_context,
++    const typename Traits::SignalFloatContext& float_context,
++    typename Traits::CPUContext* context);
++
++#endif  // ARCH_CPU_RISCV_FAMILY || DOXYGEN
++
+ }  // namespace internal
+ }  // namespace crashpad
+ 
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
+@@ -325,6 +325,61 @@ bool ExceptionSnapshotLinux::ReadContext
+       reader, context_address, context_.mips64);
+ }
+ 
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++
++template <typename Traits>
++static bool ReadContext(ProcessReaderLinux* reader,
++                        LinuxVMAddress context_address,
++                        typename Traits::CPUContext* dest_context) {
++  const ProcessMemory* memory = reader->Memory();
++
++  LinuxVMAddress gregs_address = context_address +
++                                 offsetof(UContext<Traits>, mcontext) +
++                                 offsetof(typename Traits::MContext, gregs);
++
++  typename Traits::SignalThreadContext thread_context;
++  if (!memory->Read(gregs_address, sizeof(thread_context), &thread_context)) {
++    LOG(ERROR) << "Couldn't read gregs";
++    return false;
++  }
++
++  LinuxVMAddress fpregs_address = context_address +
++                                  offsetof(UContext<Traits>, mcontext) +
++                                  offsetof(typename Traits::MContext, fpregs);
++
++  typename Traits::SignalFloatContext fp_context;
++  if (!memory->Read(fpregs_address, sizeof(fp_context), &fp_context)) {
++    LOG(ERROR) << "Couldn't read fpregs";
++    return false;
++  }
++
++  InitializeCPUContextRISCV<Traits>(thread_context, fp_context, dest_context);
++
++  return true;
++}
++
++template <>
++bool ExceptionSnapshotLinux::ReadContext<ContextTraits32>(
++    ProcessReaderLinux* reader,
++    LinuxVMAddress context_address) {
++  context_.architecture = kCPUArchitectureRISCV32;
++  context_.riscv32 = &context_union_.riscv32;
++
++  return internal::ReadContext<ContextTraits32>(
++      reader, context_address, context_.riscv32);
++}
++
++template <>
++bool ExceptionSnapshotLinux::ReadContext<ContextTraits64>(
++    ProcessReaderLinux* reader,
++    LinuxVMAddress context_address) {
++  context_.architecture = kCPUArchitectureRISCV64;
++  context_.riscv64 = &context_union_.riscv64;
++
++  return internal::ReadContext<ContextTraits64>(
++      reader, context_address, context_.riscv64);
++}
++
+ #endif  // ARCH_CPU_X86_FAMILY
+ 
+ bool ExceptionSnapshotLinux::Initialize(
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
+@@ -89,6 +89,9 @@ class ExceptionSnapshotLinux final : pub
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+     CPUContextMIPS mipsel;
+     CPUContextMIPS64 mips64;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++    CPUContextRISCV32 riscv32;
++    CPUContextRISCV64 riscv64;
+ #endif
+   } context_union_;
+   CPUContext context_;
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
+@@ -127,6 +127,9 @@ void ProcessReaderLinux::Thread::Initial
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+   stack_pointer = reader->Is64Bit() ? thread_info.thread_context.t64.regs[29]
+                                     : thread_info.thread_context.t32.regs[29];
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++  stack_pointer = reader->Is64Bit() ? thread_info.thread_context.t64.sp
++                                    : thread_info.thread_context.t32.sp;
+ #else
+ #error Port.
+ #endif
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
+@@ -422,6 +422,67 @@ static_assert(offsetof(UContext<ContextT
+               "context offset mismatch");
+ #endif
+ 
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++
++struct MContext32 {
++  uint32_t gregs[32];
++  uint64_t fpregs[32];
++  unsigned int fcsr;
++};
++
++struct MContext64 {
++  uint64_t gregs[32];
++  uint64_t fpregs[32];
++  unsigned int fcsr;
++};
++
++struct ContextTraits32 : public Traits32 {
++  using MContext = MContext32;
++  using SignalThreadContext = ThreadContext::t32_t;
++  using SignalFloatContext = FloatContext::f32_t;
++  using CPUContext = CPUContextRISCV32;
++};
++
++struct ContextTraits64 : public Traits64 {
++  using MContext = MContext64;
++  using SignalThreadContext = ThreadContext::t64_t;
++  using SignalFloatContext = FloatContext::f64_t;
++  using CPUContext = CPUContextRISCV64;
++};
++
++template <typename Traits>
++struct UContext {
++  typename Traits::ULong flags;
++  typename Traits::Address link;
++  SignalStack<Traits> stack;
++  Sigset<Traits> sigmask;
++  char padding[128 - sizeof(sigmask)];
++  typename Traits::Char_64Only padding2[8];
++  typename Traits::MContext mcontext;
++};
++
++#if defined(ARCH_CPU_RISCV32)
++static_assert(offsetof(UContext<ContextTraits32>, mcontext) ==
++                  offsetof(ucontext_t, uc_mcontext),
++              "context offset mismatch");
++static_assert(offsetof(UContext<ContextTraits32>, mcontext.gregs) ==
++                  offsetof(ucontext_t, uc_mcontext.__gregs),
++              "context offset mismatch");
++static_assert(offsetof(UContext<ContextTraits32>, mcontext.fpregs) ==
++                  offsetof(ucontext_t, uc_mcontext.__fpregs),
++              "context offset mismatch");
++#elif defined(ARCH_CPU_RISCV64)
++static_assert(offsetof(UContext<ContextTraits64>, mcontext) ==
++                  offsetof(ucontext_t, uc_mcontext),
++              "context offset mismatch");
++static_assert(offsetof(UContext<ContextTraits64>, mcontext.gregs) ==
++                  offsetof(ucontext_t, uc_mcontext.__gregs),
++              "context offset mismatch");
++static_assert(offsetof(UContext<ContextTraits64>, mcontext.fpregs) ==
++                  offsetof(ucontext_t, uc_mcontext.__fpregs),
++              "context offset mismatch");
++#endif
++
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
+@@ -205,6 +205,9 @@ CPUArchitecture SystemSnapshotLinux::Get
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+   return process_reader_->Is64Bit() ? kCPUArchitectureMIPS64EL
+                                     : kCPUArchitectureMIPSEL;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++  return process_reader_->Is64Bit() ? kCPUArchitectureRISCV64
++                                    : kCPUArchitectureRISCV32;
+ #else
+ #error port to your architecture
+ #endif
+@@ -220,6 +223,9 @@ uint32_t SystemSnapshotLinux::CPURevisio
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+   // Not implementable on MIPS
+   return 0;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++  // Not implementable on RISCV
++  return 0;
+ #else
+ #error port to your architecture
+ #endif
+@@ -240,6 +246,9 @@ std::string SystemSnapshotLinux::CPUVend
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+   // Not implementable on MIPS
+   return std::string();
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++  // Not implementable on RISCV
++  return std::string();
+ #else
+ #error port to your architecture
+ #endif
+@@ -373,6 +382,9 @@ bool SystemSnapshotLinux::NXEnabled() co
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+   // Not implementable on MIPS
+   return false;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++  // Not implementable on RISCV
++  return false;
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
+@@ -190,6 +190,22 @@ bool ThreadSnapshotLinux::Initialize(
+         thread.thread_info.float_context.f32,
+         context_.mipsel);
+   }
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++  if (process_reader->Is64Bit()) {
++    context_.architecture = kCPUArchitectureRISCV64;
++    context_.riscv64 = &context_union_.riscv64;
++    InitializeCPUContextRISCV<ContextTraits64>(
++	thread.thread_info.thread_context.t64,
++	thread.thread_info.float_context.f64,
++	context_.riscv64);
++  } else {
++    context_.architecture = kCPUArchitectureRISCV32;
++    context_.riscv32 = &context_union_.riscv32;
++    InitializeCPUContextRISCV<ContextTraits32>(
++	thread.thread_info.thread_context.t32,
++	thread.thread_info.float_context.f32,
++	context_.riscv32);
++  }
+ #else
+ #error Port.
+ #endif
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
+@@ -74,6 +74,9 @@ class ThreadSnapshotLinux final : public
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+     CPUContextMIPS mipsel;
+     CPUContextMIPS64 mips64;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++    CPUContextRISCV32 riscv32;
++    CPUContextRISCV64 riscv64;
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/util/linux/ptracer.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/util/linux/ptracer.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/util/linux/ptracer.cc
+@@ -398,6 +398,51 @@ bool GetThreadArea64(pid_t tid,
+   return true;
+ }
+ 
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++
++template <typename Destination>
++bool GetRegisterSet(pid_t tid, int set, Destination* dest, bool can_log) {
++  iovec iov;
++  iov.iov_base = dest;
++  iov.iov_len = sizeof(*dest);
++  if (ptrace(PTRACE_GETREGSET, tid, reinterpret_cast<void*>(set), &iov) != 0) {
++    PLOG_IF(ERROR, can_log) << "ptrace";
++    return false;
++  }
++  if (iov.iov_len != sizeof(*dest)) {
++    LOG_IF(ERROR, can_log) << "Unexpected registers size";
++    return false;
++  }
++  return true;
++}
++
++bool GetFloatingPointRegisters32(pid_t tid,
++                                 FloatContext* context,
++                                 bool can_log) {
++  return false;
++}
++
++bool GetFloatingPointRegisters64(pid_t tid,
++                                 FloatContext* context,
++                                 bool can_log) {
++  return GetRegisterSet(tid, NT_PRFPREG, &context->f64.f, can_log);
++}
++
++bool GetThreadArea32(pid_t tid,
++                     const ThreadContext& context,
++                     LinuxVMAddress* address,
++                     bool can_log) {
++  return false;
++}
++
++bool GetThreadArea64(pid_t tid,
++                     const ThreadContext& context,
++                     LinuxVMAddress* address,
++                     bool can_log) {
++  *address = context.t64.tp;
++  return true;
++}
++
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/util/linux/thread_info.h
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/util/linux/thread_info.h
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/util/linux/thread_info.h
+@@ -79,6 +79,40 @@ union ThreadContext {
+     uint32_t cp0_status;
+     uint32_t cp0_cause;
+     uint32_t padding1_;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++    // Reflects user_regs_struct in asm/ptrace.h.
++    uint32_t pc;
++    uint32_t ra;
++    uint32_t sp;
++    uint32_t gp;
++    uint32_t tp;
++    uint32_t t0;
++    uint32_t t1;
++    uint32_t t2;
++    uint32_t s0;
++    uint32_t s1;
++    uint32_t a0;
++    uint32_t a1;
++    uint32_t a2;
++    uint32_t a3;
++    uint32_t a4;
++    uint32_t a5;
++    uint32_t a6;
++    uint32_t a7;
++    uint32_t s2;
++    uint32_t s3;
++    uint32_t s4;
++    uint32_t s5;
++    uint32_t s6;
++    uint32_t s7;
++    uint32_t s8;
++    uint32_t s9;
++    uint32_t s10;
++    uint32_t s11;
++    uint32_t t3;
++    uint32_t t4;
++    uint32_t t5;
++    uint32_t t6;
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+@@ -132,6 +166,40 @@ union ThreadContext {
+     uint64_t cp0_badvaddr;
+     uint64_t cp0_status;
+     uint64_t cp0_cause;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++    // Reflects user_regs_struct in asm/ptrace.h.
++    uint64_t pc;
++    uint64_t ra;
++    uint64_t sp;
++    uint64_t gp;
++    uint64_t tp;
++    uint64_t t0;
++    uint64_t t1;
++    uint64_t t2;
++    uint64_t s0;
++    uint64_t s1;
++    uint64_t a0;
++    uint64_t a1;
++    uint64_t a2;
++    uint64_t a3;
++    uint64_t a4;
++    uint64_t a5;
++    uint64_t a6;
++    uint64_t a7;
++    uint64_t s2;
++    uint64_t s3;
++    uint64_t s4;
++    uint64_t s5;
++    uint64_t s6;
++    uint64_t s7;
++    uint64_t s8;
++    uint64_t s9;
++    uint64_t s10;
++    uint64_t s11;
++    uint64_t t3;
++    uint64_t t4;
++    uint64_t t5;
++    uint64_t t6;
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+@@ -143,11 +211,12 @@ union ThreadContext {
+   using NativeThreadContext = user_regs;
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+ // No appropriate NativeThreadsContext type available for MIPS
++#elif defined(ARCH_CPU_RISCV_FAMILY)
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY || ARCH_CPU_ARM64
+ 
+-#if !defined(ARCH_CPU_MIPS_FAMILY)
++#if !defined(ARCH_CPU_MIPS_FAMILY) && !defined(ARCH_CPU_RISCV_FAMILY)
+ #if defined(ARCH_CPU_32_BITS)
+   static_assert(sizeof(t32_t) == sizeof(NativeThreadContext), "Size mismatch");
+ #else  // ARCH_CPU_64_BITS
+@@ -218,6 +287,9 @@ union FloatContext {
+     } fpregs[32];
+     uint32_t fpcsr;
+     uint32_t fpu_id;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++    uint64_t f[32];
++    uint32_t fcsr;
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+@@ -252,6 +324,9 @@ union FloatContext {
+     double fpregs[32];
+     uint32_t fpcsr;
+     uint32_t fpu_id;
++#elif defined(ARCH_CPU_RISCV_FAMILY)
++    uint64_t f[32];
++    uint32_t fcsr;
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86_FAMILY
+@@ -281,6 +356,7 @@ union FloatContext {
+   static_assert(sizeof(f64) == sizeof(user_fpsimd_struct), "Size mismatch");
+ #elif defined(ARCH_CPU_MIPS_FAMILY)
+ // No appropriate floating point context native type for available MIPS.
++#elif defined(ARCH_CPU_RISCV_FAMILY)
+ #else
+ #error Port.
+ #endif  // ARCH_CPU_X86
+Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
+===================================================================
+--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
++++ chromium-106.0.5249.91/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
+@@ -237,6 +237,8 @@ std::string UserAgent() {
+ #elif defined(ARCH_CPU_BIG_ENDIAN)
+     static constexpr char arch[] = "aarch64_be";
+ #endif
++#elif defined(ARCH_CPU_RISCV64)
++    static constexpr char arch[] = "riscv64";
+ #else
+ #error Port
+ #endif
+
diff --git a/srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch.args b/srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch.args
new file mode 100644
index 000000000000..d5f38e354e7f
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0005-riscv-crashpad.patch.args
@@ -0,0 +1 @@
+-Np1 --directory=src/3rdparty/chromium/
diff --git a/srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch b/srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch
new file mode 100644
index 000000000000..12ad07275bd3
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch
@@ -0,0 +1,44 @@
+Index: chromium-102.0.5005.61/third_party/dav1d/config/linux/riscv64/config.h
+===================================================================
+--- /dev/null
++++ chromium-102.0.5005.61/third_party/dav1d/config/linux/riscv64/config.h
+@@ -0,0 +1,38 @@
++/*
++ * Autogenerated by the Meson build system.
++ * Do not edit, your changes will be lost.
++ */
++
++#pragma once
++
++#define ARCH_AARCH64 0
++
++#define ARCH_ARM 0
++
++#define ARCH_PPC64LE 0
++
++#define ARCH_X86 0
++
++#define ARCH_X86_32 0
++
++#define ARCH_X86_64 0
++
++#define CONFIG_16BPC 1
++
++#define CONFIG_8BPC 1
++
++// #define CONFIG_LOG 1 -- Logging is controlled by Chromium
++
++#define ENDIANNESS_BIG 0
++
++#define HAVE_ASM 0
++
++#define HAVE_AS_FUNC 0
++
++#define HAVE_CLOCK_GETTIME 1
++
++#define HAVE_GETAUXVAL 1
++
++#define HAVE_POSIX_MEMALIGN 1
++
++#define HAVE_UNISTD_H 1
+
diff --git a/srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch.args b/srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch.args
new file mode 100644
index 000000000000..d5f38e354e7f
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0006-riscv-dav1d.patch.args
@@ -0,0 +1 @@
+-Np1 --directory=src/3rdparty/chromium/
diff --git a/srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch b/srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch
new file mode 100644
index 000000000000..098bd95a8de6
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch
@@ -0,0 +1,1956 @@
+Index: chromium-107.0.5304.87/sandbox/features.gni
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/features.gni
++++ chromium-107.0.5304.87/sandbox/features.gni
+@@ -9,7 +9,8 @@
+ use_seccomp_bpf = (is_linux || is_chromeos || is_android) &&
+                   (current_cpu == "x86" || current_cpu == "x64" ||
+                    current_cpu == "arm" || current_cpu == "arm64" ||
+-                   current_cpu == "mipsel" || current_cpu == "mips64el")
++                   current_cpu == "mipsel" || current_cpu == "mips64el" ||
++                   current_cpu == "riscv64")
+ 
+ # SSBD (Speculative Store Bypass Disable) is a mitigation of Spectre Variant 4.
+ # As Spectre Variant 4 can be mitigated by site isolation, opt-out SSBD on site
+Index: chromium-107.0.5304.87/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
++++ chromium-107.0.5304.87/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
+@@ -56,6 +56,12 @@
+ #define MAX_PUBLIC_SYSCALL __NR_syscalls
+ #define MAX_SYSCALL MAX_PUBLIC_SYSCALL
+ 
++#elif defined(__riscv)
++
++#define MIN_SYSCALL 0u
++#define MAX_PUBLIC_SYSCALL 1024u
++#define MAX_SYSCALL MAX_PUBLIC_SYSCALL
++
+ #else
+ #error "Unsupported architecture"
+ #endif
+Index: chromium-107.0.5304.87/sandbox/linux/bpf_dsl/seccomp_macros.h
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/bpf_dsl/seccomp_macros.h
++++ chromium-107.0.5304.87/sandbox/linux/bpf_dsl/seccomp_macros.h
+@@ -343,6 +343,46 @@ struct regs_struct {
+ #define SECCOMP_PT_PARM4(_regs) (_regs).regs[3]
+ #define SECCOMP_PT_PARM5(_regs) (_regs).regs[4]
+ #define SECCOMP_PT_PARM6(_regs) (_regs).regs[5]
++
++#elif defined(__riscv)
++struct regs_struct {
++  unsigned long regs[32];
++};
++
++#define SECCOMP_ARCH AUDIT_ARCH_RISCV64
++
++#define SECCOMP_REG(_ctx, _reg) ((_ctx)->uc_mcontext.__gregs[_reg])
++
++#define SECCOMP_RESULT(_ctx) SECCOMP_REG(_ctx, REG_A0)
++#define SECCOMP_SYSCALL(_ctx) SECCOMP_REG(_ctx, REG_A0+7)
++#define SECCOMP_IP(_ctx) (_ctx)->uc_mcontext.__gregs[REG_PC]
++#define SECCOMP_PARM1(_ctx) SECCOMP_REG(_ctx, REG_A0)
++#define SECCOMP_PARM2(_ctx) SECCOMP_REG(_ctx, REG_A0+1)
++#define SECCOMP_PARM3(_ctx) SECCOMP_REG(_ctx, REG_A0+2)
++#define SECCOMP_PARM4(_ctx) SECCOMP_REG(_ctx, REG_A0+3)
++#define SECCOMP_PARM5(_ctx) SECCOMP_REG(_ctx, REG_A0+4)
++#define SECCOMP_PARM6(_ctx) SECCOMP_REG(_ctx, REG_A0+5)
++
++#define SECCOMP_NR_IDX (offsetof(struct arch_seccomp_data, nr))
++#define SECCOMP_ARCH_IDX (offsetof(struct arch_seccomp_data, arch))
++#define SECCOMP_IP_MSB_IDX \
++  (offsetof(struct arch_seccomp_data, instruction_pointer) + 4)
++#define SECCOMP_IP_LSB_IDX \
++  (offsetof(struct arch_seccomp_data, instruction_pointer) + 0)
++#define SECCOMP_ARG_MSB_IDX(nr) \
++  (offsetof(struct arch_seccomp_data, args) + 8 * (nr) + 4)
++#define SECCOMP_ARG_LSB_IDX(nr) \
++  (offsetof(struct arch_seccomp_data, args) + 8 * (nr) + 0)
++
++#define SECCOMP_PT_RESULT(_regs) (_regs).regs[REG_A0]
++#define SECCOMP_PT_SYSCALL(_regs) (_regs).regs[REG_A0+7]
++#define SECCOMP_PT_IP(_regs) (_regs).regs[REG_PC]
++#define SECCOMP_PT_PARM1(_regs) (_regs).regs[REG_A0]
++#define SECCOMP_PT_PARM2(_regs) (_regs).regs[REG_A0+1]
++#define SECCOMP_PT_PARM3(_regs) (_regs).regs[REG_A0+2]
++#define SECCOMP_PT_PARM4(_regs) (_regs).regs[REG_A0+3]
++#define SECCOMP_PT_PARM5(_regs) (_regs).regs[REG_A0+4]
++#define SECCOMP_PT_PARM6(_regs) (_regs).regs[REG_A0+5]
+ #else
+ #error Unsupported target platform
+ 
+Index: chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
++++ chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
+@@ -61,6 +61,9 @@ bool IsBaselinePolicyAllowed(int sysno)
+ #if defined(__mips__)
+          SyscallSets::IsMipsPrivate(sysno) ||
+ #endif
++#if defined(__riscv)
++         SyscallSets::IsRiscvPrivate(sysno) ||
++#endif
+          SyscallSets::IsAllowedOperationOnFd(sysno);
+   // clang-format on
+ }
+@@ -198,7 +201,7 @@ ResultExpr EvaluateSyscallImpl(int fs_de
+     return RestrictFcntlCommands();
+ #endif
+ 
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+   // fork() is never used as a system call (clone() is used instead), but we
+   // have seen it in fallback code on Android.
+   if (sysno == __NR_fork) {
+@@ -253,7 +256,7 @@ ResultExpr EvaluateSyscallImpl(int fs_de
+   }
+ 
+ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+   if (sysno == __NR_mmap)
+     return RestrictMmapFlags();
+ #endif
+@@ -274,7 +277,7 @@ ResultExpr EvaluateSyscallImpl(int fs_de
+     return RestrictPrctl();
+ 
+ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+   if (sysno == __NR_socketpair) {
+     // Only allow AF_UNIX, PF_UNIX. Crash if anything else is seen.
+     static_assert(AF_UNIX == PF_UNIX,
+Index: chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
++++ chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
+@@ -37,6 +37,7 @@
+ 
+ #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \
+     !defined(__arm__) && !defined(__aarch64__) &&             \
++    !defined(__riscv) &&                                      \
+     !defined(PTRACE_GET_THREAD_AREA)
+ // Also include asm/ptrace-abi.h since ptrace.h in older libc (for instance
+ // the one in Ubuntu 16.04 LTS) is missing PTRACE_GET_THREAD_AREA.
+@@ -443,7 +444,7 @@ ResultExpr RestrictPtrace() {
+ #endif
+   return Switch(request)
+       .CASES((
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+                  PTRACE_GETREGS, PTRACE_GETFPREGS, PTRACE_GET_THREAD_AREA,
+                  PTRACE_GETREGSET,
+ #endif
+Index: chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
++++ chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+@@ -103,7 +103,7 @@ bool SyscallSets::IsUmask(int sysno) {
+ // Both EPERM and ENOENT are valid errno unless otherwise noted in comment.
+ bool SyscallSets::IsFileSystem(int sysno) {
+   switch (sysno) {
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_access:  // EPERM not a valid errno.
+     case __NR_chmod:
+     case __NR_chown:
+@@ -136,7 +136,7 @@ bool SyscallSets::IsFileSystem(int sysno
+     case __NR_faccessat2:
+     case __NR_fchmodat:
+     case __NR_fchownat:  // Should be called chownat ?
+-#if defined(__x86_64__) || defined(__aarch64__)
++#if defined(__x86_64__) || defined(__aarch64__) || defined(__riscv)
+     case __NR_newfstatat:  // fstatat(). EPERM not a valid errno.
+ #elif defined(__i386__) || defined(__arm__) || \
+     (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+@@ -226,7 +226,7 @@ bool SyscallSets::IsAllowedFileSystemAcc
+     case __NR_oldfstat:
+ #endif
+ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_sync_file_range:  // EPERM not a valid errno.
+ #elif defined(__arm__)
+     case __NR_arm_sync_file_range:  // EPERM not a valid errno.
+@@ -245,7 +245,7 @@ bool SyscallSets::IsDeniedFileSystemAcce
+ #if defined(__i386__) || defined(__arm__)
+     case __NR_fchown32:
+ #endif
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_getdents:    // EPERM not a valid errno.
+ #endif
+     case __NR_getdents64:  // EPERM not a valid errno.
+@@ -324,7 +324,7 @@ bool SyscallSets::IsProcessPrivilegeChan
+ bool SyscallSets::IsProcessGroupOrSession(int sysno) {
+   switch (sysno) {
+     case __NR_setpgid:
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_getpgrp:
+ #endif
+     case __NR_setsid:
+@@ -358,7 +358,7 @@ bool SyscallSets::IsAllowedSignalHandlin
+     case __NR_rt_sigqueueinfo:
+     case __NR_rt_sigsuspend:
+     case __NR_rt_tgsigqueueinfo:
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_signalfd:
+ #endif
+     case __NR_signalfd4:
+@@ -382,12 +382,12 @@ bool SyscallSets::IsAllowedOperationOnFd
+   switch (sysno) {
+     case __NR_close:
+     case __NR_dup:
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_dup2:
+ #endif
+     case __NR_dup3:
+ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_shutdown:
+ #endif
+       return true;
+@@ -426,7 +426,7 @@ bool SyscallSets::IsAllowedProcessStartO
+       return true;
+     case __NR_clone:  // Should be parameter-restricted.
+     case __NR_setns:  // Privileged.
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_fork:
+ #endif
+ #if defined(__i386__) || defined(__x86_64__)
+@@ -437,7 +437,7 @@ bool SyscallSets::IsAllowedProcessStartO
+ #endif
+     case __NR_set_tid_address:
+     case __NR_unshare:
+-#if !defined(__mips__) && !defined(__aarch64__)
++#if !defined(__mips__) && !defined(__aarch64__) && !defined(__riscv)
+     case __NR_vfork:
+ #endif
+     default:
+@@ -462,7 +462,7 @@ bool SyscallSets::IsAllowedFutex(int sys
+ 
+ bool SyscallSets::IsAllowedEpoll(int sysno) {
+   switch (sysno) {
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_epoll_create:
+     case __NR_epoll_wait:
+ #endif
+@@ -483,14 +483,14 @@ bool SyscallSets::IsAllowedEpoll(int sys
+ 
+ bool SyscallSets::IsAllowedGetOrModifySocket(int sysno) {
+   switch (sysno) {
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_pipe:
+ #endif
+     case __NR_pipe2:
+       return true;
+     default:
+ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_socketpair:  // We will want to inspect its argument.
+ #endif
+       return false;
+@@ -500,7 +500,7 @@ bool SyscallSets::IsAllowedGetOrModifySo
+ bool SyscallSets::IsDeniedGetOrModifySocket(int sysno) {
+   switch (sysno) {
+ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_accept:
+     case __NR_accept4:
+     case __NR_bind:
+@@ -554,7 +554,7 @@ bool SyscallSets::IsAllowedAddressSpaceA
+     case __NR_mincore:
+     case __NR_mlockall:
+ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_mmap:
+ #endif
+ #if defined(__i386__) || defined(__arm__) || \
+@@ -587,7 +587,7 @@ bool SyscallSets::IsAllowedGeneralIo(int
+     (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+     case __NR__llseek:
+ #endif
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_poll:
+ #endif
+     case __NR_ppoll:
+@@ -608,7 +608,7 @@ bool SyscallSets::IsAllowedGeneralIo(int
+     case __NR_recv:
+ #endif
+ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_recvfrom:  // Could specify source.
+     case __NR_recvmsg:   // Could specify source.
+ #endif
+@@ -623,7 +623,7 @@ bool SyscallSets::IsAllowedGeneralIo(int
+     case __NR_send:
+ #endif
+ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_sendmsg:  // Could specify destination.
+     case __NR_sendto:   // Could specify destination.
+ #endif
+@@ -672,7 +672,7 @@ bool SyscallSets::IsSeccomp(int sysno) {
+ bool SyscallSets::IsAllowedBasicScheduler(int sysno) {
+   switch (sysno) {
+     case __NR_sched_yield:
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_pause:
+ #endif
+     case __NR_nanosleep:
+@@ -756,7 +756,7 @@ bool SyscallSets::IsNuma(int sysno) {
+     case __NR_getcpu:
+     case __NR_mbind:
+ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_migrate_pages:
+ #endif
+     case __NR_move_pages:
+@@ -791,7 +791,7 @@ bool SyscallSets::IsGlobalProcessEnviron
+   switch (sysno) {
+     case __NR_acct:  // Privileged.
+ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_getrlimit:
+ #endif
+ #if defined(__i386__) || defined(__arm__)
+@@ -826,7 +826,7 @@ bool SyscallSets::IsDebug(int sysno) {
+ 
+ bool SyscallSets::IsGlobalSystemStatus(int sysno) {
+   switch (sysno) {
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR__sysctl:
+     case __NR_sysfs:
+ #endif
+@@ -844,7 +844,7 @@ bool SyscallSets::IsGlobalSystemStatus(i
+ 
+ bool SyscallSets::IsEventFd(int sysno) {
+   switch (sysno) {
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_eventfd:
+ #endif
+     case __NR_eventfd2:
+@@ -896,7 +896,8 @@ bool SyscallSets::IsKeyManagement(int sy
+ }
+ 
+ #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \
+-    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
++    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
++    defined(__riscv)
+ bool SyscallSets::IsSystemVSemaphores(int sysno) {
+   switch (sysno) {
+     case __NR_semctl:
+@@ -916,7 +917,8 @@ bool SyscallSets::IsSystemVSemaphores(in
+ 
+ #if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
+     defined(__aarch64__) ||                                         \
+-    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
++    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
++    defined(__riscv)
+ // These give a lot of ambient authority and bypass the setuid sandbox.
+ bool SyscallSets::IsSystemVSharedMemory(int sysno) {
+   switch (sysno) {
+@@ -932,7 +934,8 @@ bool SyscallSets::IsSystemVSharedMemory(
+ #endif
+ 
+ #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \
+-    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
++    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
++    defined(__riscv)
+ bool SyscallSets::IsSystemVMessageQueue(int sysno) {
+   switch (sysno) {
+     case __NR_msgctl:
+@@ -963,7 +966,8 @@ bool SyscallSets::IsSystemVIpc(int sysno
+ 
+ bool SyscallSets::IsAnySystemV(int sysno) {
+ #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \
+-    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
++    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
++    defined(__riscv)
+   return IsSystemVMessageQueue(sysno) || IsSystemVSemaphores(sysno) ||
+          IsSystemVSharedMemory(sysno);
+ #elif defined(__i386__) || \
+@@ -1000,7 +1004,7 @@ bool SyscallSets::IsAdvancedScheduler(in
+ bool SyscallSets::IsInotify(int sysno) {
+   switch (sysno) {
+     case __NR_inotify_add_watch:
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_inotify_init:
+ #endif
+     case __NR_inotify_init1:
+@@ -1138,7 +1142,7 @@ bool SyscallSets::IsMisc(int sysno) {
+ #if defined(__x86_64__)
+     case __NR_tuxcall:
+ #endif
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_vserver:
+ #endif
+       return true;
+@@ -1173,6 +1177,17 @@ bool SyscallSets::IsArmPrivate(int sysno
+ }
+ #endif  // defined(__arm__)
+ 
++#if defined(__riscv)
++bool SyscallSets::IsRiscvPrivate(int sysno) {
++  switch (sysno) {
++    case __NR_riscv_flush_icache:
++      return true;
++    default:
++      return false;
++  }
++}
++#endif  // defined(__riscv)
++
+ #if defined(__mips__)
+ bool SyscallSets::IsMipsPrivate(int sysno) {
+   switch (sysno) {
+Index: chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h
++++ chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h
+@@ -52,7 +52,7 @@ class SANDBOX_EXPORT SyscallSets {
+ #endif
+ 
+ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+   static bool IsNetworkSocketInformation(int sysno);
+ #endif
+ 
+@@ -79,18 +79,21 @@ class SANDBOX_EXPORT SyscallSets {
+   static bool IsAsyncIo(int sysno);
+   static bool IsKeyManagement(int sysno);
+ #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \
+-    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
++    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
++    defined(__riscv)
+   static bool IsSystemVSemaphores(int sysno);
+ #endif
+ #if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
+     defined(__aarch64__) ||                                         \
+-    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
++    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
++    defined(__riscv)
+   // These give a lot of ambient authority and bypass the setuid sandbox.
+   static bool IsSystemVSharedMemory(int sysno);
+ #endif
+ 
+ #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \
+-    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
++    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
++    defined(__riscv)
+   static bool IsSystemVMessageQueue(int sysno);
+ #endif
+ 
+@@ -117,6 +120,9 @@ class SANDBOX_EXPORT SyscallSets {
+   static bool IsMipsPrivate(int sysno);
+   static bool IsMipsMisc(int sysno);
+ #endif  // defined(__mips__)
++#if defined(__riscv)
++  static bool IsRiscvPrivate(int sysno);
++#endif
+   static bool IsGoogle3Threading(int sysno);
+ };
+ 
+Index: chromium-107.0.5304.87/sandbox/linux/seccomp-bpf/syscall.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/seccomp-bpf/syscall.cc
++++ chromium-107.0.5304.87/sandbox/linux/seccomp-bpf/syscall.cc
+@@ -18,7 +18,7 @@ namespace sandbox {
+ namespace {
+ 
+ #if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \
+-    defined(ARCH_CPU_MIPS_FAMILY)
++    defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_RISCV_FAMILY)
+ // Number that's not currently used by any Linux kernel ABIs.
+ const int kInvalidSyscallNumber = 0x351d3;
+ #else
+@@ -308,6 +308,28 @@ asm(// We need to be able to tell the ke
+     "2:ret\n"
+     ".cfi_endproc\n"
+     ".size SyscallAsm, .-SyscallAsm\n"
++#elif defined(__riscv)
++    ".text\n"
++    ".align 2\n"
++    ".type SyscallAsm, %function\n"
++    "SyscallAsm:\n"
++    ".cfi_startproc\n"
++    "bgez a0,1f\n"
++    "la a0,2f\n"
++    "j 2f\n"
++    "1:mv a7, a0\n"
++    "ld a0, (t0)\n"
++    "ld a1, 8(t0)\n"
++    "ld a2, 16(t0)\n"
++    "ld a3, 24(t0)\n"
++    "ld a4, 32(t0)\n"
++    "ld a5, 40(t0)\n"
++    "ld a6, 48(t0)\n"
++    // Enter the kernel
++    "scall\n"
++    "2:ret\n"
++    ".cfi_endproc\n"
++    ".size SyscallAsm, .-SyscallAsm\n"
+ #endif
+     );  // asm
+ 
+@@ -425,6 +447,18 @@ intptr_t Syscall::Call(int nr,
+     ret = inout;
+   }
+ 
++#elif defined(__riscv)
++  intptr_t ret;
++  {
++    register intptr_t inout __asm__("a0") = nr;
++    register const intptr_t* data __asm__("t0") = args;
++    asm volatile("jal SyscallAsm\n"
++                 : "+r"(inout)
++                 : "r"(data)
++                 : "memory", "a1", "a2", "a3", "a4", "a5", "a6");
++    ret = inout;
++  }
++
+ #else
+ #error "Unimplemented architecture"
+ #endif
+Index: chromium-107.0.5304.87/sandbox/linux/services/credentials.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/services/credentials.cc
++++ chromium-107.0.5304.87/sandbox/linux/services/credentials.cc
+@@ -80,7 +80,7 @@ bool ChrootToSafeEmptyDir() {
+   pid_t pid = -1;
+   alignas(16) char stack_buf[PTHREAD_STACK_MIN];
+ #if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \
+-    defined(ARCH_CPU_MIPS_FAMILY)
++    defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_RISCV_FAMILY)
+   // The stack grows downward.
+   void* stack = stack_buf + sizeof(stack_buf);
+ #else
+Index: chromium-107.0.5304.87/sandbox/linux/services/syscall_wrappers.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/services/syscall_wrappers.cc
++++ chromium-107.0.5304.87/sandbox/linux/services/syscall_wrappers.cc
+@@ -61,7 +61,7 @@ long sys_clone(unsigned long flags,
+ #if defined(ARCH_CPU_X86_64)
+   return syscall(__NR_clone, flags, child_stack, ptid, ctid, tls);
+ #elif defined(ARCH_CPU_X86) || defined(ARCH_CPU_ARM_FAMILY) || \
+-    defined(ARCH_CPU_MIPS_FAMILY)
++    defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_RISCV_FAMILY)
+   // CONFIG_CLONE_BACKWARDS defined.
+   return syscall(__NR_clone, flags, child_stack, ptid, tls, ctid);
+ #endif
+Index: chromium-107.0.5304.87/sandbox/linux/syscall_broker/broker_process.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/syscall_broker/broker_process.cc
++++ chromium-107.0.5304.87/sandbox/linux/syscall_broker/broker_process.cc
+@@ -117,44 +117,46 @@ bool BrokerProcess::IsSyscallBrokerable(
+   // and are default disabled in Android. So, we should refuse to broker them
+   // to be consistent with the platform's restrictions.
+   switch (sysno) {
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_access:
+ #endif
+     case __NR_faccessat:
+     case __NR_faccessat2:
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_ACCESS);
+ 
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_mkdir:
+ #endif
+     case __NR_mkdirat:
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_MKDIR);
+ 
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_open:
+ #endif
+     case __NR_openat:
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_OPEN);
+ 
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_readlink:
+ #endif
+     case __NR_readlinkat:
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_READLINK);
+ 
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_rename:
+ #endif
++#ifdef __NR_renameat
+     case __NR_renameat:
++#endif
+     case __NR_renameat2:
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_RENAME);
+ 
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_rmdir:
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_RMDIR);
+ #endif
+ 
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_stat:
+     case __NR_lstat:
+ #endif
+@@ -164,7 +166,7 @@ bool BrokerProcess::IsSyscallBrokerable(
+ #if defined(__NR_fstatat64)
+     case __NR_fstatat64:
+ #endif
+-#if defined(__x86_64__) || defined(__aarch64__)
++#if defined(__x86_64__) || defined(__aarch64__) || defined(__riscv)
+     case __NR_newfstatat:
+ #endif
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_STAT);
+@@ -179,7 +181,7 @@ bool BrokerProcess::IsSyscallBrokerable(
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_STAT);
+ #endif
+ 
+-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID)
++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv)
+     case __NR_unlink:
+       return !fast_check || policy_->allowed_command_set.test(COMMAND_UNLINK);
+ #endif
+Index: chromium-107.0.5304.87/sandbox/linux/system_headers/linux_seccomp.h
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/system_headers/linux_seccomp.h
++++ chromium-107.0.5304.87/sandbox/linux/system_headers/linux_seccomp.h
+@@ -38,6 +38,9 @@
+ #ifndef EM_AARCH64
+ #define EM_AARCH64 183
+ #endif
++#ifndef EM_RISCV
++#define EM_RISCV 243
++#endif
+ 
+ #ifndef __AUDIT_ARCH_64BIT
+ #define __AUDIT_ARCH_64BIT 0x80000000
+@@ -70,6 +73,9 @@
+ #ifndef AUDIT_ARCH_AARCH64
+ #define AUDIT_ARCH_AARCH64 (EM_AARCH64 | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE)
+ #endif
++#ifndef AUDIT_ARCH_RISCV64
++#define AUDIT_ARCH_RISCV64 (EM_RISCV|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
++#endif
+ 
+ // For prctl.h
+ #ifndef PR_SET_SECCOMP
+Index: chromium-107.0.5304.87/sandbox/linux/system_headers/linux_signal.h
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/system_headers/linux_signal.h
++++ chromium-107.0.5304.87/sandbox/linux/system_headers/linux_signal.h
+@@ -13,7 +13,7 @@
+ // (not undefined, but defined different values and in different memory
+ // layouts). So, fill the gap here.
+ #if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+ 
+ #define LINUX_SIGHUP 1
+ #define LINUX_SIGINT 2
+Index: chromium-107.0.5304.87/sandbox/linux/system_headers/linux_stat.h
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/system_headers/linux_stat.h
++++ chromium-107.0.5304.87/sandbox/linux/system_headers/linux_stat.h
+@@ -150,7 +150,7 @@ struct kernel_stat {
+   int st_blocks;
+   int st_pad4[14];
+ };
+-#elif defined(__aarch64__)
++#elif defined(__aarch64__) || defined(__riscv)
+ struct kernel_stat {
+   unsigned long st_dev;
+   unsigned long st_ino;
+Index: chromium-107.0.5304.87/sandbox/linux/system_headers/linux_syscalls.h
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/linux/system_headers/linux_syscalls.h
++++ chromium-107.0.5304.87/sandbox/linux/system_headers/linux_syscalls.h
+@@ -35,5 +35,9 @@
+ #include "sandbox/linux/system_headers/arm64_linux_syscalls.h"
+ #endif
+ 
++#if defined(__riscv) && __riscv_xlen == 64
++#include "sandbox/linux/system_headers/riscv64_linux_syscalls.h"
++#endif
++
+ #endif  // SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SYSCALLS_H_
+ 
+Index: chromium-107.0.5304.87/sandbox/linux/system_headers/riscv64_linux_syscalls.h
+===================================================================
+--- /dev/null
++++ chromium-107.0.5304.87/sandbox/linux/system_headers/riscv64_linux_syscalls.h
+@@ -0,0 +1,1222 @@
++// Copyright 2014 The Chromium Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#ifndef SANDBOX_LINUX_SYSTEM_HEADERS_RISCV64_LINUX_SYSCALLS_H_
++#define SANDBOX_LINUX_SYSTEM_HEADERS_RISCV64_LINUX_SYSCALLS_H_
++
++#include <asm-generic/unistd.h>
++
++#if !defined(__NR_io_setup)
++#define __NR_io_setup 0
++#endif
++
++#if !defined(__NR_io_destroy)
++#define __NR_io_destroy 1
++#endif
++
++#if !defined(__NR_io_submit)
++#define __NR_io_submit 2
++#endif
++
++#if !defined(__NR_io_cancel)
++#define __NR_io_cancel 3
++#endif
++
++#if !defined(__NR_io_getevents)
++#define __NR_io_getevents 4
++#endif
++
++#if !defined(__NR_setxattr)
++#define __NR_setxattr 5
++#endif
++
++#if !defined(__NR_lsetxattr)
++#define __NR_lsetxattr 6
++#endif
++
++#if !defined(__NR_fsetxattr)
++#define __NR_fsetxattr 7
++#endif
++
++#if !defined(__NR_getxattr)
++#define __NR_getxattr 8
++#endif
++
++#if !defined(__NR_lgetxattr)
++#define __NR_lgetxattr 9
++#endif
++
++#if !defined(__NR_fgetxattr)
++#define __NR_fgetxattr 10
++#endif
++
++#if !defined(__NR_listxattr)
++#define __NR_listxattr 11
++#endif
++
++#if !defined(__NR_llistxattr)
++#define __NR_llistxattr 12
++#endif
++
++#if !defined(__NR_flistxattr)
++#define __NR_flistxattr 13
++#endif
++
++#if !defined(__NR_removexattr)
++#define __NR_removexattr 14
++#endif
++
++#if !defined(__NR_lremovexattr)
++#define __NR_lremovexattr 15
++#endif
++
++#if !defined(__NR_fremovexattr)
++#define __NR_fremovexattr 16
++#endif
++
++#if !defined(__NR_getcwd)
++#define __NR_getcwd 17
++#endif
++
++#if !defined(__NR_lookup_dcookie)
++#define __NR_lookup_dcookie 18
++#endif
++
++#if !defined(__NR_eventfd2)
++#define __NR_eventfd2 19
++#endif
++
++#if !defined(__NR_epoll_create1)
++#define __NR_epoll_create1 20
++#endif
++
++#if !defined(__NR_epoll_ctl)
++#define __NR_epoll_ctl 21
++#endif
++
++#if !defined(__NR_epoll_pwait)
++#define __NR_epoll_pwait 22
++#endif
++
++#if !defined(__NR_dup)
++#define __NR_dup 23
++#endif
++
++#if !defined(__NR_dup3)
++#define __NR_dup3 24
++#endif
++
++#if !defined(__NR_fcntl)
++#define __NR_fcntl 25
++#endif
++
++#if !defined(__NR_inotify_init1)
++#define __NR_inotify_init1 26
++#endif
++
++#if !defined(__NR_inotify_add_watch)
++#define __NR_inotify_add_watch 27
++#endif
++
++#if !defined(__NR_inotify_rm_watch)
++#define __NR_inotify_rm_watch 28
++#endif
++
++#if !defined(__NR_ioctl)
++#define __NR_ioctl 29
++#endif
++
++#if !defined(__NR_ioprio_set)
++#define __NR_ioprio_set 30
++#endif
++
++#if !defined(__NR_ioprio_get)
++#define __NR_ioprio_get 31
++#endif
++
++#if !defined(__NR_flock)
++#define __NR_flock 32
++#endif
++
++#if !defined(__NR_mknodat)
++#define __NR_mknodat 33
++#endif
++
++#if !defined(__NR_mkdirat)
++#define __NR_mkdirat 34
++#endif
++
++#if !defined(__NR_unlinkat)
++#define __NR_unlinkat 35
++#endif
++
++#if !defined(__NR_symlinkat)
++#define __NR_symlinkat 36
++#endif
++
++#if !defined(__NR_linkat)
++#define __NR_linkat 37
++#endif
++
++#if !defined(__NR_renameat)
++#define __NR_renameat 38
++#endif
++
++#if !defined(__NR_umount2)
++#define __NR_umount2 39
++#endif
++
++#if !defined(__NR_mount)
++#define __NR_mount 40
++#endif
++
++#if !defined(__NR_pivot_root)
++#define __NR_pivot_root 41
++#endif
++
++#if !defined(__NR_nfsservctl)
++#define __NR_nfsservctl 42
++#endif
++
++#if !defined(__NR_statfs)
++#define __NR_statfs 43
++#endif
++
++#if !defined(__NR_fstatfs)
++#define __NR_fstatfs 44
++#endif
++
++#if !defined(__NR_truncate)
++#define __NR_truncate 45
++#endif
++
++#if !defined(__NR_ftruncate)
++#define __NR_ftruncate 46
++#endif
++
++#if !defined(__NR_fallocate)
++#define __NR_fallocate 47
++#endif
++
++#if !defined(__NR_faccessat)
++#define __NR_faccessat 48
++#endif
++
++#if !defined(__NR_chdir)
++#define __NR_chdir 49
++#endif
++
++#if !defined(__NR_fchdir)
++#define __NR_fchdir 50
++#endif
++
++#if !defined(__NR_chroot)
++#define __NR_chroot 51
++#endif
++
++#if !defined(__NR_fchmod)
++#define __NR_fchmod 52
++#endif
++
++#if !defined(__NR_fchmodat)
++#define __NR_fchmodat 53
++#endif
++
++#if !defined(__NR_fchownat)
++#define __NR_fchownat 54
++#endif
++
++#if !defined(__NR_fchown)
++#define __NR_fchown 55
++#endif
++
++#if !defined(__NR_openat)
++#define __NR_openat 56
++#endif
++
++#if !defined(__NR_close)
++#define __NR_close 57
++#endif
++
++#if !defined(__NR_vhangup)
++#define __NR_vhangup 58
++#endif
++
++#if !defined(__NR_pipe2)
++#define __NR_pipe2 59
++#endif
++
++#if !defined(__NR_quotactl)
++#define __NR_quotactl 60
++#endif
++
++#if !defined(__NR_getdents64)
++#define __NR_getdents64 61
++#endif
++
++#if !defined(__NR_lseek)
++#define __NR_lseek 62
++#endif
++
++#if !defined(__NR_read)
++#define __NR_read 63
++#endif
++
++#if !defined(__NR_write)
++#define __NR_write 64
++#endif
++
++#if !defined(__NR_readv)
++#define __NR_readv 65
++#endif
++
++#if !defined(__NR_writev)
++#define __NR_writev 66
++#endif
++
++#if !defined(__NR_pread64)
++#define __NR_pread64 67
++#endif
++
++#if !defined(__NR_pwrite64)
++#define __NR_pwrite64 68
++#endif
++
++#if !defined(__NR_preadv)
++#define __NR_preadv 69
++#endif
++
++#if !defined(__NR_pwritev)
++#define __NR_pwritev 70
++#endif
++
++#if !defined(__NR_sendfile)
++#define __NR_sendfile 71
++#endif
++
++#if !defined(__NR_pselect6)
++#define __NR_pselect6 72
++#endif
++
++#if !defined(__NR_ppoll)
++#define __NR_ppoll 73
++#endif
++
++#if !defined(__NR_signalfd4)
++#define __NR_signalfd4 74
++#endif
++
++#if !defined(__NR_vmsplice)
++#define __NR_vmsplice 75
++#endif
++
++#if !defined(__NR_splice)
++#define __NR_splice 76
++#endif
++
++#if !defined(__NR_tee)
++#define __NR_tee 77
++#endif
++
++#if !defined(__NR_readlinkat)
++#define __NR_readlinkat 78
++#endif
++
++#if !defined(__NR_newfstatat)
++#define __NR_newfstatat 79
++#endif
++
++#if !defined(__NR_fstat)
++#define __NR_fstat 80
++#endif
++
++#if !defined(__NR_sync)
++#define __NR_sync 81
++#endif
++
++#if !defined(__NR_fsync)
++#define __NR_fsync 82
++#endif
++
++#if !defined(__NR_fdatasync)
++#define __NR_fdatasync 83
++#endif
++
++#if !defined(__NR_sync_file_range)
++#define __NR_sync_file_range 84
++#endif
++
++#if !defined(__NR_timerfd_create)
++#define __NR_timerfd_create 85
++#endif
++
++#if !defined(__NR_timerfd_settime)
++#define __NR_timerfd_settime 86
++#endif
++
++#if !defined(__NR_timerfd_gettime)
++#define __NR_timerfd_gettime 87
++#endif
++
++#if !defined(__NR_utimensat)
++#define __NR_utimensat 88
++#endif
++
++#if !defined(__NR_acct)
++#define __NR_acct 89
++#endif
++
++#if !defined(__NR_capget)
++#define __NR_capget 90
++#endif
++
++#if !defined(__NR_capset)
++#define __NR_capset 91
++#endif
++
++#if !defined(__NR_personality)
++#define __NR_personality 92
++#endif
++
++#if !defined(__NR_exit)
++#define __NR_exit 93
++#endif
++
++#if !defined(__NR_exit_group)
++#define __NR_exit_group 94
++#endif
++
++#if !defined(__NR_waitid)
++#define __NR_waitid 95
++#endif
++
++#if !defined(__NR_set_tid_address)
++#define __NR_set_tid_address 96
++#endif
++
++#if !defined(__NR_unshare)
++#define __NR_unshare 97
++#endif
++
++#if !defined(__NR_futex)
++#define __NR_futex 98
++#endif
++
++#if !defined(__NR_set_robust_list)
++#define __NR_set_robust_list 99
++#endif
++
++#if !defined(__NR_get_robust_list)
++#define __NR_get_robust_list 100
++#endif
++
++#if !defined(__NR_nanosleep)
++#define __NR_nanosleep 101
++#endif
++
++#if !defined(__NR_getitimer)
++#define __NR_getitimer 102
++#endif
++
++#if !defined(__NR_setitimer)
++#define __NR_setitimer 103
++#endif
++
++#if !defined(__NR_kexec_load)
++#define __NR_kexec_load 104
++#endif
++
++#if !defined(__NR_init_module)
++#define __NR_init_module 105
++#endif
++
++#if !defined(__NR_delete_module)
++#define __NR_delete_module 106
++#endif
++
++#if !defined(__NR_timer_create)
++#define __NR_timer_create 107
++#endif
++
++#if !defined(__NR_timer_gettime)
++#define __NR_timer_gettime 108
++#endif
++
++#if !defined(__NR_timer_getoverrun)
++#define __NR_timer_getoverrun 109
++#endif
++
++#if !defined(__NR_timer_settime)
++#define __NR_timer_settime 110
++#endif
++
++#if !defined(__NR_timer_delete)
++#define __NR_timer_delete 111
++#endif
++
++#if !defined(__NR_clock_settime)
++#define __NR_clock_settime 112
++#endif
++
++#if !defined(__NR_clock_gettime)
++#define __NR_clock_gettime 113
++#endif
++
++#if !defined(__NR_clock_getres)
++#define __NR_clock_getres 114
++#endif
++
++#if !defined(__NR_clock_nanosleep)
++#define __NR_clock_nanosleep 115
++#endif
++
++#if !defined(__NR_syslog)
++#define __NR_syslog 116
++#endif
++
++#if !defined(__NR_ptrace)
++#define __NR_ptrace 117
++#endif
++
++#if !defined(__NR_sched_setparam)
++#define __NR_sched_setparam 118
++#endif
++
++#if !defined(__NR_sched_setscheduler)
++#define __NR_sched_setscheduler 119
++#endif
++
++#if !defined(__NR_sched_getscheduler)
++#define __NR_sched_getscheduler 120
++#endif
++
++#if !defined(__NR_sched_getparam)
++#define __NR_sched_getparam 121
++#endif
++
++#if !defined(__NR_sched_setaffinity)
++#define __NR_sched_setaffinity 122
++#endif
++
++#if !defined(__NR_sched_getaffinity)
++#define __NR_sched_getaffinity 123
++#endif
++
++#if !defined(__NR_sched_yield)
++#define __NR_sched_yield 124
++#endif
++
++#if !defined(__NR_sched_get_priority_max)
++#define __NR_sched_get_priority_max 125
++#endif
++
++#if !defined(__NR_sched_get_priority_min)
++#define __NR_sched_get_priority_min 126
++#endif
++
++#if !defined(__NR_sched_rr_get_interval)
++#define __NR_sched_rr_get_interval 127
++#endif
++
++#if !defined(__NR_restart_syscall)
++#define __NR_restart_syscall 128
++#endif
++
++#if !defined(__NR_kill)
++#define __NR_kill 129
++#endif
++
++#if !defined(__NR_tkill)
++#define __NR_tkill 130
++#endif
++
++#if !defined(__NR_tgkill)
++#define __NR_tgkill 131
++#endif
++
++#if !defined(__NR_sigaltstack)
++#define __NR_sigaltstack 132
++#endif
++
++#if !defined(__NR_rt_sigsuspend)
++#define __NR_rt_sigsuspend 133
++#endif
++
++#if !defined(__NR_rt_sigaction)
++#define __NR_rt_sigaction 134
++#endif
++
++#if !defined(__NR_rt_sigprocmask)
++#define __NR_rt_sigprocmask 135
++#endif
++
++#if !defined(__NR_rt_sigpending)
++#define __NR_rt_sigpending 136
++#endif
++
++#if !defined(__NR_rt_sigtimedwait)
++#define __NR_rt_sigtimedwait 137
++#endif
++
++#if !defined(__NR_rt_sigqueueinfo)
++#define __NR_rt_sigqueueinfo 138
++#endif
++
++#if !defined(__NR_rt_sigreturn)
++#define __NR_rt_sigreturn 139
++#endif
++
++#if !defined(__NR_setpriority)
++#define __NR_setpriority 140
++#endif
++
++#if !defined(__NR_getpriority)
++#define __NR_getpriority 141
++#endif
++
++#if !defined(__NR_reboot)
++#define __NR_reboot 142
++#endif
++
++#if !defined(__NR_setregid)
++#define __NR_setregid 143
++#endif
++
++#if !defined(__NR_setgid)
++#define __NR_setgid 144
++#endif
++
++#if !defined(__NR_setreuid)
++#define __NR_setreuid 145
++#endif
++
++#if !defined(__NR_setuid)
++#define __NR_setuid 146
++#endif
++
++#if !defined(__NR_setresuid)
++#define __NR_setresuid 147
++#endif
++
++#if !defined(__NR_getresuid)
++#define __NR_getresuid 148
++#endif
++
++#if !defined(__NR_setresgid)
++#define __NR_setresgid 149
++#endif
++
++#if !defined(__NR_getresgid)
++#define __NR_getresgid 150
++#endif
++
++#if !defined(__NR_setfsuid)
++#define __NR_setfsuid 151
++#endif
++
++#if !defined(__NR_setfsgid)
++#define __NR_setfsgid 152
++#endif
++
++#if !defined(__NR_times)
++#define __NR_times 153
++#endif
++
++#if !defined(__NR_setpgid)
++#define __NR_setpgid 154
++#endif
++
++#if !defined(__NR_getpgid)
++#define __NR_getpgid 155
++#endif
++
++#if !defined(__NR_getsid)
++#define __NR_getsid 156
++#endif
++
++#if !defined(__NR_setsid)
++#define __NR_setsid 157
++#endif
++
++#if !defined(__NR_getgroups)
++#define __NR_getgroups 158
++#endif
++
++#if !defined(__NR_setgroups)
++#define __NR_setgroups 159
++#endif
++
++#if !defined(__NR_uname)
++#define __NR_uname 160
++#endif
++
++#if !defined(__NR_sethostname)
++#define __NR_sethostname 161
++#endif
++
++#if !defined(__NR_setdomainname)
++#define __NR_setdomainname 162
++#endif
++
++#if !defined(__NR_getrlimit)
++#define __NR_getrlimit 163
++#endif
++
++#if !defined(__NR_setrlimit)
++#define __NR_setrlimit 164
++#endif
++
++#if !defined(__NR_getrusage)
++#define __NR_getrusage 165
++#endif
++
++#if !defined(__NR_umask)
++#define __NR_umask 166
++#endif
++
++#if !defined(__NR_prctl)
++#define __NR_prctl 167
++#endif
++
++#if !defined(__NR_getcpu)
++#define __NR_getcpu 168
++#endif
++
++#if !defined(__NR_gettimeofday)
++#define __NR_gettimeofday 169
++#endif
++
++#if !defined(__NR_settimeofday)
++#define __NR_settimeofday 170
++#endif
++
++#if !defined(__NR_adjtimex)
++#define __NR_adjtimex 171
++#endif
++
++#if !defined(__NR_getpid)
++#define __NR_getpid 172
++#endif
++
++#if !defined(__NR_getppid)
++#define __NR_getppid 173
++#endif
++
++#if !defined(__NR_getuid)
++#define __NR_getuid 174
++#endif
++
++#if !defined(__NR_geteuid)
++#define __NR_geteuid 175
++#endif
++
++#if !defined(__NR_getgid)
++#define __NR_getgid 176
++#endif
++
++#if !defined(__NR_getegid)
++#define __NR_getegid 177
++#endif
++
++#if !defined(__NR_gettid)
++#define __NR_gettid 178
++#endif
++
++#if !defined(__NR_sysinfo)
++#define __NR_sysinfo 179
++#endif
++
++#if !defined(__NR_mq_open)
++#define __NR_mq_open 180
++#endif
++
++#if !defined(__NR_mq_unlink)
++#define __NR_mq_unlink 181
++#endif
++
++#if !defined(__NR_mq_timedsend)
++#define __NR_mq_timedsend 182
++#endif
++
++#if !defined(__NR_mq_timedreceive)
++#define __NR_mq_timedreceive 183
++#endif
++
++#if !defined(__NR_mq_notify)
++#define __NR_mq_notify 184
++#endif
++
++#if !defined(__NR_mq_getsetattr)
++#define __NR_mq_getsetattr 185
++#endif
++
++#if !defined(__NR_msgget)
++#define __NR_msgget 186
++#endif
++
++#if !defined(__NR_msgctl)
++#define __NR_msgctl 187
++#endif
++
++#if !defined(__NR_msgrcv)
++#define __NR_msgrcv 188
++#endif
++
++#if !defined(__NR_msgsnd)
++#define __NR_msgsnd 189
++#endif
++
++#if !defined(__NR_semget)
++#define __NR_semget 190
++#endif
++
++#if !defined(__NR_semctl)
++#define __NR_semctl 191
++#endif
++
++#if !defined(__NR_semtimedop)
++#define __NR_semtimedop 192
++#endif
++
++#if !defined(__NR_semop)
++#define __NR_semop 193
++#endif
++
++#if !defined(__NR_shmget)
++#define __NR_shmget 194
++#endif
++
++#if !defined(__NR_shmctl)
++#define __NR_shmctl 195
++#endif
++
++#if !defined(__NR_shmat)
++#define __NR_shmat 196
++#endif
++
++#if !defined(__NR_shmdt)
++#define __NR_shmdt 197
++#endif
++
++#if !defined(__NR_socket)
++#define __NR_socket 198
++#endif
++
++#if !defined(__NR_socketpair)
++#define __NR_socketpair 199
++#endif
++
++#if !defined(__NR_bind)
++#define __NR_bind 200
++#endif
++
++#if !defined(__NR_listen)
++#define __NR_listen 201
++#endif
++
++#if !defined(__NR_accept)
++#define __NR_accept 202
++#endif
++
++#if !defined(__NR_connect)
++#define __NR_connect 203
++#endif
++
++#if !defined(__NR_getsockname)
++#define __NR_getsockname 204
++#endif
++
++#if !defined(__NR_getpeername)
++#define __NR_getpeername 205
++#endif
++
++#if !defined(__NR_sendto)
++#define __NR_sendto 206
++#endif
++
++#if !defined(__NR_recvfrom)
++#define __NR_recvfrom 207
++#endif
++
++#if !defined(__NR_setsockopt)
++#define __NR_setsockopt 208
++#endif
++
++#if !defined(__NR_getsockopt)
++#define __NR_getsockopt 209
++#endif
++
++#if !defined(__NR_shutdown)
++#define __NR_shutdown 210
++#endif
++
++#if !defined(__NR_sendmsg)
++#define __NR_sendmsg 211
++#endif
++
++#if !defined(__NR_recvmsg)
++#define __NR_recvmsg 212
++#endif
++
++#if !defined(__NR_readahead)
++#define __NR_readahead 213
++#endif
++
++#if !defined(__NR_brk)
++#define __NR_brk 214
++#endif
++
++#if !defined(__NR_munmap)
++#define __NR_munmap 215
++#endif
++
++#if !defined(__NR_mremap)
++#define __NR_mremap 216
++#endif
++
++#if !defined(__NR_add_key)
++#define __NR_add_key 217
++#endif
++
++#if !defined(__NR_request_key)
++#define __NR_request_key 218
++#endif
++
++#if !defined(__NR_keyctl)
++#define __NR_keyctl 219
++#endif
++
++#if !defined(__NR_clone)
++#define __NR_clone 220
++#endif
++
++#if !defined(__NR_execve)
++#define __NR_execve 221
++#endif
++
++#if !defined(__NR_mmap)
++#define __NR_mmap 222
++#endif
++
++#if !defined(__NR_fadvise64)
++#define __NR_fadvise64 223
++#endif
++
++#if !defined(__NR_swapon)
++#define __NR_swapon 224
++#endif
++
++#if !defined(__NR_swapoff)
++#define __NR_swapoff 225
++#endif
++
++#if !defined(__NR_mprotect)
++#define __NR_mprotect 226
++#endif
++
++#if !defined(__NR_msync)
++#define __NR_msync 227
++#endif
++
++#if !defined(__NR_mlock)
++#define __NR_mlock 228
++#endif
++
++#if !defined(__NR_munlock)
++#define __NR_munlock 229
++#endif
++
++#if !defined(__NR_mlockall)
++#define __NR_mlockall 230
++#endif
++
++#if !defined(__NR_munlockall)
++#define __NR_munlockall 231
++#endif
++
++#if !defined(__NR_mincore)
++#define __NR_mincore 232
++#endif
++
++#if !defined(__NR_madvise)
++#define __NR_madvise 233
++#endif
++
++#if !defined(__NR_remap_file_pages)
++#define __NR_remap_file_pages 234
++#endif
++
++#if !defined(__NR_mbind)
++#define __NR_mbind 235
++#endif
++
++#if !defined(__NR_get_mempolicy)
++#define __NR_get_mempolicy 236
++#endif
++
++#if !defined(__NR_set_mempolicy)
++#define __NR_set_mempolicy 237
++#endif
++
++#if !defined(__NR_migrate_pages)
++#define __NR_migrate_pages 238
++#endif
++
++#if !defined(__NR_move_pages)
++#define __NR_move_pages 239
++#endif
++
++#if !defined(__NR_rt_tgsigqueueinfo)
++#define __NR_rt_tgsigqueueinfo 240
++#endif
++
++#if !defined(__NR_perf_event_open)
++#define __NR_perf_event_open 241
++#endif
++
++#if !defined(__NR_accept4)
++#define __NR_accept4 242
++#endif
++
++#if !defined(__NR_recvmmsg)
++#define __NR_recvmmsg 243
++#endif
++
++#if !defined(__NR_riscv_flush_icache)
++#define __NR_riscv_flush_icache 259
++#endif
++
++#if !defined(__NR_wait4)
++#define __NR_wait4 260
++#endif
++
++#if !defined(__NR_prlimit64)
++#define __NR_prlimit64 261
++#endif
++
++#if !defined(__NR_fanotify_init)
++#define __NR_fanotify_init 262
++#endif
++
++#if !defined(__NR_fanotify_mark)
++#define __NR_fanotify_mark 263
++#endif
++
++#if !defined(__NR_name_to_handle_at)
++#define __NR_name_to_handle_at 264
++#endif
++
++#if !defined(__NR_open_by_handle_at)
++#define __NR_open_by_handle_at 265
++#endif
++
++#if !defined(__NR_clock_adjtime)
++#define __NR_clock_adjtime 266
++#endif
++
++#if !defined(__NR_syncfs)
++#define __NR_syncfs 267
++#endif
++
++#if !defined(__NR_setns)
++#define __NR_setns 268
++#endif
++
++#if !defined(__NR_sendmmsg)
++#define __NR_sendmmsg 269
++#endif
++
++#if !defined(__NR_process_vm_readv)
++#define __NR_process_vm_readv 270
++#endif
++
++#if !defined(__NR_process_vm_writev)
++#define __NR_process_vm_writev 271
++#endif
++
++#if !defined(__NR_kcmp)
++#define __NR_kcmp 272
++#endif
++
++#if !defined(__NR_finit_module)
++#define __NR_finit_module 273
++#endif
++
++#if !defined(__NR_sched_setattr)
++#define __NR_sched_setattr 274
++#endif
++
++#if !defined(__NR_sched_getattr)
++#define __NR_sched_getattr 275
++#endif
++
++#if !defined(__NR_renameat2)
++#define __NR_renameat2 276
++#endif
++
++#if !defined(__NR_seccomp)
++#define __NR_seccomp 277
++#endif
++
++#if !defined(__NR_getrandom)
++#define __NR_getrandom 278
++#endif
++
++#if !defined(__NR_memfd_create)
++#define __NR_memfd_create 279
++#endif
++
++#if !defined(__NR_bpf)
++#define __NR_bpf 280
++#endif
++
++#if !defined(__NR_execveat)
++#define __NR_execveat 281
++#endif
++
++#if !defined(__NR_userfaultfd)
++#define __NR_userfaultfd 282
++#endif
++
++#if !defined(__NR_membarrier)
++#define __NR_membarrier 283
++#endif
++
++#if !defined(__NR_mlock2)
++#define __NR_mlock2 284
++#endif
++
++#if !defined(__NR_copy_file_range)
++#define __NR_copy_file_range 285
++#endif
++
++#if !defined(__NR_preadv2)
++#define __NR_preadv2 286
++#endif
++
++#if !defined(__NR_pwritev2)
++#define __NR_pwritev2 287
++#endif
++
++#if !defined(__NR_pkey_mprotect)
++#define __NR_pkey_mprotect 288
++#endif
++
++#if !defined(__NR_pkey_alloc)
++#define __NR_pkey_alloc 289
++#endif
++
++#if !defined(__NR_pkey_free)
++#define __NR_pkey_free 290
++#endif
++
++#if !defined(__NR_statx)
++#define __NR_statx 291
++#endif
++
++#if !defined(__NR_io_pgetevents)
++#define __NR_io_pgetevents 292
++#endif
++
++#if !defined(__NR_rseq)
++#define __NR_rseq 293
++#endif
++
++#if !defined(__NR_kexec_file_load)
++#define __NR_kexec_file_load 294
++#endif
++
++#if !defined(__NR_pidfd_send_signal)
++#define __NR_pidfd_send_signal 424
++#endif
++
++#if !defined(__NR_io_uring_setup)
++#define __NR_io_uring_setup 425
++#endif
++
++#if !defined(__NR_io_uring_enter)
++#define __NR_io_uring_enter 426
++#endif
++
++#if !defined(__NR_io_uring_register)
++#define __NR_io_uring_register 427
++#endif
++
++#if !defined(__NR_open_tree)
++#define __NR_open_tree 428
++#endif
++
++#if !defined(__NR_move_mount)
++#define __NR_move_mount 429
++#endif
++
++#if !defined(__NR_fsopen)
++#define __NR_fsopen 430
++#endif
++
++#if !defined(__NR_fsconfig)
++#define __NR_fsconfig 431
++#endif
++
++#if !defined(__NR_fsmount)
++#define __NR_fsmount 432
++#endif
++
++#if !defined(__NR_fspick)
++#define __NR_fspick 433
++#endif
++
++#if !defined(__NR_pidfd_open)
++#define __NR_pidfd_open 434
++#endif
++
++#if !defined(__NR_clone3)
++#define __NR_clone3 435
++#endif
++
++#if !defined(__NR_close_range)
++#define __NR_close_range 436
++#endif
++
++#if !defined(__NR_openat2)
++#define __NR_openat2 437
++#endif
++
++#if !defined(__NR_pidfd_getfd)
++#define __NR_pidfd_getfd 438
++#endif
++
++#if !defined(__NR_faccessat2)
++#define __NR_faccessat2 439
++#endif
++
++#if !defined(__NR_process_madvise)
++#define __NR_process_madvise 440
++#endif
++
++#if !defined(__NR_epoll_pwait2)
++#define __NR_epoll_pwait2 441
++#endif
++
++#if !defined(__NR_mount_setattr)
++#define __NR_mount_setattr 442
++#endif
++
++#if !defined(__NR_quotactl_path)
++#define __NR_quotactl_path 443
++#endif
++
++#if !defined(__NR_landlock_create_ruleset)
++#define __NR_landlock_create_ruleset 444
++#endif
++
++#if !defined(__NR_landlock_add_rule)
++#define __NR_landlock_add_rule 445
++#endif
++
++#if !defined(__NR_landlock_restrict_self)
++#define __NR_landlock_restrict_self 446
++#endif
++
++#endif  // SANDBOX_LINUX_SYSTEM_HEADERS_RISCV64_LINUX_SYSCALLS_H_
+Index: chromium-107.0.5304.87/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc
++++ chromium-107.0.5304.87/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc
+@@ -38,7 +38,7 @@ ResultExpr CrosAmdGpuProcessPolicy::Eval
+     case __NR_sched_setscheduler:
+     case __NR_sysinfo:
+     case __NR_uname:
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_readlink:
+     case __NR_stat:
+ #endif
+Index: chromium-107.0.5304.87/sandbox/policy/linux/bpf_gpu_policy_linux.cc
+===================================================================
+--- chromium-107.0.5304.87.orig/sandbox/policy/linux/bpf_gpu_policy_linux.cc
++++ chromium-107.0.5304.87/sandbox/policy/linux/bpf_gpu_policy_linux.cc
+@@ -73,7 +73,7 @@ ResultExpr GpuProcessPolicy::EvaluateSys
+     (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+     case __NR_ftruncate64:
+ #endif
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+     case __NR_getdents:
+ #endif
+     case __NR_getdents64:
+
diff --git a/srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch.args b/srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch.args
new file mode 100644
index 000000000000..d5f38e354e7f
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch.args
@@ -0,0 +1 @@
+-Np1 --directory=src/3rdparty/chromium/
diff --git a/srcpkgs/qt6-webengine/patches/0100-chromium-revert-9d080c0.patch b/srcpkgs/qt6-webengine/patches/0100-chromium-revert-9d080c0.patch
deleted file mode 100644
index adca364a4060..000000000000
--- a/srcpkgs/qt6-webengine/patches/0100-chromium-revert-9d080c0.patch
+++ /dev/null
@@ -1,154 +0,0 @@
-Revert 9d080c0934b848ee4a05013c78641e612fcc1e03
-
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/build/config/sanitizers/BUILD.gn
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/build/config/sanitizers/BUILD.gn
-@@ -271,11 +271,11 @@ config("asan_flags") {
-   if (is_asan) {
-     cflags += [ "-fsanitize=address" ]
-     if (is_win) {
--      if (!defined(asan_win_blocklist_path)) {
--        asan_win_blocklist_path =
-+      if (!defined(asan_win_blacklist_path)) {
-+        asan_win_blacklist_path =
-             rebase_path("//tools/memory/asan/blocklist_win.txt", root_build_dir)
-       }
--      cflags += [ "-fsanitize-ignorelist=$asan_win_blocklist_path" ]
-+      cflags += [ "-fsanitize-blacklist=$asan_win_blacklist_path" ]
-     }
-   }
- }
-@@ -305,13 +305,13 @@ config("link_shared_library") {
- config("cfi_flags") {
-   cflags = []
-   if (is_cfi && current_toolchain == default_toolchain) {
--    if (!defined(cfi_ignorelist_path)) {
--      cfi_ignorelist_path =
-+    if (!defined(cfi_blacklist_path)) {
-+      cfi_blacklist_path =
-           rebase_path("//tools/cfi/ignores.txt", root_build_dir)
-     }
-     cflags += [
-       "-fsanitize=cfi-vcall",
--      "-fsanitize-ignorelist=$cfi_ignorelist_path",
-+      "-fsanitize-blacklist=$cfi_blacklist_path",
-     ]
- 
-     if (use_cfi_cast) {
-@@ -408,14 +408,14 @@ config("msan_flags") {
-   if (is_msan) {
-     assert(is_linux || is_chromeos,
-            "msan only supported on linux x86_64/ChromeOS")
--    if (!defined(msan_ignorelist_path)) {
--      msan_ignorelist_path =
--          rebase_path("//tools/msan/ignorelist.txt", root_build_dir)
-+    if (!defined(msan_blacklist_path)) {
-+      msan_blacklist_path =
-+          rebase_path("//tools/msan/blacklist.txt", root_build_dir)
-     }
-     cflags = [
-       "-fsanitize=memory",
-       "-fsanitize-memory-track-origins=$msan_track_origins",
--      "-fsanitize-ignorelist=$msan_ignorelist_path",
-+      "-fsanitize-blacklist=$msan_blacklist_path",
-     ]
-   }
- }
-@@ -423,13 +423,13 @@ config("msan_flags") {
- config("tsan_flags") {
-   if (is_tsan) {
-     assert(is_linux || is_chromeos, "tsan only supported on linux x86_64")
--    if (!defined(tsan_ignorelist_path)) {
--      tsan_ignorelist_path =
-+    if (!defined(tsan_blacklist_path)) {
-+      tsan_blacklist_path =
-           rebase_path("//tools/memory/tsan_v2/ignores.txt", root_build_dir)
-     }
-     cflags = [
-       "-fsanitize=thread",
--      "-fsanitize-ignorelist=$tsan_ignorelist_path",
-+      "-fsanitize-blacklist=$tsan_blacklist_path",
-     ]
-   }
- }
-@@ -437,8 +437,8 @@ config("tsan_flags") {
- config("ubsan_flags") {
-   cflags = []
-   if (is_ubsan) {
--    if (!defined(ubsan_ignorelist_path)) {
--      ubsan_ignorelist_path =
-+    if (!defined(ubsan_blacklist_path)) {
-+      ubsan_blacklist_path =
-           rebase_path("//tools/ubsan/ignorelist.txt", root_build_dir)
-     }
-     cflags += [
-@@ -455,7 +455,7 @@ config("ubsan_flags") {
-       "-fsanitize=signed-integer-overflow",
-       "-fsanitize=unreachable",
-       "-fsanitize=vla-bound",
--      "-fsanitize-ignorelist=$ubsan_ignorelist_path",
-+      "-fsanitize-blacklist=$ubsan_blacklist_path",
-     ]
-     if (!is_clang) {
-       # These exposes too much illegal C++14 code to compile on anything stricter than clang:
-@@ -496,8 +496,8 @@ config("ubsan_no_recover") {
- 
- config("ubsan_security_flags") {
-   if (is_ubsan_security) {
--    if (!defined(ubsan_security_ignorelist_path)) {
--      ubsan_security_ignorelist_path =
-+    if (!defined(ubsan_security_blacklist_path)) {
-+      ubsan_security_blacklist_path =
-           rebase_path("//tools/ubsan/security_ignorelist.txt", root_build_dir)
-     }
-     cflags = [
-@@ -505,7 +505,7 @@ config("ubsan_security_flags") {
-       "-fsanitize=shift",
-       "-fsanitize=signed-integer-overflow",
-       "-fsanitize=vla-bound",
--      "-fsanitize-ignorelist=$ubsan_security_ignorelist_path",
-+      "-fsanitize-blacklist=$ubsan_security_blacklist_path",
-     ]
-   }
- }
-@@ -518,13 +518,13 @@ config("ubsan_null_flags") {
- 
- config("ubsan_vptr_flags") {
-   if (is_ubsan_vptr) {
--    if (!defined(ubsan_vptr_ignorelist_path)) {
--      ubsan_vptr_ignorelist_path =
-+    if (!defined(ubsan_vptr_blacklist_path)) {
-+      ubsan_vptr_blacklist_path =
-           rebase_path("//tools/ubsan/vptr_ignorelist.txt", root_build_dir)
-     }
-     cflags = [
-       "-fsanitize=vptr",
--      "-fsanitize-ignorelist=$ubsan_vptr_ignorelist_path",
-+      "-fsanitize-blacklist=$ubsan_vptr_blacklist_path",
-     ]
-     if (!is_clang) {
-       # Clang specific flag:
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/build_overrides/build.gni
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/build_overrides/build.gni
-@@ -43,15 +43,15 @@ declare_args() {
- # Allows different projects to specify their own suppression/ignore lists for
- # sanitizer tools.
- # asan_suppressions_file = "path/to/asan_suppressions.cc"
--# asan_win_ignorelist_path = "path/to/asan/blocklist_win.txt"
-+# asan_win_blacklist_path = "path/to/asan/blocklist_win.txt"
- # lsan_suppressions_file = "path/to/lsan_suppressions.cc"
- # tsan_suppressions_file = "path/to/tsan_suppressions.cc"
--# tsan_ignorelist_path = "path/to/tsan/ignores.txt"
--# msan_ignorelist_path = "path/to/msan/ignorelist.txt"
--# ubsan_ignorelist_path = "path/to/ubsan/ignorelist.txt"
--# ubsan_vptr_ignorelist_path = "path/to/ubsan/vptr_ignorelist.txt"
--# ubsan_security_ignorelist_path = "path/to/ubsan/security_ignorelist.txt"
--# cfi_ignorelist_path = "path/to/cfi/ignores.txt"
-+# tsan_blacklist_path = "path/to/tsan/ignores.txt"
-+# msan_blacklist_path = "path/to/msan/blacklist.txt"
-+# ubsan_blacklist_path = "path/to/ubsan/blacklist.txt"
-+# ubsan_vptr_blacklist_path = "path/to/ubsan/vptr_blacklist.txt"
-+# ubsan_security_blacklist_path = "path/to/ubsan/security_blacklist.txt"
-+# cfi_blacklist_path = "path/to/cfi/ignores.txt"
- 
- if (host_os == "mac" || is_apple) {
-   # Needed for is_apple when targeting macOS or iOS, independent of host.
diff --git a/srcpkgs/qt6-webengine/patches/0101-chromium-102-fenced_frame_utils-include.patch b/srcpkgs/qt6-webengine/patches/0101-chromium-102-fenced_frame_utils-include.patch
deleted file mode 100644
index f41c7984840d..000000000000
--- a/srcpkgs/qt6-webengine/patches/0101-chromium-102-fenced_frame_utils-include.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-From 7c135a291184b59a59643ed6a8c40b4405ac0175 Mon Sep 17 00:00:00 2001
-From: Stephan Hartmann <stha09@googlemail.com>
-Date: Wed, 27 Apr 2022 16:01:01 +0000
-Subject: [PATCH] IWYU: add cstring for std::strlen in fenced_frame_utils
-
----
- third_party/blink/common/fenced_frame/fenced_frame_utils.cc | 2 ++
- 1 file changed, 2 insertions(+)
-
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/blink/common/fenced_frame/fenced_frame_utils.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/blink/common/fenced_frame/fenced_frame_utils.cc
-@@ -6,6 +6,8 @@
- 
- #include <cstring>
- 
-+#include <cstring>
-+
- #include "base/guid.h"
- #include "base/strings/string_util.h"
- 
diff --git a/srcpkgs/qt6-webengine/patches/0102-chromium-102-regex_pattern-array.patch b/srcpkgs/qt6-webengine/patches/0102-chromium-102-regex_pattern-array.patch
deleted file mode 100644
index 420ef941a386..000000000000
--- a/srcpkgs/qt6-webengine/patches/0102-chromium-102-regex_pattern-array.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/components/autofill/core/browser/BUILD.gn
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/components/autofill/core/browser/BUILD.gn
-@@ -34,6 +34,11 @@ action("regex_patterns_inl_h") {
- }
- 
- jumbo_static_library("browser") {
-+  if (is_clang) {
-+    cflags = [
-+      "-fbracket-depth=1000",
-+    ]
-+  }
-   sources = [
-     "address_normalization_manager.cc",
-     "address_normalization_manager.h",
diff --git a/srcpkgs/qt6-webengine/patches/0103-chromium-i686-vaapi-fpermissive.patch b/srcpkgs/qt6-webengine/patches/0103-chromium-i686-vaapi-fpermissive.patch
deleted file mode 100644
index 708d567a04dc..000000000000
--- a/srcpkgs/qt6-webengine/patches/0103-chromium-i686-vaapi-fpermissive.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/media/gpu/vaapi/BUILD.gn
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/gpu/vaapi/BUILD.gn
-@@ -14,6 +14,12 @@ import("//ui/gl/features.gni")
- assert(is_linux || is_chromeos)
- assert(use_vaapi)
- 
-+config("vaapi_permissive") {
-+  if (target_cpu == "x86") {
-+    cflags = [ "-fpermissive" ]
-+  }
-+}
-+
- generate_stubs("libva_stubs") {
-   extra_header = "va_stub_header.fragment"
-   sigs = [ "va.sigs" ]
-@@ -89,6 +95,7 @@ source_set("vaapi") {
-   configs += [
-     "//build/config/linux/libva",
-     "//third_party/libvpx:libvpx_config",
-+    ":vaapi_permissive",
-   ]
- 
-   deps = [
diff --git a/srcpkgs/qt6-webengine/patches/0104-chromium-libxml-unbundle.patch b/srcpkgs/qt6-webengine/patches/0104-chromium-libxml-unbundle.patch
deleted file mode 100644
index baca484abc4a..000000000000
--- a/srcpkgs/qt6-webengine/patches/0104-chromium-libxml-unbundle.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/build/linux/unbundle/libxml.gn
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/build/linux/unbundle/libxml.gn
-@@ -19,6 +19,7 @@ static_library("libxml_utils") {
-     ":xml_reader",
-     ":xml_writer",
-     "//base/test:test_support",
-+    "//services/data_decoder:lib",
-     "//services/data_decoder:xml_parser_fuzzer_deps",
-   ]
-   sources = [
diff --git a/srcpkgs/qt6-webengine/patches/0107-chromium-cross-build.patch b/srcpkgs/qt6-webengine/patches/0107-chromium-cross-build.patch
index 44954dfbb1e5..7fbfabcd79b7 100644
--- a/srcpkgs/qt6-webengine/patches/0107-chromium-cross-build.patch
+++ b/srcpkgs/qt6-webengine/patches/0107-chromium-cross-build.patch
@@ -11,10 +11,10 @@
    # Normally, Android builds are lightly optimized, even for debug builds, to
    # keep binary size down. Setting this flag to true disables such optimization
    android_full_debug = false
-@@ -970,8 +974,13 @@ config("compiler_cpu_abi") {
-       }
+@@ -1003,8 +1003,13 @@
      } else if (current_cpu == "arm64") {
-       if (is_clang && !is_android && !is_nacl && !is_fuchsia) {
+       if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
+           !(is_chromeos_lacros && is_chromeos_device)) {
 -        cflags += [ "--target=aarch64-linux-gnu" ]
 -        ldflags += [ "--target=aarch64-linux-gnu" ]
 +        if (is_musl) {
diff --git a/srcpkgs/qt6-webengine/patches/0117-chromium-musl-resolver.patch b/srcpkgs/qt6-webengine/patches/0117-chromium-musl-resolver.patch
index 176524adc083..5f090c810579 100644
--- a/srcpkgs/qt6-webengine/patches/0117-chromium-musl-resolver.patch
+++ b/srcpkgs/qt6-webengine/patches/0117-chromium-musl-resolver.patch
@@ -27,17 +27,6 @@
  }
  
  bool ScopedResState::IsValid() const {
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/net/dns/host_resolver_manager.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/net/dns/host_resolver_manager.cc
-@@ -3158,7 +3158,7 @@ HostResolverManager::HostResolverManager
-   if (system_dns_config_notifier_)
-     system_dns_config_notifier_->AddObserver(this);
- #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_OPENBSD) && \
--    !BUILDFLAG(IS_ANDROID)
-+    !BUILDFLAG(IS_ANDROID) && !(BUILDFLAG(IS_LINUX) && !defined(__GLIBC__))
-   EnsureDnsReloaderInit();
- #endif
- 
 --- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/net/dns/dns_reloader.cc
 +++ qt6-webengine-6.4.2/src/3rdparty/chromium/net/dns/dns_reloader.cc
 @@ -7,7 +7,8 @@
@@ -50,8 +39,18 @@
  
  #include <resolv.h>
  
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/net/dns/host_resolver_proc.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/net/dns/host_resolver_proc.cc
+--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/net/dns/host_resolver_system_task.cc
++++ qt6-webengine-6.4.2/src/3rdparty/chromium/net/dns/host_resolver_system_task.cc
+@@ -310,8 +310,7 @@
+ }
+ 
+ void EnsureSystemHostResolverCallReady() {
+-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_OPENBSD) && \
+-    !BUILDFLAG(IS_ANDROID)
++#if defined(__GLIBC__)
+   EnsureDnsReloaderInit();
+ #elif BUILDFLAG(IS_WIN)
+   EnsureWinsockInit();
 @@ -192,7 +192,8 @@ int SystemHostResolverCall(const std::st
                                                  base::BlockingType::WILL_BLOCK);
  
diff --git a/srcpkgs/qt6-webengine/patches/0124-chromium-enable-i686.patch b/srcpkgs/qt6-webengine/patches/0124-chromium-enable-i686.patch
deleted file mode 100644
index 11d8de7c23f8..000000000000
--- a/srcpkgs/qt6-webengine/patches/0124-chromium-enable-i686.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/BUILD.gn
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/BUILD.gn
-@@ -1537,14 +1537,6 @@ if (!is_ios && !use_qt) {
-   }
- }
- 
--# TODO(cassew): Add more OS's that don't support x86.
--is_valid_x86_target =
--    target_os != "ios" && target_os != "mac" &&
--    (target_os != "linux" || use_libfuzzer || !build_with_chromium)
--assert(
--    is_valid_x86_target || target_cpu != "x86",
--    "'target_cpu=x86' is not supported for 'target_os=$target_os'. Consider omitting 'target_cpu' (default) or using 'target_cpu=x64' instead.")
--
- group("chromium_builder_perf") {
-   testonly = true
- 
diff --git a/srcpkgs/qt6-webengine/patches/0129-chromium-sandbox-shed_getparam.patch b/srcpkgs/qt6-webengine/patches/0129-chromium-sandbox-shed_getparam.patch
index 80d91c77e8ba..63c589f4a58e 100644
--- a/srcpkgs/qt6-webengine/patches/0129-chromium-sandbox-shed_getparam.patch
+++ b/srcpkgs/qt6-webengine/patches/0129-chromium-sandbox-shed_getparam.patch
@@ -1,20 +1,17 @@
 Allow SYS_sched_getparam and SYS_sched_getscheduler
 musl uses them for pthread_getschedparam()
 
-source: https://git.alpinelinux.org/aports/commit/community/chromium?id=54af9f8ac24f52d382c5758e2445bf0206eff40e
-
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
-@@ -97,10 +97,10 @@ ResultExpr RendererProcessPolicy::Evalua
+--- a/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
++++ b/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
+@@ -94,6 +94,11 @@
+     case __NR_pwrite64:
+     case __NR_sched_get_priority_max:
+     case __NR_sched_get_priority_min:
++#ifdef __GLIBC__
++    case __NR_sched_getparam:
++    case __NR_sched_getscheduler:
++    case __NR_sched_setscheduler:
++#endif
      case __NR_sysinfo:
      case __NR_times:
      case __NR_uname:
--      return Allow();
--    case __NR_sched_getaffinity:
-     case __NR_sched_getparam:
-     case __NR_sched_getscheduler:
-+      return Allow();
-+    case __NR_sched_getaffinity:
-     case __NR_sched_setscheduler:
-       return RestrictSchedTarget(GetPolicyPid(), sysno);
-     case __NR_prlimit64:
diff --git a/srcpkgs/qt6-webengine/patches/0155-systypes.patch b/srcpkgs/qt6-webengine/patches/0155-systypes.patch
new file mode 100644
index 000000000000..f4e71e939cd1
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0155-systypes.patch
@@ -0,0 +1,11 @@
+--- a/src/3rdparty/chromium/base/third_party/symbolize/symbolize.h
++++ b/src/3rdparty/chromium/base/third_party/symbolize/symbolize.h
+@@ -58,6 +58,8 @@
+ #include "config.h"
+ #include "glog/logging.h"
+ 
++#include <sys/types.h>
++
+ #ifdef HAVE_SYMBOLIZE
+ 
+ #if defined(__ELF__)  // defined by gcc
diff --git a/srcpkgs/qt6-webengine/patches/0200-chromium-sndio.patch b/srcpkgs/qt6-webengine/patches/0200-chromium-sndio.patch
deleted file mode 100644
index d769b531497b..000000000000
--- a/srcpkgs/qt6-webengine/patches/0200-chromium-sndio.patch
+++ /dev/null
@@ -1,849 +0,0 @@
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/media/BUILD.gn
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/BUILD.gn
-@@ -78,6 +78,9 @@ config("media_config") {
-       defines += [ "DLOPEN_PULSEAUDIO" ]
-     }
-   }
-+  if (use_sndio) {
-+    defines += [ "USE_SNDIO" ]
-+  }
-   if (use_cras) {
-     defines += [ "USE_CRAS" ]
-   }
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/media/audio/BUILD.gn
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/BUILD.gn
-@@ -245,6 +245,17 @@ source_set("audio") {
-     sources += [ "linux/audio_manager_linux.cc" ]
-   }
- 
-+  if (use_sndio) {
-+    libs += [ "sndio" ]
-+    sources += [
-+      "sndio/audio_manager_sndio.cc",
-+      "sndio/sndio_input.cc",
-+      "sndio/sndio_input.h",
-+      "sndio/sndio_output.cc",
-+      "sndio/sndio_output.h"
-+    ]
-+  }
-+
-   if (use_alsa) {
-     libs += [ "asound" ]
-     sources += [
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/media/audio/linux/audio_manager_linux.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/linux/audio_manager_linux.cc
-@@ -25,6 +25,11 @@
- #include "media/audio/pulse/audio_manager_pulse.h"
- #include "media/audio/pulse/pulse_util.h"
- #endif
-+#if defined(USE_SNDIO)
-+#include "media/audio/sndio/audio_manager_sndio.h"
-+#include "media/audio/sndio/sndio_input.h"
-+#include "media/audio/sndio/sndio_output.h"
-+#endif
- 
- namespace media {
- 
---- /dev/null
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/sndio/audio_manager_sndio.cc
-@@ -0,0 +1,148 @@
-+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+#include "media/audio/sndio/audio_manager_sndio.h"
-+
-+#include "base/metrics/histogram_macros.h"
-+#include "base/memory/ptr_util.h"
-+#include "media/audio/audio_device_description.h"
-+#include "media/audio/audio_output_dispatcher.h"
-+#include "media/audio/sndio/sndio_input.h"
-+#include "media/audio/sndio/sndio_output.h"
-+#include "media/base/limits.h"
-+#include "media/base/media_switches.h"
-+
-+namespace media {
-+
-+
-+// Maximum number of output streams that can be open simultaneously.
-+static const int kMaxOutputStreams = 4;
-+
-+// Default sample rate for input and output streams.
-+static const int kDefaultSampleRate = 48000;
-+
-+void AddDefaultDevice(AudioDeviceNames* device_names) {
-+  DCHECK(device_names->empty());
-+  device_names->push_front(AudioDeviceName::CreateDefault());
-+}
-+
-+bool AudioManagerSndio::HasAudioOutputDevices() {
-+  return true;
-+}
-+
-+bool AudioManagerSndio::HasAudioInputDevices() {
-+  return true;
-+}
-+
-+void AudioManagerSndio::GetAudioInputDeviceNames(
-+    AudioDeviceNames* device_names) {
-+  DCHECK(device_names->empty());
-+  AddDefaultDevice(device_names);
-+}
-+
-+void AudioManagerSndio::GetAudioOutputDeviceNames(
-+    AudioDeviceNames* device_names) {
-+  AddDefaultDevice(device_names);
-+}
-+
-+const char* AudioManagerSndio::GetName() {
-+  return "SNDIO";
-+}
-+
-+AudioParameters AudioManagerSndio::GetInputStreamParameters(
-+    const std::string& device_id) {
-+  static const int kDefaultInputBufferSize = 1024;
-+
-+  int user_buffer_size = GetUserBufferSize();
-+  int buffer_size = user_buffer_size ?
-+      user_buffer_size : kDefaultInputBufferSize;
-+
-+  return AudioParameters(
-+      AudioParameters::AUDIO_PCM_LOW_LATENCY, CHANNEL_LAYOUT_STEREO,
-+      kDefaultSampleRate, buffer_size);
-+}
-+
-+AudioManagerSndio::AudioManagerSndio(std::unique_ptr<AudioThread> audio_thread,
-+                                         AudioLogFactory* audio_log_factory)
-+    : AudioManagerBase(std::move(audio_thread),
-+                       audio_log_factory) {
-+  DLOG(WARNING) << "AudioManagerSndio";
-+  SetMaxOutputStreamsAllowed(kMaxOutputStreams);
-+}
-+
-+AudioManagerSndio::~AudioManagerSndio() {
-+  Shutdown();
-+}
-+
-+AudioOutputStream* AudioManagerSndio::MakeLinearOutputStream(
-+    const AudioParameters& params,
-+    const LogCallback& log_callback) {
-+  DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format());
-+  return MakeOutputStream(params);
-+}
-+
-+AudioOutputStream* AudioManagerSndio::MakeLowLatencyOutputStream(
-+    const AudioParameters& params,
-+    const std::string& device_id,
-+    const LogCallback& log_callback) {
-+  DLOG_IF(ERROR, !device_id.empty()) << "Not implemented!";
-+  DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format());
-+  return MakeOutputStream(params);
-+}
-+
-+AudioInputStream* AudioManagerSndio::MakeLinearInputStream(
-+    const AudioParameters& params,
-+    const std::string& device_id,
-+    const LogCallback& log_callback) {
-+  DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format());
-+  return MakeInputStream(params);
-+}
-+
-+AudioInputStream* AudioManagerSndio::MakeLowLatencyInputStream(
-+    const AudioParameters& params,
-+    const std::string& device_id,
-+    const LogCallback& log_callback) {
-+  DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format());
-+  return MakeInputStream(params);
-+}
-+
-+AudioParameters AudioManagerSndio::GetPreferredOutputStreamParameters(
-+    const std::string& output_device_id,
-+    const AudioParameters& input_params) {
-+  // TODO(tommi): Support |output_device_id|.
-+  DLOG_IF(ERROR, !output_device_id.empty()) << "Not implemented!";
-+  static const int kDefaultOutputBufferSize = 2048;
-+
-+  ChannelLayout channel_layout = CHANNEL_LAYOUT_STEREO;
-+  int sample_rate = kDefaultSampleRate;
-+  int buffer_size = kDefaultOutputBufferSize;
-+  if (input_params.IsValid()) {
-+    sample_rate = input_params.sample_rate();
-+    channel_layout = input_params.channel_layout();
-+    buffer_size = std::min(buffer_size, input_params.frames_per_buffer());
-+  }
-+
-+  int user_buffer_size = GetUserBufferSize();
-+  if (user_buffer_size)
-+    buffer_size = user_buffer_size;
-+
-+  return AudioParameters(
-+      AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout,
-+      sample_rate, buffer_size);
-+}
-+
-+AudioInputStream* AudioManagerSndio::MakeInputStream(
-+    const AudioParameters& params) {
-+  DLOG(WARNING) << "MakeInputStream";
-+  return new SndioAudioInputStream(this,
-+             AudioDeviceDescription::kDefaultDeviceId, params);
-+}
-+
-+AudioOutputStream* AudioManagerSndio::MakeOutputStream(
-+    const AudioParameters& params) {
-+  DLOG(WARNING) << "MakeOutputStream";
-+  return new SndioAudioOutputStream(params, this);
-+}
-+
-+}  // namespace media
---- /dev/null
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/sndio/audio_manager_sndio.h
-@@ -0,0 +1,65 @@
-+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+#ifndef MEDIA_AUDIO_SNDIO_AUDIO_MANAGER_SNDIO_H_
-+#define MEDIA_AUDIO_SNDIO_AUDIO_MANAGER_SNDIO_H_
-+
-+#include <set>
-+
-+#include "base/compiler_specific.h"
-+#include "base/macros.h"
-+#include "base/memory/ref_counted.h"
-+#include "base/threading/thread.h"
-+#include "media/audio/audio_manager_base.h"
-+
-+namespace media {
-+
-+class MEDIA_EXPORT AudioManagerSndio : public AudioManagerBase {
-+ public:
-+  AudioManagerSndio(std::unique_ptr<AudioThread> audio_thread,
-+                   AudioLogFactory* audio_log_factory);
-+  ~AudioManagerSndio() override;
-+
-+  // Implementation of AudioManager.
-+  bool HasAudioOutputDevices() override;
-+  bool HasAudioInputDevices() override;
-+  void GetAudioInputDeviceNames(AudioDeviceNames* device_names) override;
-+  void GetAudioOutputDeviceNames(AudioDeviceNames* device_names) override;
-+  AudioParameters GetInputStreamParameters(
-+      const std::string& device_id) override;
-+  const char* GetName() override;
-+
-+  // Implementation of AudioManagerBase.
-+  AudioOutputStream* MakeLinearOutputStream(
-+      const AudioParameters& params,
-+      const LogCallback& log_callback) override;
-+  AudioOutputStream* MakeLowLatencyOutputStream(
-+      const AudioParameters& params,
-+      const std::string& device_id,
-+      const LogCallback& log_callback) override;
-+  AudioInputStream* MakeLinearInputStream(
-+      const AudioParameters& params,
-+      const std::string& device_id,
-+      const LogCallback& log_callback) override;
-+  AudioInputStream* MakeLowLatencyInputStream(
-+      const AudioParameters& params,
-+      const std::string& device_id,
-+      const LogCallback& log_callback) override;
-+
-+ protected:
-+  AudioParameters GetPreferredOutputStreamParameters(
-+      const std::string& output_device_id,
-+      const AudioParameters& input_params) override;
-+
-+ private:
-+  // Called by MakeLinearOutputStream and MakeLowLatencyOutputStream.
-+  AudioOutputStream* MakeOutputStream(const AudioParameters& params);
-+  AudioInputStream* MakeInputStream(const AudioParameters& params);
-+
-+  DISALLOW_COPY_AND_ASSIGN(AudioManagerSndio);
-+};
-+
-+}  // namespace media
-+
-+#endif  // MEDIA_AUDIO_SNDIO_AUDIO_MANAGER_SNDIO_H_
---- /dev/null
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/sndio/sndio_input.cc
-@@ -0,0 +1,200 @@
-+// Copyright 2013 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+#include "base/bind.h"
-+#include "base/logging.h"
-+#include "base/macros.h"
-+#include "media/base/audio_timestamp_helper.h"
-+#include "media/audio/sndio/audio_manager_sndio.h"
-+#include "media/audio/audio_manager.h"
-+#include "media/audio/sndio/sndio_input.h"
-+
-+namespace media {
-+
-+static const SampleFormat kSampleFormat = kSampleFormatS16;
-+
-+void SndioAudioInputStream::OnMoveCallback(void *arg, int delta)
-+{
-+  SndioAudioInputStream* self = static_cast<SndioAudioInputStream*>(arg);
-+
-+  self->hw_delay += delta;
-+}
-+
-+void *SndioAudioInputStream::ThreadEntry(void *arg) {
-+  SndioAudioInputStream* self = static_cast<SndioAudioInputStream*>(arg);
-+
-+  self->ThreadLoop();
-+  return NULL;
-+}
-+
-+SndioAudioInputStream::SndioAudioInputStream(AudioManagerBase* manager,
-+                                             const std::string& device_name,
-+                                             const AudioParameters& params)
-+    : manager(manager),
-+      params(params),
-+      audio_bus(AudioBus::Create(params)),
-+      state(kClosed) {
-+}
-+
-+SndioAudioInputStream::~SndioAudioInputStream() {
-+  if (state != kClosed)
-+    Close();
-+}
-+
-+bool SndioAudioInputStream::Open() {
-+  struct sio_par par;
-+  int sig;
-+
-+  if (state != kClosed)
-+    return false;
-+
-+  if (params.format() != AudioParameters::AUDIO_PCM_LINEAR &&
-+      params.format() != AudioParameters::AUDIO_PCM_LOW_LATENCY) {
-+    LOG(WARNING) << "Unsupported audio format.";
-+    return false;
-+  }
-+
-+  sio_initpar(&par);
-+  par.rate = params.sample_rate();
-+  par.rchan = params.channels();
-+  par.bits = SampleFormatToBitsPerChannel(kSampleFormat);
-+  par.bps = par.bits / 8;
-+  par.sig = sig = par.bits != 8 ? 1 : 0;
-+  par.le = SIO_LE_NATIVE;
-+  par.appbufsz = params.frames_per_buffer();
-+
-+  hdl = sio_open(SIO_DEVANY, SIO_REC, 0);
-+
-+  if (hdl == NULL) {
-+    LOG(ERROR) << "Couldn't open audio device.";
-+    return false;
-+  }
-+
-+  if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par)) {
-+    LOG(ERROR) << "Couldn't set audio parameters.";
-+    goto bad_close;
-+  }
-+
-+  if (par.rate  != (unsigned int)params.sample_rate() ||
-+      par.rchan != (unsigned int)params.channels() ||
-+      par.bits  != (unsigned int)SampleFormatToBitsPerChannel(kSampleFormat) ||
-+      par.sig   != (unsigned int)sig ||
-+      (par.bps > 1 && par.le != SIO_LE_NATIVE) ||
-+      (par.bits != par.bps * 8)) {
-+    LOG(ERROR) << "Unsupported audio parameters.";
-+    goto bad_close;
-+  }
-+  state = kStopped;
-+  buffer = new char[audio_bus->frames() * params.GetBytesPerFrame(kSampleFormat)];
-+  sio_onmove(hdl, &OnMoveCallback, this);
-+  return true;
-+bad_close:
-+  sio_close(hdl);
-+  return false;
-+}
-+
-+void SndioAudioInputStream::Start(AudioInputCallback* cb) {
-+
-+  StartAgc();
-+
-+  state = kRunning;
-+  hw_delay = 0;
-+  callback = cb;
-+  sio_start(hdl);
-+  if (pthread_create(&thread, NULL, &ThreadEntry, this) != 0) {
-+    LOG(ERROR) << "Failed to create real-time thread for recording.";
-+    sio_stop(hdl);
-+    state = kStopped;
-+  }
-+}
-+
-+void SndioAudioInputStream::Stop() {
-+
-+  if (state == kStopped)
-+    return;
-+
-+  state = kStopWait;
-+  pthread_join(thread, NULL);
-+  sio_stop(hdl);
-+  state = kStopped;
-+
-+  StopAgc();
-+}
-+
-+void SndioAudioInputStream::Close() {
-+
-+  if (state == kClosed)
-+    return;
-+
-+  if (state == kRunning)
-+    Stop();
-+
-+  state = kClosed;
-+  delete [] buffer;
-+  sio_close(hdl);
-+
-+  manager->ReleaseInputStream(this);
-+}
-+
-+double SndioAudioInputStream::GetMaxVolume() {
-+  // Not supported
-+  return 0.0;
-+}
-+
-+void SndioAudioInputStream::SetVolume(double volume) {
-+  // Not supported. Do nothing.
-+}
-+
-+double SndioAudioInputStream::GetVolume() {
-+  // Not supported.
-+  return 0.0;
-+}
-+
-+bool SndioAudioInputStream::IsMuted() {
-+  // Not supported.
-+  return false;
-+}
-+
-+void SndioAudioInputStream::SetOutputDeviceForAec(
-+    const std::string& output_device_id) {
-+  // Not supported.
-+}
-+
-+void SndioAudioInputStream::ThreadLoop(void) {
-+  size_t todo, n;
-+  char *data;
-+  unsigned int nframes;
-+  double normalized_volume = 0.0;
-+
-+  nframes = audio_bus->frames();
-+
-+  while (state == kRunning && !sio_eof(hdl)) {
-+
-+    GetAgcVolume(&normalized_volume);
-+
-+    // read one block
-+    todo = nframes * params.GetBytesPerFrame(kSampleFormat);
-+    data = buffer;
-+    while (todo > 0) {
-+      n = sio_read(hdl, data, todo);
-+      if (n == 0)
-+        return;	// unrecoverable I/O error
-+      todo -= n;
-+      data += n;
-+    }
-+    hw_delay -= nframes;
-+
-+    // convert frames count to TimeDelta
-+    const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay,
-+      params.sample_rate());
-+
-+    // push into bus
-+    audio_bus->FromInterleaved<SignedInt16SampleTypeTraits>(reinterpret_cast<int16_t*>(buffer), nframes);
-+
-+    // invoke callback
-+    callback->OnData(audio_bus.get(), base::TimeTicks::Now() - delay, 1.);
-+  }
-+}
-+
-+}  // namespace media
---- /dev/null
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/sndio/sndio_input.h
-@@ -0,0 +1,91 @@
-+// Copyright 2013 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+#ifndef MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_
-+#define MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_
-+
-+#include <stdint.h>
-+#include <string>
-+#include <sndio.h>
-+
-+#include "base/compiler_specific.h"
-+#include "base/macros.h"
-+#include "base/memory/weak_ptr.h"
-+#include "base/time/time.h"
-+#include "media/audio/agc_audio_stream.h"
-+#include "media/audio/audio_io.h"
-+#include "media/audio/audio_device_description.h"
-+#include "media/base/audio_parameters.h"
-+
-+namespace media {
-+
-+class AudioManagerBase;
-+
-+// Implementation of AudioOutputStream using sndio(7)
-+class SndioAudioInputStream : public AgcAudioStream<AudioInputStream> {
-+ public:
-+  // Pass this to the constructor if you want to attempt auto-selection
-+  // of the audio recording device.
-+  static const char kAutoSelectDevice[];
-+
-+  // Create a PCM Output stream for the SNDIO device identified by
-+  // |device_name|. If unsure of what to use for |device_name|, use
-+  // |kAutoSelectDevice|.
-+  SndioAudioInputStream(AudioManagerBase* audio_manager,
-+                     const std::string& device_name,
-+                     const AudioParameters& params);
-+
-+  ~SndioAudioInputStream() override;
-+
-+  // Implementation of AudioInputStream.
-+  bool Open() override;
-+  void Start(AudioInputCallback* callback) override;
-+  void Stop() override;
-+  void Close() override;
-+  double GetMaxVolume() override;
-+  void SetVolume(double volume) override;
-+  double GetVolume() override;
-+  bool IsMuted() override;
-+  void SetOutputDeviceForAec(const std::string& output_device_id) override;
-+
-+ private:
-+
-+  enum StreamState {
-+    kClosed,            // Not opened yet
-+    kStopped,           // Device opened, but not started yet
-+    kRunning,           // Started, device playing
-+    kStopWait           // Stopping, waiting for the real-time thread to exit
-+  };
-+
-+  // C-style call-backs
-+  static void OnMoveCallback(void *arg, int delta);
-+  static void* ThreadEntry(void *arg);
-+
-+  // Continuously moves data from the device to the consumer
-+  void ThreadLoop();
-+  // Our creator, the audio manager needs to be notified when we close.
-+  AudioManagerBase* manager;
-+  // Parameters of the source
-+  AudioParameters params;
-+  // We store data here for consumer
-+  std::unique_ptr<AudioBus> audio_bus;
-+  // Call-back that consumes recorded data
-+  AudioInputCallback* callback;  // Valid during a recording session.
-+  // Handle of the audio device
-+  struct sio_hdl* hdl;
-+  // Current state of the stream
-+  enum StreamState state;
-+  // High priority thread running ThreadLoop()
-+  pthread_t thread;
-+  // Number of frames buffered in the hardware
-+  int hw_delay;
-+  // Temporary buffer where data is stored sndio-compatible format
-+  char* buffer;
-+
-+  DISALLOW_COPY_AND_ASSIGN(SndioAudioInputStream);
-+};
-+
-+}  // namespace media
-+
-+#endif  // MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_
---- /dev/null
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/sndio/sndio_output.cc
-@@ -0,0 +1,183 @@
-+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+#include "base/logging.h"
-+#include "base/time/time.h"
-+#include "base/time/default_tick_clock.h"
-+#include "media/audio/audio_manager_base.h"
-+#include "media/base/audio_timestamp_helper.h"
-+#include "media/audio/sndio/sndio_output.h"
-+
-+namespace media {
-+
-+static const SampleFormat kSampleFormat = kSampleFormatS16;
-+
-+void SndioAudioOutputStream::OnMoveCallback(void *arg, int delta) {
-+  SndioAudioOutputStream* self = static_cast<SndioAudioOutputStream*>(arg);
-+
-+  self->hw_delay -= delta;
-+}
-+
-+void SndioAudioOutputStream::OnVolCallback(void *arg, unsigned int vol) {
-+  SndioAudioOutputStream* self = static_cast<SndioAudioOutputStream*>(arg);
-+
-+  self->vol = vol;
-+}
-+
-+void *SndioAudioOutputStream::ThreadEntry(void *arg) {
-+  SndioAudioOutputStream* self = static_cast<SndioAudioOutputStream*>(arg);
-+
-+  self->ThreadLoop();
-+  return NULL;
-+}
-+
-+SndioAudioOutputStream::SndioAudioOutputStream(const AudioParameters& params,
-+                                               AudioManagerBase* manager)
-+    : manager(manager),
-+      params(params),
-+      audio_bus(AudioBus::Create(params)),
-+      state(kClosed),
-+      mutex(PTHREAD_MUTEX_INITIALIZER) {
-+}
-+
-+SndioAudioOutputStream::~SndioAudioOutputStream() {
-+  if (state != kClosed)
-+    Close();
-+}
-+
-+bool SndioAudioOutputStream::Open() {
-+  struct sio_par par;
-+  int sig;
-+
-+  if (params.format() != AudioParameters::AUDIO_PCM_LINEAR &&
-+      params.format() != AudioParameters::AUDIO_PCM_LOW_LATENCY) {
-+    LOG(WARNING) << "Unsupported audio format.";
-+    return false;
-+  }
-+  sio_initpar(&par);
-+  par.rate = params.sample_rate();
-+  par.pchan = params.channels();
-+  par.bits = SampleFormatToBitsPerChannel(kSampleFormat);
-+  par.bps = par.bits / 8;
-+  par.sig = sig = par.bits != 8 ? 1 : 0;
-+  par.le = SIO_LE_NATIVE;
-+  par.appbufsz = params.frames_per_buffer();
-+
-+  hdl = sio_open(SIO_DEVANY, SIO_PLAY, 0);
-+  if (hdl == NULL) {
-+    LOG(ERROR) << "Couldn't open audio device.";
-+    return false;
-+  }
-+  if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par)) {
-+    LOG(ERROR) << "Couldn't set audio parameters.";
-+    goto bad_close;
-+  }
-+  if (par.rate  != (unsigned int)params.sample_rate() ||
-+      par.pchan != (unsigned int)params.channels() ||
-+      par.bits  != (unsigned int)SampleFormatToBitsPerChannel(kSampleFormat) ||
-+      par.sig   != (unsigned int)sig ||
-+      (par.bps > 1 && par.le != SIO_LE_NATIVE) ||
-+      (par.bits != par.bps * 8)) {
-+    LOG(ERROR) << "Unsupported audio parameters.";
-+    goto bad_close;
-+  }
-+  state = kStopped;
-+  volpending = 0;
-+  vol = 0;
-+  buffer = new char[audio_bus->frames() * params.GetBytesPerFrame(kSampleFormat)];
-+  sio_onmove(hdl, &OnMoveCallback, this);
-+  sio_onvol(hdl, &OnVolCallback, this);
-+  return true;
-+ bad_close:
-+  sio_close(hdl);
-+  return false;
-+}
-+
-+void SndioAudioOutputStream::Close() {
-+  if (state == kClosed)
-+    return;
-+  if (state == kRunning)
-+    Stop();
-+  state = kClosed;
-+  delete [] buffer;
-+  sio_close(hdl);
-+  manager->ReleaseOutputStream(this);  // Calls the destructor
-+}
-+
-+void SndioAudioOutputStream::Start(AudioSourceCallback* callback) {
-+  state = kRunning;
-+  hw_delay = 0;
-+  source = callback;
-+  sio_start(hdl);
-+  if (pthread_create(&thread, NULL, &ThreadEntry, this) != 0) {
-+    LOG(ERROR) << "Failed to create real-time thread.";
-+    sio_stop(hdl);
-+    state = kStopped;
-+  }
-+}
-+
-+void SndioAudioOutputStream::Stop() {
-+  if (state == kStopped)
-+    return;
-+  state = kStopWait;
-+  pthread_join(thread, NULL);
-+  sio_stop(hdl);
-+  state = kStopped;
-+}
-+
-+void SndioAudioOutputStream::SetVolume(double v) {
-+  pthread_mutex_lock(&mutex);
-+  vol = v * SIO_MAXVOL;
-+  volpending = 1;
-+  pthread_mutex_unlock(&mutex);
-+}
-+
-+void SndioAudioOutputStream::GetVolume(double* v) {
-+  pthread_mutex_lock(&mutex);
-+  *v = vol * (1. / SIO_MAXVOL);
-+  pthread_mutex_unlock(&mutex);
-+}
-+
-+// This stream is always used with sub second buffer sizes, where it's
-+// sufficient to simply always flush upon Start().
-+void SndioAudioOutputStream::Flush() {}
-+
-+void SndioAudioOutputStream::ThreadLoop(void) {
-+  int avail, count, result;
-+
-+  while (state == kRunning) {
-+    // Update volume if needed
-+    pthread_mutex_lock(&mutex);
-+    if (volpending) {
-+      volpending = 0;
-+      sio_setvol(hdl, vol);
-+    }
-+    pthread_mutex_unlock(&mutex);
-+
-+    // Get data to play
-+    const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay,
-+	params.sample_rate());
-+    count = source->OnMoreData(delay, base::TimeTicks::Now(), 0, audio_bus.get());
-+    audio_bus->ToInterleaved<SignedInt16SampleTypeTraits>(count, reinterpret_cast<int16_t*>(buffer));
-+    if (count == 0) {
-+      // We have to submit something to the device
-+      count = audio_bus->frames();
-+      memset(buffer, 0, count * params.GetBytesPerFrame(kSampleFormat));
-+      LOG(WARNING) << "No data to play, running empty cycle.";
-+    }
-+
-+    // Submit data to the device
-+    avail = count * params.GetBytesPerFrame(kSampleFormat);
-+    result = sio_write(hdl, buffer, avail);
-+    if (result == 0) {
-+      LOG(WARNING) << "Audio device disconnected.";
-+      break;
-+    }
-+
-+    // Update hardware pointer
-+    hw_delay += count;
-+  }
-+}
-+
-+}  // namespace media
---- /dev/null
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/audio/sndio/sndio_output.h
-@@ -0,0 +1,86 @@
-+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+#ifndef MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_
-+#define MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_
-+
-+#include <pthread.h>
-+#include <sndio.h>
-+
-+#include "base/time/tick_clock.h"
-+#include "base/time/time.h"
-+#include "media/audio/audio_io.h"
-+
-+namespace media {
-+
-+class AudioManagerBase;
-+
-+// Implementation of AudioOutputStream using sndio(7)
-+class SndioAudioOutputStream : public AudioOutputStream {
-+ public:
-+  // The manager is creating this object
-+  SndioAudioOutputStream(const AudioParameters& params,
-+                         AudioManagerBase* manager);
-+  virtual ~SndioAudioOutputStream();
-+
-+  // Implementation of AudioOutputStream.
-+  bool Open() override;
-+  void Close() override;
-+  void Start(AudioSourceCallback* callback) override;
-+  void Stop() override;
-+  void SetVolume(double volume) override;
-+  void GetVolume(double* volume) override;
-+  void Flush() override;
-+
-+  friend void sndio_onmove(void *arg, int delta);
-+  friend void sndio_onvol(void *arg, unsigned int vol);
-+  friend void *sndio_threadstart(void *arg);
-+
-+ private:
-+  enum StreamState {
-+    kClosed,            // Not opened yet
-+    kStopped,           // Device opened, but not started yet
-+    kRunning,           // Started, device playing
-+    kStopWait           // Stopping, waiting for the real-time thread to exit
-+  };
-+
-+  // C-style call-backs
-+  static void OnMoveCallback(void *arg, int delta);
-+  static void OnVolCallback(void *arg, unsigned int vol);
-+  static void* ThreadEntry(void *arg);
-+
-+  // Continuously moves data from the producer to the device
-+  void ThreadLoop(void);
-+
-+  // Our creator, the audio manager needs to be notified when we close.
-+  AudioManagerBase* manager;
-+  // Parameters of the source
-+  AudioParameters params;
-+  // Source stores data here
-+  std::unique_ptr<AudioBus> audio_bus;
-+  // Call-back that produces data to play
-+  AudioSourceCallback* source;
-+  // Handle of the audio device
-+  struct sio_hdl* hdl;
-+  // Current state of the stream
-+  enum StreamState state;
-+  // High priority thread running ThreadLoop()
-+  pthread_t thread;
-+  // Protects vol, volpending and hw_delay
-+  pthread_mutex_t mutex;
-+  // Current volume in the 0..SIO_MAXVOL range
-+  int vol;
-+  // Set to 1 if volumes must be refreshed in the realtime thread
-+  int volpending;
-+  // Number of frames buffered in the hardware
-+  int hw_delay;
-+  // Temporary buffer where data is stored sndio-compatible format
-+  char* buffer;
-+
-+  DISALLOW_COPY_AND_ASSIGN(SndioAudioOutputStream);
-+};
-+
-+}  // namespace media
-+
-+#endif  // MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/media/media_options.gni
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/media/media_options.gni
-@@ -133,6 +133,9 @@ declare_args() {
-   # Enables runtime selection of ALSA library for audio.
-   use_alsa = false
- 
-+  # Enable runtime selection of sndio(7)
-+  use_sndio = false
-+
-   # Alsa should be used on non-Android, non-Mac POSIX systems.
-   # Alsa should be used on desktop Chromecast and audio-only Chromecast builds.
-   if (is_posix && !is_android && !is_mac &&
diff --git a/srcpkgs/qt6-webengine/patches/0300-chromium-musl-hacks.patch b/srcpkgs/qt6-webengine/patches/0300-chromium-musl-hacks.patch
index 525aeb8a63d2..e0b91a09a84f 100644
--- a/srcpkgs/qt6-webengine/patches/0300-chromium-musl-hacks.patch
+++ b/srcpkgs/qt6-webengine/patches/0300-chromium-musl-hacks.patch
@@ -36,17 +36,3 @@
    s.OutputToStream(&os);
  #else
    os << "StackTrace::OutputToStream not implemented.";
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/net/socket/udp_socket_posix.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/net/socket/udp_socket_posix.cc
-@@ -1157,7 +1157,11 @@ SendResult UDPSocketPosixSender::Interna
-     msg_iov->push_back({const_cast<char*>(buffer->data()), buffer->length()});
-   msgvec->reserve(buffers.size());
-   for (size_t j = 0; j < buffers.size(); j++)
-+#ifdef __GLIBC__
-     msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, nullptr, 0, 0}, 0});
-+#else
-+    msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, 0, 0, 0}, 0});
-+#endif
-   int result = HANDLE_EINTR(Sendmmsg(fd, &msgvec[0], buffers.size(), 0));
-   SendResult send_result(0, 0, std::move(buffers));
-   if (result < 0) {
diff --git a/srcpkgs/qt6-webengine/patches/0301-chromium-musl-sandbox.patch b/srcpkgs/qt6-webengine/patches/0301-chromium-musl-sandbox.patch
index 4afbec5b98ef..46b917a3174e 100644
--- a/srcpkgs/qt6-webengine/patches/0301-chromium-musl-sandbox.patch
+++ b/srcpkgs/qt6-webengine/patches/0301-chromium-musl-sandbox.patch
@@ -67,20 +67,3 @@
      case __NR_msync:
      case __NR_munlockall:
      case __NR_readahead:
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
-@@ -99,9 +99,14 @@ ResultExpr RendererProcessPolicy::Evalua
-     case __NR_uname:
-     case __NR_sched_getparam:
-     case __NR_sched_getscheduler:
-+#ifndef __GLIBC__
-+    case __NR_sched_setscheduler:
-+#endif
-       return Allow();
-     case __NR_sched_getaffinity:
-+#ifdef __GLIBC__
-     case __NR_sched_setscheduler:
-+#endif
-       return RestrictSchedTarget(GetPolicyPid(), sysno);
-     case __NR_prlimit64:
-       // See crbug.com/662450 and setrlimit comment above.
diff --git a/srcpkgs/qt6-webengine/patches/0302-chromium-no-mallinfo.patch b/srcpkgs/qt6-webengine/patches/0302-chromium-no-mallinfo.patch
index 519930e7bef0..13b9c2c3164f 100644
--- a/srcpkgs/qt6-webengine/patches/0302-chromium-no-mallinfo.patch
+++ b/srcpkgs/qt6-webengine/patches/0302-chromium-no-mallinfo.patch
@@ -35,17 +35,23 @@
  #endif
 --- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc
 +++ qt6-webengine-6.4.2/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc
-@@ -174,7 +174,8 @@ void ReportAppleAllocStats(size_t* total
+@@ -185,7 +185,6 @@
+ #define MALLINFO2_FOUND_IN_LIBC
+   struct mallinfo2 info = mallinfo2();
+ #endif
+-#endif  // defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ #if !defined(MALLINFO2_FOUND_IN_LIBC)
+   struct mallinfo info = mallinfo();
+ #endif
+@@ -205,6 +204,7 @@
+     sys_alloc_dump->AddScalar(MemoryAllocatorDump::kNameSize,
+                               MemoryAllocatorDump::kUnitsBytes, info.uordblks);
+   }
++#endif  // defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ }
+ #endif
  
- #if (BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(IS_ANDROID)) || \
-     (!BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && !BUILDFLAG(IS_WIN) &&    \
--     !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_FUCHSIA))
-+     !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_FUCHSIA) && \
-+     !(BUILDFLAG(IS_LINUX) && !defined(__GLIBC__)))
- void ReportMallinfoStats(ProcessMemoryDump* pmd,
-                          size_t* total_virtual_size,
-                          size_t* resident_size,
-@@ -339,7 +340,7 @@ bool MallocDumpProvider::OnMemoryDump(co
+@@ -339,7 +340,7 @@
                       &allocated_objects_count);
  #elif BUILDFLAG(IS_FUCHSIA)
  // TODO(fuchsia): Port, see https://crbug.com/706592.
@@ -54,14 +60,3 @@
    ReportMallinfoStats(/*pmd=*/nullptr, &total_virtual_size, &resident_size,
                        &allocated_objects_size, &allocated_objects_count);
  #endif
---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/tflite/src/tensorflow/lite/profiling/memory_info.cc
-+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/tflite/src/tensorflow/lite/profiling/memory_info.cc
-@@ -35,7 +35,7 @@ bool MemoryUsage::IsSupported() {
- 
- MemoryUsage GetMemoryUsage() {
-   MemoryUsage result;
--#ifdef __linux__
-+#if defined(__linux__) && defined(__GLIBC__)
-   rusage res;
-   if (getrusage(RUSAGE_SELF, &res) == 0) {
-     result.max_rss_kb = res.ru_maxrss;
diff --git a/srcpkgs/qt6-webengine/template b/srcpkgs/qt6-webengine/template
index 96846feaee83..4e22cb6e8863 100644
--- a/srcpkgs/qt6-webengine/template
+++ b/srcpkgs/qt6-webengine/template
@@ -1,7 +1,7 @@
 # Template file for 'qt6-webengine'
 pkgname=qt6-webengine
-version=6.4.2
-revision=2
+version=6.5.0
+revision=1
 build_style=cmake
 configure_args="
  -DQT_FEATURE_webengine_system_ffmpeg=ON
@@ -32,7 +32,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only, GPL-2.0-only, LGPL-3.0-only, BSD-3-Clause"
 homepage="https://www.qt.io"
 distfiles="https://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtwebengine-everywhere-src-${version}.tar.xz"
-checksum=ffa945518d1cc8d9ee73523e8d9c2090844f5a2d9c7eac05c4ad079472a119c9
+checksum=2a10da34a71b307e9ff11ec086455dd20b83d5b0ee6bda499c4ba9221e306f07
 
 if [ "$XBPS_LIBC" = "musl" ]; then
 	hostmakedepends+=" musl-legacy-compat"
@@ -164,7 +164,7 @@ qt6-webengine-devel_package() {
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }
 

From aee7c17ad8620162cd38e927a63c24bfc2be2fec Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:36 +0200
Subject: [PATCH 03/27] qt6-webchannel: update to 6.5.0.

---
 srcpkgs/qt6-webchannel/patches/no-cmake-test.patch | 7 -------
 srcpkgs/qt6-webchannel/template                    | 8 ++++----
 2 files changed, 4 insertions(+), 11 deletions(-)
 delete mode 100644 srcpkgs/qt6-webchannel/patches/no-cmake-test.patch

diff --git a/srcpkgs/qt6-webchannel/patches/no-cmake-test.patch b/srcpkgs/qt6-webchannel/patches/no-cmake-test.patch
deleted file mode 100644
index c02028772a2d..000000000000
--- a/srcpkgs/qt6-webchannel/patches/no-cmake-test.patch
+++ /dev/null
@@ -1,7 +0,0 @@
---- a/tests/auto/CMakeLists.txt
-+++ b/tests/auto/CMakeLists.txt
-@@ -1,4 +1,3 @@
--add_subdirectory(cmake)
- add_subdirectory(webchannel)
- if(TARGET Qt::Quick)
-     add_subdirectory(qml)
diff --git a/srcpkgs/qt6-webchannel/template b/srcpkgs/qt6-webchannel/template
index 8f4b58cab240..9c3def385a7b 100644
--- a/srcpkgs/qt6-webchannel/template
+++ b/srcpkgs/qt6-webchannel/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-webchannel'
 pkgname=qt6-webchannel
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtwebchannel-everywhere-src-${version}.tar.xz"
-checksum=06657b2b2509f26c733b7c40da0dbb8571a215b97f99685a6fc3bc51dcbebd87
+checksum=d9553d646df3681b8e09c7609bf7eda0cde69b562f180fa50451a987ed00f1bf
 
 pre_check() {
 	export QML2_IMPORT_PATH="$wrksrc/build/lib/qt6/qml"
@@ -27,13 +27,13 @@ qt6-webchannel-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove usr/lib/qt6/qml/QtWebChannel/plugins.qmltypes
 		vmove usr/lib/qt6/qml/QtWebChannel/qmldir
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From aa05dfb09db23e46dcad7d52c4c8d1093d4e9d72 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:35 +0200
Subject: [PATCH 04/27] qt6-wayland: update to 6.5.0.

---
 srcpkgs/qt6-wayland/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-wayland/template b/srcpkgs/qt6-wayland/template
index 3b45f98bc7ce..da0c31b4acd5 100644
--- a/srcpkgs/qt6-wayland/template
+++ b/srcpkgs/qt6-wayland/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-wayland'
 pkgname=qt6-wayland
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="qt6-base perl pkg-config wayland-devel qt6-declarative-host-tools"
@@ -14,7 +14,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only with Qt-GPL-exception-1.0, LGPL-3.0-only, GPL-2.0-or-later"
 homepage="https://www.qt.io"
 distfiles="https://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtwayland-everywhere-src-${version}.tar.xz"
-checksum=24cf1a0af751ab1637b4815d5c5f3704483d5fa7bedbd3519e6fc020d8be135f
+checksum=ccc57fa277fc5f1c1c2c4733eae80a60996b67a067233c47809e542aa31759a3
 
 subpackages="qt6-wayland-tools qt6-wayland-devel"
 
@@ -43,11 +43,11 @@ qt6-wayland-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 4121dbb925822308397f8e02930875424567a583 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:34 +0200
Subject: [PATCH 05/27] qt6-virtualkeyboard: update to 6.5.0.

---
 srcpkgs/qt6-virtualkeyboard/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-virtualkeyboard/template b/srcpkgs/qt6-virtualkeyboard/template
index 3de6238c411f..cf7b6f2ec830 100644
--- a/srcpkgs/qt6-virtualkeyboard/template
+++ b/srcpkgs/qt6-virtualkeyboard/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-virtualkeyboard'
 pkgname=qt6-virtualkeyboard
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl pkg-config qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtvirtualkeyboard-everywhere-src-${version}.tar.xz"
-checksum=9c3c830f6e17896efaca5fdc7c191088eedd70b07490b38835856579346a4f28
+checksum=7b45de78240817e9f4b57af821e4781655463a4f5f396bbc5df0580a7d2a0fa7
 
 if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args="-DQT_BUILD_TESTS=ON"
@@ -34,11 +34,11 @@ qt6-virtualkeyboard-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From dcab7256ff031fdf99dae65cfcd213959eaa672d Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:32 +0200
Subject: [PATCH 06/27] qt6-translations: update to 6.5.0.

---
 srcpkgs/qt6-translations/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/qt6-translations/template b/srcpkgs/qt6-translations/template
index 5669ab56dc20..866f504f3b9d 100644
--- a/srcpkgs/qt6-translations/template
+++ b/srcpkgs/qt6-translations/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-translations'
 pkgname=qt6-translations
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="qt6-base qt6-tools perl"
@@ -10,4 +10,4 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qttranslations-everywhere-src-${version}.tar.xz"
-checksum=bbe0291502c2604b72fef730e1935bd22f8b921d8c473250f298a723b2a9c496
+checksum=fc85d0fd8393f518653ccada1014177a56df6e73f30f3b64eea0c2e4a0067a3d

From b606d837796027b8a38c799e23eb0e15e52f2216 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:31 +0200
Subject: [PATCH 07/27] qt6-tools: update to 6.5.0.

---
 srcpkgs/qt6-tools/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/qt6-tools/template b/srcpkgs/qt6-tools/template
index d5ad1618e3a7..c0ec27cf612c 100644
--- a/srcpkgs/qt6-tools/template
+++ b/srcpkgs/qt6-tools/template
@@ -1,7 +1,7 @@
 # Template file for 'qt6-tools'
 pkgname=qt6-tools
-version=6.4.2
-revision=2
+version=6.5.0
+revision=1
 build_style=cmake
 configure_args="-DEXTERNAL_GUMBO=ON -DLITEHTML_UTF8=ON -DUSE_ICU=ON
  -DQT_BUILD_SHARED_LIBS=ON -DQT_FEATURE_assistant=ON
@@ -16,7 +16,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only with Qt-GPL-exception-1.0, LGPL-3.0-only, GPL-2.0-or-later"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qttools-everywhere-src-${version}.tar.xz"
-checksum=a31387916184e4a5ef522d3ea841e8e931cc0f88be0824a7a354a572d5826c68
+checksum=49c33d96b0a44988be954269b8ce3d1a495b439726e03a6be7c0d50a686369c4
 
 if [ "$CROSS_BUILD" ]; then
 	configure_args+=" -DQT_FORCE_BUILD_TOOLS=TRUE"

From c088323db028048527a2101e186d3ad882c24cf3 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:29 +0200
Subject: [PATCH 08/27] qt6-svg: update to 6.5.0.

---
 srcpkgs/qt6-svg/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-svg/template b/srcpkgs/qt6-svg/template
index 06c1fcc306c9..aba275a34c86 100644
--- a/srcpkgs/qt6-svg/template
+++ b/srcpkgs/qt6-svg/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-svg'
 pkgname=qt6-svg
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="qt6-base perl"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only with Qt-GPL-exception-1.0, GPL-2.0-or-later, LGPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtsvg-everywhere-src-${version}.tar.xz"
-checksum=b746af3cb1793621d8ed7eae38d9ad5a15541dc2742031069f2ae3fe87590314
+checksum=64ca7e61f44d51e28bcbb4e0509299b53a9a7e38879e00a7fe91643196067a4f
 
 if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args="-DQT_BUILD_TESTS=ON"
@@ -31,11 +31,11 @@ qt6-svg-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 57846f66111aec553d5bbf5eadc9e8ac67aa4a55 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:28 +0200
Subject: [PATCH 09/27] qt6-shadertools: update to 6.5.0.

---
 srcpkgs/qt6-shadertools/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-shadertools/template b/srcpkgs/qt6-shadertools/template
index fbb2fba7181f..b11b281680ad 100644
--- a/srcpkgs/qt6-shadertools/template
+++ b/srcpkgs/qt6-shadertools/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-shadertools'
 pkgname=qt6-shadertools
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base"
@@ -11,7 +11,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtshadertools-everywhere-src-${version}.tar.xz"
-checksum=fa65bff84d4e9c2cb4cbf6fb098207e0e23d863dbe675eb277034a29c226a217
+checksum=86618d037f3071f1f7ac5eb7ab76ae4e6f51cfddded0a402bb9aa7f3f79f5775
 
 if [ "$CROSS_BUILD" ]; then
 	configure_args="-DQT_FORCE_BUILD_TOOLS=true"
@@ -31,12 +31,12 @@ qt6-shadertools-devel_package() {
 	pkg_install() {
 		local _f
 		vmove usr/include
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 		for _f in ${DESTDIR}/usr/lib/cmake/*; do
 			case "$_f" in
 			*ToolsTools) ;;

From f47fa9eef2a9a667e95b47988e93ca0db4ceca3a Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:27 +0200
Subject: [PATCH 10/27] qt6-serialport: update to 6.5.0.

---
 srcpkgs/qt6-serialport/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-serialport/template b/srcpkgs/qt6-serialport/template
index c100f9686fcf..77166598d01f 100644
--- a/srcpkgs/qt6-serialport/template
+++ b/srcpkgs/qt6-serialport/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-serialport'
 pkgname=qt6-serialport
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base pkg-config"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtserialport-everywhere-src-${version}.tar.xz"
-checksum=336d95919037800184b3c3de8ccb6f62954b20f3756c05adce8d5010504340fa
+checksum=9209a9f5978a4adf3a150582270432fe3b635d05513ad1a57bff5ca4954a4dff
 
 qt6-serialport-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision} qt6-base-devel>=${version}_1"
@@ -18,11 +18,11 @@ qt6-serialport-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From b182fc56c3fbd898bd792a5e923e8c9c996e9314 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:26 +0200
Subject: [PATCH 11/27] qt6-sensors: update to 6.5.0.

---
 srcpkgs/qt6-sensors/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/qt6-sensors/template b/srcpkgs/qt6-sensors/template
index 1dd0d0f3df13..5e6a1e2a7776 100644
--- a/srcpkgs/qt6-sensors/template
+++ b/srcpkgs/qt6-sensors/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-sensors'
 pkgname=qt6-sensors
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-declarative-host-tools pkg-config"
@@ -10,7 +10,7 @@ maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtsensors-everywhere-src-${version}.tar.xz"
-checksum=455619ff28a39f4caba49c9e1952fbcfafc8ffc893b437d653d5465a077ee656
+checksum=5ee434e2f4917c2d2e9b1de6cb1347c644a8c92338284efeb96202a557e72ea6
 
 post_install() {
 	rm -rf ${DESTDIR}/usr/tests
@@ -23,7 +23,7 @@ qt6-sensors-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove usr/lib/qt6/qml/QtSensors/plugins.qmltypes

From 050f9477f88eb699719b076a7ad0f28783e5e192 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:24 +0200
Subject: [PATCH 12/27] qt6-scxml: update to 6.5.0.

---
 srcpkgs/qt6-scxml/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-scxml/template b/srcpkgs/qt6-scxml/template
index 0e53ba7cf506..8f81d750b1b1 100644
--- a/srcpkgs/qt6-scxml/template
+++ b/srcpkgs/qt6-scxml/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-scxml'
 pkgname=qt6-scxml
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtscxml-everywhere-src-${version}.tar.xz"
-checksum=13b0d43459394bed2481967a1feff02b63228a82c1136a62941c0eb83ef54e7f
+checksum=f121843cb8cf4a76d621be371e80265ac28254f3c4c123b051e907c1c915766e
 
 subpackages="qt6-scxml-tools qt6-scxml-devel"
 if [ "$CROSS_BUILD" ]; then
@@ -41,11 +41,11 @@ qt6-scxml-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From b698a4ce0f4a6d4edc51ac069bff44dd3cbc35f3 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:23 +0200
Subject: [PATCH 13/27] qt6-remoteobjects: update to 6.5.0.

---
 srcpkgs/qt6-remoteobjects/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/qt6-remoteobjects/template b/srcpkgs/qt6-remoteobjects/template
index 062736349442..b37d82bed03d 100644
--- a/srcpkgs/qt6-remoteobjects/template
+++ b/srcpkgs/qt6-remoteobjects/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-remoteobjects'
 pkgname=qt6-remoteobjects
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-declarative-host-tools pkg-config"
@@ -13,7 +13,7 @@ maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtremoteobjects-everywhere-src-${version}.tar.xz"
-checksum=583c53640020d5d068eef7ae180d750120bb49e30249c2febdd173c5a7428812
+checksum=ff40b6e7afa84e44190d3b6357462569525b1e1fb0e8bfd8de16a8680825c2ae
 
 if [ "$CROSS_BUILD" ]; then
 	hostmakedepends+=" qt6-remoteobjects"
@@ -35,7 +35,7 @@ qt6-remoteobjects-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove usr/lib/qt6/qml/QtRemoteObjects/plugins.qmltypes

From b95ed46e2ad75cc792fb9f9767018ea51279b651 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:22 +0200
Subject: [PATCH 14/27] qt6-quicktimeline: update to 6.5.0.

---
 srcpkgs/qt6-quicktimeline/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/qt6-quicktimeline/template b/srcpkgs/qt6-quicktimeline/template
index f2c8e16e621e..3d24a392ff40 100644
--- a/srcpkgs/qt6-quicktimeline/template
+++ b/srcpkgs/qt6-quicktimeline/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-quicktimeline'
 pkgname=qt6-quicktimeline
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version/rc/-rc}/submodules/qtquicktimeline-everywhere-src-${version/rc/-rc}.tar.xz"
-checksum=3088abb7f478362a354ea1509d1c3c3403e3f5adfb84f3e5cf30a1f2eff09a5e
+checksum=578b3e929662b443cd4e51cb0de71e91f4ff55a512d66e0b1ea2999b5657cfbf
 
 if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args="-DQT_BUILD_TESTS=ON"

From bf74900f1db153cc035866fc671c96f6c78e8608 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:21 +0200
Subject: [PATCH 15/27] qt6-quick3d: update to 6.5.0.

---
 srcpkgs/qt6-quick3d/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-quick3d/template b/srcpkgs/qt6-quick3d/template
index e5ef91c9053c..e01cea81bebe 100644
--- a/srcpkgs/qt6-quick3d/template
+++ b/srcpkgs/qt6-quick3d/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-quick3d'
 pkgname=qt6-quick3d
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-declarative-host-tools qt6-shadertools"
@@ -11,7 +11,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtquick3d-everywhere-src-${version}.tar.xz"
-checksum=953d3b6ca6dc00563ceea33d51f25e22b1788ab5aa861941100f6a1b652926a7
+checksum=9b590429ca98b5cc8cec4df2efa3775e9f11ed8260d123e95f3c0fc37f3772a5
 
 subpackages="qt6-quick3d-tools qt6-quick3d-devel"
 if [ "$CROSS_BUILD" ]; then
@@ -50,11 +50,11 @@ qt6-quick3d-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 8ac798cb8e6ce3e3ddbb9b979a710fa7f6f95ea9 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:11 +0200
Subject: [PATCH 16/27] qt6-qt5compat: update to 6.5.0.

---
 srcpkgs/qt6-qt5compat/template | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/qt6-qt5compat/template b/srcpkgs/qt6-qt5compat/template
index ed167695b5cd..3b3d2b5dfacf 100644
--- a/srcpkgs/qt6-qt5compat/template
+++ b/srcpkgs/qt6-qt5compat/template
@@ -1,7 +1,7 @@
 # Template file for 'qt6-qt5compat'
 pkgname=qt6-qt5compat
-version=6.4.2
-revision=2
+version=6.5.0
+revision=1
 build_style=cmake
 configure_args="-DQT_FEATURE_textcodec=ON -DQT_FEATURE_codecs=ON
  -DQT_FEATURE_iconv=ON -DQT_FEATURE_big_codecs=ON"
@@ -12,7 +12,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only with Qt-GPL-exception-1.0, LGPL-3.0-only, GPL-2.0-or-later"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qt5compat-everywhere-src-${version}.tar.xz"
-checksum=f51f505c8e985b51b7d733e27d782c6fce181beef53364acb0368cc892c4b792
+checksum=a9e2f53a193fc2e131b01a2f6e7a1fbfe31309c2413fdc213e5a81c558c21261
 
 if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args="-DQT_BUILD_TESTS=ON"
@@ -28,11 +28,11 @@ qt6-qt5compat-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From efa153b838fbb50e08dd7d48c752ba593656f935 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:07 +0200
Subject: [PATCH 17/27] qt6-networkauth: update to 6.5.0.

---
 srcpkgs/qt6-networkauth/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-networkauth/template b/srcpkgs/qt6-networkauth/template
index 35d7161a3288..03bda38ed1fc 100644
--- a/srcpkgs/qt6-networkauth/template
+++ b/srcpkgs/qt6-networkauth/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-networkauth'
 pkgname=qt6-networkauth
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtnetworkauth-everywhere-src-${version}.tar.xz"
-checksum=deab17bd957d0a493bd7757bc71270918147596fb9661a886b3f1d305047c2ee
+checksum=dbcc522ab2136ebe6c9be5c7f156a3bcefa92cd19a462e33a00e94068a24413e
 
 if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args="-DQT_BUILD_TESTS=ON"
@@ -22,11 +22,11 @@ qt6-networkauth-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 5f689c4e2cccb91234a5d3e3e01f42298dda1a90 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:06 +0200
Subject: [PATCH 18/27] qt6-multimedia: update to 6.5.0.

---
 srcpkgs/qt6-multimedia/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/qt6-multimedia/template b/srcpkgs/qt6-multimedia/template
index d89e7d54eb5a..c622b7c9e8fc 100644
--- a/srcpkgs/qt6-multimedia/template
+++ b/srcpkgs/qt6-multimedia/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-multimedia'
 pkgname=qt6-multimedia
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 configure_args="-DQT_FEATURE_gstreamer=ON"
@@ -12,7 +12,7 @@ maintainer="John <me@johnnynator.dev>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtmultimedia-everywhere-src-${version}.tar.xz"
-checksum=7f2b70deeada911c8e660e2801286657f297a5d1d543d1f6bfa856f28972c776
+checksum=9480d0c73abdd01aec4899e340938cec046a3f404b9f9ed945288be574dca146
 
 if [ "$XBPS_MACHINE" = "i686" ]; then
 	CXXFLAGS="-DPFFFT_SIMD_DISABLE=1"
@@ -39,7 +39,7 @@ qt6-multimedia-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove usr/lib/qt6/qml/QtMultimedia/plugins.qmltypes

From 76cf40ce56bf150c1c961dc09533b4e86b317632 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:04 +0200
Subject: [PATCH 19/27] qt6-lottie: update to 6.5.0.

---
 srcpkgs/qt6-lottie/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-lottie/template b/srcpkgs/qt6-lottie/template
index 0e246987d078..8a37fae7f2dc 100644
--- a/srcpkgs/qt6-lottie/template
+++ b/srcpkgs/qt6-lottie/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-lottie'
 pkgname=qt6-lottie
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtlottie-everywhere-src-${version}.tar.xz"
-checksum=accc8869c72095ce5b373a30c362d21235145a79f9e270480712f861d1de1c56
+checksum=8425ecdeb9286a6c51985bdaf3936026610d04dc31eec06fee79df6442b7e246
 
 if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args="-DQT_BUILD_TESTS=ON"
@@ -30,10 +30,10 @@ qt6-lottie-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 893093d7d8aa43d268e95f27906e0a672795500a Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:04 +0200
Subject: [PATCH 20/27] qt6-location: update to 6.5.0.

---
 srcpkgs/qt6-location/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-location/template b/srcpkgs/qt6-location/template
index 429e9e02db12..89ff6498c679 100644
--- a/srcpkgs/qt6-location/template
+++ b/srcpkgs/qt6-location/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-location'
 pkgname=qt6-location
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtpositioning-everywhere-src-${version}.tar.xz"
-checksum=7f01baf5ba877af5b211c9d32e6075019f00d9d7a2ba81bb0f10ca759e9aef82
+checksum=0da7121ebfd9d2ba985ab1f2c8a3af70027c35732177ec0fc72ff7e82835c886
 
 pre_check() {
 	export QML2_IMPORT_PATH="$wrksrc/build/lib/qt6/qml"
@@ -26,11 +26,11 @@ qt6-location-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 5743f2f55064e32be9a1c8aa10effcea22799f9d Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:02 +0200
Subject: [PATCH 21/27] qt6-imageformats: update to 6.5.0.

---
 srcpkgs/qt6-imageformats/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/qt6-imageformats/template b/srcpkgs/qt6-imageformats/template
index 3ed63f6e98cd..253ff125e09e 100644
--- a/srcpkgs/qt6-imageformats/template
+++ b/srcpkgs/qt6-imageformats/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-imageformats'
 pkgname=qt6-imageformats
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-base"
@@ -10,4 +10,4 @@ maintainer="John <me@johnnynator.dev>"
 license="LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtimageformats-everywhere-src-${version}.tar.xz"
-checksum=fc5f999ae0779a67d5507956d4dd315386eb81cf6ccba632de039bb9eee11707
+checksum=f9f810cd3ac7e60132c0da33f34fcfce42e3e764d6cad3020c2f3b1b42046f78

From 5f4ca361054d596bbde0503046d09b7d1ee8b962 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:36:01 +0200
Subject: [PATCH 22/27] qt6-declarative: update to 6.5.0.

---
 .../patches/qml-broken-test.patch             | 64 -------------------
 srcpkgs/qt6-declarative/template              |  8 +--
 2 files changed, 4 insertions(+), 68 deletions(-)
 delete mode 100644 srcpkgs/qt6-declarative/patches/qml-broken-test.patch

diff --git a/srcpkgs/qt6-declarative/patches/qml-broken-test.patch b/srcpkgs/qt6-declarative/patches/qml-broken-test.patch
deleted file mode 100644
index b16412fcd5e5..000000000000
--- a/srcpkgs/qt6-declarative/patches/qml-broken-test.patch
+++ /dev/null
@@ -1,64 +0,0 @@
---- qt6-declarative-6.4.2.orig/tests/auto/quickcontrols2/controls/data/tst_rangeslider.qml
-+++ qt6-declarative-6.4.2/tests/auto/quickcontrols2/controls/data/tst_rangeslider.qml
-@@ -602,61 +602,6 @@ TestCase {
-     }
- 
-     function test_overlappingHandles() {
--        var control = createTemporaryObject(sliderComponent, testCase)
--        verify(control)
--
--        // By default, we force the second handle to be after the first in
--        // terms of stacking order *and* z value.
--        compare(control.second.handle.z, 1)
--        compare(control.first.handle.z, 0)
--        control.first.value = 0
--        control.second.value = 0
--
--        // When both handles overlap, only the handle with the higher Z value
--        // should be hovered.
--        mouseMove(control, control.second.handle.x, control.second.handle.y)
--        compare(control.second.hovered, true)
--        compare(control.first.hovered, false)
--
--        // Both are at the same position, so it doesn't matter whose coordinates we use.
--        mousePress(control, control.first.handle.x, control.first.handle.y, Qt.LeftButton)
--        verify(control.second.pressed)
--        compare(control.second.handle.z, 1)
--        compare(control.first.handle.z, 0)
--
--        // Move the second handle out of the way.
--        mouseMove(control, control.width, control.first.handle.y)
--        mouseRelease(control, control.width, control.first.handle.y, Qt.LeftButton)
--        verify(!control.second.pressed)
--        compare(control.second.value, 1.0)
--        compare(control.second.handle.z, 1)
--        compare(control.first.handle.z, 0)
--
--        // The first handle should not be hovered.
--        compare(control.first.hovered, false)
--
--        // Move the first handle on top of the second.
--        mousePress(control, control.first.handle.x, control.first.handle.y, Qt.LeftButton)
--        verify(control.first.pressed)
--        compare(control.first.handle.z, 1)
--        compare(control.second.handle.z, 0)
--
--        mouseMove(control, control.width, control.first.handle.y)
--        mouseRelease(control, control.width, control.first.handle.y, Qt.LeftButton)
--        verify(!control.first.pressed)
--        compare(control.first.handle.z, 1)
--        compare(control.second.handle.z, 0)
--
--        // The most recently pressed handle (the first) should have the higher z value.
--        mousePress(control, control.first.handle.x, control.first.handle.y, Qt.LeftButton)
--        verify(control.first.pressed)
--        compare(control.first.handle.z, 1)
--        compare(control.second.handle.z, 0)
--
--        mouseRelease(control, control.first.handle.x, control.first.handle.y, Qt.LeftButton)
--        verify(!control.first.pressed)
--        compare(control.first.handle.z, 1)
--        compare(control.second.handle.z, 0)
-     }
- 
-     function test_keys_data() {
diff --git a/srcpkgs/qt6-declarative/template b/srcpkgs/qt6-declarative/template
index a3d921f9ea19..22e58f1578e3 100644
--- a/srcpkgs/qt6-declarative/template
+++ b/srcpkgs/qt6-declarative/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-declarative'
 pkgname=qt6-declarative
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 configure_args="-DQT_BUILD_TESTS=ON"
@@ -11,7 +11,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only with Qt-GPL-exception-1.0, LGPL-3.0-only, GPL-2.0-or-later"
 homepage="https://www.qt.io"
 distfiles="https://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtdeclarative-everywhere-src-${version}.tar.xz"
-checksum=a4bdd983de4e9cbca0f85b767dbdd8598711554e370a06da8f509ded4430f5bd
+checksum=f7d631cd8ebc1491dad0f30f1b5326ae812bee4ad706e61157816a82bf588c97
 replaces="qt6-quickcontrols2>=0"
 
 if [ "$CROSS_BUILD" ]; then
@@ -96,13 +96,13 @@ qt6-declarative-devel_package() {
 	replaces="qt6-quickcontrols2-devel>=0"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.a"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 		for _f in ${DESTDIR}/usr/lib/cmake/*; do
 			case "$_f" in
 			*Tools) ;;

From e57866d929b877a133d442731ac29dfb4836ce25 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:35:55 +0200
Subject: [PATCH 23/27] qt6-connectivity: update to 6.5.0.

---
 srcpkgs/qt6-connectivity/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-connectivity/template b/srcpkgs/qt6-connectivity/template
index 66fce5c0397b..5705416ba440 100644
--- a/srcpkgs/qt6-connectivity/template
+++ b/srcpkgs/qt6-connectivity/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-connectivity'
 pkgname=qt6-connectivity
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="GPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtconnectivity-everywhere-src-${version}.tar.xz"
-checksum=8c9b44b239e42b4c4d6fca5f427904e688890b2a1bfb6bcbe5e6e2afcdc5d7af
+checksum=e7636653bab986361a77b23451d966c85591428c0422741890ef0fb197698f06
 
 qt6-connectivity-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision}
@@ -19,11 +19,11 @@ qt6-connectivity-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From 36b8027d204508d9f04641979ca733aab778cf6f Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:35:54 +0200
Subject: [PATCH 24/27] qt6-charts: update to 6.5.0.

---
 srcpkgs/qt6-charts/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qt6-charts/template b/srcpkgs/qt6-charts/template
index 57ce88143367..2c00ac9a44a1 100644
--- a/srcpkgs/qt6-charts/template
+++ b/srcpkgs/qt6-charts/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-charts'
 pkgname=qt6-charts
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-declarative-host-tools"
@@ -10,7 +10,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtcharts-everywhere-src-${version}.tar.xz"
-checksum=a1a7c0e08c8870cf97d1c3a2eb3f37681aaed00a63b5b2f70bdf2da878d0a9aa
+checksum=fccd1d50a7f56de011f7668e0e90f022316bd4065fa7f91b078579403e2e26a8
 
 pre_check() {
 	export QML2_IMPORT_PATH="$wrksrc/build/lib/qt6/qml"
@@ -26,11 +26,11 @@ qt6-charts-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/metatypes
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/qt6/mkspecs
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 	}
 }

From bc6b608a8b569df2304e3cd5fdf7c589a45d69d8 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:35:53 +0200
Subject: [PATCH 25/27] qt6-base: update to 6.5.0.

---
 srcpkgs/qt6-base/patches/feenableexcept.patch | 13 -------------
 srcpkgs/qt6-base/template                     | 16 +++++++++-------
 2 files changed, 9 insertions(+), 20 deletions(-)
 delete mode 100644 srcpkgs/qt6-base/patches/feenableexcept.patch

diff --git a/srcpkgs/qt6-base/patches/feenableexcept.patch b/srcpkgs/qt6-base/patches/feenableexcept.patch
deleted file mode 100644
index 9b268bc95d3e..000000000000
--- a/srcpkgs/qt6-base/patches/feenableexcept.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- qt6-base-6.4.2.orig/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
-+++ qt6-base-6.4.2/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
-@@ -1502,8 +1502,10 @@ void tst_QLocale::fpExceptions()
-     fenv_t envp;
-     fegetenv(&envp);
-     feclearexcept(FE_ALL_EXCEPT);
-+#ifdef __GLIBC__
-     feenableexcept(FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INVALID);
- #endif
-+#endif
- 
-     QString::number(1000.1245);
-     QString::number(1.1);
diff --git a/srcpkgs/qt6-base/template b/srcpkgs/qt6-base/template
index dfde60bdb438..26c3274641e5 100644
--- a/srcpkgs/qt6-base/template
+++ b/srcpkgs/qt6-base/template
@@ -1,7 +1,7 @@
 # Template file for 'qt6-base'
 pkgname=qt6-base
-version=6.4.2
-revision=3
+version=6.5.0
+revision=1
 build_style=cmake
 configure_args="-DINSTALL_DATADIR=share/qt6
  -DINSTALL_ARCHDATADIR=lib/qt6
@@ -26,13 +26,13 @@ makedepends="zlib-devel libzstd-devel dbus-devel
  libmariadbclient-devel postgresql-libs-devel libatomic-devel
  unixodbc-devel cups-devel libproxy-devel brotli-devel
  sqlite-devel Vulkan-Headers mit-krb5-devel vulkan-loader libb2-devel
- libXevie-devel libXcursor-devel"
+ libXevie-devel xcb-util-cursor-devel"
 short_desc="Cross-platform application and UI framework (QT6)"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only WITH Qt-GPL-exception-1.0, LGPL-3.0-only, GPL-2.0-or-later"
 homepage="https://www.qt.io"
 distfiles="https://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtbase-everywhere-src-${version}.tar.xz"
-checksum=a88bc6cedbb34878a49a622baa79cace78cfbad4f95fdbd3656ddb21c705525d
+checksum=fde1aa7b4fbe64ec1b4fc576a57f4688ad1453d2fab59cbadd948a10a6eaf5ef
 python_version=3
 
 if [ "$CROSS_BUILD" ]; then
@@ -63,7 +63,9 @@ do_check() {
 		tst_qgraphicsview tst_qapplication tst_qfontcombobox
 		tst_qlineedit tst_qmenubar tst_qopenglwidget
 		tst_qx11info tst_qcomplextext
-		tst_qaddpreroutine tst_qtextcursor"
+		tst_qaddpreroutine tst_qtextcursor
+		test_widgets_app_deployment tst_qnetworkinterface
+		tst_qgraphicsproxywidget"
 	# Unknown platform linux-g++ :/
 	failing_tests+=" mockplugins test_import_plugins
 	 test_static_resources test_generating_cpp_exports"
@@ -282,13 +284,13 @@ qt6-base-devel_package() {
 	pkg_install() {
 		local _f
 		vmove usr/include
-		vmove usr/lib/metatypes
 		vmove usr/lib/pkgconfig
+		vmove usr/lib/qt6/metatypes
 		vmove usr/lib/qt6/mkspecs/modules
 		vmove "usr/lib/*.a"
 		vmove "usr/lib/*.so"
 		vmove "usr/lib/*.prl"
-		vmove usr/share/qt6/modules
+		vmove usr/lib/qt6/modules
 		for _f in ${DESTDIR}/usr/lib/cmake/*; do
 			case "$_f" in
 			*Tools|*HostInfo) ;;

From 14f2b131acc76e793d3b829b0959c83f75b891b6 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Mon, 3 Apr 2023 19:35:44 +0200
Subject: [PATCH 26/27] qt6-3d: update to 6.5.0.

---
 srcpkgs/qt6-3d/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/qt6-3d/template b/srcpkgs/qt6-3d/template
index 95519668d1cc..4b7fbee0562e 100644
--- a/srcpkgs/qt6-3d/template
+++ b/srcpkgs/qt6-3d/template
@@ -1,6 +1,6 @@
 # Template file for 'qt6-3d'
 pkgname=qt6-3d
-version=6.4.2
+version=6.5.0
 revision=1
 build_style=cmake
 hostmakedepends="perl qt6-declarative-host-tools"
@@ -11,7 +11,7 @@ maintainer="John <me@johnnynator.dev>"
 license="(LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND GPL-3.0-only with Qt-GPL-exception-1.0"
 homepage="https://qt.io/"
 distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qt3d-everywhere-src-${version}.tar.xz"
-checksum=456c24c3d3840273e720b79fe8fed452fa889b54cbae6b45db1d1ded4da37341
+checksum=20b250023244f21dfbec5c007bac805d4494fa463a6dd27538afb1a81b230816
 
 qt6-3d-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision}"

From 1d8cc778ee6b5647d4cb58f4424db49aa0e4aac4 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Thu, 6 Apr 2023 11:28:32 +0200
Subject: [PATCH 27/27] telegram-desktop: rebuild against qt6.5.0

---
 srcpkgs/telegram-desktop/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/telegram-desktop/template b/srcpkgs/telegram-desktop/template
index aae9f3135100..7943b36f0b8a 100644
--- a/srcpkgs/telegram-desktop/template
+++ b/srcpkgs/telegram-desktop/template
@@ -1,7 +1,7 @@
 # Template file for 'telegram-desktop'
 pkgname=telegram-desktop
 version=4.6.5
-revision=1
+revision=2
 build_style=cmake
 build_helper="qemu"
 configure_args="-DTDESKTOP_API_ID=209235

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Qt6: Update to 6.5.0
  2023-04-05 22:13 [PR PATCH] Qt6: Update to 6.5.0 Johnnynator
                   ` (2 preceding siblings ...)
  2023-04-06 13:21 ` Johnnynator
@ 2023-05-14 18:35 ` Johnnynator
  2023-05-14 18:35 ` [PR PATCH] [Closed]: " Johnnynator
  4 siblings, 0 replies; 6+ messages in thread
From: Johnnynator @ 2023-05-14 18:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 152 bytes --]

New comment by Johnnynator on void-packages repository

https://github.com/void-linux/void-packages/pull/43293#issuecomment-1546971384

Comment:
merged

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Closed]: Qt6: Update to 6.5.0
  2023-04-05 22:13 [PR PATCH] Qt6: Update to 6.5.0 Johnnynator
                   ` (3 preceding siblings ...)
  2023-05-14 18:35 ` Johnnynator
@ 2023-05-14 18:35 ` Johnnynator
  4 siblings, 0 replies; 6+ messages in thread
From: Johnnynator @ 2023-05-14 18:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2029 bytes --]

There's a closed pull request on the void-packages repository

Qt6: Update to 6.5.0
https://github.com/void-linux/void-packages/pull/43293

Description:
- qt6-websockets: update to 6.5.0.
- qt6-webengine: update to 6.5.0.
- qt6-webchannel: update to 6.5.0.
- qt6-wayland: update to 6.5.0.
- qt6-virtualkeyboard: update to 6.5.0.
- qt6-translations: update to 6.5.0.
- qt6-tools: update to 6.5.0.
- qt6-svg: update to 6.5.0.
- qt6-shadertools: update to 6.5.0.
- qt6-serialport: update to 6.5.0.
- qt6-sensors: update to 6.5.0.
- qt6-scxml: update to 6.5.0.
- qt6-remoteobjects: update to 6.5.0.
- qt6-quicktimeline: update to 6.5.0.
- qt6-quick3d: update to 6.5.0.
- qt6-qt5compat: update to 6.5.0.
- qt6-networkauth: update to 6.5.0.
- qt6-multimedia: update to 6.5.0.
- qt6-lottie: update to 6.5.0.
- qt6-location: update to 6.5.0.
- qt6-imageformats: update to 6.5.0.
- qt6-declarative: update to 6.5.0.
- qt6-connectivity: update to 6.5.0.
- qt6-charts: update to 6.5.0.
- qt6-base: update to 6.5.0.
- qt6-3d: update to 6.5.0.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86_64
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  -  - [x] riscv64
  -  - [x] x86_64-musl
  -  - [x] aarch64

[ci skip]
[skip ci]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-05-14 18:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-05 22:13 [PR PATCH] Qt6: Update to 6.5.0 Johnnynator
2023-04-05 22:31 ` [PR PATCH] [Updated] " Johnnynator
2023-04-06 11:23 ` Johnnynator
2023-04-06 13:21 ` Johnnynator
2023-05-14 18:35 ` Johnnynator
2023-05-14 18:35 ` [PR PATCH] [Closed]: " Johnnynator

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).