Add dev-qt from an older version of the gentoo repo

Qt5 has been removed, we restore it since we still use it.
This commit is contained in:
2026-07-03 09:45:00 +02:00
parent 2247967dd3
commit d21535e7cb
586 changed files with 30139 additions and 0 deletions

View File

@ -0,0 +1,23 @@
Patch status: fixed in >=chromium-141.0.7365.0
https://bugs.gentoo.org/968956
https://crbug.com/438445382
https://crrev.com/820ca85d1e918a399abf471d97b37d99be892f1f
https://skia.googlesource.com/skcms.git/+/135488419331
https://skia.googlesource.com/skcms.git/+/02ca44da98eb
https://skia.googlesource.com/skcms.git/+/238fd0489c04
https://skia.googlesource.com/skcms.git/+/c602c137fb05
--- a/src/3rdparty/chromium/third_party/skia/modules/skcms/src/Transform_inl.h
+++ b/src/3rdparty/chromium/third_party/skia/modules/skcms/src/Transform_inl.h
@@ -162,6 +162,11 @@
return (F)_mm512_cvtph_ps((__m256i)half);
#elif defined(USING_AVX_F16C)
+#if defined(__clang__) && __clang_major__ >= 15 // for _Float16 support
+ typedef _Float16 __attribute__((vector_size(16))) F16;
+ return __builtin_convertvector((F16)half, F);
+#else
typedef int16_t __attribute__((vector_size(16))) I16;
return __builtin_ia32_vcvtph2ps256((I16)half);
+#endif // defined(__clang))
#else
U32 wide = cast<U32>(half);

View File

@ -0,0 +1,11 @@
Same issue as https://bugs.gentoo.org/971287 which only happens with
recent gcc-16 libstdc++ snapshots.
--- a/src/3rdparty/chromium/third_party/blink/renderer/platform/widget/input/prediction/predictor_factory.cc
+++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/widget/input/prediction/predictor_factory.cc
@@ -3,4 +3,6 @@
// found in the LICENSE file.
+#include <climits>
+
#include "third_party/blink/renderer/platform/widget/input/prediction/predictor_factory.h"

View File

@ -0,0 +1,29 @@
https://bugs.gentoo.org/973445
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125064
--- a/src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h
+++ b/src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h
@@ -352,5 +352,5 @@
// struct PA_TRIVIAL_ABI S { ~S(); }
// ```
-#if PA_HAS_CPP_ATTRIBUTE(clang::trivial_abi)
+#if PA_HAS_CPP_ATTRIBUTE(clang::trivial_abi) && defined(__clang__)
#define PA_TRIVIAL_ABI [[clang::trivial_abi]]
#else
--- a/src/3rdparty/chromium/base/compiler_specific.h
+++ b/src/3rdparty/chromium/base/compiler_specific.h
@@ -575,5 +575,5 @@
// struct TRIVIAL_ABI S { ~S(); }
// ```
-#if __has_cpp_attribute(clang::trivial_abi)
+#if __has_cpp_attribute(clang::trivial_abi) && defined(__clang__)
#define TRIVIAL_ABI [[clang::trivial_abi]]
#else
--- a/src/3rdparty/chromium/skia/config/SkUserConfig.h
+++ b/src/3rdparty/chromium/skia/config/SkUserConfig.h
@@ -104,5 +104,5 @@
#if defined(__has_attribute)
-#if __has_attribute(trivial_abi)
+#if __has_attribute(trivial_abi) && defined(__clang__)
#define SK_TRIVIAL_ABI [[clang::trivial_abi]]
#else

View File

@ -0,0 +1,9 @@
https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/742007
--- a/src/3rdparty/chromium/third_party/dawn/src/tint/utils/rtti/traits.h
+++ b/src/3rdparty/chromium/third_party/dawn/src/tint/utils/rtti/traits.h
@@ -30,4 +30,5 @@
#include <ostream>
+#include <sstream>
#include <string>
#include <tuple>

View File

@ -0,0 +1,18 @@
Patch status: *seems* fixed in Qt 6.9+
Temporary (lame) workaround for [1] given backporting[2] (which
is believed to be the fix) does not seem trivial. A better fix
is welcome if have one and can test it, but otherwise this can
likely be removed in Qt 6.9.0.
[1] https://bugs.gentoo.org/945843
[2] https://github.com/google/XNNPACK/pull/1789
--- a/src/3rdparty/chromium/third_party/xnnpack/BUILD.gn
+++ b/src/3rdparty/chromium/third_party/xnnpack/BUILD.gn
@@ -27,4 +27,5 @@
+ cflags = [ "-Wno-error=incompatible-pointer-types" ]
if (is_clang || !is_win) {
- cflags = [
+ cflags += [
"-Wno-unused-function",

View File

@ -0,0 +1,32 @@
Patch status: fixed in >=chromium-133.0.6892.0
IWYU issue, only manifests with gcc+musl[1] (clang+musl or gcc+glibc are fine).
Backport of [2] (>=chromium-133.0.6892.0) + [3][4] (>=chromium-128.0.6571.0).
TODO: [2] likely needs to be kept Qt6.9.0, but the rest is already present
[1] https://bugs.gentoo.org/950579
[2] https://chromium.googlesource.com/external/webrtc/+/000f04375b67e6139a1dc88d832d2da65c7acb29
[3] https://crrev.com/0d3d5062f7d5ff83f38685bf864c71dd5bd9d460
[4] https://crrev.com/26f3c318377ab31c2b317b656613e2d3c11ce513
--- a/src/3rdparty/chromium/content/public/browser/mhtml_generation_result.h
+++ b/src/3rdparty/chromium/content/public/browser/mhtml_generation_result.h
@@ -7,2 +7,3 @@
+#include <cstdint>
#include <optional>
--- a/src/3rdparty/chromium/extensions/browser/path_util.h
+++ b/src/3rdparty/chromium/extensions/browser/path_util.h
@@ -7,2 +7,5 @@
+#include <cstdint>
+#include <string>
+
#include "base/files/file_path.h"
--- a/src/3rdparty/chromium/third_party/webrtc/modules/audio_coding/neteq/reorder_optimizer.cc
+++ b/src/3rdparty/chromium/third_party/webrtc/modules/audio_coding/neteq/reorder_optimizer.cc
@@ -12,2 +12,4 @@
+#include <stdint.h>
+
#include <algorithm>

View File

@ -0,0 +1,20 @@
https://bugs.gentoo.org/949654
https://bugreports.qt.io/browse/QTBUG-134631
--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
+++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
@@ -36,4 +36,8 @@
#include "sandbox/linux/system_headers/linux_time.h"
+#if !defined(MAP_DROPPABLE)
+#define MAP_DROPPABLE 0x08 // Zero memory under memory pressure.
+#endif
+
#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \
!defined(__arm__) && !defined(__aarch64__) && \
@@ -239,5 +243,5 @@
const uint64_t kAllowedMask = MAP_SHARED | MAP_PRIVATE | MAP_ANONYMOUS |
MAP_STACK | MAP_NORESERVE | MAP_FIXED |
- MAP_DENYWRITE | MAP_LOCKED |
+ MAP_DENYWRITE | MAP_LOCKED | MAP_DROPPABLE |
kArchSpecificAllowedMask;
const Arg<int> flags(3);

View File

@ -0,0 +1,22 @@
api/candidate.h:96:40: error: 'lifetimebound' attribute cannot be
applied to a parameter of a function that returns void
Hardly know C++, but my "impression" is that this is not needed in
a void function and webrtc was just trying to keep the attributes
matching with other uses of it -- and that it is safe to remove.
Guard behind __clang__ to limit damage in case misunderstanding.
Only a temporary patch given Qt 6.9+ should not be affected as
these types were changed entirely (difficult to backport).
https://forums.gentoo.org/viewtopic-p-8858206.html
--- a/src/3rdparty/chromium/third_party/webrtc/api/candidate.h
+++ b/src/3rdparty/chromium/third_party/webrtc/api/candidate.h
@@ -95,3 +95,7 @@
// things down. See also the `Port` class.
+#ifdef __clang__
+ void set_type(absl::string_view type) {
+#else
void set_type(absl::string_view type ABSL_ATTRIBUTE_LIFETIME_BOUND) {
+#endif
Assign(type_, type);

View File

@ -0,0 +1,26 @@
Patch status: fixed in >=chromium-137.0.7126.0
A old workaround for a gperf-3.1 issue[1] breaks building with the
now fixed gperf-3.2, backport the conditional check[2] which should
work with either.
[1] https://savannah.gnu.org/bugs/index.php?53029
[2] https://crrev.com/f8f21fb4aa01f75acbb12abf5ea8c263c6817141
--- a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py
@@ -36,8 +36,11 @@
gperf_output = re.sub(r'\bregister ', '', gperf_output)
# -Wimplicit-fallthrough needs an explicit fallthrough statement,
- # so replace gperf's /*FALLTHROUGH*/ comment with the statement.
- # https://savannah.gnu.org/bugs/index.php?53029
- gperf_output = gperf_output.replace('/*FALLTHROUGH*/',
- ' [[fallthrough]];')
+ # so replace gperf 3.1's /*FALLTHROUGH*/ comment with the statement.
+ # https://savannah.gnu.org/bugs/index.php?53029 (fixed in 3.2)
+ if re.search(
+ r'/\* C\+\+ code produced by gperf version 3\.[01](\.\d+)? \*/',
+ gperf_output):
+ gperf_output = gperf_output.replace('/*FALLTHROUGH*/',
+ ' [[fallthrough]];')
# -Wpointer-to-int-cast warns about casting pointers to smaller ints
# Replace {(int)(long)&(foo), bar} with

View File

@ -0,0 +1,19 @@
https://bugs.gentoo.org/951816
https://issues.webrtc.org/issues/401732633
https://webrtc-review.googlesource.com/c/src/+/380500
--- a/src/3rdparty/chromium/third_party/webrtc/modules/video_capture/linux/pipewire_session.cc
+++ b/src/3rdparty/chromium/third_party/webrtc/modules/video_capture/linux/pipewire_session.cc
@@ -61,5 +61,5 @@
};
- pw_node_add_listener(proxy_, &node_listener_, &node_events, this);
+ pw_node_add_listener(reinterpret_cast<pw_node*>(proxy_), &node_listener_, &node_events, this);
}
@@ -95,5 +95,5 @@
if (id == SPA_PARAM_EnumFormat &&
info->params[i].flags & SPA_PARAM_INFO_READ) {
- pw_node_enum_params(that->proxy_, 0, id, 0, UINT32_MAX, nullptr);
+ pw_node_enum_params(reinterpret_cast<pw_node*>(that->proxy_), 0, id, 0, UINT32_MAX, nullptr);
break;
}

View File

@ -0,0 +1,108 @@
https://bugs.kde.org/show_bug.cgi?id=497691
https://github.com/qutebrowser/qutebrowser/issues/8534
https://bugreports.qt.io/browse/QTBUG-133570
https://codereview.qt-project.org/c/qt/qtwebengine/+/634920
--- a/src/core/configure/BUILD.root.gn.in
+++ b/src/core/configure/BUILD.root.gn.in
@@ -406,4 +406,5 @@
"//ui/base/x:gl",
"//ui/gfx/linux:gpu_memory_buffer_support_x11",
+ "//ui/gfx/x",
]
@@ -411,4 +412,6 @@
"//ui/ozone/platform/x11/gl_egl_utility_x11.cc",
"//ui/ozone/platform/x11/gl_egl_utility_x11.h",
+ "//ui/ozone/platform/x11/native_pixmap_egl_x11_binding.cc",
+ "//ui/ozone/platform/x11/native_pixmap_egl_x11_binding.h",
]
}
--- a/src/core/ozone/gl_ozone_angle_qt.cpp
+++ b/src/core/ozone/gl_ozone_angle_qt.cpp
@@ -1,5 +1,9 @@
-// Copyright (C) 2024 The Qt Company Ltd.
+// Copyright (C) 2025 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Copyright 2016 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
#include "gl_ozone_angle_qt.h"
@@ -13,4 +17,6 @@
#if BUILDFLAG(IS_OZONE_X11)
#include "ozone_util_qt.h"
+
+#include "ui/ozone/platform/x11/native_pixmap_egl_x11_binding.h"
#endif
@@ -21,4 +27,32 @@
namespace ui {
+namespace {
+// Based on //ui/ozone/platform/x11/x11_surface_factory.cc
+enum class NativePixmapSupportType {
+ // Importing native pixmaps not supported.
+ kNone,
+
+ // Native pixmaps are imported directly into EGL using the
+ // EGL_EXT_image_dma_buf_import extension.
+ kDMABuf,
+
+ // Native pixmaps are first imported as X11 pixmaps using DRI3 and then into
+ // EGL.
+ kX11Pixmap,
+};
+
+NativePixmapSupportType GetNativePixmapSupportType()
+{
+ if (gl::GLSurfaceEGL::GetGLDisplayEGL()->ext->b_EGL_EXT_image_dma_buf_import)
+ return NativePixmapSupportType::kDMABuf;
+
+#if BUILDFLAG(IS_OZONE_X11)
+ if (NativePixmapEGLX11Binding::CanImportNativeGLXPixmap())
+ return NativePixmapSupportType::kX11Pixmap;
+#endif
+
+ return NativePixmapSupportType::kNone;
+}
+} // namespace
bool GLOzoneANGLEQt::LoadGLES2Bindings(const gl::GLImplementationParts & /*implementation*/)
@@ -74,5 +108,14 @@
bool GLOzoneANGLEQt::CanImportNativePixmap(gfx::BufferFormat format)
{
- return gl::GLSurfaceEGL::GetGLDisplayEGL()->ext->b_EGL_EXT_image_dma_buf_import;
+ switch (GetNativePixmapSupportType()) {
+ case NativePixmapSupportType::kDMABuf:
+ return NativePixmapEGLBinding::IsBufferFormatSupported(format);
+#if BUILDFLAG(IS_OZONE_X11)
+ case NativePixmapSupportType::kX11Pixmap:
+ return NativePixmapEGLX11Binding::IsBufferFormatSupported(format);
+#endif
+ default:
+ return false;
+ }
}
@@ -83,6 +126,17 @@
GLenum target, GLuint texture_id)
{
- return NativePixmapEGLBinding::Create(pixmap, plane_format, plane, plane_size, color_space,
- target, texture_id);
+ switch (GetNativePixmapSupportType()) {
+ case NativePixmapSupportType::kDMABuf:
+ return NativePixmapEGLBinding::Create(pixmap, plane_format, plane, plane_size, color_space,
+ target, texture_id);
+#if BUILDFLAG(IS_OZONE_X11)
+ case NativePixmapSupportType::kX11Pixmap:
+ return NativePixmapEGLX11Binding::Create(pixmap, plane_format, plane_size, target,
+ texture_id);
+#endif
+ default:
+ NOTREACHED();
+ return nullptr;
+ }
}

View File

@ -0,0 +1,43 @@
Patch status: fixed in Qt 6.9.1
https://bugreports.qt.io/browse/QTBUG-135047
https://codereview.qt-project.org/c/qt/qtwebengine/+/634033
--- a/src/core/compositor/native_skia_output_device_opengl.cpp
+++ b/src/core/compositor/native_skia_output_device_opengl.cpp
@@ -214,9 +214,10 @@
glFun->glBindTexture(GL_TEXTURE_2D, 0);
- m_frontBuffer->textureCleanupCallback = [glFun, glxFun, display, glxPixmap,
- glTexture]() {
+ m_frontBuffer->textureCleanupCallback = [glFun, glxFun, display, glxPixmap, glTexture,
+ glxHelper, pixmapId]() {
glxFun->glXReleaseTexImageEXT(display, glxPixmap, GLX_FRONT_LEFT_EXT);
glFun->glDeleteTextures(1, &glTexture);
glXDestroyGLXPixmap(display, glxPixmap);
+ glxHelper->freePixmap(pixmapId);
};
}
--- a/src/core/ozone/glx_helper.cpp
+++ b/src/core/ozone/glx_helper.cpp
@@ -101,3 +101,13 @@
}
+void GLXHelper::freePixmap(uint32_t pixmapId) const
+{
+ xcb_void_cookie_t cookie = xcb_free_pixmap_checked(m_connection, pixmapId);
+ xcb_generic_error_t *error = xcb_request_check(m_connection, cookie);
+ if (error) {
+ qWarning("GLX: XCB_FREE_PIXMAP failed with error code: 0x%x", error->error_code);
+ free(error);
+ }
+}
+
QT_END_NAMESPACE
--- a/src/core/ozone/glx_helper.h
+++ b/src/core/ozone/glx_helper.h
@@ -34,4 +34,5 @@
GLXPixmap importBufferAsPixmap(int dmaBufFd, uint32_t size, uint16_t width, uint16_t height,
uint16_t stride) const;
+ void freePixmap(uint32_t pixmapId) const;
bool isDmaBufSupported() const { return m_isDmaBufSupported; }