Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: qt6-serialport-6.2.0
@ 2021-10-03 13:27 Johnnynator
  2021-10-16  0:34 ` ericonr
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Johnnynator @ 2021-10-03 13:27 UTC (permalink / raw)
  To: ml

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

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

https://github.com/Johnnynator/void-packages qt6.2-new-modules
https://github.com/void-linux/void-packages/pull/33294

New package: qt6-serialport-6.2.0
- New package: qt6-serialport-6.2.0
- New package: qt6-websockets-6.2.0
- New package: qt6-webchannel-6.2.0
- New package: qt6-multimedia-6.2.0
- New package: qt6-webengine-6.2.0
- New package: qt6-location-6.2.0

<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

[ci skip]

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

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

From 2dad16967681e7edcbab3a2aec359493d8144e70 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Sat, 26 Jun 2021 12:16:54 +0200
Subject: [PATCH 1/6] New package: qt6-serialport-6.2.0

---
 common/shlibs                   |  1 +
 srcpkgs/qt6-serialport-devel    |  1 +
 srcpkgs/qt6-serialport/template | 27 +++++++++++++++++++++++++++
 3 files changed, 29 insertions(+)
 create mode 120000 srcpkgs/qt6-serialport-devel
 create mode 100644 srcpkgs/qt6-serialport/template

diff --git a/common/shlibs b/common/shlibs
index 7e5289f58f66..9c4c2e0bea4f 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2052,6 +2052,7 @@ libQt6Help.so.6 qt6-tools-6.1.0_1
 libQt6UiTools.so.6 qt6-tools-6.1.0_1
 libQt6HunspellInputMethod.so.6 qt6-virtualkeyboard-6.1.0_1
 libQt6VirtualKeyboard.so.6 qt6-virtualkeyboard-6.1.0_1
+libQt6SerialPort.so.6 qt6-serialport-6.2.0alpha_1
 libnpth.so.0 npth-1.1_1
 libnpupnp.so.4 libnpupnp-4.0.2_1
 libglfw.so.3 glfw-3.0.4_1
diff --git a/srcpkgs/qt6-serialport-devel b/srcpkgs/qt6-serialport-devel
new file mode 120000
index 000000000000..f6a498cf2653
--- /dev/null
+++ b/srcpkgs/qt6-serialport-devel
@@ -0,0 +1 @@
+qt6-serialport
\ No newline at end of file
diff --git a/srcpkgs/qt6-serialport/template b/srcpkgs/qt6-serialport/template
new file mode 100644
index 000000000000..5813afa55f5f
--- /dev/null
+++ b/srcpkgs/qt6-serialport/template
@@ -0,0 +1,27 @@
+# Template file for 'qt6-serialport'
+pkgname=qt6-serialport
+version=6.2.0
+revision=1
+wrksrc="qtserialport-everywhere-src-${version}"
+build_style=cmake
+configure_args="-DQT_HOST_PATH=/usr"
+hostmakedepends="perl qt6-base-devel pkg-config"
+makedepends="qt6-base-devel"
+short_desc="Cross-platform application and UI framework - serialport"
+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=3fb3c0c37602e6fee8c5e386b61d14f4d7a820cf9e053c6952ad6e860ce05248
+
+qt6-serialport-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision} qt6-base-devel>=${version}_1"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/qt6/mkspecs
+		vmove "usr/lib/*.so"
+		vmove "usr/lib/*.prl"
+	}
+}

From fdccd971d6346c92e8a6b577be0c8758cd631ce3 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Sat, 26 Jun 2021 12:23:48 +0200
Subject: [PATCH 2/6] New package: qt6-websockets-6.2.0

---
 common/shlibs                   |  1 +
 srcpkgs/qt6-websockets-devel    |  1 +
 srcpkgs/qt6-websockets/template | 27 +++++++++++++++++++++++++++
 3 files changed, 29 insertions(+)
 create mode 120000 srcpkgs/qt6-websockets-devel
 create mode 100644 srcpkgs/qt6-websockets/template

diff --git a/common/shlibs b/common/shlibs
index 9c4c2e0bea4f..d0d0d356edd9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2053,6 +2053,7 @@ libQt6UiTools.so.6 qt6-tools-6.1.0_1
 libQt6HunspellInputMethod.so.6 qt6-virtualkeyboard-6.1.0_1
 libQt6VirtualKeyboard.so.6 qt6-virtualkeyboard-6.1.0_1
 libQt6SerialPort.so.6 qt6-serialport-6.2.0alpha_1
+libQt6WebSockets.so.6 qt6-websockets-6.2.0alpha_1
 libnpth.so.0 npth-1.1_1
 libnpupnp.so.4 libnpupnp-4.0.2_1
 libglfw.so.3 glfw-3.0.4_1
diff --git a/srcpkgs/qt6-websockets-devel b/srcpkgs/qt6-websockets-devel
new file mode 120000
index 000000000000..a3c674e42954
--- /dev/null
+++ b/srcpkgs/qt6-websockets-devel
@@ -0,0 +1 @@
+qt6-websockets
\ No newline at end of file
diff --git a/srcpkgs/qt6-websockets/template b/srcpkgs/qt6-websockets/template
new file mode 100644
index 000000000000..f0614cba8596
--- /dev/null
+++ b/srcpkgs/qt6-websockets/template
@@ -0,0 +1,27 @@
+# Template file for 'qt6-websockets'
+pkgname=qt6-websockets
+version=6.2.0
+revision=1
+wrksrc="qtwebsockets-everywhere-src-${version}"
+build_style=cmake
+configure_args="-DQT_HOST_PATH=/usr"
+hostmakedepends="perl qt6-base-devel qt6-declarative-devel"
+makedepends="qt6-base-devel qt6-declarative-devel"
+short_desc="Cross-platform application and UI framework - websockets"
+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=4278a1aa961f4b9c752db38ee3f5319b56f1033d0e6982eabbba6eaffb14c59f
+
+qt6-websockets-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision} qt6-base-devel>=${version}_1"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/qt6/mkspecs
+		vmove "usr/lib/*.so"
+		vmove "usr/lib/*.prl"
+	}
+}

From 7f91365221f7b34583043cb91a8bb25a652571b4 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Sat, 26 Jun 2021 12:25:04 +0200
Subject: [PATCH 3/6] New package: qt6-webchannel-6.2.0

---
 common/shlibs                   |  1 +
 srcpkgs/qt6-webchannel-devel    |  1 +
 srcpkgs/qt6-webchannel/template | 28 ++++++++++++++++++++++++++++
 3 files changed, 30 insertions(+)
 create mode 120000 srcpkgs/qt6-webchannel-devel
 create mode 100644 srcpkgs/qt6-webchannel/template

diff --git a/common/shlibs b/common/shlibs
index d0d0d356edd9..b45df9460f6b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2054,6 +2054,7 @@ libQt6HunspellInputMethod.so.6 qt6-virtualkeyboard-6.1.0_1
 libQt6VirtualKeyboard.so.6 qt6-virtualkeyboard-6.1.0_1
 libQt6SerialPort.so.6 qt6-serialport-6.2.0alpha_1
 libQt6WebSockets.so.6 qt6-websockets-6.2.0alpha_1
+libQt6WebChannel.so.6 qt6-webchannel-6.2.0alpha_1
 libnpth.so.0 npth-1.1_1
 libnpupnp.so.4 libnpupnp-4.0.2_1
 libglfw.so.3 glfw-3.0.4_1
diff --git a/srcpkgs/qt6-webchannel-devel b/srcpkgs/qt6-webchannel-devel
new file mode 120000
index 000000000000..03e8b23d785d
--- /dev/null
+++ b/srcpkgs/qt6-webchannel-devel
@@ -0,0 +1 @@
+qt6-webchannel
\ No newline at end of file
diff --git a/srcpkgs/qt6-webchannel/template b/srcpkgs/qt6-webchannel/template
new file mode 100644
index 000000000000..a27c8b044843
--- /dev/null
+++ b/srcpkgs/qt6-webchannel/template
@@ -0,0 +1,28 @@
+# Template file for 'qt6-webchannel'
+pkgname=qt6-webchannel
+version=6.2.0
+revision=1
+wrksrc="qtwebchannel-everywhere-src-${version}"
+build_style=cmake
+configure_args="-DQT_HOST_PATH=/usr"
+hostmakedepends="perl qt6-base-devel qt6-declarative-devel"
+makedepends="qt6-base-devel qt6-declarative-devel qt6-websockets-devel"
+short_desc="Cross-platform application and UI framework - webchannel"
+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=518391ed74b087da3c15058c9c17760204425599ef3ffe61b1b73edc2028c171
+
+qt6-webchannel-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision} qt6-base-devel>=${version}_1
+	 qt6-websockets-devel>=${version}_1"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/qt6/mkspecs
+		vmove "usr/lib/*.so"
+		vmove "usr/lib/*.prl"
+	}
+}

From 66ce16c9e5f9f86dfaa2abfb65b31dd18ee3210e Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Sat, 26 Jun 2021 21:08:25 +0200
Subject: [PATCH 4/6] New package: qt6-multimedia-6.2.0

---
 srcpkgs/qt6-multimedia-devel    |  1 +
 srcpkgs/qt6-multimedia/template | 29 +++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 120000 srcpkgs/qt6-multimedia-devel
 create mode 100644 srcpkgs/qt6-multimedia/template

diff --git a/srcpkgs/qt6-multimedia-devel b/srcpkgs/qt6-multimedia-devel
new file mode 120000
index 000000000000..9343446502d0
--- /dev/null
+++ b/srcpkgs/qt6-multimedia-devel
@@ -0,0 +1 @@
+qt6-multimedia
\ No newline at end of file
diff --git a/srcpkgs/qt6-multimedia/template b/srcpkgs/qt6-multimedia/template
new file mode 100644
index 000000000000..9631419dd915
--- /dev/null
+++ b/srcpkgs/qt6-multimedia/template
@@ -0,0 +1,29 @@
+# Template file for 'qt6-multimedia'
+pkgname=qt6-multimedia
+version=6.2.0
+revision=1
+wrksrc="qtmultimedia-everywhere-src-${version}"
+build_style=cmake
+configure_args="-DQT_HOST_PATH=/usr -DQT_FEATURE_gstreamer=ON"
+hostmakedepends="perl qt6-declarative-devel pkg-config
+ qt6-shadertools-devel"
+makedepends="qt6-declarative-devel
+ qt6-shadertools-devel libglib-devel gst-plugins-base1-devel"
+short_desc="Cross-platform application and UI framework - multimedia"
+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=f12b96e6da2ebfe84105c0cb6e96fbc6bda012de8998ec5c96b58c85dcb40b4f
+
+qt6-multimedia-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision} qt6-base-devel>=${version}_1"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/qt6/mkspecs
+		vmove "usr/lib/*.so"
+		vmove "usr/lib/*.prl"
+	}
+}

From 7622dd83409ec8f909efcd802cb7aece5fec00ce Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Sun, 27 Jun 2021 00:35:33 +0200
Subject: [PATCH 5/6] New package: qt6-webengine-6.2.0

---
 srcpkgs/qt6-webengine-devel                   |   1 +
 srcpkgs/qt6-webengine/files/resolv_compat.h   |  29 +++++
 .../patches/0001-mus-cstring.patch            |  10 ++
 .../patches/0002-None-no-debug.patch          |  11 ++
 ...reg.h-to-get-__WORDSIZE-on-musl-libc.patch |  26 +++++
 .../patches/0003-musl-dispatch-to-musl.patch  | 103 +++++++++++++++++
 .../patches/0004-musl-no-mallinfo.patch       |  39 +++++++
 .../patches/0006-musl-pread-pwrite.patch      |  18 +++
 .../patches/0008-musl-resolve.patch           |  26 +++++
 .../patches/0009-musl-siginfo_t.patch         |  18 +++
 .../patches/0010-musl-stackstart.patch        |  20 ++++
 .../patches/0011-musl-sandbox.patch           |  71 ++++++++++++
 ...0012-musl-chromium-default-stacksize.patch |  15 +++
 .../0014-musl-cross-no-asm_ptrace_h.patch     |  30 +++++
 .../patches/0015-no-glibc-cmake-check.patch   |  17 +++
 .../patches/0016-qt-musl-execinfo.patch       | 106 ++++++++++++++++++
 .../0017-qt-musl-thread-stacksize.patch       |  26 +++++
 .../patches/0018-sandbox-membarrier.patch     |  60 ++++++++++
 .../patches/0020-msgvec-push_back.patch       |  14 +++
 .../patches/0021-sandbox-sched_getparam.patch |  26 +++++
 .../0022-canonicalize-file-name-musl.patch    |  11 ++
 .../patches/0089-enable-ppc64.patch           |  49 ++++++++
 .../qt6-webengine/patches/0110-size_t.patch   |  16 +++
 .../patches/0111-armv7l-neon.patch            |  10 ++
 .../patches/0112-arm-user_vfp.patch           |  20 ++++
 .../patches/0113-arm-elf_auxv_t.patch         |  18 +++
 .../qt6-webengine/patches/0114-time64.patch   |  89 +++++++++++++++
 .../qt6-webengine/patches/cross-hack.patch    |  10 ++
 .../patches/pthread_getname_np-mus.patch      |  15 +++
 srcpkgs/qt6-webengine/template                |  87 ++++++++++++++
 30 files changed, 991 insertions(+)
 create mode 120000 srcpkgs/qt6-webengine-devel
 create mode 100644 srcpkgs/qt6-webengine/files/resolv_compat.h
 create mode 100644 srcpkgs/qt6-webengine/patches/0001-mus-cstring.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0002-None-no-debug.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0002-include-sys-reg.h-to-get-__WORDSIZE-on-musl-libc.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0003-musl-dispatch-to-musl.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0004-musl-no-mallinfo.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0006-musl-pread-pwrite.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0008-musl-resolve.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0009-musl-siginfo_t.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0010-musl-stackstart.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0011-musl-sandbox.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0012-musl-chromium-default-stacksize.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0014-musl-cross-no-asm_ptrace_h.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0015-no-glibc-cmake-check.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0016-qt-musl-execinfo.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0017-qt-musl-thread-stacksize.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0018-sandbox-membarrier.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0020-msgvec-push_back.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0021-sandbox-sched_getparam.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0022-canonicalize-file-name-musl.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0089-enable-ppc64.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0110-size_t.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0111-armv7l-neon.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0112-arm-user_vfp.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0113-arm-elf_auxv_t.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/0114-time64.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/cross-hack.patch
 create mode 100644 srcpkgs/qt6-webengine/patches/pthread_getname_np-mus.patch
 create mode 100644 srcpkgs/qt6-webengine/template

diff --git a/srcpkgs/qt6-webengine-devel b/srcpkgs/qt6-webengine-devel
new file mode 120000
index 000000000000..8e4d1b99c587
--- /dev/null
+++ b/srcpkgs/qt6-webengine-devel
@@ -0,0 +1 @@
+qt6-webengine
\ No newline at end of file
diff --git a/srcpkgs/qt6-webengine/files/resolv_compat.h b/srcpkgs/qt6-webengine/files/resolv_compat.h
new file mode 100644
index 000000000000..4f0e852a19d0
--- /dev/null
+++ b/srcpkgs/qt6-webengine/files/resolv_compat.h
@@ -0,0 +1,29 @@
+#if !defined(__GLIBC__)
+/***************************************************************************
+ * resolv_compat.h
+ *
+ * Mimick GLIBC's res_ninit() and res_nclose() for musl libc
+ * Note: res_init() is actually deprecated according to
+ * http://docs.oracle.com/cd/E36784_01/html/E36875/res-nclose-3resolv.html
+ **************************************************************************/
+#include <string.h>
+
+static inline int res_ninit(res_state statp)
+{
+	int rc = res_init();
+	if (statp != &_res) {
+		memcpy(statp, &_res, sizeof(*statp));
+	}
+	return rc;
+}
+
+static inline int res_nclose(res_state statp)
+{
+	if (!statp)
+		return -1;
+	if (statp != &_res) {
+		memset(statp, 0, sizeof(*statp));
+	}
+	return 0;
+}
+#endif
diff --git a/srcpkgs/qt6-webengine/patches/0001-mus-cstring.patch b/srcpkgs/qt6-webengine/patches/0001-mus-cstring.patch
new file mode 100644
index 000000000000..d4b22c77ce96
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0001-mus-cstring.patch
@@ -0,0 +1,10 @@
+--- a/src/3rdparty/chromium/mojo/public/cpp/platform/named_platform_channel_posix.cc	2021-03-08 10:30:42.504006604 +0100
++++ -	2021-03-08 10:31:27.415366585 +0100
+@@ -8,6 +8,7 @@
+ #include <sys/socket.h>
+ #include <sys/un.h>
+ #include <unistd.h>
++#include <cstring>
+ 
+ #include "base/files/file_util.h"
+ #include "base/files/scoped_file.h"
diff --git a/srcpkgs/qt6-webengine/patches/0002-None-no-debug.patch b/srcpkgs/qt6-webengine/patches/0002-None-no-debug.patch
new file mode 100644
index 000000000000..b3ee486e3d25
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0002-None-no-debug.patch
@@ -0,0 +1,11 @@
+--- a/cmake/Functions.cmake
++++ b/cmake/Functions.cmake
+@@ -682,6 +682,8 @@ macro(append_build_type_setup)
+         endif()
+     elseif(${config} STREQUAL "MinSizeRel")
+         list(APPEND gnArgArg is_debug=false symbol_level=0 optimize_for_size=true)
++    elseif(${config} STREQUAL "None")
++        list(APPEND gnArgArg is_debug=false symbol_level=0)
+     endif()
+     if(FEATURE_developer_build OR (${config} STREQUAL "Debug"))
+         list(APPEND gnArgArg
diff --git a/srcpkgs/qt6-webengine/patches/0002-include-sys-reg.h-to-get-__WORDSIZE-on-musl-libc.patch b/srcpkgs/qt6-webengine/patches/0002-include-sys-reg.h-to-get-__WORDSIZE-on-musl-libc.patch
new file mode 100644
index 000000000000..da4160b21bd3
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0002-include-sys-reg.h-to-get-__WORDSIZE-on-musl-libc.patch
@@ -0,0 +1,26 @@
+From 9001c54d6b974449174a8cee8f3f5d78a9bd6c9e Mon Sep 17 00:00:00 2001
+From: Felix Janda <felix.janda@posteo.de>
+Date: Sun, 1 Feb 2015 14:26:52 +0100
+Subject: [PATCH 3/6] include <sys/reg.h> to get __WORDSIZE on musl libc
+
+---
+ qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/common/linux/elf_core_dump.h b/src/common/linux/elf_core_dump.h
+index d03c7a8..02eb391 100644
+--- qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h
++++ qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h
+@@ -36,6 +36,9 @@
+ #include <elf.h>
+ #include <link.h>
+ #include <stddef.h>
++#ifndef __GLIBC__
++#include <sys/reg.h>
++#endif
+ 
+ #include "common/memory_range.h"
+ 
+-- 
+2.0.5
+
diff --git a/srcpkgs/qt6-webengine/patches/0003-musl-dispatch-to-musl.patch b/srcpkgs/qt6-webengine/patches/0003-musl-dispatch-to-musl.patch
new file mode 100644
index 000000000000..de32a3dab95c
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0003-musl-dispatch-to-musl.patch
@@ -0,0 +1,103 @@
+--- qtwebengine/src/3rdparty/chromium/base/allocator/allocator_shim_default_dispatch_to_glibc.cc
+--- qtwebengine/src/3rdparty/chromium/base/allocator/allocator_shim_default_dispatch_to_glibc.cc
+@@ -6,6 +6,7 @@
+ 
+ #include <malloc.h>
+ 
++#if defined(__GLIBC__)
+ // This translation unit defines a default dispatch for the allocator shim which
+ // routes allocations to libc functions.
+ // The code here is strongly inspired from tcmalloc's libc_override_glibc.h.
+@@ -73,3 +74,92 @@ const AllocatorDispatch AllocatorDispatch::default_dispatch = {
+     nullptr,               /* free_definite_size_function */
+     nullptr,               /* next */
+ };
++
++#else // defined(__GLIBC__)
++
++#include <dlfcn.h>
++
++extern "C" {
++// Declare function pointers to the memory functions
++typedef void* (*t_libc_malloc)(size_t size);
++typedef void* (*t_libc_calloc)(size_t n, size_t size);
++typedef void* (*t_libc_realloc)(void* address, size_t size);
++typedef void* (*t_libc_memalign)(size_t alignment, size_t size);
++typedef void (*t_libc_free)(void* ptr);
++typedef size_t (*t_libc_malloc_usable_size)(void* ptr);
++
++// Static instances of pointers to libc.so dl symbols
++static t_libc_malloc libc_malloc = NULL;
++static t_libc_calloc libc_calloc = NULL;
++static t_libc_realloc libc_realloc = NULL;
++static t_libc_memalign libc_memalign = NULL;
++static t_libc_free libc_free = NULL;
++static t_libc_malloc_usable_size libc_malloc_usable_size = NULL;
++
++// resolve the symbols in libc.so
++void musl_libc_memory_init(void)
++{
++  libc_malloc = (t_libc_malloc) dlsym(RTLD_NEXT, "malloc");
++  libc_calloc = (t_libc_calloc) dlsym(RTLD_NEXT, "calloc");
++  libc_realloc = (t_libc_realloc) dlsym(RTLD_NEXT, "realloc");
++  libc_memalign = (t_libc_memalign) dlsym(RTLD_NEXT, "memalign");
++  libc_free = (t_libc_free) dlsym(RTLD_NEXT, "free");
++  libc_malloc_usable_size = (t_libc_malloc_usable_size) dlsym(RTLD_NEXT, "malloc_usable_size");
++}
++}  // extern "C"
++
++namespace {
++
++using base::allocator::AllocatorDispatch;
++
++void* MuslMalloc(const AllocatorDispatch*, size_t size, void* context) {
++  if (!libc_malloc)
++    musl_libc_memory_init();
++  return (*libc_malloc)(size);
++}
++
++void* MuslCalloc(const AllocatorDispatch*, size_t n, size_t size, void* context) {
++  if (!libc_calloc)
++    musl_libc_memory_init();
++  return (*libc_calloc)(n, size);
++}
++
++void* MuslRealloc(const AllocatorDispatch*, void* address, size_t size, void* context) {
++  if (!libc_realloc)
++    musl_libc_memory_init();
++  return (*libc_realloc)(address, size);
++}
++
++void* MuslMemalign(const AllocatorDispatch*, size_t alignment, size_t size, void* context) {
++  if (!libc_memalign)
++    musl_libc_memory_init();
++  return (*libc_memalign)(alignment, size);
++}
++
++void MuslFree(const AllocatorDispatch*, void* address, void* context) {
++  if (!libc_free)
++    musl_libc_memory_init();
++  (*libc_free)(address);
++}
++
++size_t MuslGetSizeEstimate(const AllocatorDispatch*, void* address, void* context) {
++  // TODO(siggi, primiano): malloc_usable_size may need redirection in the
++  //     presence of interposing shims that divert allocations.
++  if (!libc_malloc_usable_size)
++    musl_libc_memory_init();
++  return (*libc_malloc_usable_size)(address);
++}
++
++}  // namespace
++
++const AllocatorDispatch AllocatorDispatch::default_dispatch = {
++    &MuslMalloc,           /* alloc_function */
++    &MuslCalloc,           /* alloc_zero_initialized_function */
++    &MuslMemalign,         /* alloc_aligned_function */
++    &MuslRealloc,          /* realloc_function */
++    &MuslFree,             /* free_function */
++    &MuslGetSizeEstimate,  /* get_size_estimate_function */
++    nullptr,               /* next */
++};
++
++#endif
diff --git a/srcpkgs/qt6-webengine/patches/0004-musl-no-mallinfo.patch b/srcpkgs/qt6-webengine/patches/0004-musl-no-mallinfo.patch
new file mode 100644
index 000000000000..36900f907833
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0004-musl-no-mallinfo.patch
@@ -0,0 +1,39 @@
+--- qtwebengine/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc	2017-11-28 14:06:53.000000000 +0100
++++ qtwebengine/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc	2018-01-27 20:13:26.960932805 +0100
+@@ -243,7 +243,7 @@
+   allocated_objects_count = main_heap_info.block_count;
+ #elif defined(OS_FUCHSIA)
+ // TODO(fuchsia): Port, see https://crbug.com/706592.
+-#else
++#elif defined(__GLIBC__)
+   struct mallinfo info = mallinfo();
+   DCHECK_GE(info.arena + info.hblkhd, info.uordblks);
+ 
+@@ -255,6 +255,8 @@
+ 
+   // Total allocated space is given by |uordblks|.
+   allocated_objects_size = info.uordblks;
++#else
++// musl libc does not support mallinfo()
+ #endif
+ 
+   MemoryAllocatorDump* outer_dump = pmd->CreateAllocatorDump("malloc");
+--- qtwebengine/src/3rdparty/chromium/base/process/process_metrics_posix.cc	2021-02-23 16:36:59.000000000 +0100
++++ -	2021-03-07 21:03:38.579424720 +0100
+@@ -119,14 +119,14 @@
+   malloc_statistics_t stats = {0};
+   malloc_zone_statistics(nullptr, &stats);
+   return stats.size_in_use;
+-#elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
++#elif (defined(OS_LINUX) && defined(__GLIBC__)) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
+   struct mallinfo minfo = mallinfo();
+ #if BUILDFLAG(USE_TCMALLOC)
+   return minfo.uordblks;
+ #else
+   return minfo.hblkhd + minfo.arena;
+ #endif
+-#elif defined(OS_FUCHSIA)
++#else //if defined(OS_FUCHSIA) // also musl doesn't do this.
+   // TODO(fuchsia): Not currently exposed. https://crbug.com/735087.
+   return 0;
+ #endif
diff --git a/srcpkgs/qt6-webengine/patches/0006-musl-pread-pwrite.patch b/srcpkgs/qt6-webengine/patches/0006-musl-pread-pwrite.patch
new file mode 100644
index 000000000000..00017bba0172
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0006-musl-pread-pwrite.patch
@@ -0,0 +1,18 @@
+--- qtwebengine/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h	2018-09-07 21:25:26.639964100 +0200
++++ qtwebengine/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h	2018-09-07 21:25:11.611964995 +0200
+@@ -1794,6 +1794,15 @@
+ /* End of s390/s390x definitions                                             */
+ #endif
+ 
++#ifndef __GLIBC__
++  /* For Musl libc pread/pread is the same as pread64/pwrite64 */
++#ifndef __NR_pread
++#define __NR_pread              __NR_pread64
++#endif
++#ifndef __NR_pwrite
++#define __NR_pwrite             __NR_pwrite64
++#endif
++#endif /* ifndef __GLIBC__ */
+ 
+ /* After forking, we must make sure to only call system calls.               */
+ #if defined(__BOUNDED_POINTERS__)
diff --git a/srcpkgs/qt6-webengine/patches/0008-musl-resolve.patch b/srcpkgs/qt6-webengine/patches/0008-musl-resolve.patch
new file mode 100644
index 000000000000..edfceb79f30a
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0008-musl-resolve.patch
@@ -0,0 +1,26 @@
+--- qtwebengine/src/3rdparty/chromium/net/dns/dns_reloader.cc	2016-11-07 15:46:18.000000000 +0100
++++ qtwebengine/src/3rdparty/chromium/net/dns/dns_reloader.cc	2016-12-20 03:33:11.749059656 +0100
+@@ -9,6 +9,10 @@
+ 
+ #include <resolv.h>
+ 
++#if !defined(__GLIBC__)
++#include "resolv_compat.h"
++#endif
++
+ #include "base/lazy_instance.h"
+ #include "base/logging.h"
+ #include "base/macros.h"
+--- qtwebengine/src/3rdparty/chromium/net/dns/dns_config_service_posix.cc	2016-11-07 15:46:18.000000000 +0100
++++ qtwebengine/src/3rdparty/chromium/net/dns/dns_config_service_posix.cc	2016-12-20 03:40:07.671953098 +0100
+@@ -6,6 +6,10 @@
+ 
+ #include <string>
+ 
++#if !defined(__GLIBC__)
++#include "resolv_compat.h"
++#endif
++
+ #include "base/bind.h"
+ #include "base/files/file.h"
+ #include "base/files/file_path.h"
diff --git a/srcpkgs/qt6-webengine/patches/0009-musl-siginfo_t.patch b/srcpkgs/qt6-webengine/patches/0009-musl-siginfo_t.patch
new file mode 100644
index 000000000000..fe760be16664
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0009-musl-siginfo_t.patch
@@ -0,0 +1,18 @@
+There's a subtle difference in the internal name of siginfo_t fields
+between glibc and musl. The structure itself is equivalent, so it
+should suffice to add a macro to rename the field.
+
+--- qtwebengine/src/3rdparty/chromium/sandbox/linux/seccomp-bpf/trap.cc	2015-02-17 05:57:43.000000000 +0100
++++ qtwebengine/src/3rdparty/chromium/sandbox/linux/seccomp-bpf/trap.cc	2015-06-03 08:20:25.032716427 +0200
+@@ -22,6 +22,11 @@
+ #include "sandbox/linux/services/android_ucontext.h"
+ #endif
+
++// musl libc defines siginfo_t __si_fields instead of _sifields
++#if !defined(__GLIBC__)
++#define _sifields __si_fields
++#endif
++
+ namespace {
+
+ const int kCapacityIncrement = 20;
diff --git a/srcpkgs/qt6-webengine/patches/0010-musl-stackstart.patch b/srcpkgs/qt6-webengine/patches/0010-musl-stackstart.patch
new file mode 100644
index 000000000000..a9f8ab6c252c
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0010-musl-stackstart.patch
@@ -0,0 +1,20 @@
+--- qtwebengine/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc	2018-01-27 23:08:43.586475349 +0100
++++ qtwebengine/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc	2018-01-27 23:18:22.274505203 +0100
+@@ -28,7 +28,7 @@
+ // FIXME: On Mac OSX and Linux, this method cannot estimate stack size
+ // correctly for the main thread.
+ 
+-#elif defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
++#elif defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
+     defined(OS_FUCHSIA)
+   // pthread_getattr_np() can fail if the thread is not invoked by
+   // pthread_create() (e.g., the main thread of blink_unittests).
+@@ -96,7 +96,7 @@
+ }
+ 
+ void* GetStackStart() {
+-#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
+     defined(OS_FUCHSIA)
+   pthread_attr_t attr;
+   int error;
diff --git a/srcpkgs/qt6-webengine/patches/0011-musl-sandbox.patch b/srcpkgs/qt6-webengine/patches/0011-musl-sandbox.patch
new file mode 100644
index 000000000000..d3de1e41183d
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0011-musl-sandbox.patch
@@ -0,0 +1,71 @@
+--- qtwebengine/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc	2018-06-15 09:47:20.000000000 +0200
++++ qtwebengine/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc	2018-09-13 19:53:53.453780253 +0200
+@@ -129,7 +129,7 @@
+ // CLONE_VM, nor CLONE_THREAD, which includes all fork() implementations.
+ ResultExpr RestrictCloneToThreadsAndEPERMFork() {
+   const Arg<unsigned long> flags(0);
+-
++#if defined(__GLIBC__)
+   // TODO(mdempsky): Extend DSL to support (flags & ~mask1) == mask2.
+   const uint64_t kAndroidCloneMask = CLONE_VM | CLONE_FS | CLONE_FILES |
+                                      CLONE_SIGHAND | CLONE_THREAD |
+@@ -148,6 +148,17 @@
+   return If(IsAndroid() ? android_test : glibc_test, Allow())
+       .ElseIf((flags & (CLONE_VM | CLONE_THREAD)) == 0, 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
+ }
+ 
+ ResultExpr RestrictPrctl() {
+--- qtwebengine/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc	2018-06-15 09:47:20.000000000 +0200
++++ qtwebengine/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc	2018-09-13 19:56:31.779773940 +0200
+@@ -375,6 +375,9 @@
+ #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.
+@@ -387,7 +390,9 @@
+ #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:
+@@ -496,6 +501,9 @@
+     case __NR_mlock:
+     case __NR_munlock:
+     case __NR_munmap:
++#if !defined(__GLIBC__)
++    case __NR_mremap:
++#endif
+       return true;
+     case __NR_madvise:
+     case __NR_mincore:
+@@ -511,7 +519,9 @@
+     case __NR_modify_ldt:
+ #endif
+     case __NR_mprotect:
++#if defined(__GLIBC__)
+     case __NR_mremap:
++#endif
+     case __NR_msync:
+     case __NR_munlockall:
+     case __NR_readahead:
diff --git a/srcpkgs/qt6-webengine/patches/0012-musl-chromium-default-stacksize.patch b/srcpkgs/qt6-webengine/patches/0012-musl-chromium-default-stacksize.patch
new file mode 100644
index 000000000000..7bf5a22fba71
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0012-musl-chromium-default-stacksize.patch
@@ -0,0 +1,15 @@
+--- qtwebengine/src/3rdparty/chromium/base/threading/platform_thread_linux.cc.orig	2018-09-19 18:05:15.523923703 +0200
++++ qtwebengine/src/3rdparty/chromium/base/threading/platform_thread_linux.cc	2018-09-19 18:08:05.150932454 +0200
+@@ -173,7 +173,12 @@
+ 
+ size_t GetDefaultThreadStackSize(const pthread_attr_t& attributes) {
+ #if !defined(THREAD_SANITIZER)
++#if defined(__GLIBC__)
+   return 0;
++#else // defined(__GLIBC__)
++  // For Musl libc try with a default stack size of 2 MiB
++  return 2 * 1024 * 1024;
++#endif // !defined(__GLIBC__)
+ #else
+   // ThreadSanitizer bloats the stack heavily. Evidence has been that the
+   // default stack size isn't enough for some browser tests.
diff --git a/srcpkgs/qt6-webengine/patches/0014-musl-cross-no-asm_ptrace_h.patch b/srcpkgs/qt6-webengine/patches/0014-musl-cross-no-asm_ptrace_h.patch
new file mode 100644
index 000000000000..140742f72c25
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0014-musl-cross-no-asm_ptrace_h.patch
@@ -0,0 +1,30 @@
+--- qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc	2018-08-27 10:21:31.000000000 +0200
++++ qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc	2018-11-22 00:41:58.522477559 +0100
+@@ -38,7 +38,12 @@
+ 
+ #include "client/linux/minidump_writer/linux_ptrace_dumper.h"
+ 
++#if defined(__GLIBC__)
+ #include <asm/ptrace.h>
++#else
++/* For arm*-musl this definition is missing */
++#define ARM_sp uregs[13]
++#endif
+ #include <assert.h>
+ #include <errno.h>
+ #include <fcntl.h>
+--- qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc	2018-08-27 10:21:31.000000000 +0200
++++ qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc	2018-11-22 00:49:39.533492245 +0100
+@@ -32,7 +32,12 @@
+ 
+ #include "client/linux/minidump_writer/linux_core_dumper.h"
+ 
++#if defined(__GLIBC__)
+ #include <asm/ptrace.h>
++#else
++/* For arm*-musl this definition is missing */
++#define ARM_sp uregs[13]
++#endif
+ #include <assert.h>
+ #include <elf.h>
+ #include <stdio.h>
diff --git a/srcpkgs/qt6-webengine/patches/0015-no-glibc-cmake-check.patch b/srcpkgs/qt6-webengine/patches/0015-no-glibc-cmake-check.patch
new file mode 100644
index 000000000000..faca4d205151
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0015-no-glibc-cmake-check.patch
@@ -0,0 +1,17 @@
+diff --git a/configure.cmake b/configure.cmake
+index 28318587..8ecc66af 100644
+--- a/configure.cmake
++++ b/configure.cmake
+@@ -388,11 +388,6 @@ add_check_for_support(
+    CONDITION NOT LINUX OR PkgConfig_FOUND
+    MESSAGE "A pkg-config support is required."
+ )
+-add_check_for_support(
+-   MODULES QtWebEngine QtPdf
+-   CONDITION NOT LINUX OR TEST_glibc
+-   MESSAGE "A suitable version >= 2.17 of glibc is required."
+-)
+ add_check_for_support(
+    MODULES QtWebEngine QtPdf
+    CONDITION NOT LINUX OR TEST_khr
+
diff --git a/srcpkgs/qt6-webengine/patches/0016-qt-musl-execinfo.patch b/srcpkgs/qt6-webengine/patches/0016-qt-musl-execinfo.patch
new file mode 100644
index 000000000000..608dd0b4e078
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0016-qt-musl-execinfo.patch
@@ -0,0 +1,106 @@
+--- qtwebengine/src/3rdparty/chromium//base/debug/stack_trace_posix.cc.orig	2019-04-09 09:31:16.000000000 +0200
++++ qtwebengine/src/3rdparty/chromium//base/debug/stack_trace_posix.cc	2019-05-06 23:16:13.245502467 +0200
+@@ -27,7 +27,7 @@
+ #if !defined(USE_SYMBOLIZE)
+ #include <cxxabi.h>
+ #endif
+-#if !defined(__UCLIBC__) && !defined(_AIX)
++#if defined(__GLIBC__) && !defined(_AIX)
+ #include <execinfo.h>
+ #endif
+ 
+@@ -86,7 +86,7 @@
+   // Note: code in this function is NOT async-signal safe (std::string uses
+   // malloc internally).
+ 
+-#if !defined(__UCLIBC__) && !defined(_AIX)
++#if defined(__GLIBC__) && !defined(_AIX)
+   std::string::size_type search_from = 0;
+   while (search_from < text->size()) {
+     // Look for the start of a mangled symbol, from search_from.
+@@ -121,7 +121,7 @@
+       search_from = mangled_start + 2;
+     }
+   }
+-#endif  // !defined(__UCLIBC__) && !defined(_AIX)
++#endif  // !defined(__GLIBC__) && !defined(_AIX)
+ }
+ #endif  // !defined(USE_SYMBOLIZE)
+ 
+@@ -133,7 +133,7 @@
+   virtual ~BacktraceOutputHandler() = default;
+ };
+ 
+-#if !defined(__UCLIBC__) && !defined(_AIX)
++#if defined(__GLIBC__) && !defined(_AIX)
+ void OutputPointer(void* pointer, BacktraceOutputHandler* handler) {
+   // This should be more than enough to store a 64-bit number in hex:
+   // 16 hex digits + 1 for null-terminator.
+@@ -216,7 +216,7 @@
+   }
+ #endif  // defined(USE_SYMBOLIZE)
+ }
+-#endif  // !defined(__UCLIBC__) && !defined(_AIX)
++#endif  // !defined(__GLIBC__) && !defined(_AIX)
+ 
+ void PrintToStderr(const char* output) {
+   // NOTE: This code MUST be async-signal safe (it's used by in-process
+@@ -812,7 +812,7 @@
+   // NOTE: This code MUST be async-signal safe (it's used by in-process
+   // stack dumping signal handler). NO malloc or stdio is allowed here.
+ 
+-#if !defined(__UCLIBC__) && !defined(_AIX)
++#if defined(__GLIBC__) && !defined(_AIX)
+   // Though the backtrace API man page does not list any possible negative
+   // return values, we take no chance.
+   return base::saturated_cast<size_t>(backtrace(trace, count));
+@@ -825,13 +825,13 @@
+ // NOTE: This code MUST be async-signal safe (it's used by in-process
+ // stack dumping signal handler). NO malloc or stdio is allowed here.
+ 
+-#if !defined(__UCLIBC__) && !defined(_AIX)
++#if defined(__GLIBC__) && !defined(_AIX)
+   PrintBacktraceOutputHandler handler;
+   ProcessBacktrace(trace_, count_, prefix_string, &handler);
+ #endif
+ }
+ 
+-#if !defined(__UCLIBC__) && !defined(_AIX)
++#if defined(__GLIBC__) && !defined(_AIX)
+ void StackTrace::OutputToStreamWithPrefix(std::ostream* os,
+                                           const char* prefix_string) const {
+   StreamBacktraceOutputHandler handler(os);
+--- qtwebengine/src/3rdparty/chromium/base/debug/stack_trace.cc	2019-04-09 09:31:16.000000000 +0200
++++ -	2019-05-06 23:18:14.923566992 +0200
+@@ -233,7 +233,7 @@
+ }
+ std::string StackTrace::ToStringWithPrefix(const char* prefix_string) const {
+   std::stringstream stream;
+-#if !defined(__UCLIBC__) && !defined(_AIX)
++#if defined(__GLIBC__) && !defined(_AIX)
+   OutputToStreamWithPrefix(&stream, prefix_string);
+ #endif
+   return stream.str();
+--- qtwebengine/src/3rdparty/chromium//base/logging.cc	2017-11-28 14:06:53.000000000 +0100
+--- qtwebengine/src/3rdparty/chromium//base/logging.cc	2018-01-27 22:46:34.970406807 +0100
+@@ -546,7 +546,7 @@
+ 
+ LogMessage::~LogMessage() {
+   size_t stack_start = stream_.tellp();
+-#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && !defined(__UCLIBC__) && \
++#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && defined(__GLIBC__) && \
+     !defined(OS_AIX)
+   if (severity_ == LOG_FATAL && !base::debug::BeingDebugged()) {
+     // Include a stack trace on a fatal, unless a debugger is attached.
+--- a/src/3rdparty/chromium/base/debug/stack_trace.cc	2021-06-27 18:17:06.834705848 +0200
++++ -	2021-06-27 18:27:53.014102803 +0200
+@@ -217,7 +217,9 @@
+ }
+ 
+ void StackTrace::OutputToStream(std::ostream* os) const {
++#if defined(__GLIBC__) && !defined(_AIX)
+   OutputToStreamWithPrefix(os, nullptr);
++#endif
+ }
+ 
+ std::string StackTrace::ToString() const {
diff --git a/srcpkgs/qt6-webengine/patches/0017-qt-musl-thread-stacksize.patch b/srcpkgs/qt6-webengine/patches/0017-qt-musl-thread-stacksize.patch
new file mode 100644
index 000000000000..496753bef30f
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0017-qt-musl-thread-stacksize.patch
@@ -0,0 +1,26 @@
+diff --git a/src/3rdparty/chromium/ppapi/utility/threading/simple_thread.cc b/src/3rdparty/chromium/ppapi/utility/threading/simple_thread.cc
+index 02bf49b..05ee182 100644
+--- qtwebengine/src/3rdparty/chromium/ppapi/utility/threading/simple_thread.cc
++++ qtwebengine/src/3rdparty/chromium/ppapi/utility/threading/simple_thread.cc
+@@ -13,7 +13,7 @@ namespace pp {
+ namespace {
+ 
+ // Use 2MB default stack size for Native Client, otherwise use system default.
+-#if defined(__native_client__)
++#if defined(__native_client__) || !defined(__GLIBC__)
+ const size_t kDefaultStackSize = 2 * 1024 * 1024;
+ #else
+ const size_t kDefaultStackSize = 0;
+diff --git a/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc b/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc
+index cf7f3ec..e06a5ce 100644
+--- qtwebengine/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc
++++ qtwebengine/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc
+@@ -761,7 +761,7 @@ void Thread::Start() {
+ #if V8_OS_MACOSX
+     // Default on Mac OS X is 512kB -- bump up to 1MB
+     stack_size = 1 * 1024 * 1024;
+-#elif V8_OS_AIX
++#elif V8_OS_AIX || !defined(__GLIBC__)
+     // Default on AIX is 96kB -- bump up to 2MB
+     stack_size = 2 * 1024 * 1024;
+ #endif
diff --git a/srcpkgs/qt6-webengine/patches/0018-sandbox-membarrier.patch b/srcpkgs/qt6-webengine/patches/0018-sandbox-membarrier.patch
new file mode 100644
index 000000000000..b73971f24324
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0018-sandbox-membarrier.patch
@@ -0,0 +1,60 @@
+--- qtwebengine/src/3rdparty/chromium//sandbox/linux/system_headers/arm64_linux_syscalls.h
++++ qtwebengine/src/3rdparty/chromium//sandbox/linux/system_headers/arm64_linux_syscalls.h
+@@ -1063,4 +1063,8 @@
+ #define __NR_memfd_create 279
+ #endif
+ 
++#if !defined(__NR_membarrier)
++#define __NR_membarrier 283
++#endif
++
+ #endif  // SANDBOX_LINUX_SYSTEM_HEADERS_ARM64_LINUX_SYSCALLS_H_
+
+--- qtwebengine/src/3rdparty/chromium//sandbox/linux/system_headers/arm_linux_syscalls.h
++++ qtwebengine/src/3rdparty/chromium//sandbox/linux/system_headers/arm_linux_syscalls.h
+@@ -1385,6 +1385,10 @@
+ #define __NR_memfd_create (__NR_SYSCALL_BASE+385)
+ #endif
+ 
++#if !defined(__NR_membarrier)
++#define __NR_membarrier (__NR_SYSCALL_BASE+389)
++#endif
++
+ // ARM private syscalls.
+ #if !defined(__ARM_NR_BASE)
+ #define __ARM_NR_BASE (__NR_SYSCALL_BASE + 0xF0000)
+
+--- qtwebengine/src/3rdparty/chromium//sandbox/linux/system_headers/x86_32_linux_syscalls.h
++++ qtwebengine/src/3rdparty/chromium//sandbox/linux/system_headers/x86_32_linux_syscalls.h
+@@ -1422,5 +1422,9 @@
+ #define __NR_memfd_create 356
+ #endif
+ 
++#if !defined(__NR_membarrier)
++#define __NR_membarrier 375
++#endif
++
+ #endif  // SANDBOX_LINUX_SYSTEM_HEADERS_X86_32_LINUX_SYSCALLS_H_
+ 
+--- qtwebengine/src/3rdparty/chromium//sandbox/linux/system_headers/x86_64_linux_syscalls.h
++++ qtwebengine/src/3rdparty/chromium//sandbox/linux/system_headers/x86_64_linux_syscalls.h
+@@ -1290,5 +1290,9 @@
+ #define __NR_memfd_create 319
+ #endif
+ 
++#if !defined(__NR_membarrier)
++#define __NR_membarrier 324
++#endif
++
+ #endif  // SANDBOX_LINUX_SYSTEM_HEADERS_X86_64_LINUX_SYSCALLS_H_
+ 
+--- qtwebengine/src/3rdparty/chromium//sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
++++ qtwebengine/src/3rdparty/chromium//sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+@@ -370,6 +370,7 @@
+   switch (sysno) {
+     case __NR_exit:
+     case __NR_exit_group:
++    case __NR_membarrier:
+     case __NR_wait4:
+     case __NR_waitid:
+ #if defined(__i386__)
diff --git a/srcpkgs/qt6-webengine/patches/0020-msgvec-push_back.patch b/srcpkgs/qt6-webengine/patches/0020-msgvec-push_back.patch
new file mode 100644
index 000000000000..75481a2889f4
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0020-msgvec-push_back.patch
@@ -0,0 +1,14 @@
+--- qtwebengine-everywhere-src-5.14.0-beta2/src/3rdparty/chromium/net/socket/udp_socket_posix.cc	2019-10-08 08:27:43.000000000 +0200
++++ -	2019-11-11 22:41:46.699068889 +0100
+@@ -1191,7 +1191,11 @@
+     msg_iov->push_back({const_cast<char*>(buffer->data()), buffer->length()});
+   msgvec->reserve(buffers.size());
+   for (size_t j = 0; j < buffers.size(); j++)
++#if defined(__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/0021-sandbox-sched_getparam.patch b/srcpkgs/qt6-webengine/patches/0021-sandbox-sched_getparam.patch
new file mode 100644
index 000000000000..d8c6aa15cf66
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0021-sandbox-sched_getparam.patch
@@ -0,0 +1,26 @@
+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
+
+--- a/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc	2021-02-23 16:36:59.000000000 +0100
++++ -	2021-03-07 21:13:44.992079145 +0100
+@@ -93,11 +93,18 @@
+     case __NR_sysinfo:
+     case __NR_times:
+     case __NR_uname:
++#if !defined(__GLIBC__)
++    case __NR_sched_getparam:
++    case __NR_sched_getscheduler:
++    case __NR_sched_setscheduler:
++#endif
+       return Allow();
+     case __NR_sched_getaffinity:
++#if defined(__GLIBC__)
+     case __NR_sched_getparam:
+     case __NR_sched_getscheduler:
+     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/0022-canonicalize-file-name-musl.patch b/srcpkgs/qt6-webengine/patches/0022-canonicalize-file-name-musl.patch
new file mode 100644
index 000000000000..893ed2d41bb4
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0022-canonicalize-file-name-musl.patch
@@ -0,0 +1,11 @@
+--- qtwebengine/src/3rdparty/chromium/third_party/nasm/nasmlib/realpath.c	2019-09-23 14:24:20.000000000 +0200
++++ -	2019-10-11 06:27:28.450329986 +0200
+@@ -57,7 +57,7 @@
+  */
+ char *nasm_realpath(const char *rel_path)
+ {
+-    char *rp = canonicalize_file_name(rel_path);
++    char *rp = realpath(rel_path, NULL);
+     return rp ? rp : nasm_strdup(rel_path);
+ }
+ 
diff --git a/srcpkgs/qt6-webengine/patches/0089-enable-ppc64.patch b/srcpkgs/qt6-webengine/patches/0089-enable-ppc64.patch
new file mode 100644
index 000000000000..b87766825063
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0089-enable-ppc64.patch
@@ -0,0 +1,49 @@
+From 463f1234c57a36e78ff666bd55094a9d4e68f296 Mon Sep 17 00:00:00 2001
+From: q66 <daniel@octaforge.org>
+Date: Sat, 18 Jan 2020 23:52:55 +0100
+Subject: [PATCH 1/3] Enable ppc64 builds
+
+---
+ configure.pri                  | 1 +
+ mkspecs/features/functions.prf | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/configure.pri b/configure.pri
+index 3a144e3f8..cabe8b24a 100644
+--- a/configure.pri	2021-02-24 10:45:58.000000000 +0100
++++ -	2021-03-07 21:18:43.124754796 +0100
+@@ -144,6 +144,7 @@
+     contains(QT_ARCH, "arm")|contains(QT_ARCH, "arm64"): return(true)
+     contains(QT_ARCH, "mips"): return(true)
+     contains(QT_ARCH, "mips64"): return(true)
++    contains(QT_ARCH, "power64"): return(true)
+     qtLog("Architecture not supported.")
+     return(false)
+ }
+diff --git a/mkspecs/features/functions.prf b/mkspecs/features/functions.prf
+index 512e2523b..e31123654 100644
+--- a/mkspecs/features/functions.prf	2021-02-24 10:45:58.000000000 +0100
++++ -	2021-03-07 21:19:21.345036293 +0100
+@@ -107,6 +107,7 @@
+     contains(qtArch, "mips"): return(mipsel)
+     contains(qtArch, "mips64"): return(mips64el)
+     contains(qtArch, "mips64el"): return(mips64el)
++    contains(qtArch, "power64"): return(ppc64)
+     return(unknown)
+ }
+ 
+--- a/cmake/Functions.cmake	2021-06-27 21:30:47.236998844 +0200
++++ -	2021-06-27 21:33:50.091794753 +0200
+@@ -362,6 +362,8 @@
+       set(${result} "mipsel" PARENT_SCOPE)
+    elseif("${arch}" STREQUAL "mipsel64")
+       set(${result} "mips64el" PARENT_SCOPE)
++   elseif("${arch}" STREQUAL "power64")
++      set(${result} "ppc64" PARENT_SCOPE)
+    else()
+       message(DEBUG "Unsupported achitecture: ${arch}")
+    endif()
+
+-- 
+2.26.0
+
diff --git a/srcpkgs/qt6-webengine/patches/0110-size_t.patch b/srcpkgs/qt6-webengine/patches/0110-size_t.patch
new file mode 100644
index 000000000000..462e3202279f
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0110-size_t.patch
@@ -0,0 +1,16 @@
+--- a/src/3rdparty/chromium/third_party/angle/include/platform/PlatformMethods.h	2021-02-23 16:36:59.000000000 +0100
++++ -	2021-03-07 21:44:25.477989726 +0100
+@@ -239,11 +239,11 @@
+ using ProgramKeyType   = std::array<uint8_t, 20>;
+ using CacheProgramFunc = void (*)(PlatformMethods *platform,
+                                   const ProgramKeyType &key,
+-                                  size_t programSize,
++                                  std::size_t programSize,
+                                   const uint8_t *programBytes);
+ inline void DefaultCacheProgram(PlatformMethods *platform,
+                                 const ProgramKeyType &key,
+-                                size_t programSize,
++                                std::size_t programSize,
+                                 const uint8_t *programBytes)
+ {}
+ 
diff --git a/srcpkgs/qt6-webengine/patches/0111-armv7l-neon.patch b/srcpkgs/qt6-webengine/patches/0111-armv7l-neon.patch
new file mode 100644
index 000000000000..368099b981cc
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0111-armv7l-neon.patch
@@ -0,0 +1,10 @@
+--- a/src/3rdparty/chromium/skia/BUILD.gn	2020-09-01 13:02:34.000000000 +0200
++++ b/src/3rdparty/chromium/skia/BUILD.gn	2020-10-06 20:51:48.834970455 +0200
+@@ -772,7 +772,6 @@
+         # Root build config sets -mfpu=$arm_fpu, which we expect to be neon
+         # when running this.
+         if (!arm_use_neon) {
+-          configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
+           cflags += [ "-mfpu=neon" ]
+         }
+       }
diff --git a/srcpkgs/qt6-webengine/patches/0112-arm-user_vfp.patch b/srcpkgs/qt6-webengine/patches/0112-arm-user_vfp.patch
new file mode 100644
index 000000000000..6e2d62f35ee6
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0112-arm-user_vfp.patch
@@ -0,0 +1,20 @@
+--- a/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h
++++ b/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h
+@@ -17,6 +17,17 @@
+ 
+ #include <stdint.h>
+ #include <sys/user.h>
++#if !defined(__GLIBC__)
++struct user_vfp {
++	unsigned long long fpregs[32];
++	unsigned long fpscr;
++};
++struct user_vfp_exc {
++	unsigned long fpexc;
++	unsigned long fpinst;
++	unsigned long fpinst2;
++};
++#endif /* !defined(__GLIBC__) */
+ 
+ #include <type_traits>
+ 
diff --git a/srcpkgs/qt6-webengine/patches/0113-arm-elf_auxv_t.patch b/srcpkgs/qt6-webengine/patches/0113-arm-elf_auxv_t.patch
new file mode 100644
index 000000000000..5c7cbfc46f65
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0113-arm-elf_auxv_t.patch
@@ -0,0 +1,18 @@
+--- a/src/3rdparty/chromium/v8/src/base/cpu.cc	2020-09-01 13:02:34.000000000 +0200
++++ b/src/3rdparty/chromium/v8/src/base/cpu.cc	2020-10-06 21:28:45.124882085 +0200
+@@ -109,6 +109,15 @@
+ #define HWCAP_IDIV  (HWCAP_IDIVA | HWCAP_IDIVT)
+ #define HWCAP_LPAE  (1 << 20)
+ 
++#ifndef __GLIBC__
++#include <elf.h>
++#ifdef __LP64__
++typedef Elf64_auxv_t elf_auxv_t;
++#else
++typedef Elf32_auxv_t elf_auxv_t;
++#endif
++#endif
++
+ static uint32_t ReadELFHWCaps() {
+ #if V8_GLIBC_PREREQ(2, 16)
+   return static_cast<uint32_t>(getauxval(AT_HWCAP));
diff --git a/srcpkgs/qt6-webengine/patches/0114-time64.patch b/srcpkgs/qt6-webengine/patches/0114-time64.patch
new file mode 100644
index 000000000000..6a98dd4e480e
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/0114-time64.patch
@@ -0,0 +1,89 @@
+Description: fix seccomp-bpf failures in syscalls 0403, 0407
+ glibc ≥ 2.31 uses these syscalls on 32-bit platforms:
+ .
+ - https://sourceware.org/git/?p=glibc.git;a=commit;h=2e44b10b42d68d98
+ - https://sourceware.org/git/?p=glibc.git;a=commit;h=ec138c67cbda8b58
+Author: Andreas Müller <schnitzeltony@gmail.com>
+Forwarded: no
+Last-Update: 2020-09-02
+
+--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
++++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
+@@ -148,7 +148,14 @@ ResultExpr EvaluateSyscallImpl(int fs_de
+     return Allow();
+ #endif
+ 
+-  if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep) {
++  if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep
++#if defined(__NR_clock_gettime64)
++                                  || sysno == __NR_clock_gettime64
++#endif
++#if defined(__NR_clock_nanosleep_time64)
++                                  || sysno == __NR_clock_nanosleep_time64
++#endif
++  ) {
+     return RestrictClockID();
+   }
+ 
+--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc
++++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc
+@@ -60,6 +60,12 @@ class RestrictClockIdPolicy : public bpf
+       case __NR_clock_gettime:
+       case __NR_clock_getres:
+       case __NR_clock_nanosleep:
++#if defined(__NR_clock_nanosleep_time64)
++      case __NR_clock_nanosleep_time64:
++#endif
++#if defined(__NR_clock_gettime64)
++      case __NR_clock_gettime64:
++#endif
+         return RestrictClockID();
+       default:
+         return Allow();
+--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
++++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+@@ -39,6 +39,12 @@ bool SyscallSets::IsAllowedGettime(int s
+                                 // filtered by RestrictClokID().
+     case __NR_clock_gettime:    // Parameters filtered by RestrictClockID().
+     case __NR_clock_nanosleep:  // Parameters filtered by RestrictClockID().
++#if defined(__NR_clock_gettime64)
++    case __NR_clock_gettime64:  // Parameters filtered by RestrictClockID().
++#endif
++#if defined(__NR_clock_nanosleep_time64)
++    case __NR_clock_nanosleep_time64:  // Parameters filtered by RestrictClockID().
++#endif
+     case __NR_clock_settime:    // Privileged.
+ #if defined(__i386__) || \
+     (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+--- a/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h
++++ b/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h
+@@ -1385,6 +1385,14 @@
+ #define __NR_memfd_create (__NR_SYSCALL_BASE+385)
+ #endif
+ 
++#if !defined(__NR_clock_gettime64)
++#define __NR_clock_gettime64 (__NR_SYSCALL_BASE+403)
++#endif
++
++#if !defined(__NR_clock_nanosleep_time64)
++#define __NR_clock_nanosleep_time64 (__NR_SYSCALL_BASE+407)
++#endif
++
+ // ARM private syscalls.
+ #if !defined(__ARM_NR_BASE)
+ #define __ARM_NR_BASE (__NR_SYSCALL_BASE + 0xF0000)
+--- a/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h
++++ b/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h
+@@ -1433,4 +1433,12 @@
+ #define __NR_memfd_create (__NR_Linux + 354)
+ #endif
+ 
++#if !defined(__NR_clock_gettime64)
++#define __NR_clock_gettime64 (__NR_Linux + 403)
++#endif
++
++#if !defined(__NR_clock_nanosleep_time64)
++#define __NR_clock_nanosleep_time64 (__NR_Linux + 407)
++#endif
++
+ #endif  // SANDBOX_LINUX_SYSTEM_HEADERS_MIPS_LINUX_SYSCALLS_H_
diff --git a/srcpkgs/qt6-webengine/patches/cross-hack.patch b/srcpkgs/qt6-webengine/patches/cross-hack.patch
new file mode 100644
index 000000000000..725fb7b3e920
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/cross-hack.patch
@@ -0,0 +1,10 @@
+--- a/src/core/api/CMakeLists.txt	2021-09-25 11:39:27.000000000 +0200
++++ -	2021-10-03 12:11:29.275564729 +0200
+@@ -50,6 +50,7 @@
+         Qt::Gui
+         Qt::Network
+         Qt::Quick
++	X11
+ )
+ 
+ set_target_properties(WebEngineCore PROPERTIES QTWEBENGINEPROCESS_NAME ${qtWebEngineProcessName})
diff --git a/srcpkgs/qt6-webengine/patches/pthread_getname_np-mus.patch b/srcpkgs/qt6-webengine/patches/pthread_getname_np-mus.patch
new file mode 100644
index 000000000000..aabaa51b9015
--- /dev/null
+++ b/srcpkgs/qt6-webengine/patches/pthread_getname_np-mus.patch
@@ -0,0 +1,15 @@
+--- a/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/base/thread_utils.h	2021-09-12 00:49:47.623538583 +0200
++++ -	2021-09-12 00:50:07.673426016 +0200
+@@ -61,9 +61,11 @@
+ #if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
+   if (prctl(PR_GET_NAME, buf) != 0)
+     return false;
+-#else
++#elif defined(__GLIBC__)
+   if (pthread_getname_np(pthread_self(), buf, sizeof(buf)) != 0)
+     return false;
++#else
++  return false;
+ #endif
+   out_result = std::string(buf);
+   return true;
diff --git a/srcpkgs/qt6-webengine/template b/srcpkgs/qt6-webengine/template
new file mode 100644
index 000000000000..e0ee3a566c2d
--- /dev/null
+++ b/srcpkgs/qt6-webengine/template
@@ -0,0 +1,87 @@
+# Template file for 'qt6-webengine'
+pkgname=qt6-webengine
+version=6.2.0
+revision=1
+wrksrc="qtwebengine-everywhere-src-${version}"
+build_style=cmake
+configure_args="-DQT_HOST_PATH=/usr -DQT_BUILD_TOOLS_WHEN_CROSSCOMPILING=true
+ -DQT_FEATURE_webengine_system_ffmpeg=ON
+ -DQT_FEATURE_webengine_system_libevent=ON
+ -DQT_FEATURE_webengine_system_gn=ON
+ -DPKG_CONFIG_HOST_EXECUTABLE=${PKG_CONFIG_FOR_BUILD}"
+hostmakedepends="qt6-base-devel perl pkg-config nodejs python
+ qt6-declarative-devel protobuf gperf flex nss-devel libwebp-devel"
+makedepends="qt6-base-devel qt6-declarative-devel pulseaudio-devel
+ alsa-lib-devel libvpx-devel pciutils-devel opus-devel libxslt-devel
+ libxml2-devel freetype-devel lcms2-devel libwebp-devel icu-devel
+ re2-devel zlib-devel libpng-devel minizip-devel harfbuzz-devel
+ nss-devel libXcursor-devel libXcomposite-devel libXScrnSaver-devel
+ protobuf-devel ffmpeg-devel snappy-devel libevent-devel pipewire-devel
+ libxkbfile-devel qt6-location-devel qt6-webchannel-devel"
+short_desc="Cross-platform application and UI framework - Webengine"
+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=c6e530a61bea2e7fbb50308a2b4e7fdb4f7c7b61a28797973270acffc020809d
+
+if [ -z "$CROSS_BUILD" ];then
+	configure_args+=" -DCMAKE_TOOLCHAIN_FILE=/usr/lib/cmake/Qt6/qt.toolchain.cmake"
+fi
+
+if [ "$XBPS_LIBC" = "musl" ]; then
+	hostmakedepends+=" musl-legacy-compat"
+fi
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+	makedepends+=" musl-legacy-compat"
+fi
+
+if [ ! "$XBPS_WORDSIZE" = "$XBPS_TARGET_WORDSIZE" ]; then
+	broken="webengine can be built only if word size matches"
+fi
+
+if [ "$XBPS_WORDSIZE" -eq 32 ]; then
+	nodebug=yes
+	LDFLAGS="-Wl,--no-keep-memory"
+fi
+
+if [ "$XBPS_TARGET_ENDIAN" != "le" ]; then
+	broken="webengine only supports little endian"
+fi
+
+_bootstrap_gn() {
+	# Bootstrap gn (generate ninja)
+	echo "Bootstrapping 'gn'"
+	cd ${wrksrc}/src/3rdparty/gn
+	CFLAGS="$CFLAGS_host" CXXFLAGS="$CXXFLAGS_host" LDFLAGS="$LDFLAGS_host" \
+	PKGCONFIG=/usr/bin/pkgconfig PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/share/pkgconfig" \
+		python2 build/gen.py --no-last-commit-position --out-path \
+			${wrksrc}/src/3rdparty/gn/out/Release --cc "${CC_host:-$CC}" \
+			--cxx "${CXX_host:-$CXX}" --ld "${CXX_host:-$CXX}" --ar "${AR_host:-$AR}" \
+			--qt-version "${version}.qtwebengine.qt.io"
+	ninja -C out/Release gn
+	cd ${wrksrc}
+}
+
+pre_configure() {
+	cp ${FILESDIR}/resolv_compat.h ${wrksrc}/src/3rdparty/chromium/net/dns
+	_bootstrap_gn
+	export PATH="$PATH:${wrksrc}/src/3rdparty/gn/out/Release"
+}
+
+pre_build() {
+	export PATH="$PATH:${wrksrc}/src/3rdparty/gn/out/Release"
+}
+
+qt6-webengine-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision} qt6-webchannel-devel>=${version}_1
+	 qt6-declarative-devel>=${version}_1 qt6-location-devel>=${version}_1"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/qt6/mkspecs
+		vmove "usr/lib/*.so"
+	}
+}

From ee889545f97f084ab9dede26d7f5ad6735b29236 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Sun, 27 Jun 2021 16:00:28 +0200
Subject: [PATCH 6/6] New package: qt6-location-6.2.0

---
 common/shlibs                 |  1 +
 srcpkgs/qt6-location-devel    |  1 +
 srcpkgs/qt6-location/template | 27 +++++++++++++++++++++++++++
 3 files changed, 29 insertions(+)
 create mode 120000 srcpkgs/qt6-location-devel
 create mode 100644 srcpkgs/qt6-location/template

diff --git a/common/shlibs b/common/shlibs
index b45df9460f6b..e1de670feedc 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2055,6 +2055,7 @@ libQt6VirtualKeyboard.so.6 qt6-virtualkeyboard-6.1.0_1
 libQt6SerialPort.so.6 qt6-serialport-6.2.0alpha_1
 libQt6WebSockets.so.6 qt6-websockets-6.2.0alpha_1
 libQt6WebChannel.so.6 qt6-webchannel-6.2.0alpha_1
+libQt6Positioning.so.6 qt6-location-6.2.0alpha_1
 libnpth.so.0 npth-1.1_1
 libnpupnp.so.4 libnpupnp-4.0.2_1
 libglfw.so.3 glfw-3.0.4_1
diff --git a/srcpkgs/qt6-location-devel b/srcpkgs/qt6-location-devel
new file mode 120000
index 000000000000..7924c82dd3f4
--- /dev/null
+++ b/srcpkgs/qt6-location-devel
@@ -0,0 +1 @@
+qt6-location
\ No newline at end of file
diff --git a/srcpkgs/qt6-location/template b/srcpkgs/qt6-location/template
new file mode 100644
index 000000000000..03868ff37338
--- /dev/null
+++ b/srcpkgs/qt6-location/template
@@ -0,0 +1,27 @@
+# Template file for 'qt6-location'
+pkgname=qt6-location
+version=6.2.0
+revision=1
+wrksrc="qtlocation-everywhere-src-${version}"
+build_style=cmake
+configure_args="-DQT_HOST_PATH=/usr"
+hostmakedepends="perl qt6-base-devel qt6-declarative-devel"
+makedepends="qt6-serialport-devel qt6-declarative-devel GConf-devel"
+short_desc="Cross-platform application and UI framework - location"
+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/qtlocation-everywhere-src-${version}.tar.xz"
+checksum=c627f85afbffe18b91e9081e9a4867b79c81a0ea24a683a2d5847c55097b5426
+
+qt6-location-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision} qt6-base-devel>=${version}_1"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/qt6/mkspecs
+		vmove "usr/lib/*.so"
+		vmove "usr/lib/*.prl"
+	}
+}

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

end of thread, other threads:[~2022-06-21  2:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-03 13:27 [PR PATCH] New package: qt6-serialport-6.2.0 Johnnynator
2021-10-16  0:34 ` ericonr
2021-11-03 14:36 ` [PR PATCH] [Updated] " Johnnynator
2022-06-06  2:15 ` New package: qt6-webchannel-6.2.1 qt6-multimedia-6.2.1 qt6-webengine-6.2.1 github-actions
2022-06-21  2:12 ` [PR PATCH] [Closed]: " github-actions

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).