diff --git a/srcpkgs/qt6-pdf/patches/0001-None-no-debug.patch b/srcpkgs/qt6-pdf/patches/0001-None-no-debug.patch index b221fdcd392..b6596bd57f6 100644 --- a/srcpkgs/qt6-pdf/patches/0001-None-no-debug.patch +++ b/srcpkgs/qt6-pdf/patches/0001-None-no-debug.patch @@ -1,6 +1,6 @@ ---- qt6-webengine-6.4.2.orig/cmake/Functions.cmake -+++ qt6-webengine-6.4.2/cmake/Functions.cmake -@@ -820,6 +820,8 @@ macro(append_build_type_setup) +--- a/cmake/Functions.cmake ++++ b/cmake/Functions.cmake +@@ -844,6 +844,8 @@ macro(append_build_type_setup) endif() elseif(${config} STREQUAL "MinSizeRel") list(APPEND gnArgArg is_debug=false symbol_level=0 optimize_for_size=true) diff --git a/srcpkgs/qt6-pdf/patches/0003-cross-hack.patch b/srcpkgs/qt6-pdf/patches/0003-cross-hack.patch index a3f0a579140..f82133d6746 100644 --- a/srcpkgs/qt6-pdf/patches/0003-cross-hack.patch +++ b/srcpkgs/qt6-pdf/patches/0003-cross-hack.patch @@ -1,10 +1,10 @@ ---- qt6-webengine-6.4.2.orig/src/core/api/CMakeLists.txt -+++ qt6-webengine-6.4.2/src/core/api/CMakeLists.txt -@@ -51,6 +51,7 @@ qt_internal_add_module(WebEngineCore +--- a/src/core/api/CMakeLists.txt ++++ b/src/core/api/CMakeLists.txt +@@ -57,6 +57,7 @@ qt_internal_add_module(WebEngineCore Qt::Gui Qt::Network Qt::Quick + X11 + EXTRA_CMAKE_FILES + "${CMAKE_CURRENT_LIST_DIR}/${INSTALL_CMAKE_NAMESPACE}WebEngineCoreDeploySupport.cmake" ) - - set_target_properties(WebEngineCore PROPERTIES QTWEBENGINEPROCESS_NAME ${qtWebEngineProcessName}) diff --git a/srcpkgs/qt6-pdf/patches/0050-no-glibc-cmake-check.patch b/srcpkgs/qt6-pdf/patches/0004-no-glibc-cmake-check.patch similarity index 100% rename from srcpkgs/qt6-pdf/patches/0050-no-glibc-cmake-check.patch rename to srcpkgs/qt6-pdf/patches/0004-no-glibc-cmake-check.patch diff --git a/srcpkgs/qt6-pdf/patches/0004-riscv-angle.patch b/srcpkgs/qt6-pdf/patches/0004-riscv-angle.patch deleted file mode 100644 index 1aceb6f2d22..00000000000 --- a/srcpkgs/qt6-pdf/patches/0004-riscv-angle.patch +++ /dev/null @@ -1,28 +0,0 @@ -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 - #endif - - diff --git a/srcpkgs/qt6-pdf/patches/0004-riscv-angle.patch.args b/srcpkgs/qt6-pdf/patches/0004-riscv-angle.patch.args deleted file mode 100644 index d5f38e354e7..00000000000 --- a/srcpkgs/qt6-pdf/patches/0004-riscv-angle.patch.args +++ /dev/null @@ -1 +0,0 @@ --Np1 --directory=src/3rdparty/chromium/ diff --git a/srcpkgs/qt6-pdf/patches/0005-riscv-crashpad.patch b/srcpkgs/qt6-pdf/patches/0005-riscv-crashpad.patch deleted file mode 100644 index 012a38c3886..00000000000 --- a/srcpkgs/qt6-pdf/patches/0005-riscv-crashpad.patch +++ /dev/null @@ -1,778 +0,0 @@ -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(); -+ reinterpret_cast(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 -+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( -+ const ContextTraits32::SignalThreadContext& thread_context, -+ const ContextTraits32::SignalFloatContext& float_context, -+ ContextTraits32::CPUContext* context); -+template void InitializeCPUContextRISCV( -+ 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 -+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 -+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, 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, 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(thread_context, fp_context, dest_context); -+ -+ return true; -+} -+ -+template <> -+bool ExceptionSnapshotLinux::ReadContext( -+ ProcessReaderLinux* reader, -+ LinuxVMAddress context_address) { -+ context_.architecture = kCPUArchitectureRISCV32; -+ context_.riscv32 = &context_union_.riscv32; -+ -+ return internal::ReadContext( -+ reader, context_address, context_.riscv32); -+} -+ -+template <> -+bool ExceptionSnapshotLinux::ReadContext( -+ ProcessReaderLinux* reader, -+ LinuxVMAddress context_address) { -+ context_.architecture = kCPUArchitectureRISCV64; -+ context_.riscv64 = &context_union_.riscv64; -+ -+ return internal::ReadContext( -+ 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 -+struct UContext { -+ typename Traits::ULong flags; -+ typename Traits::Address link; -+ SignalStack stack; -+ Sigset 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, mcontext) == -+ offsetof(ucontext_t, uc_mcontext), -+ "context offset mismatch"); -+static_assert(offsetof(UContext, mcontext.gregs) == -+ offsetof(ucontext_t, uc_mcontext.__gregs), -+ "context offset mismatch"); -+static_assert(offsetof(UContext, mcontext.fpregs) == -+ offsetof(ucontext_t, uc_mcontext.__fpregs), -+ "context offset mismatch"); -+#elif defined(ARCH_CPU_RISCV64) -+static_assert(offsetof(UContext, mcontext) == -+ offsetof(ucontext_t, uc_mcontext), -+ "context offset mismatch"); -+static_assert(offsetof(UContext, mcontext.gregs) == -+ offsetof(ucontext_t, uc_mcontext.__gregs), -+ "context offset mismatch"); -+static_assert(offsetof(UContext, 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( -+ thread.thread_info.thread_context.t64, -+ thread.thread_info.float_context.f64, -+ context_.riscv64); -+ } else { -+ context_.architecture = kCPUArchitectureRISCV32; -+ context_.riscv32 = &context_union_.riscv32; -+ InitializeCPUContextRISCV( -+ 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 -+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(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-pdf/patches/0005-riscv-crashpad.patch.args b/srcpkgs/qt6-pdf/patches/0005-riscv-crashpad.patch.args deleted file mode 100644 index d5f38e354e7..00000000000 --- a/srcpkgs/qt6-pdf/patches/0005-riscv-crashpad.patch.args +++ /dev/null @@ -1 +0,0 @@ --Np1 --directory=src/3rdparty/chromium/ diff --git a/srcpkgs/qt6-pdf/patches/0006-riscv-dav1d.patch b/srcpkgs/qt6-pdf/patches/0006-riscv-dav1d.patch deleted file mode 100644 index 12ad07275bd..00000000000 --- a/srcpkgs/qt6-pdf/patches/0006-riscv-dav1d.patch +++ /dev/null @@ -1,44 +0,0 @@ -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-pdf/patches/0006-riscv-dav1d.patch.args b/srcpkgs/qt6-pdf/patches/0006-riscv-dav1d.patch.args deleted file mode 100644 index d5f38e354e7..00000000000 --- a/srcpkgs/qt6-pdf/patches/0006-riscv-dav1d.patch.args +++ /dev/null @@ -1 +0,0 @@ --Np1 --directory=src/3rdparty/chromium/ diff --git a/srcpkgs/qt6-pdf/patches/0007-riscv-sandbox.patch b/srcpkgs/qt6-pdf/patches/0007-riscv-sandbox.patch deleted file mode 100644 index c04eb47a013..00000000000 --- a/srcpkgs/qt6-pdf/patches/0007-riscv-sandbox.patch +++ /dev/null @@ -1,1939 +0,0 @@ -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. -@@ -442,7 +442,7 @@ - #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 -@@ -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 -+ -+#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-pdf/patches/0007-riscv-sandbox.patch.args b/srcpkgs/qt6-pdf/patches/0007-riscv-sandbox.patch.args deleted file mode 100644 index d5f38e354e7..00000000000 --- a/srcpkgs/qt6-pdf/patches/0007-riscv-sandbox.patch.args +++ /dev/null @@ -1 +0,0 @@ --Np1 --directory=src/3rdparty/chromium/ diff --git a/srcpkgs/qt6-pdf/patches/0008-rsicv-allocator.patch b/srcpkgs/qt6-pdf/patches/0008-rsicv-allocator.patch deleted file mode 100644 index 98b009f6615..00000000000 --- a/srcpkgs/qt6-pdf/patches/0008-rsicv-allocator.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc.gni 2023-10-03 21:49:54.000000000 +0200 -+++ - 2023-10-27 19:05:06.146398062 +0200 -@@ -14,7 +14,7 @@ - if (is_nacl) { - # NaCl targets don't use 64-bit pointers. - has_64_bit_pointers = false --} else if (current_cpu == "x64" || current_cpu == "arm64") { -+} else if (current_cpu == "x64" || current_cpu == "arm64" || current_cpu == "riscv64") { - has_64_bit_pointers = true - } else if (current_cpu == "x86" || current_cpu == "arm") { - has_64_bit_pointers = false diff --git a/srcpkgs/qt6-pdf/patches/0100-REVERT-roll-src-third_party-ffmpeg-m102.patch b/srcpkgs/qt6-pdf/patches/0100-REVERT-roll-src-third_party-ffmpeg-m102.patch new file mode 100644 index 00000000000..aaaa3018c57 --- /dev/null +++ b/srcpkgs/qt6-pdf/patches/0100-REVERT-roll-src-third_party-ffmpeg-m102.patch @@ -0,0 +1,52 @@ +--- a/src/3rdparty/chromium/media/filters/audio_file_reader_unittest.cc ++++ b/src/3rdparty/chromium/media/filters/audio_file_reader_unittest.cc +@@ -121,11 +121,11 @@ class AudioFileReaderTest : public testi + EXPECT_FALSE(reader_->Open()); + } + +- void RunTestFailingDecode(const char* fn, int expect_read = 0) { ++ void RunTestFailingDecode(const char* fn) { + Initialize(fn); + EXPECT_TRUE(reader_->Open()); + std::vector> decoded_audio_packets; +- EXPECT_EQ(reader_->Read(&decoded_audio_packets), expect_read); ++ EXPECT_EQ(reader_->Read(&decoded_audio_packets), 0); + } + + void RunTestPartialDecode(const char* fn) { +@@ -219,7 +219,7 @@ TEST_F(AudioFileReaderTest, AAC_ADTS) { + } + + TEST_F(AudioFileReaderTest, MidStreamConfigChangesFail) { +- RunTestFailingDecode("midstream_config_change.mp3", 42624); ++ RunTestFailingDecode("midstream_config_change.mp3"); + } + #endif + +--- a/src/3rdparty/chromium/media/filters/audio_video_metadata_extractor.cc ++++ b/src/3rdparty/chromium/media/filters/audio_video_metadata_extractor.cc +@@ -113,15 +113,6 @@ bool AudioVideoMetadataExtractor::Extrac + if (!stream) + continue; + +- void* display_matrix = +- av_stream_get_side_data(stream, AV_PKT_DATA_DISPLAYMATRIX, nullptr); +- if (display_matrix) { +- rotation_ = VideoTransformation::FromFFmpegDisplayMatrix( +- static_cast(display_matrix)) +- .rotation; +- info.tags["rotate"] = base::NumberToString(rotation_); +- } +- + // Extract dictionary from streams also. Needed for containers that attach + // metadata to contained streams instead the container itself, like OGG. + ExtractDictionary(stream->metadata, &info.tags); +@@ -264,6 +255,8 @@ void AudioVideoMetadataExtractor::Extrac + if (raw_tags->find(tag->key) == raw_tags->end()) + (*raw_tags)[tag->key] = tag->value; + ++ if (ExtractInt(tag, "rotate", &rotation_)) ++ continue; + if (ExtractString(tag, "album", &album_)) + continue; + if (ExtractString(tag, "artist", &artist_)) diff --git a/srcpkgs/qt6-pdf/patches/0104-angle-wayland-include.patch b/srcpkgs/qt6-pdf/patches/0104-angle-wayland-include.patch new file mode 100644 index 00000000000..bdae89e41d3 --- /dev/null +++ b/srcpkgs/qt6-pdf/patches/0104-angle-wayland-include.patch @@ -0,0 +1,37 @@ +Patch-Source: https://github.com/archlinux/svntogit-packages/blob/a353833a5a731abfaa465b658f61894a516aa49b/trunk/angle-wayland-include-protocol.patch +--- a/src/3rdparty/chromium/third_party/angle/BUILD.gn ++++ b/src/3rdparty/chromium/third_party/angle/BUILD.gn +@@ -588,6 +588,12 @@ config("angle_vulkan_wayland_config") { + if (angle_enable_vulkan && angle_use_wayland && + defined(vulkan_wayland_include_dirs)) { + include_dirs = vulkan_wayland_include_dirs ++ } else if (angle_enable_vulkan && angle_use_wayland) { ++ include_dirs = [ ++ "$wayland_gn_dir/src/src", ++ "$wayland_gn_dir/include/src", ++ "$wayland_gn_dir/include/protocol", ++ ] + } + } + +@@ -1176,6 +1182,7 @@ if (angle_use_wayland) { + include_dirs = [ + "$wayland_dir/egl", + "$wayland_dir/src", ++ "$wayland_gn_dir/include/protocol", + ] + } + +--- a/src/3rdparty/chromium/third_party/angle/src/third_party/volk/BUILD.gn ++++ b/src/3rdparty/chromium/third_party/angle/src/third_party/volk/BUILD.gn +@@ -21,6 +21,9 @@ source_set("volk") { + configs += [ "$angle_root:angle_no_cfi_icall" ] + public_deps = [ "$angle_vulkan_headers_dir:vulkan_headers" ] + if (angle_use_wayland) { +- include_dirs = [ "$wayland_dir/src" ] ++ include_dirs = [ ++ "$wayland_dir/src", ++ "$wayland_gn_dir/include/protocol", ++ ] + } + } diff --git a/srcpkgs/qt6-pdf/patches/0106-chromium-105.0.5195.52-python-six-1.16.0.patch b/srcpkgs/qt6-pdf/patches/0106-chromium-105.0.5195.52-python-six-1.16.0.patch new file mode 100644 index 00000000000..cfa7e05adc9 --- /dev/null +++ b/srcpkgs/qt6-pdf/patches/0106-chromium-105.0.5195.52-python-six-1.16.0.patch @@ -0,0 +1,84 @@ +--- a/src/3rdparty/chromium/third_party/six/src/six.py ++++ b/src/3rdparty/chromium/third_party/six/src/six.py +@@ -29,7 +29,7 @@ import sys + import types + + __author__ = "Benjamin Peterson " +-__version__ = "1.14.0" ++__version__ = "1.16.0" + + + # Useful for very coarse version differentiation. +@@ -71,6 +71,11 @@ else: + MAXSIZE = int((1 << 63) - 1) + del X + ++if PY34: ++ from importlib.util import spec_from_loader ++else: ++ spec_from_loader = None ++ + + def _add_doc(func, doc): + """Add documentation to a function.""" +@@ -186,6 +191,11 @@ class _SixMetaPathImporter(object): + return self + return None + ++ def find_spec(self, fullname, path, target=None): ++ if fullname in self.known_modules: ++ return spec_from_loader(fullname, self) ++ return None ++ + def __get_module(self, fullname): + try: + return self.known_modules[fullname] +@@ -223,6 +233,12 @@ class _SixMetaPathImporter(object): + return None + get_source = get_code # same as get_code + ++ def create_module(self, spec): ++ return self.load_module(spec.name) ++ ++ def exec_module(self, module): ++ pass ++ + _importer = _SixMetaPathImporter(__name__) + + +@@ -890,12 +906,11 @@ def ensure_binary(s, encoding='utf-8', e + - `str` -> encoded to `bytes` + - `bytes` -> `bytes` + """ ++ if isinstance(s, binary_type): ++ return s + if isinstance(s, text_type): + return s.encode(encoding, errors) +- elif isinstance(s, binary_type): +- return s +- else: +- raise TypeError("not expecting type '%s'" % type(s)) ++ raise TypeError("not expecting type '%s'" % type(s)) + + + def ensure_str(s, encoding='utf-8', errors='strict'): +@@ -909,12 +924,15 @@ def ensure_str(s, encoding='utf-8', erro + - `str` -> `str` + - `bytes` -> decoded to `str` + """ +- if not isinstance(s, (text_type, binary_type)): +- raise TypeError("not expecting type '%s'" % type(s)) ++ # Optimization: Fast return for the common case. ++ if type(s) is str: ++ return s + if PY2 and isinstance(s, text_type): +- s = s.encode(encoding, errors) ++ return s.encode(encoding, errors) + elif PY3 and isinstance(s, binary_type): +- s = s.decode(encoding, errors) ++ return s.decode(encoding, errors) ++ elif not isinstance(s, (text_type, binary_type)): ++ raise TypeError("not expecting type '%s'" % type(s)) + return s + + diff --git a/srcpkgs/qt6-pdf/patches/0106-chromium-system-nodejs.patch b/srcpkgs/qt6-pdf/patches/0106-chromium-system-nodejs.patch deleted file mode 100644 index 1648f764ea1..00000000000 --- a/srcpkgs/qt6-pdf/patches/0106-chromium-system-nodejs.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/node/node.py -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/node/node.py -@@ -18,25 +18,7 @@ def which(cmd): - return None - - def GetBinaryPath(): -- if sys.platform == 'win32': -- nodejs = which('node.exe') -- if nodejs: -- return nodejs -- else: -- nodejs = which('nodejs') -- if nodejs: -- return nodejs -- nodejs = which('node') -- if nodejs: -- return nodejs -- -- darwin_name = ('node-darwin-arm64' if platform.machine() == 'arm64' else -- 'node-darwin-x64') -- return os_path.join(os_path.dirname(__file__), *{ -- 'Darwin': ('mac', darwin_name, 'bin', 'node'), -- 'Linux': ('linux', 'node-linux-x64', 'bin', 'node'), -- 'Windows': ('win', 'node.exe'), -- }[platform.system()]) -+ return "/usr/bin/node" - - - def RunNode(cmd_parts, stdout=None): diff --git a/srcpkgs/qt6-pdf/patches/0107-chromium-114-maldoca-include.patch b/srcpkgs/qt6-pdf/patches/0107-chromium-114-maldoca-include.patch new file mode 100644 index 00000000000..ae92efb4971 --- /dev/null +++ b/srcpkgs/qt6-pdf/patches/0107-chromium-114-maldoca-include.patch @@ -0,0 +1,20 @@ +From 345c58f1d85286b394c05bb8d871ac8173be90a3 Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann +Date: Fri, 31 Mar 2023 16:26:06 +0000 +Subject: [PATCH] IWYU: add stdint.h for int types in maldoca + +--- + third_party/maldoca/src/maldoca/ole/header.h | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/src/3rdparty/chromium/third_party/maldoca/src/maldoca/ole/header.h ++++ b/src/3rdparty/chromium/third_party/maldoca/src/maldoca/ole/header.h +@@ -43,6 +43,8 @@ + #ifndef MALDOCA_OLE_HEADER_H_ + #define MALDOCA_OLE_HEADER_H_ + ++#include ++ + #include "absl/strings/string_view.h" + + namespace maldoca { diff --git a/srcpkgs/qt6-pdf/patches/0108-chromium-115-compiler-SkColor4f.patch b/srcpkgs/qt6-pdf/patches/0108-chromium-115-compiler-SkColor4f.patch new file mode 100644 index 00000000000..32e3dfbfcb3 --- /dev/null +++ b/srcpkgs/qt6-pdf/patches/0108-chromium-115-compiler-SkColor4f.patch @@ -0,0 +1,26 @@ +Patch-Source: https://src.fedoraproject.org/rpms/chromium/blob/1f8fd846d2cc72c90c73c9867619f0da43b9c816/f/chromium-115-compiler-SkColor4f.patch +--- a/src/3rdparty/chromium/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc ++++ b/src/3rdparty/chromium/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc +@@ -76,6 +76,7 @@ bool ParseCanvasColorString(const String + + void CanvasStyle::ApplyToFlags(cc::PaintFlags& flags, + float global_alpha) const { ++ SkColor4f custom_color = SkColor4f{0.0f, 0.0f, 0.0f, global_alpha}; + switch (type_) { + case kColor: + ApplyColorToFlags(flags, global_alpha); +@@ -83,12 +84,12 @@ void CanvasStyle::ApplyToFlags(cc::Paint + case kGradient: + GetCanvasGradient()->GetGradient()->ApplyToFlags(flags, SkMatrix::I(), + ImageDrawOptions()); +- flags.setColor(SkColor4f{0.0f, 0.0f, 0.0f, global_alpha}); ++ flags.setColor(custom_color); + break; + case kImagePattern: + GetCanvasPattern()->GetPattern()->ApplyToFlags( + flags, AffineTransformToSkMatrix(GetCanvasPattern()->GetTransform())); +- flags.setColor(SkColor4f{0.0f, 0.0f, 0.0f, global_alpha}); ++ flags.setColor(custom_color); + break; + default: + NOTREACHED(); diff --git a/srcpkgs/qt6-pdf/patches/0108-chromium-cursed^Uscoped_file.patch b/srcpkgs/qt6-pdf/patches/0108-chromium-cursed^Uscoped_file.patch deleted file mode 100644 index dd31da9790a..00000000000 --- a/srcpkgs/qt6-pdf/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-pdf/patches/0110-chromium-117-typename.patch b/srcpkgs/qt6-pdf/patches/0110-chromium-117-typename.patch new file mode 100644 index 00000000000..6e4af0c0e07 --- /dev/null +++ b/srcpkgs/qt6-pdf/patches/0110-chromium-117-typename.patch @@ -0,0 +1,91 @@ +--- a/src/3rdparty/chromium/components/optimization_guide/core/tflite_model_executor.h ++++ b/src/3rdparty/chromium/components/optimization_guide/core/tflite_model_executor.h +@@ -240,7 +240,7 @@ class TFLiteModelExecutor : public Model + void SendForBatchExecution( + BatchExecutionCallback callback_on_complete, + base::TimeTicks start_time, +- ModelExecutor::ConstRefInputVector inputs) ++ typename ModelExecutor::ConstRefInputVector inputs) + override { + DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +@@ -262,7 +262,7 @@ class TFLiteModelExecutor : public Model + // Starts the synchronous execution of the model. Returns model outputs. + // Model needs to be loaded. Synchronous calls do not load or unload model. + std::vector> SendForBatchExecutionSync( +- ModelExecutor::ConstRefInputVector inputs) ++ typename ModelExecutor::ConstRefInputVector inputs) + override { + DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +@@ -417,7 +417,7 @@ class TFLiteModelExecutor : public Model + // executes it on the model execution thread. + void LoadModelFileAndBatchExecute( + BatchExecutionCallback callback_on_complete, +- ModelExecutor::ConstRefInputVector inputs) { ++ typename ModelExecutor::ConstRefInputVector inputs) { + DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + +@@ -434,7 +434,7 @@ class TFLiteModelExecutor : public Model + + // Batch executes the loaded model for inputs. + void BatchExecuteLoadedModel( +- ModelExecutor::ConstRefInputVector inputs, ++ typename ModelExecutor::ConstRefInputVector inputs, + std::vector>* outputs) { + DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +@@ -494,7 +494,7 @@ class TFLiteModelExecutor : public Model + // Unloads the model if needed. + void BatchExecuteLoadedModelAndRunCallback( + BatchExecutionCallback callback_on_complete, +- ModelExecutor::ConstRefInputVector inputs, ++ typename ModelExecutor::ConstRefInputVector inputs, + ExecutionStatus execution_status) { + DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +--- a/src/3rdparty/chromium/components/supervised_user/core/browser/proto_fetcher.cc ++++ b/src/3rdparty/chromium/components/supervised_user/core/browser/proto_fetcher.cc +@@ -399,7 +399,7 @@ class RetryingFetcherImpl final : public + RetryingFetcherImpl(const RetryingFetcherImpl&) = delete; + RetryingFetcherImpl& operator=(const RetryingFetcherImpl&) = delete; + +- void Start(ProtoFetcher::Callback callback) override { ++ void Start(typename ProtoFetcher::Callback callback) override { + callback_ = std::move(callback); + Retry(); + } +@@ -435,7 +435,7 @@ class RetryingFetcherImpl final : public + } + + // Client callback. +- ProtoFetcher::Callback callback_; ++ typename ProtoFetcher::Callback callback_; + + // Retry controls. + base::OneShotTimer timer_; +@@ -578,7 +578,7 @@ ParallelFetchManager: + template + void ParallelFetchManager::Fetch( + const Request& request, +- Fetcher::Callback callback) { ++ typename Fetcher::Callback callback) { + CHECK(callback) << "Use base::DoNothing() instead of empty callback."; + KeyType key = requests_in_flight_.Add(MakeFetcher(request)); + requests_in_flight_.Lookup(key)->Start( +--- a/src/3rdparty/chromium/components/supervised_user/core/browser/proto_fetcher.h ++++ b/src/3rdparty/chromium/components/supervised_user/core/browser/proto_fetcher.h +@@ -165,10 +165,10 @@ class ParallelFetchManager { + + // Starts the fetch. Underlying fetcher is stored internally, and will be + // cleaned up after finish or when this manager is destroyed. +- void Fetch(const Request& request, Fetcher::Callback callback); ++ void Fetch(const Request& request, typename Fetcher::Callback callback); + + private: +- using KeyType = base::IDMap>::KeyType; ++ using KeyType = typename base::IDMap>::KeyType; + + // Remove fetcher under key from requests_in_flight_. + void Remove(KeyType key); diff --git a/srcpkgs/qt6-pdf/patches/0111-chromium-cstdint.patch b/srcpkgs/qt6-pdf/patches/0111-chromium-cstdint.patch deleted file mode 100644 index f5787621b57..00000000000 --- a/srcpkgs/qt6-pdf/patches/0111-chromium-cstdint.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/net/third_party/quiche/src/quiche/http2/adapter/window_manager.h -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/net/third_party/quiche/src/quiche/http2/adapter/window_manager.h -@@ -3,6 +3,7 @@ - - #include - -+#include - #include - - #include "quiche/common/platform/api/quiche_export.h" diff --git a/srcpkgs/qt6-pdf/patches/0112-chromium-118-missing-header-files.patch b/srcpkgs/qt6-pdf/patches/0112-chromium-118-missing-header-files.patch new file mode 100644 index 00000000000..43861ea7321 --- /dev/null +++ b/srcpkgs/qt6-pdf/patches/0112-chromium-118-missing-header-files.patch @@ -0,0 +1,379 @@ +--- a/src/3rdparty/chromium/base/memory/ref_counted.h ++++ b/src/3rdparty/chromium/base/memory/ref_counted.h +@@ -6,6 +6,7 @@ + #define BASE_MEMORY_REF_COUNTED_H_ + + #include ++#include + + #include + #include +--- a/src/3rdparty/chromium/base/check_op.h ++++ b/src/3rdparty/chromium/base/check_op.h +@@ -5,6 +5,7 @@ + #ifndef BASE_CHECK_OP_H_ + #define BASE_CHECK_OP_H_ + ++#include + #include + #include + #include +--- a/src/3rdparty/chromium/base/debug/profiler.h ++++ b/src/3rdparty/chromium/base/debug/profiler.h +@@ -8,6 +8,7 @@ + #include + #include + ++#include + #include + + #include "base/base_export.h" +--- a/src/3rdparty/chromium/gpu/config/gpu_feature_info.h ++++ b/src/3rdparty/chromium/gpu/config/gpu_feature_info.h +@@ -7,6 +7,7 @@ + + #include + ++#include + #include + #include + +--- a/src/3rdparty/chromium/net/base/net_export.h ++++ b/src/3rdparty/chromium/net/base/net_export.h +@@ -5,6 +5,8 @@ + #ifndef NET_BASE_NET_EXPORT_H_ + #define NET_BASE_NET_EXPORT_H_ + ++#include ++ + // Defines NET_EXPORT so that functionality implemented by the net module can + // be exported to consumers, and NET_EXPORT_PRIVATE that allows unit tests to + // access features not intended to be used directly by real consumers. +--- a/src/3rdparty/chromium/sandbox/linux/syscall_broker/broker_file_permission.h ++++ b/src/3rdparty/chromium/sandbox/linux/syscall_broker/broker_file_permission.h +@@ -5,6 +5,7 @@ + #ifndef SANDBOX_LINUX_SYSCALL_BROKER_BROKER_FILE_PERMISSION_H_ + #define SANDBOX_LINUX_SYSCALL_BROKER_BROKER_FILE_PERMISSION_H_ + ++#include + #include + #include + #include +--- a/src/3rdparty/chromium/third_party/abseil-cpp/absl/strings/string_view.h ++++ b/src/3rdparty/chromium/third_party/abseil-cpp/absl/strings/string_view.h +@@ -27,6 +27,7 @@ + #ifndef ABSL_STRINGS_STRING_VIEW_H_ + #define ABSL_STRINGS_STRING_VIEW_H_ + ++#include + #include + #include + #include +--- a/src/3rdparty/chromium/third_party/angle/include/GLSLANG/ShaderVars.h ++++ b/src/3rdparty/chromium/third_party/angle/include/GLSLANG/ShaderVars.h +@@ -10,6 +10,7 @@ + #ifndef GLSLANG_SHADERVARS_H_ + #define GLSLANG_SHADERVARS_H_ + ++#include + #include + #include + #include +--- a/src/3rdparty/chromium/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h ++++ b/src/3rdparty/chromium/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h +@@ -7,6 +7,7 @@ + + #include + ++#include + #include + #include + #include +--- a/src/3rdparty/chromium/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h ++++ b/src/3rdparty/chromium/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h +@@ -15,6 +15,7 @@ + #ifndef SRC_TINT_LANG_SPIRV_READER_AST_PARSER_NAMER_H_ + #define SRC_TINT_LANG_SPIRV_READER_AST_PARSER_NAMER_H_ + ++#include + #include + #include + #include +--- a/src/3rdparty/chromium/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h ++++ b/src/3rdparty/chromium/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h +@@ -7,6 +7,7 @@ + + #include + ++#include + #include + #include + #include +--- a/src/3rdparty/chromium/third_party/swiftshader/src/System/LRUCache.hpp ++++ b/src/3rdparty/chromium/third_party/swiftshader/src/System/LRUCache.hpp +@@ -17,6 +17,7 @@ + + #include "System/Debug.hpp" + ++#include + #include + #include + #include +--- a/src/3rdparty/chromium/ui/gfx/geometry/linear_gradient.h ++++ b/src/3rdparty/chromium/ui/gfx/geometry/linear_gradient.h +@@ -7,6 +7,7 @@ + + #include + ++#include + #include + #include + #include +--- a/src/3rdparty/chromium/third_party/ruy/src/ruy/profiler/instrumentation.h ++++ b/src/3rdparty/chromium/third_party/ruy/src/ruy/profiler/instrumentation.h +@@ -17,6 +17,7 @@ limitations under the License. + #define RUY_RUY_PROFILER_INSTRUMENTATION_H_ + + #ifdef RUY_PROFILER ++#include + #include + #include + #include +--- a/src/3rdparty/chromium/base/containers/flat_map.h ++++ b/src/3rdparty/chromium/base/containers/flat_map.h +@@ -5,6 +5,7 @@ + #ifndef BASE_CONTAINERS_FLAT_MAP_H_ + #define BASE_CONTAINERS_FLAT_MAP_H_ + ++#include + #include + #include + #include +--- a/src/3rdparty/chromium/components/crash/core/app/crash_reporter_client.h ++++ b/src/3rdparty/chromium/components/crash/core/app/crash_reporter_client.h +@@ -7,6 +7,7 @@ + + #include + ++#include + #include + + #include "build/build_config.h" +--- a/src/3rdparty/chromium/ui/base/prediction/kalman_filter.h ++++ b/src/3rdparty/chromium/ui/base/prediction/kalman_filter.h +@@ -7,6 +7,8 @@ + + #include + ++#include ++ + #include "base/component_export.h" + #include "ui/gfx/geometry/matrix3_f.h" + +--- a/src/3rdparty/chromium/components/password_manager/core/browser/generation/password_generator.h ++++ b/src/3rdparty/chromium/components/password_manager/core/browser/generation/password_generator.h +@@ -7,6 +7,7 @@ + + #include + ++#include + #include + + +--- a/src/3rdparty/chromium/components/feature_engagement/internal/event_storage_validator.h ++++ b/src/3rdparty/chromium/components/feature_engagement/internal/event_storage_validator.h +@@ -7,6 +7,7 @@ + + #include + ++#include + #include + + namespace feature_engagement { +--- a/src/3rdparty/chromium/components/feature_engagement/internal/never_event_storage_validator.h ++++ b/src/3rdparty/chromium/components/feature_engagement/internal/never_event_storage_validator.h +@@ -5,6 +5,7 @@ + #ifndef COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_NEVER_EVENT_STORAGE_VALIDATOR_H_ + #define COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_NEVER_EVENT_STORAGE_VALIDATOR_H_ + ++#include + #include + + #include "components/feature_engagement/internal/event_storage_validator.h" +--- a/src/3rdparty/chromium/components/autofill/core/browser/autofill_ablation_study.h ++++ b/src/3rdparty/chromium/components/autofill/core/browser/autofill_ablation_study.h +@@ -7,6 +7,7 @@ + + #include + ++#include + #include + + class GURL; +--- a/src/3rdparty/chromium/components/payments/content/utility/fingerprint_parser.h ++++ b/src/3rdparty/chromium/components/payments/content/utility/fingerprint_parser.h +@@ -5,6 +5,7 @@ + #ifndef COMPONENTS_PAYMENTS_CONTENT_UTILITY_FINGERPRINT_PARSER_H_ + #define COMPONENTS_PAYMENTS_CONTENT_UTILITY_FINGERPRINT_PARSER_H_ + ++#include + #include + #include + +--- a/src/3rdparty/chromium/pdf/document_attachment_info.h ++++ b/src/3rdparty/chromium/pdf/document_attachment_info.h +@@ -7,6 +7,7 @@ + + #include + ++#include + #include + + +--- a/src/3rdparty/chromium/third_party/pdfium/constants/annotation_flags.h ++++ b/src/3rdparty/chromium/third_party/pdfium/constants/annotation_flags.h +@@ -7,6 +7,8 @@ + + #include + ++#include ++ + namespace pdfium { + namespace annotation_flags { + +--- a/src/3rdparty/chromium/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h ++++ b/src/3rdparty/chromium/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h +@@ -2884,6 +2884,7 @@ static void vma_aligned_free(void* VMA_N + + // Define this macro to 1 to enable functions: vmaBuildStatsString, vmaFreeStatsString. + #if VMA_STATS_STRING_ENABLED ++#include + static inline void VmaUint32ToStr(char* VMA_NOT_NULL outStr, size_t strLen, uint32_t num) + { + snprintf(outStr, strLen, "%u", static_cast(num)); +--- a/src/3rdparty/chromium/gin/time_clamper.h ++++ b/src/3rdparty/chromium/gin/time_clamper.h +@@ -48,7 +48,7 @@ class GIN_EXPORT TimeClamper { + const int64_t micros = now_micros % 1000; + // abs() is necessary for devices with times before unix-epoch (most likely + // configured incorrectly). +- if (abs(micros) + kResolutionMicros < 1000) { ++ if (std::abs(micros) + kResolutionMicros < 1000) { + return now_micros / 1000; + } + return ClampTimeResolution(now_micros) / 1000; +--- a/src/3rdparty/chromium/chrome/test/chromedriver/chrome/web_view_impl.cc ++++ b/src/3rdparty/chromium/chrome/test/chromedriver/chrome/web_view_impl.cc +@@ -11,6 +11,7 @@ + #include + #include + #include ++#include + + #include "base/check.h" + #include "base/files/file_path.h" +--- a/src/3rdparty/chromium/skia/ext/skcolorspace_trfn.cc ++++ b/src/3rdparty/chromium/skia/ext/skcolorspace_trfn.cc +@@ -3,6 +3,7 @@ + // found in the LICENSE file. + + #include "skia/ext/skcolorspace_trfn.h" ++#include + + #include + +--- a/src/3rdparty/chromium/third_party/webrtc/common_video/h264/sps_parser.h ++++ b/src/3rdparty/chromium/third_party/webrtc/common_video/h264/sps_parser.h +@@ -11,6 +11,7 @@ + #ifndef COMMON_VIDEO_H264_SPS_PARSER_H_ + #define COMMON_VIDEO_H264_SPS_PARSER_H_ + ++#include + #include "absl/types/optional.h" + #include "rtc_base/bitstream_reader.h" + +--- a/src/3rdparty/chromium/third_party/webrtc/modules/include/module_common_types_public.h ++++ b/src/3rdparty/chromium/third_party/webrtc/modules/include/module_common_types_public.h +@@ -11,6 +11,7 @@ + #ifndef MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_ + #define MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_ + ++#include + #include + + #include "absl/types/optional.h" +--- a/src/3rdparty/chromium/ui/gfx/linux/drm_util_linux.h ++++ b/src/3rdparty/chromium/ui/gfx/linux/drm_util_linux.h +@@ -9,6 +9,8 @@ + + #include "ui/gfx/buffer_types.h" + ++#include ++ + namespace ui { + + int GetFourCCFormatFromBufferFormat(gfx::BufferFormat format); +--- a/src/3rdparty/chromium/third_party/webrtc/audio/utility/channel_mixer.cc ++++ b/src/3rdparty/chromium/third_party/webrtc/audio/utility/channel_mixer.cc +@@ -8,6 +8,8 @@ + * be found in the AUTHORS file in the root of the source tree. + */ + ++#include ++ + #include "audio/utility/channel_mixer.h" + + #include "audio/utility/channel_mixing_matrix.h" +--- a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc ++++ b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc +@@ -10,6 +10,7 @@ + + #include "modules/video_coding/utility/ivf_file_reader.h" + ++#include + #include + #include + +--- a/src/3rdparty/chromium/third_party/ipcz/src/ipcz/router_link.h ++++ b/src/3rdparty/chromium/third_party/ipcz/src/ipcz/router_link.h +@@ -5,6 +5,7 @@ + #ifndef IPCZ_SRC_IPCZ_ROUTER_LINK_H_ + #define IPCZ_SRC_IPCZ_ROUTER_LINK_H_ + ++#include + #include + #include + #include +--- a/src/3rdparty/chromium/third_party/material_color_utilities/src/cpp/palettes/tones.cc ++++ b/src/3rdparty/chromium/third_party/material_color_utilities/src/cpp/palettes/tones.cc +@@ -14,6 +14,7 @@ + * limitations under the License. + */ + ++#include + #include "cpp/palettes/tones.h" + + #include +--- a/src/3rdparty/chromium/services/device/public/cpp/generic_sensor/sensor_reading.h ++++ b/src/3rdparty/chromium/services/device/public/cpp/generic_sensor/sensor_reading.h +@@ -8,6 +8,9 @@ + #include + #include + ++#include ++#include ++ + #include + + namespace device { +--- a/src/3rdparty/chromium/components/gwp_asan/client/lightweight_detector.h ++++ b/src/3rdparty/chromium/components/gwp_asan/client/lightweight_detector.h +@@ -5,6 +5,8 @@ + #ifndef COMPONENTS_GWP_ASAN_CLIENT_LIGHTWEIGHT_DETECTOR_H_ + #define COMPONENTS_GWP_ASAN_CLIENT_LIGHTWEIGHT_DETECTOR_H_ + ++#include ++ + #include "base/gtest_prod_util.h" + #include "components/gwp_asan/client/export.h" + #include "components/gwp_asan/common/lightweight_detector_state.h" diff --git a/srcpkgs/qt6-pdf/patches/0113-chromium-118-no_matching_constructor.patch b/srcpkgs/qt6-pdf/patches/0113-chromium-118-no_matching_constructor.patch new file mode 100644 index 00000000000..97926daa8ca --- /dev/null +++ b/srcpkgs/qt6-pdf/patches/0113-chromium-118-no_matching_constructor.patch @@ -0,0 +1,410 @@ +--- a/src/3rdparty/chromium/ui/base/wayland/color_manager_util.h ++++ b/src/3rdparty/chromium/ui/base/wayland/color_manager_util.h +@@ -52,53 +52,53 @@ constexpr auto kChromaticityMap = base:: + zcr_color_manager_v1_chromaticity_names, + PrimaryVersion>( + {{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT601_525_LINE, +- PrimaryVersion(gfx::ColorSpace::PrimaryID::SMPTE170M, +- kDefaultSinceVersion)}, ++ PrimaryVersion{gfx::ColorSpace::PrimaryID::SMPTE170M, ++ kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT601_625_LINE, +- PrimaryVersion(gfx::ColorSpace::PrimaryID::BT470BG, +- kDefaultSinceVersion)}, ++ PrimaryVersion{gfx::ColorSpace::PrimaryID::BT470BG, ++ kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTE170M, +- PrimaryVersion(gfx::ColorSpace::PrimaryID::SMPTE170M, +- kDefaultSinceVersion)}, ++ PrimaryVersion{gfx::ColorSpace::PrimaryID::SMPTE170M, ++ kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT709, +- PrimaryVersion(gfx::ColorSpace::PrimaryID::BT709, kDefaultSinceVersion)}, ++ PrimaryVersion{gfx::ColorSpace::PrimaryID::BT709, kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT2020, +- PrimaryVersion(gfx::ColorSpace::PrimaryID::BT2020, kDefaultSinceVersion)}, ++ PrimaryVersion{gfx::ColorSpace::PrimaryID::BT2020, kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SRGB, +- PrimaryVersion(gfx::ColorSpace::PrimaryID::BT709, kDefaultSinceVersion)}, ++ PrimaryVersion{gfx::ColorSpace::PrimaryID::BT709, kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_DISPLAYP3, +- PrimaryVersion(gfx::ColorSpace::PrimaryID::P3, kDefaultSinceVersion)}, ++ PrimaryVersion{gfx::ColorSpace::PrimaryID::P3, kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_ADOBERGB, +- PrimaryVersion(gfx::ColorSpace::PrimaryID::ADOBE_RGB, +- kDefaultSinceVersion)}, ++ PrimaryVersion{gfx::ColorSpace::PrimaryID::ADOBE_RGB, ++ kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_WIDE_GAMUT_COLOR_SPIN, +- PrimaryVersion( ++ PrimaryVersion{ + gfx::ColorSpace::PrimaryID::WIDE_GAMUT_COLOR_SPIN, +- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_WIDE_GAMUT_COLOR_SPIN_SINCE_VERSION)}, ++ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_WIDE_GAMUT_COLOR_SPIN_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT470M, +- PrimaryVersion( ++ PrimaryVersion{ + gfx::ColorSpace::PrimaryID::BT470M, +- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT470M_SINCE_VERSION)}, ++ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT470M_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTE240M, +- PrimaryVersion( ++ PrimaryVersion{ + gfx::ColorSpace::PrimaryID::SMPTE240M, +- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTE240M_SINCE_VERSION)}, ++ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTE240M_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_XYZ_D50, +- PrimaryVersion( ++ PrimaryVersion{ + gfx::ColorSpace::PrimaryID::XYZ_D50, +- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_XYZ_D50_SINCE_VERSION)}, ++ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_XYZ_D50_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST428_1, +- PrimaryVersion( ++ PrimaryVersion{ + gfx::ColorSpace::PrimaryID::SMPTEST428_1, +- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST428_1_SINCE_VERSION)}, ++ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST428_1_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST431_2, +- PrimaryVersion( ++ PrimaryVersion{ + gfx::ColorSpace::PrimaryID::SMPTEST431_2, +- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST431_2_SINCE_VERSION)}, ++ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST431_2_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_FILM, +- PrimaryVersion( ++ PrimaryVersion{ + gfx::ColorSpace::PrimaryID::FILM, +- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_FILM_SINCE_VERSION)}}); ++ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_FILM_SINCE_VERSION}}}); + + // A map from the zcr_color_manager_v1 eotf_names enum values + // representing well-known EOTFs, to their equivalent TransferIDs. +@@ -107,65 +107,65 @@ constexpr auto kEotfMap = base::MakeFixe + zcr_color_manager_v1_eotf_names, + TransferVersion>({ + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LINEAR, +- TransferVersion(gfx::ColorSpace::TransferID::LINEAR, +- kDefaultSinceVersion)}, ++ TransferVersion{gfx::ColorSpace::TransferID::LINEAR, ++ kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB, +- TransferVersion(gfx::ColorSpace::TransferID::SRGB, kDefaultSinceVersion)}, ++ TransferVersion{gfx::ColorSpace::TransferID::SRGB, kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709, +- TransferVersion(gfx::ColorSpace::TransferID::BT709, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709_SINCE_VERSION)}, ++ TransferVersion{gfx::ColorSpace::TransferID::BT709, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2087, +- TransferVersion(gfx::ColorSpace::TransferID::GAMMA24, +- kDefaultSinceVersion)}, ++ TransferVersion{gfx::ColorSpace::TransferID::GAMMA24, ++ kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_ADOBERGB, + // This is ever so slightly inaccurate. The number ought to be + // 2.19921875f, not 2.2 +- TransferVersion(gfx::ColorSpace::TransferID::GAMMA22, +- kDefaultSinceVersion)}, ++ TransferVersion{gfx::ColorSpace::TransferID::GAMMA22, ++ kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_PQ, +- TransferVersion(gfx::ColorSpace::TransferID::PQ, kDefaultSinceVersion)}, ++ TransferVersion{gfx::ColorSpace::TransferID::PQ, kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG, +- TransferVersion(gfx::ColorSpace::TransferID::HLG, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG_SINCE_VERSION)}, ++ TransferVersion{gfx::ColorSpace::TransferID::HLG, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE170M, +- TransferVersion(gfx::ColorSpace::TransferID::SMPTE170M, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE170M_SINCE_VERSION)}, ++ TransferVersion{gfx::ColorSpace::TransferID::SMPTE170M, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE170M_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE240M, +- TransferVersion(gfx::ColorSpace::TransferID::SMPTE240M, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE240M_SINCE_VERSION)}, ++ TransferVersion{gfx::ColorSpace::TransferID::SMPTE240M, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE240M_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTEST428_1, +- TransferVersion( ++ TransferVersion{ + gfx::ColorSpace::TransferID::SMPTEST428_1, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTEST428_1_SINCE_VERSION)}, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTEST428_1_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG, +- TransferVersion(gfx::ColorSpace::TransferID::LOG, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG_SINCE_VERSION)}, ++ TransferVersion{gfx::ColorSpace::TransferID::LOG, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG_SQRT, +- TransferVersion(gfx::ColorSpace::TransferID::LOG_SQRT, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG_SQRT_SINCE_VERSION)}, ++ TransferVersion{gfx::ColorSpace::TransferID::LOG_SQRT, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG_SQRT_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_IEC61966_2_4, +- TransferVersion( ++ TransferVersion{ + gfx::ColorSpace::TransferID::IEC61966_2_4, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_IEC61966_2_4_SINCE_VERSION)}, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_IEC61966_2_4_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT1361_ECG, +- TransferVersion(gfx::ColorSpace::TransferID::BT1361_ECG, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT1361_ECG_SINCE_VERSION)}, ++ TransferVersion{gfx::ColorSpace::TransferID::BT1361_ECG, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT1361_ECG_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_10, +- TransferVersion(gfx::ColorSpace::TransferID::BT2020_10, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_10_SINCE_VERSION)}, ++ TransferVersion{gfx::ColorSpace::TransferID::BT2020_10, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_10_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_12, +- TransferVersion(gfx::ColorSpace::TransferID::BT2020_12, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_12_SINCE_VERSION)}, ++ TransferVersion{gfx::ColorSpace::TransferID::BT2020_12, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_12_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SCRGB_LINEAR_80_NITS, +- TransferVersion( ++ TransferVersion{ + gfx::ColorSpace::TransferID::SCRGB_LINEAR_80_NITS, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SCRGB_LINEAR_80_NITS_SINCE_VERSION)}, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SCRGB_LINEAR_80_NITS_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA18, +- TransferVersion(gfx::ColorSpace::TransferID::GAMMA18, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA18_SINCE_VERSION)}, ++ TransferVersion{gfx::ColorSpace::TransferID::GAMMA18, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA18_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA28, +- TransferVersion(gfx::ColorSpace::TransferID::GAMMA28, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA28_SINCE_VERSION)}, ++ TransferVersion{gfx::ColorSpace::TransferID::GAMMA28, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA28_SINCE_VERSION}}, + }); + + // A map from the SDR zcr_color_manager_v1 eotf_names enum values +@@ -174,18 +174,18 @@ constexpr auto kEotfMap = base::MakeFixe + constexpr auto kTransferMap = + base::MakeFixedFlatMap({ + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LINEAR, +- TransferFnVersion(SkNamedTransferFn::kLinear, kDefaultSinceVersion)}, ++ TransferFnVersion{SkNamedTransferFn::kLinear, kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB, +- TransferFnVersion(SkNamedTransferFnExt::kSRGB, kDefaultSinceVersion)}, ++ TransferFnVersion{SkNamedTransferFnExt::kSRGB, kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709, +- TransferFnVersion( ++ TransferFnVersion{ + SkNamedTransferFnExt::kRec709, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709_SINCE_VERSION)}, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2087, +- TransferFnVersion(gamma24, kDefaultSinceVersion)}, ++ TransferFnVersion{gamma24, kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_ADOBERGB, +- TransferFnVersion(SkNamedTransferFnExt::kA98RGB, +- kDefaultSinceVersion)}, ++ TransferFnVersion{SkNamedTransferFnExt::kA98RGB, ++ kDefaultSinceVersion}}, + }); + + // A map from the HDR zcr_color_manager_v1 eotf_names enum values +@@ -194,68 +194,68 @@ constexpr auto kTransferMap = + constexpr auto kHDRTransferMap = + base::MakeFixedFlatMap( + {{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LINEAR, +- TransferFnVersion(SkNamedTransferFn::kLinear, kDefaultSinceVersion)}, ++ TransferFnVersion{SkNamedTransferFn::kLinear, kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB, +- TransferFnVersion(SkNamedTransferFnExt::kSRGB, kDefaultSinceVersion)}, ++ TransferFnVersion{SkNamedTransferFnExt::kSRGB, kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_PQ, +- TransferFnVersion(SkNamedTransferFn::kPQ, kDefaultSinceVersion)}, ++ TransferFnVersion{SkNamedTransferFn::kPQ, kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG, +- TransferFnVersion(SkNamedTransferFn::kHLG, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG_SINCE_VERSION)}, ++ TransferFnVersion{SkNamedTransferFn::kHLG, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_EXTENDEDSRGB10, +- TransferFnVersion( ++ TransferFnVersion{ + SkNamedTransferFnExt::kSRGBExtended1023Over510, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_EXTENDEDSRGB10_SINCE_VERSION)}}); ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_EXTENDEDSRGB10_SINCE_VERSION}}}); + + // A map from zcr_color_manager_v1 matrix_names enum values to + // gfx::ColorSpace::MatrixIDs. + constexpr auto kMatrixMap = + base::MakeFixedFlatMap( + {{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_RGB, +- MatrixVersion(gfx::ColorSpace::MatrixID::RGB, kDefaultSinceVersion)}, ++ MatrixVersion{gfx::ColorSpace::MatrixID::RGB, kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT709, +- MatrixVersion(gfx::ColorSpace::MatrixID::BT709, +- kDefaultSinceVersion)}, ++ MatrixVersion{gfx::ColorSpace::MatrixID::BT709, ++ kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT470BG, +- MatrixVersion( ++ MatrixVersion{ + gfx::ColorSpace::MatrixID::BT470BG, +- ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT470BG_SINCE_VERSION)}, ++ ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT470BG_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT2020_NCL, +- MatrixVersion(gfx::ColorSpace::MatrixID::BT2020_NCL, +- kDefaultSinceVersion)}, ++ MatrixVersion{gfx::ColorSpace::MatrixID::BT2020_NCL, ++ kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT2020_CL, +- MatrixVersion(gfx::ColorSpace::MatrixID::BT2020_CL, +- kDefaultSinceVersion)}, ++ MatrixVersion{gfx::ColorSpace::MatrixID::BT2020_CL, ++ kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_FCC, +- MatrixVersion(gfx::ColorSpace::MatrixID::FCC, kDefaultSinceVersion)}, ++ MatrixVersion{gfx::ColorSpace::MatrixID::FCC, kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YCOCG, +- MatrixVersion(gfx::ColorSpace::MatrixID::YCOCG, +- ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YCOCG_SINCE_VERSION)}, ++ MatrixVersion{gfx::ColorSpace::MatrixID::YCOCG, ++ ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YCOCG_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YDZDX, +- MatrixVersion(gfx::ColorSpace::MatrixID::YDZDX, +- ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YDZDX_SINCE_VERSION)}, ++ MatrixVersion{gfx::ColorSpace::MatrixID::YDZDX, ++ ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YDZDX_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_GBR, +- MatrixVersion(gfx::ColorSpace::MatrixID::GBR, +- ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_GBR_SINCE_VERSION)}, ++ MatrixVersion{gfx::ColorSpace::MatrixID::GBR, ++ ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_GBR_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_SMPTE170M, +- MatrixVersion(gfx::ColorSpace::MatrixID::SMPTE170M, +- kDefaultSinceVersion)}, ++ MatrixVersion{gfx::ColorSpace::MatrixID::SMPTE170M, ++ kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_SMPTE240M, +- MatrixVersion(gfx::ColorSpace::MatrixID::SMPTE240M, +- kDefaultSinceVersion)}}); ++ MatrixVersion{gfx::ColorSpace::MatrixID::SMPTE240M, ++ kDefaultSinceVersion}}}); + + // A map from zcr_color_manager_v1 range_names enum values to + // gfx::ColorSpace::RangeIDs. + constexpr auto kRangeMap = + base::MakeFixedFlatMap( + {{ZCR_COLOR_MANAGER_V1_RANGE_NAMES_LIMITED, +- RangeVersion(gfx::ColorSpace::RangeID::LIMITED, +- kDefaultSinceVersion)}, ++ RangeVersion{gfx::ColorSpace::RangeID::LIMITED, ++ kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_RANGE_NAMES_FULL, +- RangeVersion(gfx::ColorSpace::RangeID::FULL, kDefaultSinceVersion)}, ++ RangeVersion{gfx::ColorSpace::RangeID::FULL, kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_RANGE_NAMES_DERIVED, +- RangeVersion(gfx::ColorSpace::RangeID::DERIVED, +- kDefaultSinceVersion)}}); ++ RangeVersion{gfx::ColorSpace::RangeID::DERIVED, ++ kDefaultSinceVersion}}}); + + zcr_color_manager_v1_chromaticity_names ToColorManagerChromaticity( + gfx::ColorSpace::PrimaryID primaryID, +--- a/src/3rdparty/chromium/chrome/test/chromedriver/capabilities.cc ++++ b/src/3rdparty/chromium/chrome/test/chromedriver/capabilities.cc +@@ -346,7 +346,7 @@ Status ParseMobileEmulation(const base:: + "'version' field of type string"); + } + +- brands.emplace_back(*brand, *version); ++ brands.emplace_back() = {*brand, *version}; + } + + client_hints.brands = std::move(brands); +@@ -384,7 +384,7 @@ Status ParseMobileEmulation(const base:: + "a 'version' field of type string"); + } + +- full_version_list.emplace_back(*brand, *version); ++ full_version_list.emplace_back() = {*brand, *version}; + } + + client_hints.full_version_list = std::move(full_version_list); +--- a/src/3rdparty/chromium/base/trace_event/trace_log.cc ++++ b/src/3rdparty/chromium/base/trace_event/trace_log.cc +@@ -2190,8 +2190,8 @@ void TraceLog::SetTraceBufferForTesting( + #if BUILDFLAG(USE_PERFETTO_CLIENT_LIBRARY) + void TraceLog::OnSetup(const perfetto::DataSourceBase::SetupArgs& args) { + AutoLock lock(track_event_lock_); +- track_event_sessions_.emplace_back(args.internal_instance_index, *args.config, +- args.backend_type); ++ track_event_sessions_.emplace_back() = {args.internal_instance_index, *args.config, ++ args.backend_type}; + } + + void TraceLog::OnStart(const perfetto::DataSourceBase::StartArgs&) { +--- a/src/3rdparty/chromium/ui/gtk/gtk_ui.cc ++++ b/src/3rdparty/chromium/ui/gtk/gtk_ui.cc +@@ -955,11 +955,11 @@ ui::DisplayConfig GtkUi::GetDisplayConfi + GdkRectangle geometry; + gdk_monitor_get_geometry(monitor, &geometry); + int monitor_scale = std::max(1, gdk_monitor_get_scale_factor(monitor)); +- config.display_geometries.emplace_back( ++ config.display_geometries.emplace_back() = { + gfx::Rect(monitor_scale * geometry.x, monitor_scale * geometry.y, + monitor_scale * geometry.width, + monitor_scale * geometry.height), +- monitor_scale * font_scale); ++ static_cast(monitor_scale * font_scale)}; + } + return config; + } +--- a/src/3rdparty/chromium/components/autofill/core/browser/contact_info_sync_util.cc ++++ b/src/3rdparty/chromium/components/autofill/core/browser/contact_info_sync_util.cc +@@ -174,9 +174,9 @@ class ContactInfoProfileSetter { + CHECK(observations.empty()); + for (const sync_pb::ContactInfoSpecifics::Observation& proto_observation : + proto_observations) { +- observations.emplace_back(proto_observation.type(), ++ observations.emplace_back() = {static_cast(proto_observation.type()), + ProfileTokenQuality::FormSignatureHash( +- proto_observation.form_hash())); ++ proto_observation.form_hash())}; + } + } + +--- a/src/3rdparty/chromium/components/autofill/core/browser/webdata/autofill_sync_bridge_util.cc ++++ b/src/3rdparty/chromium/components/autofill/core/browser/webdata/autofill_sync_bridge_util.cc +@@ -553,11 +553,11 @@ ServerCvc AutofillWalletCvcStructDataFro + base::StringToInt64(wallet_credential_specifics.instrument_id(), + &instrument_id); + +- return ServerCvc( ++ return ServerCvc{ + instrument_id, base::UTF8ToUTF16(wallet_credential_specifics.cvc()), + base::Time::UnixEpoch() + + base::Milliseconds(wallet_credential_specifics +- .last_updated_time_unix_epoch_millis())); ++ .last_updated_time_unix_epoch_millis())}; + } + + VirtualCardUsageData VirtualCardUsageDataFromUsageSpecifics( +--- a/src/3rdparty/chromium/chrome/test/chromedriver/capabilities.cc ++++ b/src/3rdparty/chromium/chrome/test/chromedriver/capabilities.cc +@@ -346,7 +346,7 @@ Status ParseMobileEmulation(const base:: + "'version' field of type string"); + } + +- brands.emplace_back() = {*brand, *version}; ++ brands.emplace_back(*brand, *version); + } + + client_hints.brands = std::move(brands); +@@ -384,7 +384,7 @@ Status ParseMobileEmulation(const base:: + "a 'version' field of type string"); + } + +- full_version_list.emplace_back() = {*brand, *version}; ++ full_version_list.emplace_back(*brand, *version); + } + + client_hints.full_version_list = std::move(full_version_list); diff --git a/srcpkgs/qt6-pdf/patches/0114-chromium-118-python-3.12-deprecated.patch b/srcpkgs/qt6-pdf/patches/0114-chromium-118-python-3.12-deprecated.patch new file mode 100644 index 00000000000..1b71a5a0ad0 --- /dev/null +++ b/srcpkgs/qt6-pdf/patches/0114-chromium-118-python-3.12-deprecated.patch @@ -0,0 +1,98 @@ +--- a/src/3rdparty/chromium/base/write_build_date_header.py ++++ b/src/3rdparty/chromium/base/write_build_date_header.py +@@ -17,7 +17,7 @@ def main(): + args = argument_parser.parse_args() + + date_val = int(args.timestamp) +- date = datetime.datetime.utcfromtimestamp(date_val) ++ date = datetime.datetime.fromtimestamp(date_val, datetime.timezone.utc) + output = ('// Generated by //base/write_build_date_header.py\n' + '#ifndef BASE_GENERATED_BUILD_DATE_TIMESTAMP \n' + f'#define BASE_GENERATED_BUILD_DATE_TIMESTAMP {date_val}' +--- a/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py ++++ b/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py +@@ -40,6 +40,12 @@ class GoogleProtobufModuleImporter: + return filepath + return None + ++ def load_source(name: str, path: str) -> types.ModuleType: ++ spec = importlib.util.spec_from_file_location(name, path) ++ module = importlib.util.module_from_spec(spec) ++ spec.loader.exec_module(module) ++ return module ++ + def _module_exists(self, fullname): + return self._fullname_to_filepath(fullname) is not None + +--- a/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/html_generation_controller.py ++++ b/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/html_generation_controller.py +@@ -18,7 +18,7 @@ class HTMLGenerationController(object): + + def GetHTMLForInlineStylesheet(self, contents): + if self.current_module is None: +- if re.search('url\(.+\)', contents): ++ if re.search(r'url\(.+\)', contents): + raise Exception( + 'Default HTMLGenerationController cannot handle inline style urls') + return contents +--- a/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/js_utils.py ++++ b/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/js_utils.py +@@ -4,4 +4,4 @@ + + + def EscapeJSIfNeeded(js): +- return js.replace('', '<\/script>') ++ return js.replace(r'', r'<\/script>') +--- a/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py ++++ b/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py +@@ -293,6 +293,6 @@ class HTMLModuleParser(): + html = '' + else: + if html.find('< /script>') != -1: +- raise Exception('Escape script tags with <\/script>') ++ raise Exception(r'Escape script tags with <\/script>') + + return HTMLModuleParserResults(html) +--- a/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/style_sheet.py ++++ b/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/style_sheet.py +@@ -60,7 +60,7 @@ class ParsedStyleSheet(object): + return 'url(data:image/%s;base64,%s)' % (ext[1:], data.decode('utf-8')) + + # I'm assuming we only have url()'s associated with images +- return re.sub('url\((?P"|\'|)(?P[^"\'()]*)(?P=quote)\)', ++ return re.sub(r'url\((?P"|\'|)(?P[^"\'()]*)(?P=quote)\)', + InlineUrl, self.contents) + + def AppendDirectlyDependentFilenamesTo(self, dependent_filenames): +@@ -72,7 +72,7 @@ class ParsedStyleSheet(object): + raise Exception('@imports are not supported') + + matches = re.findall( +- 'url\((?:["|\']?)([^"\'()]*)(?:["|\']?)\)', ++ r'url\((?:["|\']?)([^"\'()]*)(?:["|\']?)\)', + self.contents) + + def resolve_url(url): +--- a/src/3rdparty/chromium/third_party/dawn/generator/generator_lib.py ++++ b/src/3rdparty/chromium/third_party/dawn/generator/generator_lib.py +@@ -119,8 +119,8 @@ class _PreprocessingLoader(jinja2.BaseLo + source = self.preprocess(f.read()) + return source, path, lambda: mtime == os.path.getmtime(path) + +- blockstart = re.compile('{%-?\s*(if|elif|else|for|block|macro)[^}]*%}') +- blockend = re.compile('{%-?\s*(end(if|for|block|macro)|elif|else)[^}]*%}') ++ blockstart = re.compile(r'{%-?\s*(if|elif|else|for|block|macro)[^}]*%}') ++ blockend = re.compile(r'{%-?\s*(end(if|for|block|macro)|elif|else)[^}]*%}') + + def preprocess(self, source): + lines = source.split('\n') +--- a/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py ++++ b/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py +@@ -16,6 +16,7 @@ import re + import subprocess + import sys + import traceback ++import types + + + class GoogleProtobufModuleImporter: diff --git a/srcpkgs/qt6-pdf/patches/0116-chromium-118-workaround_clang_bug-structured_binding.patch b/srcpkgs/qt6-pdf/patches/0116-chromium-118-workaround_clang_bug-structured_binding.patch new file mode 100644 index 00000000000..38aa477193a --- /dev/null +++ b/srcpkgs/qt6-pdf/patches/0116-chromium-118-workaround_clang_bug-structured_binding.patch @@ -0,0 +1,25 @@ +--- a/src/3rdparty/chromium/media/base/cdm_promise_adapter.cc ++++ b/src/3rdparty/chromium/media/base/cdm_promise_adapter.cc +@@ -94,7 +94,9 @@ void CdmPromiseAdapter::RejectPromise(ui + void CdmPromiseAdapter::Clear(ClearReason reason) { + // Reject all outstanding promises. + DCHECK(thread_checker_.CalledOnValidThread()); +- for (auto& [promise_id, promise] : promises_) { ++ for (auto& [p_i, p_e] : promises_) { ++ auto& promise_id = p_i; ++ auto& promise = p_e; + TRACE_EVENT_NESTABLE_ASYNC_END1( + "media", "CdmPromise", TRACE_ID_WITH_SCOPE("CdmPromise", promise_id), + "status", "cleared"); +--- a/src/3rdparty/chromium/content/browser/service_worker/service_worker_context_wrapper.cc ++++ b/src/3rdparty/chromium/content/browser/service_worker/service_worker_context_wrapper.cc +@@ -1409,7 +1409,8 @@ void ServiceWorkerContextWrapper::MaybeP + return; + } + +- auto [document_url, key, callback] = std::move(*request); ++ auto [d_u, key, callback] = std::move(*request); ++ auto document_url = d_u; + + DCHECK(document_url.is_valid()); + TRACE_EVENT1("ServiceWorker", diff --git a/srcpkgs/qt6-pdf/patches/0117-chromium-i686-vaapi-fpermissive.patch b/srcpkgs/qt6-pdf/patches/0117-chromium-i686-vaapi-fpermissive.patch new file mode 100644 index 00000000000..ad2102d650c --- /dev/null +++ b/srcpkgs/qt6-pdf/patches/0117-chromium-i686-vaapi-fpermissive.patch @@ -0,0 +1,23 @@ +--- a/src/3rdparty/chromium/media/gpu/vaapi/BUILD.gn ++++ b/src/3rdparty/chromium/media/gpu/vaapi/BUILD.gn +@@ -13,6 +13,12 @@ import("//tools/generate_stubs/rules.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" ] +@@ -81,6 +87,7 @@ source_set("vaapi") { + configs += [ + "//build/config/linux/libva", + "//third_party/libvpx:libvpx_config", ++ ":vaapi_permissive", + ] + + deps = [ diff --git a/srcpkgs/qt6-pdf/patches/0117-chromium-musl-resolver.patch b/srcpkgs/qt6-pdf/patches/0117-chromium-musl-resolver.patch deleted file mode 100644 index 12d1f81833c..00000000000 --- a/srcpkgs/qt6-pdf/patches/0117-chromium-musl-resolver.patch +++ /dev/null @@ -1,60 +0,0 @@ -diff --git a/src/3rdparty/chromium/net/dns/dns_reloader.cc b/src/3rdparty/chromium/net/dns/dns_reloader.cc -index 363eb14dc..3a86c12ee 100644 ---- a/src/3rdparty/chromium/net/dns/dns_reloader.cc -+++ b/src/3rdparty/chromium/net/dns/dns_reloader.cc -@@ -8,7 +8,7 @@ - - // If we're not on a POSIX system, it's not even safe to try to include resolv.h - // - there's not guarantee it exists at all. :( --#if BUILDFLAG(IS_POSIX) -+#if defined(__GLIBC__) - - #include - -diff --git a/src/3rdparty/chromium/net/dns/host_resolver_system_task.cc b/src/3rdparty/chromium/net/dns/host_resolver_system_task.cc -index d8142e8da..f2461b877 100644 ---- a/src/3rdparty/chromium/net/dns/host_resolver_system_task.cc -+++ b/src/3rdparty/chromium/net/dns/host_resolver_system_task.cc -@@ -351,8 +351,9 @@ void HostResolverSystemTask::OnLookupComplete(const uint32_t attempt_number, - } - - void EnsureSystemHostResolverCallReady() { -+#if defined(__GLIBC__) - EnsureDnsReloaderInit(); --#if BUILDFLAG(IS_WIN) -+#elif BUILDFLAG(IS_WIN) - EnsureWinsockInit(); - #endif - } -@@ -434,7 +435,9 @@ int SystemHostResolverCall(const std::string& host, - // current process during that time. - base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, - base::BlockingType::WILL_BLOCK); -+#if defined(__GLIBC__) - DnsReloaderMaybeReload(); -+#endif - - auto [ai, err, os_error] = AddressInfo::Get(host, hints, nullptr, network); - bool should_retry = false; -diff --git a/src/3rdparty/chromium/net/dns/public/scoped_res_state.cc b/src/3rdparty/chromium/net/dns/public/scoped_res_state.cc -index 2743697bf..36dc8adbf 100644 ---- a/src/3rdparty/chromium/net/dns/public/scoped_res_state.cc -+++ b/src/3rdparty/chromium/net/dns/public/scoped_res_state.cc -@@ -13,7 +13,7 @@ - namespace net { - - ScopedResState::ScopedResState() { --#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_FUCHSIA) -+#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_FUCHSIA) || (BUILDFLAG(IS_LINUX) && !defined(__GLIBC__)) - // Note: res_ninit in glibc always returns 0 and sets RES_INIT. - // res_init behaves the same way. - memset(&_res, 0, sizeof(_res)); -@@ -25,7 +25,7 @@ ScopedResState::ScopedResState() { - } - - ScopedResState::~ScopedResState() { --#if !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA) -+#if !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA) && !(BUILDFLAG(IS_LINUX) && !defined(__GLIBC__)) - - // Prefer res_ndestroy where available. - #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD) diff --git a/srcpkgs/qt6-pdf/patches/0105-chromium-revert-drop-of-system-java.patch b/srcpkgs/qt6-pdf/patches/0118-chromium-revert-drop-of-system-java.patch similarity index 76% rename from srcpkgs/qt6-pdf/patches/0105-chromium-revert-drop-of-system-java.patch rename to srcpkgs/qt6-pdf/patches/0118-chromium-revert-drop-of-system-java.patch index d6abf7adcab..44f3aa8fae5 100644 --- a/srcpkgs/qt6-pdf/patches/0105-chromium-revert-drop-of-system-java.patch +++ b/srcpkgs/qt6-pdf/patches/0118-chromium-revert-drop-of-system-java.patch @@ -1,6 +1,6 @@ This was dropped for some reason in 6951c37cecd05979b232a39e5c10e6346a0f74ef ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/closure_compiler/compiler.py -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/closure_compiler/compiler.py +--- a/src/3rdparty/chromium/third_party/closure_compiler/compiler.py ++++ b/src/3rdparty/chromium/third_party/closure_compiler/compiler.py @@ -13,8 +13,9 @@ import subprocess diff --git a/srcpkgs/qt6-pdf/patches/0119-chromium-system-nodejs.patch b/srcpkgs/qt6-pdf/patches/0119-chromium-system-nodejs.patch new file mode 100644 index 00000000000..224d539e6f5 --- /dev/null +++ b/srcpkgs/qt6-pdf/patches/0119-chromium-system-nodejs.patch @@ -0,0 +1,20 @@ +--- a/src/3rdparty/chromium/third_party/node/node.py ++++ b/src/3rdparty/chromium/third_party/node/node.py +@@ -32,11 +32,12 @@ def GetBinaryPath(): + + darwin_name = ('node-darwin-arm64' if platform.machine() == 'arm64' else + 'node-darwin-x64') +- return os_path.join(os_path.dirname(__file__), *{ +- 'Darwin': ('mac', darwin_name, 'bin', 'node'), +- 'Linux': ('linux', 'node-linux-x64', 'bin', 'node'), +- 'Windows': ('win', 'node.exe'), +- }[platform.system()]) ++ #return os_path.join(os_path.dirname(__file__), *{ ++ # 'Darwin': ('mac', darwin_name, 'bin', 'node'), ++ # 'Linux': ('linux', 'node-linux-x64', 'bin', 'node'), ++ # 'Windows': ('win', 'node.exe'), ++ #}[platform.system()]) ++ return "/usr/bin/node" + + + def RunNode(cmd_parts, stdout=None): diff --git a/srcpkgs/qt6-pdf/patches/0107-chromium-cross-build.patch b/srcpkgs/qt6-pdf/patches/0120-cross-build.patch similarity index 72% rename from srcpkgs/qt6-pdf/patches/0107-chromium-cross-build.patch rename to srcpkgs/qt6-pdf/patches/0120-cross-build.patch index 7fbfabcd79b..c533e500a71 100644 --- a/srcpkgs/qt6-pdf/patches/0107-chromium-cross-build.patch +++ b/srcpkgs/qt6-pdf/patches/0120-cross-build.patch @@ -1,6 +1,6 @@ ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/build/config/compiler/BUILD.gn -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/build/config/compiler/BUILD.gn -@@ -58,6 +58,10 @@ if (!is_clang) { +--- a/src/3rdparty/chromium/build/config/compiler/BUILD.gn ++++ b/src/3rdparty/chromium/build/config/compiler/BUILD.gn +@@ -59,6 +59,10 @@ if (!is_clang) { } declare_args() { @@ -11,7 +11,7 @@ # 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 -@@ -1003,8 +1003,13 @@ +@@ -1190,8 +1194,13 @@ config("compiler_cpu_abi") { } else if (current_cpu == "arm64") { if (is_clang && !is_android && !is_nacl && !is_fuchsia && !(is_chromeos_lacros && is_chromeos_device)) { @@ -25,10 +25,10 @@ + ldflags += [ "--target=aarch64-linux-gnu" ] + } } - if (is_android) { - # Outline atomics crash on Exynos 9810. http://crbug.com/1272795 ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/build/toolchain/linux/unbundle/BUILD.gn -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/build/toolchain/linux/unbundle/BUILD.gn + } else if (current_cpu == "mipsel" && !is_nacl) { + ldflags += [ "-Wl,--hash-style=sysv" ] +--- a/src/3rdparty/chromium/build/toolchain/linux/unbundle/BUILD.gn ++++ b/src/3rdparty/chromium/build/toolchain/linux/unbundle/BUILD.gn @@ -39,3 +39,22 @@ gcc_toolchain("host") { current_os = current_os } @@ -52,8 +52,8 @@ + v8_current_cpu = target_cpu + } +} ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/build/config/linux/pkg_config.gni -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/build/config/linux/pkg_config.gni +--- a/src/3rdparty/chromium/build/config/linux/pkg_config.gni ++++ b/src/3rdparty/chromium/build/config/linux/pkg_config.gni @@ -92,7 +92,7 @@ template("pkg_config") { assert(defined(invoker.packages), "Variable |packages| must be defined to be a list in pkg_config.") diff --git a/srcpkgs/qt6-pdf/patches/0121-fc-cache-version.patch b/srcpkgs/qt6-pdf/patches/0121-fc-cache-version.patch new file mode 100644 index 00000000000..d8226f0b063 --- /dev/null +++ b/srcpkgs/qt6-pdf/patches/0121-fc-cache-version.patch @@ -0,0 +1,13 @@ +instead of hardcoding the version, use the defined macro. +-- +--- a/src/3rdparty/chromium/third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc ++++ b/src/3rdparty/chromium/third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc +@@ -56,7 +56,7 @@ int main() { + FcFini(); + + // Check existence of intended fontconfig cache file. +- auto cache = fontconfig_caches + "/" + kCacheKey + "-le64.cache-9"; ++ auto cache = fontconfig_caches + "/" + kCacheKey + "-le64.cache-" + FC_CACHE_VERSION; + bool cache_exists = access(cache.c_str(), F_OK) == 0; + return !cache_exists; + } diff --git a/srcpkgs/qt6-pdf/patches/0109-chromium-aarch64-musl-memory-tagging.patch b/srcpkgs/qt6-pdf/patches/0122-fix-aarch64-musl-memory-tagging-macros.patch similarity index 73% rename from srcpkgs/qt6-pdf/patches/0109-chromium-aarch64-musl-memory-tagging.patch rename to srcpkgs/qt6-pdf/patches/0122-fix-aarch64-musl-memory-tagging-macros.patch index 0ff2a2a51aa..f2d6541b26f 100644 --- a/srcpkgs/qt6-pdf/patches/0109-chromium-aarch64-musl-memory-tagging.patch +++ b/srcpkgs/qt6-pdf/patches/0122-fix-aarch64-musl-memory-tagging-macros.patch @@ -1,6 +1,6 @@ ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/base/allocator/partition_allocator/tagging.cc -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/base/allocator/partition_allocator/tagging.cc -@@ -28,13 +28,25 @@ +--- a/src/3rdparty/chromium/base/allocator/partition_allocator/tagging.cc ++++ b/src/3rdparty/chromium/base/allocator/partition_allocator/tagging.cc +@@ -29,13 +29,25 @@ #endif #endif @@ -25,5 +25,5 @@ +#endif +#ifndef PR_MTE_TAG_MASK #define PR_MTE_TAG_MASK (0xffffUL << PR_MTE_TAG_SHIFT) - #endif + #define HWCAP2_MTE (1 << 18) #endif diff --git a/srcpkgs/qt6-pdf/patches/0123-fix-argument_spec-isnan-isinf.patch b/srcpkgs/qt6-pdf/patches/0123-fix-argument_spec-isnan-isinf.patch new file mode 100644 index 00000000000..d33de24fafb --- /dev/null +++ b/srcpkgs/qt6-pdf/patches/0123-fix-argument_spec-isnan-isinf.patch @@ -0,0 +1,11 @@ +--- a/src/3rdparty/chromium/extensions/renderer/bindings/argument_spec.cc ++++ b/src/3rdparty/chromium/extensions/renderer/bindings/argument_spec.cc +@@ -2,6 +2,8 @@ + // Use of this source code is governed by a BSD-style license that can be + // found in the LICENSE file. + ++#include ++ + #include "extensions/renderer/bindings/argument_spec.h" + + #include diff --git a/srcpkgs/qt6-pdf/patches/0124-fix-constexpr-narrowing.patch b/srcpkgs/qt6-pdf/patches/0124-fix-constexpr-narrowing.patch new file mode 100644 index 00000000000..f3e6cf05146 --- /dev/null +++ b/srcpkgs/qt6-pdf/patches/0124-fix-constexpr-narrowing.patch @@ -0,0 +1,21 @@ +--- a/src/3rdparty/chromium/third_party/blink/renderer/platform/media/web_media_player_impl.cc ++++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/media/web_media_player_impl.cc +@@ -3732,15 +3732,15 @@ void WebMediaPlayerImpl::WriteSplitHisto + const T&... values) { + std::string strkey = std::string(key); + +- if constexpr (Flags & kEncrypted) { ++ if constexpr (Flags & kEncrypted != 0) { + if (is_encrypted_) + UmaFunction(strkey + ".EME", values...); + } + +- if constexpr (Flags & kTotal) ++ if constexpr (Flags & kTotal != 0) + UmaFunction(strkey + ".All", values...); + +- if constexpr (Flags & kPlaybackType) { ++ if constexpr (Flags & kPlaybackType != 0) { + auto demuxer_type = GetDemuxerType(); + if (!demuxer_type.has_value()) + return; diff --git a/srcpkgs/qt6-pdf/patches/0125-fix-dawn-platform.patch b/srcpkgs/qt6-pdf/patches/0125-fix-dawn-platform.patch new file mode 100644 index 00000000000..85e427bbe68 --- /dev/null +++ b/srcpkgs/qt6-pdf/patches/0125-fix-dawn-platform.patch @@ -0,0 +1,55 @@ +From f815e833c946a59620a2ca9df37a1da746f61460 Mon Sep 17 00:00:00 2001 +From: q66 +Date: Sat, 1 Oct 2022 00:21:09 +0000 +Subject: [PATCH] fix dawn build for ppc64 + +--- + third_party/dawn/src/dawn/common/Assert.cpp | 4 ++-- + third_party/dawn/src/dawn/common/Platform.h | 10 +++++----- + 2 files changed, 7 insertions(+), 7 deletions(-) + +--- a/src/3rdparty/chromium/third_party/dawn/src/dawn/common/Assert.cpp ++++ b/src/3rdparty/chromium/third_party/dawn/src/dawn/common/Assert.cpp +@@ -39,9 +39,9 @@ void BreakPoint() { + __asm__ __volatile__("ebreak"); + #elif DAWN_PLATFORM_IS(MIPS) + __asm__ __volatile__("break"); +-#elif DAWN_PLATFORM_IS(S390) || DAWN_PLATFORM_IS_(S390X) ++#elif DAWN_PLATFORM_IS(S390) || DAWN_PLATFORM_IS(S390X) + __asm__ __volatile__(".word 0x0001"); +-#elif DAWN_PLATFORM_IS(PPC) || DAWN_PLATFORM_IS_(PPC64) ++#elif DAWN_PLATFORM_IS(PPC) || DAWN_PLATFORM_IS(PPC64) + __asm__ __volatile__("twge 2,2"); + #else + #error "Unsupported platform" +--- a/src/3rdparty/chromium/third_party/dawn/src/dawn/common/Platform.h ++++ b/src/3rdparty/chromium/third_party/dawn/src/dawn/common/Platform.h +@@ -140,15 +140,15 @@ + #define DAWN_PLATFORM_IS_MIPS64 1 + #endif + +-#elif defiend(__s390__) ++#elif defined(__s390__) + #define DAWN_PLATFORM_IS_S390 1 +-#elif defiend(__s390x__) ++#elif defined(__s390x__) + #define DAWN_PLATFORM_IS_S390X 1 + +-#elif defined(__PPC__) +-#define DAWN_PLATFORM_IS_PPC 1 + #elif defined(__PPC64__) + #define DAWN_PLATFORM_IS_PPC64 1 ++#elif defined(__PPC__) ++#define DAWN_PLATFORM_IS_PPC 1 + + #else + #error "Unsupported platform." +@@ -166,7 +166,7 @@ + static_assert(sizeof(sizeof(char)) == 8, "Expect sizeof(size_t) == 8"); + #elif defined(DAWN_PLATFORM_IS_I386) || defined(DAWN_PLATFORM_IS_ARM32) || \ + defined(DAWN_PLATFORM_IS_RISCV32) || defined(DAWN_PLATFORM_IS_MIPS32) || \ +- defined(DAWN_PLATFORM_IS_S390) || defined(DAWN_PLATFORM_IS_PPC32) || \ ++ defined(DAWN_PLATFORM_IS_S390) || defined(DAWN_PLATFORM_IS_PPC) || \ + defined(DAWN_PLATFORM_IS_EMSCRIPTEN) || defined(DAWN_PLATFORM_IS_LOONGARCH32) + #define DAWN_PLATFORM_IS_32_BIT 1 + static_assert(sizeof(sizeof(char)) == 4, "Expect sizeof(size_t) == 4"); diff --git a/srcpkgs/qt6-pdf/patches/0110-chromium-fix-missing-TEMP_FAILURE_RETRY-macro.patch b/srcpkgs/qt6-pdf/patches/0127-fix-missing-TEMP_FAILURE_RETRY-macro.patch similarity index 78% rename from srcpkgs/qt6-pdf/patches/0110-chromium-fix-missing-TEMP_FAILURE_RETRY-macro.patch rename to srcpkgs/qt6-pdf/patches/0127-fix-missing-TEMP_FAILURE_RETRY-macro.patch index 5558c54cf80..6c93991a5b0 100644 --- a/srcpkgs/qt6-pdf/patches/0110-chromium-fix-missing-TEMP_FAILURE_RETRY-macro.patch +++ b/srcpkgs/qt6-pdf/patches/0127-fix-missing-TEMP_FAILURE_RETRY-macro.patch @@ -1,7 +1,7 @@ This macro is defined in glibc, but not musl. ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/sandbox/linux/suid/process_util.h -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/sandbox/linux/suid/process_util.h +--- a/src/3rdparty/chromium/sandbox/linux/suid/process_util.h ++++ b/src/3rdparty/chromium/sandbox/linux/suid/process_util.h @@ -12,6 +12,16 @@ #include #include diff --git a/srcpkgs/qt6-pdf/patches/0128-fix-missing-cstdint-include-musl.patch b/srcpkgs/qt6-pdf/patches/0128-fix-missing-cstdint-include-musl.patch new file mode 100644 index 00000000000..ce545be67d2 --- /dev/null +++ b/srcpkgs/qt6-pdf/patches/0128-fix-missing-cstdint-include-musl.patch @@ -0,0 +1,10 @@ +--- a/src/3rdparty/chromium/net/third_party/quiche/src/quiche/http2/adapter/window_manager.h ++++ b/src/3rdparty/chromium/net/third_party/quiche/src/quiche/http2/adapter/window_manager.h +@@ -4,6 +4,7 @@ + #include + #include + ++#include + #include + + #include "quiche/common/platform/api/quiche_export.h" diff --git a/srcpkgs/qt6-pdf/patches/0129-chromium-sandbox-shed_getparam.patch b/srcpkgs/qt6-pdf/patches/0129-chromium-sandbox-shed_getparam.patch deleted file mode 100644 index 94260d5d62e..00000000000 --- a/srcpkgs/qt6-pdf/patches/0129-chromium-sandbox-shed_getparam.patch +++ /dev/null @@ -1,17 +0,0 @@ -Allow SYS_sched_getparam and SYS_sched_getscheduler -musl uses them for pthread_getschedparam() - ---- 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: -+#ifndef __GLIBC__ -+ case __NR_sched_getparam: -+ case __NR_sched_getscheduler: -+ case __NR_sched_setscheduler: -+#endif - case __NR_sysinfo: - case __NR_times: - case __NR_uname: diff --git a/srcpkgs/qt6-pdf/patches/0112-chromium-unistd.h.patch b/srcpkgs/qt6-pdf/patches/0129-fix-musl-missing-unistd_h-include.patch similarity index 94% rename from srcpkgs/qt6-pdf/patches/0112-chromium-unistd.h.patch rename to srcpkgs/qt6-pdf/patches/0129-fix-musl-missing-unistd_h-include.patch index bb242a808ac..327874276f1 100644 --- a/srcpkgs/qt6-pdf/patches/0112-chromium-unistd.h.patch +++ b/srcpkgs/qt6-pdf/patches/0129-fix-musl-missing-unistd_h-include.patch @@ -1,6 +1,6 @@ --- a/src/3rdparty/chromium/sandbox/linux/services/credentials.h +++ b/src/3rdparty/chromium/sandbox/linux/services/credentials.h -@@ -13,6 +13,7 @@ +@@ -15,6 +15,7 @@ #include #include diff --git a/srcpkgs/qt6-pdf/patches/0116-chromium-musl-get-thread-name.patch b/srcpkgs/qt6-pdf/patches/0130-fix-perfetto-GetThreadName-musl.patch similarity index 73% rename from srcpkgs/qt6-pdf/patches/0116-chromium-musl-get-thread-name.patch rename to srcpkgs/qt6-pdf/patches/0130-fix-perfetto-GetThreadName-musl.patch index d485385cbb6..47dfb87f147 100644 --- a/srcpkgs/qt6-pdf/patches/0116-chromium-musl-get-thread-name.patch +++ b/srcpkgs/qt6-pdf/patches/0130-fix-perfetto-GetThreadName-musl.patch @@ -1,5 +1,5 @@ ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/base/thread_utils.h -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/base/thread_utils.h +--- a/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/base/thread_utils.h ++++ b/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/base/thread_utils.h @@ -30,7 +30,8 @@ #include #endif diff --git a/srcpkgs/qt6-pdf/patches/0131-fix-swiftshader-llvm-musl-config.patch b/srcpkgs/qt6-pdf/patches/0131-fix-swiftshader-llvm-musl-config.patch new file mode 100644 index 00000000000..e69de29bb2d diff --git a/srcpkgs/qt6-pdf/patches/0120-chromium-libc-malloc.patch b/srcpkgs/qt6-pdf/patches/0132-libc_malloc.patch similarity index 66% rename from srcpkgs/qt6-pdf/patches/0120-chromium-libc-malloc.patch rename to srcpkgs/qt6-pdf/patches/0132-libc_malloc.patch index fa32830760c..0352361083d 100644 --- a/srcpkgs/qt6-pdf/patches/0120-chromium-libc-malloc.patch +++ b/srcpkgs/qt6-pdf/patches/0132-libc_malloc.patch @@ -1,5 +1,5 @@ ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/base/process/memory_linux.cc -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/base/process/memory_linux.cc +--- a/src/3rdparty/chromium/base/process/memory_linux.cc ++++ b/src/3rdparty/chromium/base/process/memory_linux.cc @@ -18,6 +18,13 @@ #include "base/threading/thread_restrictions.h" #include "build/build_config.h" @@ -14,8 +14,8 @@ namespace base { namespace { -@@ -112,7 +119,7 @@ bool UncheckedMalloc(size_t size, void** - defined(TOOLKIT_QT) || !defined(LIBC_GLIBC) +@@ -111,7 +118,7 @@ bool UncheckedMalloc(size_t size, void** + #elif defined(MEMORY_TOOL_REPLACES_ALLOCATOR) || !defined(LIBC_GLIBC) || defined(TOOLKIT_QT) *result = malloc(size); #elif defined(LIBC_GLIBC) - *result = __libc_malloc(size); @@ -23,7 +23,7 @@ #endif return *result != nullptr; } -@@ -123,7 +130,7 @@ void UncheckedFree(void* ptr) { +@@ -122,7 +129,7 @@ void UncheckedFree(void* ptr) { #elif defined(MEMORY_TOOL_REPLACES_ALLOCATOR) || !defined(LIBC_GLIBC) || defined(TOOLKIT_QT) free(ptr); #elif defined(LIBC_GLIBC) diff --git a/srcpkgs/qt6-pdf/patches/0133-musl-no-execinfo.patch b/srcpkgs/qt6-pdf/patches/0133-musl-no-execinfo.patch new file mode 100644 index 00000000000..3fa2dab93da --- /dev/null +++ b/srcpkgs/qt6-pdf/patches/0133-musl-no-execinfo.patch @@ -0,0 +1,68 @@ +Source: https://git.alpinelinux.org/aports/plain/community/chromium/no-execinfo.patch +musl does not have execinfo.h, and hence no implementation of +. backtrace() +. backtrace_symbols() +for discussion about this, see https://www.openwall.com/lists/musl/2021/07/16/1 +-- +--- a/src/3rdparty/chromium/v8/src/codegen/external-reference-table.cc ++++ b/src/3rdparty/chromium/v8/src/codegen/external-reference-table.cc +@@ -12,7 +12,9 @@ + + #if defined(DEBUG) && defined(V8_OS_LINUX) && !defined(V8_OS_ANDROID) + #define SYMBOLIZE_FUNCTION ++#if defined(__GLIBC__) + #include ++#endif + + #include + +@@ -118,7 +120,7 @@ void ExternalReferenceTable::Init(Isolat + } + + const char* ExternalReferenceTable::ResolveSymbol(void* address) { +-#ifdef SYMBOLIZE_FUNCTION ++#if defined(SYMBOLIZE_FUNCTION) && defined(__GLIBC__) + char** names = backtrace_symbols(&address, 1); + const char* name = names[0]; + // The array of names is malloc'ed. However, each name string is static +--- a/src/3rdparty/chromium/base/debug/stack_trace.cc ++++ b/src/3rdparty/chromium/base/debug/stack_trace.cc +@@ -273,7 +273,9 @@ void StackTrace::Print() const { + } + + void StackTrace::OutputToStream(std::ostream* os) const { ++#if defined(__GLIBC__) && !defined(_AIX) + OutputToStreamWithPrefix(os, nullptr); ++#endif + } + + std::string StackTrace::ToString() const { +@@ -281,7 +283,7 @@ std::string StackTrace::ToString() const + } + 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(); +--- a/src/3rdparty/chromium/base/debug/stack_trace_unittest.cc ++++ b/src/3rdparty/chromium/base/debug/stack_trace_unittest.cc +@@ -33,7 +33,7 @@ typedef MultiProcessTest StackTraceTest; + typedef testing::Test StackTraceTest; + #endif + +-#if !defined(__UCLIBC__) && !defined(_AIX) ++#if !defined(__UCLIBC__) && !defined(_AIX) && defined(__GLIBC__) + // StackTrace::OutputToStream() is not implemented under uclibc, nor AIX. + // See https://crbug.com/706728 + +@@ -156,7 +156,7 @@ TEST_F(StackTraceTest, DebugOutputToStre + + #endif // !defined(__UCLIBC__) && !defined(_AIX) + +-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) ++#if (BUILDFLAG(IS_POSIX) && defined(__GLIBC__)) && !BUILDFLAG(IS_ANDROID) + #if !BUILDFLAG(IS_IOS) + static char* newArray() { + // Clang warns about the mismatched new[]/delete if they occur in the same diff --git a/srcpkgs/qt6-pdf/patches/0302-chromium-no-mallinfo.patch b/srcpkgs/qt6-pdf/patches/0134-musl-no-mallinfo.patch similarity index 50% rename from srcpkgs/qt6-pdf/patches/0302-chromium-no-mallinfo.patch rename to srcpkgs/qt6-pdf/patches/0134-musl-no-mallinfo.patch index 9f8d4a15c28..3ec083a830f 100644 --- a/srcpkgs/qt6-pdf/patches/0302-chromium-no-mallinfo.patch +++ b/srcpkgs/qt6-pdf/patches/0134-musl-no-mallinfo.patch @@ -1,41 +1,10 @@ ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/base/process/process_metrics_posix.cc -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/base/process/process_metrics_posix.cc -@@ -105,7 +105,8 @@ void IncreaseFdLimitTo(unsigned int max_ - - #endif // !BUILDFLAG(IS_FUCHSIA) - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) -+#if (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || \ -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) - namespace { - - size_t GetMallocUsageMallinfo() { -@@ -123,17 +124,18 @@ size_t GetMallocUsageMallinfo() { - } - - } // namespace --#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || -- // BUILDFLAG(IS_ANDROID) -+#endif // (BUILDFLAG(IS_LINUX) && defined(__GLIBC__) || -+ // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) - - size_t ProcessMetrics::GetMallocUsage() { - #if BUILDFLAG(IS_APPLE) - malloc_statistics_t stats = {0}; - malloc_zone_statistics(nullptr, &stats); - return stats.size_in_use; --#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) -+#elif (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || \ -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) - return GetMallocUsageMallinfo(); --#elif BUILDFLAG(IS_FUCHSIA) -+#elif BUILDFLAG(IS_FUCHSIA) || (BUILDFLAG(IS_LINUX) && !defined(__GLIBC__)) - // TODO(fuchsia): Not currently exposed. https://crbug.com/735087. - return 0; - #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 -@@ -185,7 +185,6 @@ +Source: https://git.alpinelinux.org/aports/plain/community/chromium/no-mallinfo.patch +musl does not implement mallinfo()/mallinfo2() +(or rather, malloc-ng, musl's allocator, doesn't) +-- +--- a/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc ++++ b/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc +@@ -199,7 +199,6 @@ void ReportMallinfoStats(ProcessMemoryDu #define MALLINFO2_FOUND_IN_LIBC struct mallinfo2 info = mallinfo2(); #endif @@ -43,15 +12,15 @@ #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); +@@ -221,6 +220,7 @@ void ReportMallinfoStats(ProcessMemoryDu + MemoryAllocatorDump::kUnitsBytes, + total_allocated_size); } +#endif // defined(__GLIBC__) && defined(__GLIBC_PREREQ) } #endif -@@ -339,7 +340,7 @@ +@@ -359,7 +359,7 @@ bool MallocDumpProvider::OnMemoryDump(co &allocated_objects_count); #elif BUILDFLAG(IS_FUCHSIA) // TODO(fuchsia): Port, see https://crbug.com/706592. @@ -60,17 +29,57 @@ ReportMallinfoStats(/*pmd=*/nullptr, &total_virtual_size, &resident_size, &allocated_objects_size, &allocated_objects_count); #endif -musl does not implement mallinfo()/mallinfo2() -(or rather, malloc-ng, musl's allocator, doesn't) --- +--- a/src/3rdparty/chromium/base/process/process_metrics_posix.cc ++++ b/src/3rdparty/chromium/base/process/process_metrics_posix.cc +@@ -106,7 +106,7 @@ void IncreaseFdLimitTo(unsigned int max_ + + #endif // !BUILDFLAG(IS_FUCHSIA) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) ++#if (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + namespace { + + size_t GetMallocUsageMallinfo() { +@@ -124,7 +124,7 @@ size_t GetMallocUsageMallinfo() { + } + + } // namespace +-#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || ++#endif // (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS) || + // BUILDFLAG(IS_ANDROID) + + size_t ProcessMetrics::GetMallocUsage() { +@@ -132,9 +132,9 @@ size_t ProcessMetrics::GetMallocUsage() + malloc_statistics_t stats = {0}; + malloc_zone_statistics(nullptr, &stats); + return stats.size_in_use; +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) ++#elif (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + return GetMallocUsageMallinfo(); +-#elif BUILDFLAG(IS_FUCHSIA) ++#else + // TODO(fuchsia): Not currently exposed. https://crbug.com/735087. + return 0; + #endif --- a/src/3rdparty/chromium/base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_partition_alloc.cc +++ b/src/3rdparty/chromium/base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_partition_alloc.cc -@@ -717,7 +717,7 @@ +@@ -736,7 +736,7 @@ SHIM_ALWAYS_EXPORT int mallopt(int cmd, #endif // !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if defined(__GLIBC__) ++#if 0 SHIM_ALWAYS_EXPORT struct mallinfo mallinfo(void) __THROW { - base::SimplePartitionStatsDumper allocator_dumper; + partition_alloc::SimplePartitionStatsDumper allocator_dumper; Allocator()->DumpStats("malloc", true, &allocator_dumper); +--- a/src/3rdparty/chromium/base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_partition_alloc_unittest.cc ++++ b/src/3rdparty/chromium/base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_partition_alloc_unittest.cc +@@ -24,7 +24,7 @@ namespace allocator_shim::internal { + #if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) + + // Platforms on which we override weak libc symbols. +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS) + + PA_NOINLINE void FreeForTest(void* data) { + free(data); diff --git a/srcpkgs/qt6-pdf/patches/0135-musl-partition-atfork.patch b/srcpkgs/qt6-pdf/patches/0135-musl-partition-atfork.patch new file mode 100644 index 00000000000..1d838142146 --- /dev/null +++ b/srcpkgs/qt6-pdf/patches/0135-musl-partition-atfork.patch @@ -0,0 +1,11 @@ +--- a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_root.cc ++++ b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_root.cc +@@ -281,7 +281,7 @@ void PartitionAllocMallocInitOnce() { + return; + } + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS) + // When fork() is called, only the current thread continues to execute in the + // child process. If the lock is held, but *not* by this thread when fork() is + // called, we have a deadlock. diff --git a/srcpkgs/qt6-pdf/patches/0122-chromium-condition_var.patch b/srcpkgs/qt6-pdf/patches/0136-musl-v8-monotonic-pthread-cont_timedwait.patch similarity index 82% rename from srcpkgs/qt6-pdf/patches/0122-chromium-condition_var.patch rename to srcpkgs/qt6-pdf/patches/0136-musl-v8-monotonic-pthread-cont_timedwait.patch index 6c41312e516..1dc8bc4d3d1 100644 --- a/srcpkgs/qt6-pdf/patches/0122-chromium-condition_var.patch +++ b/srcpkgs/qt6-pdf/patches/0136-musl-v8-monotonic-pthread-cont_timedwait.patch @@ -1,7 +1,7 @@ Use monotonic clock for pthread_cond_timedwait with musl too. ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/v8/src/base/platform/condition-variable.cc -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/v8/src/base/platform/condition-variable.cc +--- a/src/3rdparty/chromium/v8/src/base/platform/condition-variable.cc ++++ b/src/3rdparty/chromium/v8/src/base/platform/condition-variable.cc @@ -20,7 +20,7 @@ namespace base { ConditionVariable::ConditionVariable() { diff --git a/srcpkgs/qt6-pdf/patches/0123-chromium-musl-no-getcontext.patch b/srcpkgs/qt6-pdf/patches/0137-no-getcontext.patch similarity index 72% rename from srcpkgs/qt6-pdf/patches/0123-chromium-musl-no-getcontext.patch rename to srcpkgs/qt6-pdf/patches/0137-no-getcontext.patch index 46522ee0a06..fc419db67de 100644 --- a/srcpkgs/qt6-pdf/patches/0123-chromium-musl-no-getcontext.patch +++ b/srcpkgs/qt6-pdf/patches/0137-no-getcontext.patch @@ -1,5 +1,5 @@ ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc +--- a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc ++++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc @@ -490,7 +490,9 @@ bool ExceptionHandler::SimulateSignalDel siginfo.si_code = SI_USER; siginfo.si_pid = getpid(); diff --git a/srcpkgs/qt6-pdf/patches/0138-no-mte.patch b/srcpkgs/qt6-pdf/patches/0138-no-mte.patch new file mode 100644 index 00000000000..074a518d6cf --- /dev/null +++ b/srcpkgs/qt6-pdf/patches/0138-no-mte.patch @@ -0,0 +1,11 @@ +--- a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_config.h ++++ b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_config.h +@@ -153,7 +153,7 @@ static_assert(sizeof(void*) != 8, ""); + defined(ARCH_CPU_LITTLE_ENDIAN)) + + #define PA_CONFIG_HAS_MEMORY_TAGGING() \ +- (defined(ARCH_CPU_ARM64) && defined(__clang__) && \ ++ (0 && defined(ARCH_CPU_ARM64) && defined(__clang__) && \ + !defined(ADDRESS_SANITIZER) && \ + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID))) + diff --git a/srcpkgs/qt6-pdf/patches/0139-old-clang.patch b/srcpkgs/qt6-pdf/patches/0139-old-clang.patch new file mode 100644 index 00000000000..4300abdea95 --- /dev/null +++ b/srcpkgs/qt6-pdf/patches/0139-old-clang.patch @@ -0,0 +1,11 @@ +--- a/src/3rdparty/chromium/build/config/compiler/BUILD.gn ++++ b/src/3rdparty/chromium/build/config/compiler/BUILD.gn +@@ -1543,7 +1543,7 @@ config("compiler_deterministic") { + } else { + # -ffile-compilation-dir is an alias for both -fdebug-compilation-dir= + # and -fcoverage-compilation-dir=. +- cflags += [ "-ffile-compilation-dir=." ] ++ cflags += [ "-fdebug-compilation-dir=." ] + swiftflags += [ "-file-compilation-dir=." ] + } + if (!is_win) { diff --git a/srcpkgs/qt6-pdf/patches/0140-reenable-linux-i686-builds.patch b/srcpkgs/qt6-pdf/patches/0140-reenable-linux-i686-builds.patch new file mode 100644 index 00000000000..47ff59a75bc --- /dev/null +++ b/srcpkgs/qt6-pdf/patches/0140-reenable-linux-i686-builds.patch @@ -0,0 +1,19 @@ +--- a/src/3rdparty/chromium/BUILD.gn ++++ b/src/3rdparty/chromium/BUILD.gn +@@ -1626,16 +1626,6 @@ if (use_blink && !is_cronet_build) { + } + } + +-# 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) +- +-# Note: v8_target_cpu == arm allows using the V8 arm simulator on x86 for fuzzing. +-assert( +- is_valid_x86_target || target_cpu != "x86" || v8_target_cpu == "arm", +- "'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-pdf/patches/0126-chromium-no-cdefs.patch b/srcpkgs/qt6-pdf/patches/0141-remove-sys-cdefs-includes.patch similarity index 65% rename from srcpkgs/qt6-pdf/patches/0126-chromium-no-cdefs.patch rename to srcpkgs/qt6-pdf/patches/0141-remove-sys-cdefs-includes.patch index 90faa3d664d..8d1c06e0dfa 100644 --- a/srcpkgs/qt6-pdf/patches/0126-chromium-no-cdefs.patch +++ b/srcpkgs/qt6-pdf/patches/0141-remove-sys-cdefs-includes.patch @@ -1,5 +1,5 @@ ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/compat/linux/sys/ptrace.h -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/crashpad/crashpad/compat/linux/sys/ptrace.h +--- a/src/3rdparty/chromium/third_party/crashpad/crashpad/compat/linux/sys/ptrace.h ++++ b/src/3rdparty/chromium/third_party/crashpad/crashpad/compat/linux/sys/ptrace.h @@ -17,8 +17,6 @@ #include_next @@ -9,8 +9,8 @@ // https://sourceware.org/bugzilla/show_bug.cgi?id=22433 #if !defined(PTRACE_GET_THREAD_AREA) && !defined(PT_GET_THREAD_AREA) && \ defined(__GLIBC__) ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/libsync/src/include/sync/sync.h -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/libsync/src/include/sync/sync.h +--- a/src/3rdparty/chromium/third_party/libsync/src/include/sync/sync.h ++++ b/src/3rdparty/chromium/third_party/libsync/src/include/sync/sync.h @@ -19,12 +19,13 @@ #ifndef __SYS_CORE_SYNC_H #define __SYS_CORE_SYNC_H diff --git a/srcpkgs/qt6-pdf/patches/0142-sandbox-membarrier.patch b/srcpkgs/qt6-pdf/patches/0142-sandbox-membarrier.patch new file mode 100644 index 00000000000..47bcbf1de19 --- /dev/null +++ b/srcpkgs/qt6-pdf/patches/0142-sandbox-membarrier.patch @@ -0,0 +1,10 @@ +--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc ++++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc +@@ -433,6 +433,7 @@ bool SyscallSets::IsAllowedProcessStartO + 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-pdf/patches/0143-sndio.patch b/srcpkgs/qt6-pdf/patches/0143-sndio.patch new file mode 100644 index 00000000000..1e6dcac8d5a --- /dev/null +++ b/srcpkgs/qt6-pdf/patches/0143-sndio.patch @@ -0,0 +1,849 @@ +--- a/src/3rdparty/chromium/media/BUILD.gn ++++ b/src/3rdparty/chromium/media/BUILD.gn +@@ -96,6 +96,9 @@ config("media_config") { + defines += [ "DLOPEN_PULSEAUDIO" ] + } + } ++ if (use_sndio) { ++ defines += [ "USE_SNDIO" ] ++ } + if (use_cras) { + defines += [ "USE_CRAS" ] + } +--- a/src/3rdparty/chromium/media/audio/BUILD.gn ++++ b/src/3rdparty/chromium/media/audio/BUILD.gn +@@ -282,6 +282,17 @@ jumbo_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 += [ +--- a/src/3rdparty/chromium/media/audio/linux/audio_manager_linux.cc ++++ b/src/3rdparty/chromium/media/audio/linux/audio_manager_linux.cc +@@ -23,6 +23,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 ++++ b/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 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 ++++ b/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 ++ ++#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 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 ++++ b/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(arg); ++ ++ self->hw_delay += delta; ++} ++ ++void *SndioAudioInputStream::ThreadEntry(void *arg) { ++ SndioAudioInputStream* self = static_cast(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(reinterpret_cast(buffer), nframes); ++ ++ // invoke callback ++ callback->OnData(audio_bus.get(), base::TimeTicks::Now() - delay, 1.); ++ } ++} ++ ++} // namespace media +--- /dev/null ++++ b/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 ++#include ++#include ++ ++#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 { ++ 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 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 ++++ b/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(arg); ++ ++ self->hw_delay -= delta; ++} ++ ++void SndioAudioOutputStream::OnVolCallback(void *arg, unsigned int vol) { ++ SndioAudioOutputStream* self = static_cast(arg); ++ ++ self->vol = vol; ++} ++ ++void *SndioAudioOutputStream::ThreadEntry(void *arg) { ++ SndioAudioOutputStream* self = static_cast(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(count, reinterpret_cast(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 ++++ b/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 ++#include ++ ++#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 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_ +--- a/src/3rdparty/chromium/media/media_options.gni ++++ b/src/3rdparty/chromium/media/media_options.gni +@@ -189,6 +189,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 all non-Android, non-Mac POSIX systems - with the + # exception of CastOS desktop builds. + # diff --git a/srcpkgs/qt6-pdf/patches/0155-systypes.patch b/srcpkgs/qt6-pdf/patches/0144-systypes.patch similarity index 93% rename from srcpkgs/qt6-pdf/patches/0155-systypes.patch rename to srcpkgs/qt6-pdf/patches/0144-systypes.patch index f4e71e939cd..431f7add784 100644 --- a/srcpkgs/qt6-pdf/patches/0155-systypes.patch +++ b/srcpkgs/qt6-pdf/patches/0144-systypes.patch @@ -1,6 +1,6 @@ --- a/src/3rdparty/chromium/base/third_party/symbolize/symbolize.h +++ b/src/3rdparty/chromium/base/third_party/symbolize/symbolize.h -@@ -58,6 +58,8 @@ +@@ -60,6 +60,8 @@ #include "config.h" #include "glog/logging.h" diff --git a/srcpkgs/qt6-pdf/patches/0150-chromium-unbundle-ffmpeg-av_stream_get_first_dts.patch b/srcpkgs/qt6-pdf/patches/0145-unbundle-ffmpeg-av_stream_get_first_dts.patch similarity index 56% rename from srcpkgs/qt6-pdf/patches/0150-chromium-unbundle-ffmpeg-av_stream_get_first_dts.patch rename to srcpkgs/qt6-pdf/patches/0145-unbundle-ffmpeg-av_stream_get_first_dts.patch index e7f6048fbc1..7d426098ed0 100644 --- a/srcpkgs/qt6-pdf/patches/0150-chromium-unbundle-ffmpeg-av_stream_get_first_dts.patch +++ b/srcpkgs/qt6-pdf/patches/0145-unbundle-ffmpeg-av_stream_get_first_dts.patch @@ -1,5 +1,5 @@ ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/build/linux/unbundle/ffmpeg.gn -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/build/linux/unbundle/ffmpeg.gn +--- a/src/3rdparty/chromium/build/linux/unbundle/ffmpeg.gn ++++ b/src/3rdparty/chromium/build/linux/unbundle/ffmpeg.gn @@ -12,6 +12,7 @@ pkg_config("system_ffmpeg") { "libavformat", "libavutil", diff --git a/srcpkgs/qt6-pdf/patches/0151-chromium-unbundled-cross-toolchain.patch b/srcpkgs/qt6-pdf/patches/0146-unbundled-cross-toolchain.patch similarity index 56% rename from srcpkgs/qt6-pdf/patches/0151-chromium-unbundled-cross-toolchain.patch rename to srcpkgs/qt6-pdf/patches/0146-unbundled-cross-toolchain.patch index 746d2dfb9a7..4381d0779ed 100644 --- a/srcpkgs/qt6-pdf/patches/0151-chromium-unbundled-cross-toolchain.patch +++ b/srcpkgs/qt6-pdf/patches/0146-unbundled-cross-toolchain.patch @@ -1,5 +1,5 @@ ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/build/toolchain/linux/unbundle/BUILD.gn -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/build/toolchain/linux/unbundle/BUILD.gn +--- a/src/3rdparty/chromium/build/toolchain/linux/unbundle/BUILD.gn ++++ b/src/3rdparty/chromium/build/toolchain/linux/unbundle/BUILD.gn @@ -35,8 +35,8 @@ gcc_toolchain("host") { extra_ldflags = getenv("BUILD_LDFLAGS") diff --git a/srcpkgs/qt6-pdf/patches/0148-webrtc-size_t.patch b/srcpkgs/qt6-pdf/patches/0148-webrtc-size_t.patch new file mode 100644 index 00000000000..c9f26b15e6a --- /dev/null +++ b/srcpkgs/qt6-pdf/patches/0148-webrtc-size_t.patch @@ -0,0 +1,10 @@ +--- a/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h ++++ b/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h +@@ -14,6 +14,7 @@ + #include + + #include ++#include + + namespace webrtc { + diff --git a/srcpkgs/qt6-pdf/patches/0152-chromium-webrtc-size_t.patch b/srcpkgs/qt6-pdf/patches/0152-chromium-webrtc-size_t.patch deleted file mode 100644 index 8f60204ff58..00000000000 --- a/srcpkgs/qt6-pdf/patches/0152-chromium-webrtc-size_t.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h -@@ -14,6 +14,7 @@ - #include - - #include -+#include - - namespace webrtc { - diff --git a/srcpkgs/qt6-pdf/patches/0153-chromium-webrtc-size_t.patch b/srcpkgs/qt6-pdf/patches/0153-chromium-webrtc-size_t.patch deleted file mode 100644 index 3b5b7a3d53b..00000000000 --- a/srcpkgs/qt6-pdf/patches/0153-chromium-webrtc-size_t.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/angle/include/platform/PlatformMethods.h -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/angle/include/platform/PlatformMethods.h -@@ -222,11 +222,11 @@ inline void DefaultHistogramBoolean(Plat - using ProgramKeyType = std::array; - 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-pdf/patches/0154-chromium-uit_t.patch b/srcpkgs/qt6-pdf/patches/0154-chromium-uit_t.patch deleted file mode 100644 index d13a31fee40..00000000000 --- a/srcpkgs/qt6-pdf/patches/0154-chromium-uit_t.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/sandbox/linux/services/credentials.h -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/sandbox/linux/services/credentials.h -@@ -14,6 +14,8 @@ - #include - #include - -+#include -+ - #include "sandbox/linux/system_headers/capability.h" - #include "sandbox/sandbox_export.h" - diff --git a/srcpkgs/qt6-pdf/patches/0300-chromium-musl-hacks.patch b/srcpkgs/qt6-pdf/patches/0300-chromium-musl-hacks.patch deleted file mode 100644 index e0b91a09a84..00000000000 --- a/srcpkgs/qt6-pdf/patches/0300-chromium-musl-hacks.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/base/debug/stack_trace.cc -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/base/debug/stack_trace.cc -@@ -234,7 +234,7 @@ bool StackTrace::WillSymbolizeToStreamFo - // Symbols are not expected to be reliable when gn args specifies - // symbol_level=0. - return false; --#elif defined(__UCLIBC__) || defined(_AIX) -+#elif defined(__GLIBC__) || defined(_AIX) - // StackTrace::OutputToStream() is not implemented under uclibc, nor AIX. - // See https://crbug.com/706728 - return false; -@@ -273,7 +273,9 @@ void StackTrace::Print() const { - } - - void StackTrace::OutputToStream(std::ostream* os) const { -+#if defined(__GLIBC__) - OutputToStreamWithPrefix(os, nullptr); -+#endif - } - - std::string StackTrace::ToString() const { -@@ -281,14 +283,14 @@ std::string StackTrace::ToString() const - } - 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(); - } - - std::ostream& operator<<(std::ostream& os, const StackTrace& s) { --#if !defined(__UCLIBC__) && !defined(_AIX) -+#if defined(__GLIBC__) && !defined(_AIX) - s.OutputToStream(&os); - #else - os << "StackTrace::OutputToStream not implemented."; diff --git a/srcpkgs/qt6-pdf/patches/0301-chromium-musl-sandbox.patch b/srcpkgs/qt6-pdf/patches/0301-chromium-musl-sandbox.patch deleted file mode 100644 index 8332e6a6711..00000000000 --- a/srcpkgs/qt6-pdf/patches/0301-chromium-musl-sandbox.patch +++ /dev/null @@ -1,70 +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 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,10 @@ bool SyscallSets::IsAllowedAddressSpaceA - case __NR_mlock: - case __NR_munlock: - case __NR_munmap: -+#ifndef __GLIBC__ -+ case __NR_mremap: -+ case __NR_membarrier: -+#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: diff --git a/srcpkgs/qt6-pdf/patches/0700-armv7l-neon.patch b/srcpkgs/qt6-pdf/patches/0700-armv7l-neon.patch deleted file mode 100644 index 5ca1953d2cb..00000000000 --- a/srcpkgs/qt6-pdf/patches/0700-armv7l-neon.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/skia/BUILD.gn -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/skia/BUILD.gn -@@ -786,7 +786,6 @@ skia_source_set("skia_opts") { - # 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-pdf/patches/0750-chromium-musl-cross-no-asm_ptrace_h.patch b/srcpkgs/qt6-pdf/patches/0750-chromium-musl-cross-no-asm_ptrace_h.patch deleted file mode 100644 index ca7b0150962..00000000000 --- a/srcpkgs/qt6-pdf/patches/0750-chromium-musl-cross-no-asm_ptrace_h.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc -@@ -38,7 +38,12 @@ - - #include "client/linux/minidump_writer/linux_ptrace_dumper.h" - -+#if defined(__GLIBC__) - #include -+#else -+/* For arm*-musl this definition is missing */ -+#define ARM_sp uregs[13] -+#endif - #include - #include - #include ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc -@@ -32,7 +32,12 @@ - - #include "client/linux/minidump_writer/linux_core_dumper.h" - -+#if defined(__GLIBC__) - #include -+#else -+/* For arm*-musl this definition is missing */ -+#define ARM_sp uregs[13] -+#endif - #include - #include - #include diff --git a/srcpkgs/qt6-pdf/patches/0751-chromium-musl-arm-user_vfp.patch b/srcpkgs/qt6-pdf/patches/0751-chromium-musl-arm-user_vfp.patch deleted file mode 100644 index d7c18036d50..00000000000 --- a/srcpkgs/qt6-pdf/patches/0751-chromium-musl-arm-user_vfp.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h -@@ -17,6 +17,17 @@ - - #include - #include -+#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 - diff --git a/srcpkgs/qt6-pdf/patches/0752-chromium-musl-arm-elf_auxv_t.patch b/srcpkgs/qt6-pdf/patches/0752-chromium-musl-arm-elf_auxv_t.patch deleted file mode 100644 index 52f5f47be83..00000000000 --- a/srcpkgs/qt6-pdf/patches/0752-chromium-musl-arm-elf_auxv_t.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/v8/src/base/cpu.cc -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/v8/src/base/cpu.cc -@@ -165,6 +165,15 @@ static V8_INLINE void __cpuid(int cpu_in - - #if V8_HOST_ARCH_ARM || V8_HOST_ARCH_ARM64 - -+#ifndef __GLIBC__ -+#include -+#ifdef __LP64__ -+typedef Elf64_auxv_t elf_auxv_t; -+#else -+typedef Elf32_auxv_t elf_auxv_t; -+#endif -+#endif -+ - static uint32_t ReadELFHWCaps() { - uint32_t result = 0; - #if V8_GLIBC_PREREQ(2, 16) diff --git a/srcpkgs/qt6-pdf/patches/0753-chromium-musl-32-bit-fstat.patch b/srcpkgs/qt6-pdf/patches/0753-chromium-musl-32-bit-fstat.patch deleted file mode 100644 index 09239a81984..00000000000 --- a/srcpkgs/qt6-pdf/patches/0753-chromium-musl-32-bit-fstat.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h -+++ b/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h -@@ -293,6 +293,10 @@ struct kernel_rusage { - long ru_nivcsw; - }; - -+#ifdef fstatat64 -+#undef fstatat64 -+#endif -+ - #if defined(__i386__) || defined(__ARM_EABI__) || defined(__ARM_ARCH_3__) \ - || defined(__PPC__) || (defined(__s390__) && !defined(__s390x__)) \ - || defined(__e2k__) diff --git a/srcpkgs/qt6-pdf/patches/0800-musl-sandbox.patch b/srcpkgs/qt6-pdf/patches/0800-musl-sandbox.patch new file mode 100644 index 00000000000..a59c2736530 --- /dev/null +++ b/srcpkgs/qt6-pdf/patches/0800-musl-sandbox.patch @@ -0,0 +1,121 @@ +Source: https://git.alpinelinux.org/aports/tree/community/chromium/musl-sandbox.patch +musl uses different syscalls from glibc for some functions, +so the sandbox has to account for that +--- 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 +@@ -132,6 +132,7 @@ namespace sandbox { + ResultExpr RestrictCloneToThreadsAndEPERMFork() { + const Arg 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 | +@@ -146,6 +147,13 @@ ResultExpr RestrictCloneToThreadsAndEPER + const BoolExpr android_test = + AnyOf(flags == kAndroidCloneMask, flags == kObsoleteAndroidCloneMask, + flags == kGlibcPthreadFlags); ++#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; ++#endif + + // The following two flags are the two important flags in any vfork-emulating + // clone call. EPERM any clone call that contains both of them. +@@ -155,7 +163,11 @@ ResultExpr RestrictCloneToThreadsAndEPER + AnyOf((flags & (CLONE_VM | CLONE_THREAD)) == 0, + (flags & kImportantCloneVforkFlags) == kImportantCloneVforkFlags); + ++#ifdef __GLIBC__ + return If(IsAndroid() ? android_test : glibc_test, Allow()) ++#else ++ return If(thread_clone_ok, Allow()) ++#endif + .ElseIf(is_fork_or_clone_vfork, Error(EPERM)) + .Else(CrashSIGSYSClone()); + } +--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc ++++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc +@@ -439,6 +439,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. +@@ -451,7 +454,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: +@@ -549,6 +554,10 @@ bool SyscallSets::IsAllowedAddressSpaceA + case __NR_mlock: + case __NR_munlock: + case __NR_munmap: ++#ifndef __GLIBC__ ++ case __NR_mremap: ++ case __NR_membarrier: ++#endif + return true; + case __NR_madvise: + case __NR_mincore: +@@ -566,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: +--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc ++++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc +@@ -225,12 +225,26 @@ ResultExpr EvaluateSyscallImpl(int fs_de + if (sysno == __NR_getpriority || sysno ==__NR_setpriority) + return RestrictGetSetpriority(current_pid); + ++#ifndef __GLIBC__ ++ // XXX: hacks for musl sandbox, calls needed? ++ if (sysno == __NR_sched_getparam || sysno == __NR_sched_getscheduler || ++ sysno == __NR_sched_setscheduler) { ++ return Allow(); ++ } ++#endif ++ + // The scheduling syscalls are used in threading libraries and also heavily in + // abseil. See for example https://crbug.com/1370394. ++#ifdef __GLIBC__ + if (sysno == __NR_sched_getaffinity || sysno == __NR_sched_getparam || + sysno == __NR_sched_getscheduler || sysno == __NR_sched_setscheduler) { + return RestrictSchedTarget(current_pid, sysno); + } ++#else ++ if (sysno == __NR_sched_getaffinity) { ++ return RestrictSchedTarget(current_pid, sysno); ++ } ++#endif + + if (sysno == __NR_getrandom) { + return RestrictGetRandom(); +--- a/src/3rdparty/chromium/sandbox/linux/system_headers/linux_syscalls.h ++++ b/src/3rdparty/chromium/sandbox/linux/system_headers/linux_syscalls.h +@@ -10,6 +10,7 @@ + #define SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SYSCALLS_H_ + + #include "build/build_config.h" ++#include + + #if defined(__x86_64__) + #include "sandbox/linux/system_headers/x86_64_linux_syscalls.h" diff --git a/srcpkgs/qt6-pdf/patches/0010-chromium-musl-tid-caching.patch b/srcpkgs/qt6-pdf/patches/0801-musl-tid-caching.patch similarity index 92% rename from srcpkgs/qt6-pdf/patches/0010-chromium-musl-tid-caching.patch rename to srcpkgs/qt6-pdf/patches/0801-musl-tid-caching.patch index 8fbf4c0b1ba..5e482667fcf 100644 --- a/srcpkgs/qt6-pdf/patches/0010-chromium-musl-tid-caching.patch +++ b/srcpkgs/qt6-pdf/patches/0801-musl-tid-caching.patch @@ -2,13 +2,13 @@ Source: https://git.alpinelinux.org/aports/plain/community/chromium/musl-tid-cac the sandbox caching of thread id's only works with glibc see: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/32356 see: https://gitlab.alpinelinux.org/alpine/aports/-/issues/13579 --- --- a/src/3rdparty/chromium/sandbox/linux/services/namespace_sandbox.cc +++ b/src/3rdparty/chromium/sandbox/linux/services/namespace_sandbox.cc -@@ -209,6 +209,70 @@ +@@ -208,6 +208,72 @@ base::Process NamespaceSandbox::LaunchPr return base::LaunchProcess(argv, launch_options_copy); } ++#ifndef __GLIBC__ +#if defined(__aarch64__) || defined(__arm__) || defined(__powerpc__) +#define TLS_ABOVE_TP +#endif @@ -72,15 +72,16 @@ see: https://gitlab.alpinelinux.org/alpine/aports/-/issues/13579 + pid_t* cached_tid_location = &reinterpret_cast(pthread_self())->tid; + *cached_tid_location = real_tid; +} ++#endif + // static pid_t NamespaceSandbox::ForkInNewPidNamespace(bool drop_capabilities_in_child) { const pid_t pid = -@@ -226,6 +290,8 @@ +@@ -225,6 +291,9 @@ pid_t NamespaceSandbox::ForkInNewPidName #if defined(LIBC_GLIBC) MaybeUpdateGlibcTidCache(); --#endif -+#else + #endif ++#ifndef __GLIBC__ + MaybeUpdateMuslTidCache(); +#endif return 0; diff --git a/srcpkgs/qt6-pdf/patches/0802-musl-no-res-ninit-nclose.patch b/srcpkgs/qt6-pdf/patches/0802-musl-no-res-ninit-nclose.patch new file mode 100644 index 00000000000..e2a01d946d3 --- /dev/null +++ b/srcpkgs/qt6-pdf/patches/0802-musl-no-res-ninit-nclose.patch @@ -0,0 +1,20 @@ +--- a/src/3rdparty/chromium/net/dns/public/scoped_res_state.cc ++++ b/src/3rdparty/chromium/net/dns/public/scoped_res_state.cc +@@ -13,7 +13,7 @@ + namespace net { + + ScopedResState::ScopedResState() { +-#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_FUCHSIA) ++#ifndef __GLIBC__ + // Note: res_ninit in glibc always returns 0 and sets RES_INIT. + // res_init behaves the same way. + memset(&_res, 0, sizeof(_res)); +@@ -30,7 +30,7 @@ ScopedResState::~ScopedResState() { + // Prefer res_ndestroy where available. + #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD) + res_ndestroy(&res_); +-#else ++#elif defined(__GLIBC__) + res_nclose(&res_); + #endif // BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD) + diff --git a/srcpkgs/qt6-pdf/patches/0803-musl-include.patch b/srcpkgs/qt6-pdf/patches/0803-musl-include.patch new file mode 100644 index 00000000000..b8e24762c77 --- /dev/null +++ b/srcpkgs/qt6-pdf/patches/0803-musl-include.patch @@ -0,0 +1,10 @@ +--- a/src/3rdparty/chromium/gpu/config/gpu_driver_bug_workarounds.h ++++ b/src/3rdparty/chromium/gpu/config/gpu_driver_bug_workarounds.h +@@ -5,6 +5,7 @@ + #ifndef GPU_CONFIG_GPU_DRIVER_BUG_WORKAROUNDS_H_ + #define GPU_CONFIG_GPU_DRIVER_BUG_WORKAROUNDS_H_ + ++#include + #include + + #include "build/build_config.h" diff --git a/srcpkgs/qt6-pdf/patches/0998-cross.patch b/srcpkgs/qt6-pdf/patches/0998-cross.patch deleted file mode 100644 index 9e62be4b4c6..00000000000 --- a/srcpkgs/qt6-pdf/patches/0998-cross.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/examples/CMakeLists.txt 2023-10-03 21:49:54.000000000 +0200 -+++ - 2023-10-27 11:12:01.573293042 +0200 -@@ -4,7 +4,7 @@ - cmake_minimum_required(VERSION 3.16) - - qt_examples_build_begin(EXTERNAL_BUILD) --if(NOT CMAKE_CROSSCOMPILING) #QTBUG-86533 -+#if(NOT CMAKE_CROSSCOMPILING) #QTBUG-86533 - if(TARGET Qt::WebEngineCore) - add_subdirectory(webenginequick) - endif() -@@ -17,5 +17,5 @@ - if(TARGET Qt::PdfWidgets) - add_subdirectory(pdfwidgets) - endif() --endif() -+#endif() - qt_examples_build_end() diff --git a/srcpkgs/qt6-pdf/patches/0998-example-cross-build.patch b/srcpkgs/qt6-pdf/patches/0998-example-cross-build.patch new file mode 100644 index 00000000000..8fb4c779985 --- /dev/null +++ b/srcpkgs/qt6-pdf/patches/0998-example-cross-build.patch @@ -0,0 +1,11 @@ +--- a/examples/CMakeLists.txt ++++ b/examples/CMakeLists.txt +@@ -4,7 +4,7 @@ + cmake_minimum_required(VERSION 3.16) + + qt_examples_build_begin(EXTERNAL_BUILD) +-if(NOT CMAKE_CROSSCOMPILING) #QTBUG-86533 ++if(TRUE) #QTBUG-86533 + if(TARGET Qt::WebEngineCore) + add_subdirectory(webenginequick) + endif() diff --git a/srcpkgs/qt6-pdf/patches/0999-python3.12.patch b/srcpkgs/qt6-pdf/patches/0999-python3.12.patch deleted file mode 100644 index 40d4010c826..00000000000 --- a/srcpkgs/qt6-pdf/patches/0999-python3.12.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/fileutil.py 2023-10-03 21:49:54.000000000 +0200 -+++ - 2023-10-13 23:26:56.151025878 +0200 -@@ -3,7 +3,6 @@ - # found in the LICENSE file. - - import errno --import imp - import os.path - import sys - ---- a/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/parse/lexer.py 2023-10-03 21:49:54.000000000 +0200 -+++ - 2023-10-13 23:28:56.391987051 +0200 -@@ -2,7 +2,6 @@ - # Use of this source code is governed by a BSD-style license that can be - # found in the LICENSE file. - --import imp - import os.path - import sys - diff --git a/srcpkgs/qt6-pdf/patches/1000-we-know-what-will-be-supported.patch b/srcpkgs/qt6-pdf/patches/1000-we-know-what-will-be-supported.patch index d9dd1c75352..fcf515071fe 100644 --- a/srcpkgs/qt6-pdf/patches/1000-we-know-what-will-be-supported.patch +++ b/srcpkgs/qt6-pdf/patches/1000-we-know-what-will-be-supported.patch @@ -1,27 +1,15 @@ ---- a/src/3rdparty/chromium/BUILD.gn -+++ b/src/3rdparty/chromium/BUILD.gn -@@ -1647,9 +1647,7 @@ if (!is_ios && !is_qtwebengine) { - } - - # 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) -+is_valid_x86_target = true - - # Note: v8_target_cpu == arm allows using the V8 arm simulator on x86 for fuzzing. - assert( --- a/src/host/CMakeLists.txt +++ b/src/host/CMakeLists.txt -@@ -48,18 +48,3 @@ if(QT_FEATURE_qtpdf_build) +@@ -50,19 +50,3 @@ if(QT_FEATURE_qtpdf_build) DESTINATION ${WEBENGINE_ROOT_BUILD_DIR}/src/pdf/v8_toolchain ) endif() - -# TODO: this could be run as part of main configure with execute_process +-# Skip for qtpdf(android) - -if(CMAKE_CXX_COMPILER_ID STREQUAL GNU AND TEST_architecture_arch STREQUAL "x86_64" --AND GN_TARGET_CPU STREQUAL "arm") +- AND GN_TARGET_CPU STREQUAL "arm" AND NOT MINGW AND NOT ANDROID) - try_compile( - has32HostCompiler - "${CMAKE_CURRENT_BINARY_DIR}/config.tests/hostcompiler" diff --git a/srcpkgs/qt6-pdf/patches/Partial-migration-from-imp-to-importlib.patch b/srcpkgs/qt6-pdf/patches/Partial-migration-from-imp-to-importlib.patch deleted file mode 100644 index 46cc88f9bf1..00000000000 --- a/srcpkgs/qt6-pdf/patches/Partial-migration-from-imp-to-importlib.patch +++ /dev/null @@ -1,36 +0,0 @@ -From cbf5f7ad619a967bd54482e1d1df36d80b28145a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= -Date: Thu, 13 Jul 2023 12:18:00 +0200 -Subject: [PATCH] Partial migration from imp to importlib - ---- - .../resources/protobufs/binary_proto_generator.py | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py b/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py -index 2a1802d..ba67251 100755 ---- a/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py -+++ b/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py -@@ -9,7 +9,7 @@ - """ - from __future__ import print_function - import abc --import imp -+from importlib import util - import optparse - import os - import re -@@ -68,7 +68,9 @@ class GoogleProtobufModuleImporter: - raise ImportError(fullname) - - filepath = self._fullname_to_filepath(fullname) -- return imp.load_source(fullname, filepath) -+ spec = util.spec_from_file_location(fullname, filepath) -+ loaded = util.module_from_spec(spec) -+ return spec.loader.exec_module(loaded) - - class BinaryProtoGenerator: - --- -2.41.0 - diff --git a/srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch b/srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch deleted file mode 100644 index f85ee4d01ff..00000000000 --- a/srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch +++ /dev/null @@ -1,34 +0,0 @@ -Based on: https://github.com/chromium/chromium/commit/871f8ae9b65ce2679b0bc0be36902d65edf0c1e4 - -diff --git a/third_party/blink/renderer/core/xml/xslt_processor.h b/third_party/blink/renderer/core/xml/xslt_processor.h -index d53835e9675793e..2eaea31ed29b90f 100644 ---- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h -+++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h -@@ -79,7 +79,11 @@ class XSLTProcessor final : public Scrip - - void reset(); - -+#if LIBXML_VERSION >= 21200 -+ static void ParseErrorFunc(void* user_data, const xmlError*); -+#else - static void ParseErrorFunc(void* user_data, xmlError*); -+#endif - static void GenericErrorFunc(void* user_data, const char* msg, ...); - - // Only for libXSLT callbacks -diff --git a/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc b/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc -index 133e0b3355d2f09..f424077089da87d 100644 ---- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc -+++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc -@@ -60,7 +60,11 @@ void XSLTProcessor::GenericErrorFunc(voi - // It would be nice to do something with this error message. - } - -+#if LIBXML_VERSION >= 21200 -+void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) { -+#else - void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) { -+#endif - FrameConsole* console = static_cast(user_data); - if (!console) - return; diff --git a/srcpkgs/qt6-pdf/patches/pipewire-fcntl-call.patch b/srcpkgs/qt6-pdf/patches/pipewire-fcntl-call.patch deleted file mode 100644 index a139a7e8a53..00000000000 --- a/srcpkgs/qt6-pdf/patches/pipewire-fcntl-call.patch +++ /dev/null @@ -1,18 +0,0 @@ -Patch-Source: https://webrtc-review.googlesource.com/c/src/+/305120 --- -diff --git a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc -index 5878180..b2ad7ad 100644 ---- a/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc -+++ b/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc -@@ -452,8 +452,8 @@ - PipeWireThreadLoopLock thread_loop_lock(pw_main_loop_); - - if (fd >= 0) { -- pw_core_ = pw_context_connect_fd( -- pw_context_, fcntl(fd, F_DUPFD_CLOEXEC), nullptr, 0); -+ pw_core_ = pw_context_connect_fd( -+ pw_context_, fcntl(fd, F_DUPFD_CLOEXEC, 0), nullptr, 0); - } else { - pw_core_ = pw_context_connect(pw_context_, nullptr, 0); - } - diff --git a/srcpkgs/qt6-pdf/template b/srcpkgs/qt6-pdf/template index ecda84afac1..a7f61ea0b0a 100644 --- a/srcpkgs/qt6-pdf/template +++ b/srcpkgs/qt6-pdf/template @@ -1,7 +1,7 @@ # Template file for 'qt6-pdf' pkgname=qt6-pdf -version=6.6.0 -revision=3 +version=6.7.2 +revision=1 build_style=cmake configure_args="-DQT_FEATURE_qtpdf_build=ON -DQT_FEATURE_qtpdf_widgets_build=ON @@ -10,7 +10,8 @@ configure_args="-DQT_FEATURE_qtpdf_build=ON -DQT_BUILD_EXAMPLES=ON" hostmakedepends="qt6-base-devel perl pkg-config nodejs python3-html5lib qt6-declarative-host-tools gperf bison flex nss-devel" -makedepends="qt6-base-devel qt6-declarative-devel qt6-svg-devel zlib-devel +makedepends="qt6-base-private-devel qt6-declarative-private-devel + qt6-svg-devel zlib-devel pciutils-devel opus-devel libxslt-devel libxml2-devel ffmpeg-devel lcms2-devel libwebp-devel icu-devel re2-devel snappy-devel libevent-devel libvpx-devel minizip-devel tiff-devel libpng-devel harfbuzz-devel @@ -21,7 +22,7 @@ maintainer="John " 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=d5dc9ff05a2c57adbf99cbf0c7cb6f19527f67216caf627b0cc160a1d253b780 +checksum=c7755875594d8be382b07bf3634d44fd77012805794d8b588891709a6405ffd1 if [ "$XBPS_LIBC" = "musl" ]; then hostmakedepends+=" musl-legacy-compat" @@ -62,6 +63,7 @@ if [ "$_have_webengine" = yes ]; then -DQT_FEATURE_webengine_system_libevent=ON -DQT_FEATURE_webengine_system_gn=ON -DQT_FEATURE_webengine_system_icu=ON + -DQT_FEATURE_webengine_system_re2=ON -DQT_FEATURE_webengine_webrtc_pipewire=ON -DQT_FEATURE_webengine_embedded_build=OFF -DQT_FEATURE_webengine_proprietary_codecs=ON" @@ -167,6 +169,8 @@ pre_install() { post_install() { local _file + rm -rf "${DESTDIR}/usr/tests" + rm -f "${DESTDIR}/usr/lib/qt6/bin/testbrowser" find "${DESTDIR}"/usr/lib/qt6/examples \ -path '*/lib/qt6/**/lib/qt6/*' -type f | while read _file; do