pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: First attempt to build qt5-qt-webengine on arm64



On Tue, 1 Nov 2022, adr wrote:

Date: Tue, 1 Nov 2022 08:12:53 +0000 (UTC)
From: adr <adr%SDF.ORG@localhost>
To: pkgsrc-users%netbsd.org@localhost
Subject: Re: First attempt to build qt5-qt-webengine on arm64

On Mon, 31 Oct 2022, adr wrote:
I'll add the code in BUILD.gn and cpu_features.c to support netbsd,
and set arm_cpu_enable_crc32 and arm_cpu_enable_pmull to 0 for now.

Later a netbsd developer can change it for something more suitable.

I'll share with the list if I achieve something, just "make clean;
make configure" is a time destroyer.

adr

There is an API change in harfbuzz:

../../3rdparty/chromium/components/paint_preview/common/subset_font.cc:74:3: error: 'hb_subset_input_set_retain_gids' was not declared in this scope; did you mean 'hb_subset_input_set_flags'?
  74 |   hb_subset_input_set_retain_gids(input.get(), true);
     |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     |   hb_subset_input_set_flags


I'm using current pkgsrc, I'm going to update all the relevant
packages, I see that QTVERSION is now 5.15.7.

These patches make qt5-qtwebengine compile in arm64.

By the way, I've seen devel/cpu_features in pkgsrc. Could this been used to
add crc and pmull instructions support? It's a pitty to let them out...

adr.

==================================
--- /dev/null	2022-11-07 19:24:22.097422956 +0000
+++ patches/patch-src_3rdparty_gn_util_sys__info.cc	2022-11-01 05:57:43.570576904 +0000
@@ -0,0 +1,46 @@
+$NetBSD$
+
+--- src/3rdparty/gn/util/sys_info.cc.orig	2021-08-24 12:21:04.000000000 +0000
++++ src/3rdparty/gn/util/sys_info.cc
+@@ -6,12 +6,18 @@
+ + #include "base/logging.h"
+ #include "util/build_config.h"
++#include "base/stl_util.h"
+ + #if defined(OS_POSIX)
+ #include <sys/utsname.h>
+ #include <unistd.h>
+ #endif
+ ++#if defined(OS_NETBSD)
++#include <sys/param.h>
++#include <sys/sysctl.h>
++#endif
++
+ #if defined(OS_WIN)
+ #include <windows.h>
+ #endif
+@@ -24,10 +30,22 @@ std::string OperatingSystemArchitecture(
+     return std::string();
+   }
+   std::string arch(info.machine);
++#if defined(OS_NETBSD)
++  int mib[] = {CTL_HW, HW_MACHINE_ARCH};
++  char name[32];
++  size_t len = base::size(name);
++  if (sysctl(mib, base::size(mib), name, &len, NULL, 0) < 0) {
++    NOTREACHED();
++    return std::string();
++  }
++  arch = name;
++#endif // defined(OS_NETBSD)
+   if (arch == "i386" || arch == "i486" || arch == "i586" || arch == "i686") {
+     arch = "x86";
+   } else if (arch == "amd64") {
+     arch = "x86_64";
++  } else if (arch == "arm64") {
++    arch = "aarch64";
+   } else if (std::string(info.sysname) == "AIX") {
+     arch = "ppc64";
+   }
==================================

$ cvs diff -Nu
? patches/patch-src_3rdparty_gn_util_sys__info.cc
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/x11/qt5-qtwebengine/distinfo,v
retrieving revision 1.10
diff -u -r1.10 distinfo
--- distinfo	30 Oct 2022 13:38:31 -0000	1.10
+++ distinfo	7 Nov 2022 19:22:59 -0000
@@ -73,7 +73,7 @@
 SHA1 (patch-src_3rdparty_chromium_base_syslog__logging.cc) = bebb700ef5c40d490f3be04d1a5d5ddb16d5e4f0
 SHA1 (patch-src_3rdparty_chromium_base_system_sys__info.h) = 7487be6109399e235032e263ed2b12b0107271e7
 SHA1 (patch-src_3rdparty_chromium_base_system_sys__info__netbsd.cc) = c086070ed60af6999a804cd7b51a70b566ecab72
-SHA1 (patch-src_3rdparty_chromium_base_system_sys__info__posix.cc) = b7c4cc6a5c04741c448771812eb0ca7f428d2a72
+SHA1 (patch-src_3rdparty_chromium_base_system_sys__info__posix.cc) = b2167af42eda17110bd3a751102e1360519d8a67
 SHA1 (patch-src_3rdparty_chromium_base_task_thread__pool_environment__config__unittest.cc) = 6cd6d2ff44aa7d6ef778c73a218f6e566346528d
 SHA1 (patch-src_3rdparty_chromium_base_test_BUILD.gn) = 955b7077afff6c72d7c4a28c61504d1de9150736
 SHA1 (patch-src_3rdparty_chromium_base_third__party_libevent_BUILD.gn) = cc598e28a342503766630307759052d695bc72c3
@@ -565,7 +565,7 @@
 SHA1 (patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_drop__privileges.cc) = d2b1d0f6d855413827b0f7483e650b9def987f69
 SHA1 (patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_signals.cc) = d87581f94d2995d7f9d5496fd9beb1192ed29770
 SHA1 (patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_symbolic__constants__posix.cc) = 1bb6d34f2c5b4a0c0e3e30c0ee2c464e6fa3fbf1
-SHA1 (patch-src_3rdparty_chromium_third__party_crc32c_BUILD.gn) = 80e5c5054294e73624d6b884f3cae04f3735fdaf
+SHA1 (patch-src_3rdparty_chromium_third__party_crc32c_BUILD.gn) = 612e8070e4ba133a1ef578d58fa87fe85756b79e
 SHA1 (patch-src_3rdparty_chromium_third__party_dav1d_BUILD.gn) = f65f1a7ab8ad5b4ad2ff3ef92618b7d8aa390aad
 SHA1 (patch-src_3rdparty_chromium_third__party_dawn_scripts_dawn__component.gni) = ee356269df97eb28b1f87ce2dab507000ec5249c
 SHA1 (patch-src_3rdparty_chromium_third__party_dawn_scripts_dawn__features.gni) = 52ef88d16caf2cfe4e1d61a9d0c93d5fed4f0607
@@ -709,7 +709,7 @@
 SHA1 (patch-src_3rdparty_chromium_third__party_webrtc_system__wrappers_source_cpu__info.cc) = 34c8f11a2211fc64fae3bec08bf9bebcb25e960b
 SHA1 (patch-src_3rdparty_chromium_third__party_webrtc_test_BUILD.gn) = 2df93c3a99f46a7bdabe74be43e2be6c426de0a6
 SHA1 (patch-src_3rdparty_chromium_third__party_webrtc_webrtc.gni) = 501ac49f4dd406057089ac65196a7c0eff2560c4
-SHA1 (patch-src_3rdparty_chromium_third__party_zlib_BUILD.gn) = e841d76dc7417676844f5f089893275c906acbbf
+SHA1 (patch-src_3rdparty_chromium_third__party_zlib_BUILD.gn) = 62aaf06c068908a61ad4cc484eeacce5f68386a6
 SHA1 (patch-src_3rdparty_chromium_third__party_zlib_cpu__features.c) = 2ae5c09b935a94fc50c052f199a945875d3d9127
 SHA1 (patch-src_3rdparty_chromium_tools_binary__size_BUILD.gn) = bae129d1c4771a4349ffdc6cab36e2b250fc2bc7
 SHA1 (patch-src_3rdparty_chromium_tools_binary__size_libsupersize_caspian_BUILD.gn) = d5db9eae64c975ce7770b9e1f2b5578c7c4883b6
@@ -827,6 +827,7 @@
 SHA1 (patch-src_3rdparty_gn_tools_gn_ninja_binary_target_writer.cc) = 81dc567ec158c4fd9cfd31c855b637201c822d24
 SHA1 (patch-src_3rdparty_gn_tools_gn_qmake_link_writer.cc) = f05536612a16c52c1cbcfc176aaf849285f8a2fe
 SHA1 (patch-src_3rdparty_gn_tools_gn_tool.h) = 9bf6c5101981dde11e89d5efb29add5092c47654
+SHA1 (patch-src_3rdparty_gn_util_sys__info.cc) = c99b378334e80342f2e33e1ca76b30a6744d0069
 SHA1 (patch-src_buildtools_buildtools.pro) = 95d6195a43e14eb246d97787ffb39c45d16729f5
 SHA1 (patch-src_buildtools_config_linking.pri) = c8b58ecc15e0ee3115745eb5abbbe187c832026a
 SHA1 (patch-src_buildtools_config_support.pri) = 9d8c631194fb506ea1b7b3d20c50f58626484445
Index: patches/patch-src_3rdparty_chromium_base_system_sys__info__posix.cc
===================================================================
RCS file: /cvsroot/pkgsrc/x11/qt5-qtwebengine/patches/patch-src_3rdparty_chromium_base_system_sys__info__posix.cc,v
retrieving revision 1.1
diff -u -r1.1 patch-src_3rdparty_chromium_base_system_sys__info__posix.cc
--- patches/patch-src_3rdparty_chromium_base_system_sys__info__posix.cc	3 Aug 2021 21:04:34 -0000	1.1
+++ patches/patch-src_3rdparty_chromium_base_system_sys__info__posix.cc	7 Nov 2022 19:22:59 -0000
@@ -1,9 +1,16 @@
 $NetBSD: patch-src_3rdparty_chromium_base_system_sys__info__posix.cc,v 1.1 2021/08/03 21:04:34 markd Exp $

---- src/3rdparty/chromium/base/system/sys_info_posix.cc.orig	2020-07-15 18:55:48.000000000 +0000
+--- src/3rdparty/chromium/base/system/sys_info_posix.cc.orig	2021-08-24 12:21:04.000000000 +0000
 +++ src/3rdparty/chromium/base/system/sys_info_posix.cc
-@@ -35,7 +35,7 @@
+@@ -34,9 +34,14 @@
+ #include <sys/vfs.h>
+ #endif

++#if defined(OS_NETBSD)
++#include <sys/param.h>
++#include <sys/sysctl.h>
++#endif
++
  namespace {

 -#if !defined(OS_OPENBSD)
@@ -11,7 +18,7 @@
  int NumberOfProcessors() {
    // sysconf returns the number of "logical" (not "physical") processors on both
    // Mac and Linux.  So we get the number of max available "logical" processors.
-@@ -127,7 +127,7 @@ bool GetDiskSpaceInfo(const base::FilePa
+@@ -128,7 +133,7 @@ bool GetDiskSpaceInfo(const base::FilePa

  namespace base {

@@ -20,7 +27,21 @@
  int SysInfo::NumberOfProcessors() {
    return g_lazy_number_of_processors.Get().value();
  }
-@@ -220,6 +220,8 @@ std::string SysInfo::OperatingSystemArch
+@@ -219,10 +224,22 @@ std::string SysInfo::OperatingSystemArch
+     return std::string();
+   }
+   std::string arch(info.machine);
++#if defined(OS_NETBSD)
++  int mib[] = {CTL_HW, HW_MACHINE_ARCH};
++  char name[32];
++  size_t len = base::size(name);
++  if (sysctl(mib, base::size(mib), name, &len, NULL, 0) < 0) {
++    NOTREACHED();
++    return std::string();
++  }
++  arch = name;
++#endif // defined(OS_NETBSD)
+   if (arch == "i386" || arch == "i486" || arch == "i586" || arch == "i686") {
      arch = "x86";
    } else if (arch == "amd64") {
      arch = "x86_64";
Index: patches/patch-src_3rdparty_chromium_base_third__party_libevent_BUILD.gn
===================================================================
RCS file: /cvsroot/pkgsrc/x11/qt5-qtwebengine/patches/patch-src_3rdparty_chromium_base_third__party_libevent_BUILD.gn,v
retrieving revision 1.2
diff -u -r1.2 patch-src_3rdparty_chromium_base_third__party_libevent_BUILD.gn
--- patches/patch-src_3rdparty_chromium_base_third__party_libevent_BUILD.gn	18 Apr 2022 11:18:18 -0000	1.2
+++ patches/patch-src_3rdparty_chromium_base_third__party_libevent_BUILD.gn	7 Nov 2022 19:22:59 -0000
@@ -1,31 +1,133 @@
 $NetBSD: patch-src_3rdparty_chromium_base_third__party_libevent_BUILD.gn,v 1.2 2022/04/18 11:18:18 adam Exp $

---- src/3rdparty/chromium/base/third_party/libevent/BUILD.gn.orig	2021-02-19 16:41:59.000000000 +0000
+--- src/3rdparty/chromium/base/third_party/libevent/BUILD.gn.orig	2022-11-02 21:44:41.313262986 +0000
 +++ src/3rdparty/chromium/base/third_party/libevent/BUILD.gn
-@@ -50,11 +50,25 @@ static_library("bundled_libevent") {
-     include_dirs = [ "mac" ]
-   } else if (is_linux || is_chromeos) {
-     sources += [
+@@ -1,125 +1,15 @@
+-# Copyright (c) 2013 The Chromium Authors. All rights reserved.
++# Copyright 2016 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.
+ +-import("//build/config/nacl/config.gni")
+ import("//build/shim_headers.gni")
+ +-declare_args() {
+-  use_system_libevent = false
+-}
+-
+-static_library("bundled_libevent") {
+-  sources = [
+-    "buffer.c",
+-    "evbuffer.c",
+-    "evdns.c",
+-    "evdns.h",
+-    "event-config.h",
+-    "event-internal.h",
+-    "event.c",
+-    "event.h",
+-    "event_tagging.c",
+-    "evhttp.h",
+-    "evrpc-internal.h",
+-    "evrpc.c",
+-    "evrpc.h",
+-    "evsignal.h",
+-    "evutil.c",
+-    "evutil.h",
+-    "http-internal.h",
+-    "http.c",
+-    "log.c",
+-    "log.h",
+-    "min_heap.h",
+-    "poll.c",
+-    "select.c",
+-    "signal.c",
+-    "strlcpy-internal.h",
+-    "strlcpy.c",
+-  ]
+-
+-  defines = [ "HAVE_CONFIG_H" ]
+-
+-  if (is_apple) {
+-    sources += [
+-      "kqueue.c",
+-      "mac/config.h",
+-      "mac/event-config.h",
+-    ]
+-    include_dirs = [ "mac" ]
+-  } else if (is_linux || is_chromeos) {
+-    sources += [
+-      "kqueue.c",
+-      "linux/config.h",
+-      "linux/event-config.h",
+-    ]
+-    include_dirs = [ "linux" ]
+-  } else if (is_freebsd) {
+-    sources += [
+-      "kqueue.c",
+-      "freebsd/config.h",
+-      "freebsd/event-config.h",
+-    ]
+-    include_dirs = [ "freebsd" ]
+-  } else if (is_netbsd) {
+-    sources += [
+-      "kqueue.c",
+-      "netbsd/config.h",
+-      "netbsd/event-config.h",
+-    ]
+-    include_dirs = [ "netbsd" ]
+-  } else if (is_android) {
+-    sources += [
+-      "android/config.h",
+-      "android/event-config.h",
 -      "epoll.c",
-+      "kqueue.c",
-       "linux/config.h",
-       "linux/event-config.h",
-     ]
-     include_dirs = [ "linux" ]
-+  } else if (is_freebsd) {
-+    sources += [
-+      "kqueue.c",
-+      "freebsd/config.h",
-+      "freebsd/event-config.h",
-+    ]
-+    include_dirs = [ "freebsd" ]
-+  } else if (is_netbsd) {
-+    sources += [
-+      "kqueue.c",
-+      "netbsd/config.h",
-+      "netbsd/event-config.h",
-+    ]
-+    include_dirs = [ "netbsd" ]
-   } else if (is_android) {
-     sources += [
-       "android/config.h",
+-    ]
+-    include_dirs = [ "android" ]
+-  } else if (is_nacl_nonsfi) {
+-    sources -= [
+-      "evdns.c",
+-      "event_tagging.c",
+-      "evrpc.c",
+-      "http.c",
+-      "select.c",
+-      "signal.c",
+-    ]
+-    sources += [
+-      "nacl_nonsfi/config.h",
+-      "nacl_nonsfi/event-config.h",
+-      "nacl_nonsfi/random.c",
+-      "nacl_nonsfi/signal_stub.c",
+-    ]
+-    include_dirs = [ "nacl_nonsfi" ]
+-  }
+-
+-  configs -= [ "//build/config/compiler:chromium_code" ]
+-  configs += [ "//build/config/compiler:no_chromium_code" ]
+-}
+-
+ shim_headers("libevent_shim") {
+   root_path = "."
+   headers = [ "event.h" ]
+ }
+ +-source_set("system_libevent") {
+-  deps = [
+-    ":libevent_shim",
+-  ]
++source_set("libevent") {
++  deps = [ ":libevent_shim" ]
+   libs = [ "event" ]
+ }
+-
+-group("libevent") {
+-  if (host_toolchain != current_toolchain) {
+-    if (use_system_libevent) {
+-       public_deps = [ ":system_libevent" ]
+-    } else {
+-       public_deps = [ ":bundled_libevent" ]
+-    }
+-  } else {
+-    # Fix me: unbundle for host build
+-    # this requires host pkg-config besides sysroot one.
+-    public_deps = [ ":bundled_libevent" ]
+-  }
+-}
Index: patches/patch-src_3rdparty_chromium_third__party_boringssl_BUILD.gn
===================================================================
RCS file: /cvsroot/pkgsrc/x11/qt5-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_boringssl_BUILD.gn,v
retrieving revision 1.2
diff -u -r1.2 patch-src_3rdparty_chromium_third__party_boringssl_BUILD.gn
--- patches/patch-src_3rdparty_chromium_third__party_boringssl_BUILD.gn	18 Apr 2022 11:18:19 -0000	1.2
+++ patches/patch-src_3rdparty_chromium_third__party_boringssl_BUILD.gn	7 Nov 2022 19:22:59 -0000
@@ -1,6 +1,6 @@
 $NetBSD: patch-src_3rdparty_chromium_third__party_boringssl_BUILD.gn,v 1.2 2022/04/18 11:18:19 adam Exp $

---- src/3rdparty/chromium/third_party/boringssl/BUILD.gn.orig	2021-02-19 16:41:59.000000000 +0000
+--- src/3rdparty/chromium/third_party/boringssl/BUILD.gn.orig	2021-10-19 12:46:32.000000000 +0000
 +++ src/3rdparty/chromium/third_party/boringssl/BUILD.gn
 @@ -35,7 +35,6 @@ config("internal_config") {
    ]
@@ -35,12 +35,3 @@
          sources += crypto_sources_linux_arm
        } else if (is_ios) {
          sources += crypto_sources_ios_arm
-@@ -94,7 +93,7 @@ if (is_win && !is_msan && current_cpu !=
-         public_configs = [ ":no_asm_config" ]
-       }
-     } else if (current_cpu == "arm64") {
--      if (is_linux || is_chromeos || is_android) {
-+      if (is_linux || is_chromeos || is_android || is_bsd) {
-         sources += crypto_sources_linux_aarch64
-       } else if (is_ios) {
-         sources += crypto_sources_ios_aarch64
Index: patches/patch-src_3rdparty_chromium_third__party_crc32c_BUILD.gn
===================================================================
RCS file: /cvsroot/pkgsrc/x11/qt5-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crc32c_BUILD.gn,v
retrieving revision 1.1
diff -u -r1.1 patch-src_3rdparty_chromium_third__party_crc32c_BUILD.gn
--- patches/patch-src_3rdparty_chromium_third__party_crc32c_BUILD.gn	3 Aug 2021 21:04:36 -0000	1.1
+++ patches/patch-src_3rdparty_chromium_third__party_crc32c_BUILD.gn	7 Nov 2022 19:22:59 -0000
@@ -1,8 +1,16 @@
 $NetBSD: patch-src_3rdparty_chromium_third__party_crc32c_BUILD.gn,v 1.1 2021/08/03 21:04:36 markd Exp $

---- src/3rdparty/chromium/third_party/crc32c/BUILD.gn.orig	2020-07-15 18:56:30.000000000 +0000
+--- src/3rdparty/chromium/third_party/crc32c/BUILD.gn.orig	2021-08-24 12:21:04.000000000 +0000
 +++ src/3rdparty/chromium/third_party/crc32c/BUILD.gn
-@@ -47,7 +47,7 @@ config("crc32c_config") {
+@@ -40,14 +40,14 @@ config("crc32c_config") {
+     defines += [ "HAVE_BUILTIN_PREFETCH=0" ]
+   }
+ +- if (current_cpu == "arm64") {
++  if (current_cpu == "arm64" && !is_netbsd) {
+     defines += [ "HAVE_ARM64_CRC32C=1" ]
+   } else {
+     defines += [ "HAVE_ARM64_CRC32C=0" ]
    }

    # Android added <sys/auxv.h> in API level 18.
Index: patches/patch-src_3rdparty_chromium_third__party_libxslt_BUILD.gn
===================================================================
RCS file: /cvsroot/pkgsrc/x11/qt5-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libxslt_BUILD.gn,v
retrieving revision 1.2
diff -u -r1.2 patch-src_3rdparty_chromium_third__party_libxslt_BUILD.gn
--- patches/patch-src_3rdparty_chromium_third__party_libxslt_BUILD.gn	18 Apr 2022 11:18:19 -0000	1.2
+++ patches/patch-src_3rdparty_chromium_third__party_libxslt_BUILD.gn	7 Nov 2022 19:22:59 -0000
@@ -1,13 +1,140 @@
 $NetBSD: patch-src_3rdparty_chromium_third__party_libxslt_BUILD.gn,v 1.2 2022/04/18 11:18:19 adam Exp $

---- src/3rdparty/chromium/third_party/libxslt/BUILD.gn.orig	2021-02-19 16:41:59.000000000 +0000
+--- src/3rdparty/chromium/third_party/libxslt/BUILD.gn.orig	2022-11-02 21:44:41.314679004 +0000
 +++ src/3rdparty/chromium/third_party/libxslt/BUILD.gn
-@@ -92,7 +92,7 @@ static_library("bundled_libxslt") {
-   public_configs = [ ":libxslt_config" ]
+@@ -1,129 +1,13 @@
+-# Copyright 2014 The Chromium Authors. All rights reserved.
++# Copyright 2016 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.

-   cflags = []
--  if (is_linux || is_chromeos || is_android || is_fuchsia) {
-+  if (is_linux || is_chromeos || is_android || is_fuchsia || is_bsd) {
-     include_dirs = [ "linux" ]
-   } else if (is_win) {
-     include_dirs = [ "win32" ]
+-declare_args() {
+-  use_system_libxslt = false
+-}
+-
+-# This file depends on the legacy global sources assignment filter. It should
+-# be converted to check target platform before assigning source files to the
+-# sources variable. Remove this import and set_sources_assignment_filter call
+-# when the file has been converted. See https://crbug.com/1018739 for details.
+-import("//build/config/deprecated_default_sources_assignment_filter.gni")
+-set_sources_assignment_filter(deprecated_default_sources_assignment_filter)
+-
+-config("libxslt_config") {
+-  defines = [ "LIBXSLT_STATIC" ]
+-  include_dirs = [ "src" ]
+-}
+-
+-config("libxslt_warnings") {
+-  if (is_clang) {
+-    cflags = [
+-      # libxslt stores a char[3] in a `const unsigned char*`.
+-      "-Wno-pointer-sign",
+-
+-      # xsltDefaultRegion and xsltCalibrateTimestamps are only
+-      # used with certain preprocessor defines set.
+-      "-Wno-unused-function",
+-    ]
+-  }
+-}
+-
+-static_library("bundled_libxslt") {
+-  sources = [
+-    "linux/config.h",
+-    "mac/config.h",
+-    "src/libxslt/attributes.c",
+-    "src/libxslt/attributes.h",
+-    "src/libxslt/attrvt.c",
+-    "src/libxslt/documents.c",
+-    "src/libxslt/documents.h",
+-    "src/libxslt/extensions.c",
+-    "src/libxslt/extensions.h",
+-    "src/libxslt/extra.c",
+-    "src/libxslt/extra.h",
+-    "src/libxslt/functions.c",
+-    "src/libxslt/functions.h",
+-    "src/libxslt/imports.c",
+-    "src/libxslt/imports.h",
+-    "src/libxslt/keys.c",
+-    "src/libxslt/keys.h",
+-    "src/libxslt/libxslt.h",
+-    "src/libxslt/namespaces.c",
+-    "src/libxslt/namespaces.h",
+-    "src/libxslt/numbers.c",
+-    "src/libxslt/numbersInternals.h",
+-    "src/libxslt/pattern.c",
+-    "src/libxslt/pattern.h",
+-    "src/libxslt/preproc.c",
+-    "src/libxslt/preproc.h",
+-    "src/libxslt/security.c",
+-    "src/libxslt/security.h",
+-    "src/libxslt/templates.c",
+-    "src/libxslt/templates.h",
+-    "src/libxslt/transform.c",
+-    "src/libxslt/transform.h",
+-    "src/libxslt/trio.h",
+-    "src/libxslt/triodef.h",
+-    "src/libxslt/variables.c",
+-    "src/libxslt/variables.h",
+-    "src/libxslt/win32config.h",
+-    "src/libxslt/xslt.c",
+-    "src/libxslt/xslt.h",
+-    "src/libxslt/xsltInternals.h",
+-    "src/libxslt/xsltconfig.h",
+-    "src/libxslt/xsltexports.h",
+-    "src/libxslt/xsltlocale.c",
+-    "src/libxslt/xsltlocale.h",
+-    "src/libxslt/xsltutils.c",
+-    "src/libxslt/xsltutils.h",
+-    "win32/config.h",
+-  ]
+-
+-  configs -= [ "//build/config/compiler:chromium_code" ]
+-  configs += [
+-    "//build/config/compiler:no_chromium_code",
+-
+-    # Must be after no_chromium_code for warning flags to be ordered correctly.
+-    ":libxslt_warnings",
+-  ]
+-  public_configs = [ ":libxslt_config" ]
+-
+-  cflags = []
+-  if (is_linux || is_chromeos || is_android || is_fuchsia || is_bsd) {
+-    include_dirs = [ "linux" ]
+-  } else if (is_win) {
+-    include_dirs = [ "win32" ]
+-    cflags += [
+-      "/wd4267",  # size_t to int.
+-
+-      # TODO(brucedawson): http://crbug.com/554200 4311 is a VS
+-      # 2015 64-bit warning for pointer truncation
+-      "/wd4311",
+-    ]
+-  } else if (is_mac) {
+-    include_dirs = [ "mac" ]
+-  }
+-
+-  deps = [ "//third_party/libxml" ]
++import("//build/config/linux/pkg_config.gni")
+ +- visibility = [ ":libxslt" ]
++pkg_config("system_libxslt") {
++  packages = [ "libxslt" ]
+ }
+ +-if (use_system_libxslt) {
+-  import("//build/config/linux/pkg_config.gni")
+-  pkg_config("system_libxslt") {
+-    packages = [ "libxslt" ]
+-  }
+-  source_set("libxslt") {
+-    public_configs = [ ":system_libxslt" ]
+-    visibility = [ "//third_party/blink/renderer/*" ]
+-  }
+-} else {
+-  group("libxslt") {
+-    public_deps = [ ":bundled_libxslt" ]
+-    visibility = [ "//third_party/blink/renderer/*" ]
+-  }
++source_set("libxslt") {
++  public_configs = [ ":system_libxslt" ]
+ }
Index: patches/patch-src_3rdparty_chromium_third__party_zlib_BUILD.gn
===================================================================
RCS file: /cvsroot/pkgsrc/x11/qt5-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_zlib_BUILD.gn,v
retrieving revision 1.2
diff -u -r1.2 patch-src_3rdparty_chromium_third__party_zlib_BUILD.gn
--- patches/patch-src_3rdparty_chromium_third__party_zlib_BUILD.gn	18 Apr 2022 11:18:19 -0000	1.2
+++ patches/patch-src_3rdparty_chromium_third__party_zlib_BUILD.gn	7 Nov 2022 19:22:59 -0000
@@ -1,7 +1,16 @@
 $NetBSD: patch-src_3rdparty_chromium_third__party_zlib_BUILD.gn,v 1.2 2022/04/18 11:18:19 adam Exp $

---- src/3rdparty/chromium/third_party/zlib/BUILD.gn.orig	2021-02-19 16:41:59.000000000 +0000
+--- src/3rdparty/chromium/third_party/zlib/BUILD.gn.orig	2021-08-24 12:21:04.000000000 +0000
 +++ src/3rdparty/chromium/third_party/zlib/BUILD.gn
+@@ -115,7 +115,7 @@ if (use_arm_neon_optimizations) {
+     # Disabled for iPhone, as described in DDI0487C_a_armv8_arm:
+     #  "All implementations of the ARMv8.1 architecture are required to
+     #   implement the CRC32* instructions. These are optional in ARMv8.0."
+-    if (!is_ios) {
++    if (!is_ios && !is_netbsd) {
+       defines = [ "CRC32_ARMV8_CRC32" ]
+       if (is_android) {
+         defines += [ "ARMV8_OS_ANDROID" ]
 @@ -438,7 +438,7 @@ static_library("bundled_minizip") {
      ]
    }
--- /dev/null	2022-11-07 19:24:22.097422956 +0000
+++ patches/patch-src_3rdparty_gn_util_sys__info.cc	2022-11-01 05:57:43.570576904 +0000
@@ -0,0 +1,46 @@
+$NetBSD$
+
+--- src/3rdparty/gn/util/sys_info.cc.orig	2021-08-24 12:21:04.000000000 +0000
++++ src/3rdparty/gn/util/sys_info.cc
+@@ -6,12 +6,18 @@
+ 
+ #include "base/logging.h"
+ #include "util/build_config.h"
++#include "base/stl_util.h"
+ 
+ #if defined(OS_POSIX)
+ #include <sys/utsname.h>
+ #include <unistd.h>
+ #endif
+ 
++#if defined(OS_NETBSD)
++#include <sys/param.h>
++#include <sys/sysctl.h>
++#endif
++
+ #if defined(OS_WIN)
+ #include <windows.h>
+ #endif
+@@ -24,10 +30,22 @@ std::string OperatingSystemArchitecture(
+     return std::string();
+   }
+   std::string arch(info.machine);
++#if defined(OS_NETBSD)
++  int mib[] = {CTL_HW, HW_MACHINE_ARCH};
++  char name[32];
++  size_t len = base::size(name);
++  if (sysctl(mib, base::size(mib), name, &len, NULL, 0) < 0) {
++    NOTREACHED();
++    return std::string();
++  }
++  arch = name;
++#endif // defined(OS_NETBSD)
+   if (arch == "i386" || arch == "i486" || arch == "i586" || arch == "i686") {
+     arch = "x86";
+   } else if (arch == "amd64") {
+     arch = "x86_64";
++  } else if (arch == "arm64") {
++    arch = "aarch64";
+   } else if (std::string(info.sysname) == "AIX") {
+     arch = "ppc64";
+   }
? patches/patch-src_3rdparty_gn_util_sys__info.cc
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/x11/qt5-qtwebengine/distinfo,v
retrieving revision 1.10
diff -u -r1.10 distinfo
--- distinfo	30 Oct 2022 13:38:31 -0000	1.10
+++ distinfo	7 Nov 2022 19:22:59 -0000
@@ -73,7 +73,7 @@
 SHA1 (patch-src_3rdparty_chromium_base_syslog__logging.cc) = bebb700ef5c40d490f3be04d1a5d5ddb16d5e4f0
 SHA1 (patch-src_3rdparty_chromium_base_system_sys__info.h) = 7487be6109399e235032e263ed2b12b0107271e7
 SHA1 (patch-src_3rdparty_chromium_base_system_sys__info__netbsd.cc) = c086070ed60af6999a804cd7b51a70b566ecab72
-SHA1 (patch-src_3rdparty_chromium_base_system_sys__info__posix.cc) = b7c4cc6a5c04741c448771812eb0ca7f428d2a72
+SHA1 (patch-src_3rdparty_chromium_base_system_sys__info__posix.cc) = b2167af42eda17110bd3a751102e1360519d8a67
 SHA1 (patch-src_3rdparty_chromium_base_task_thread__pool_environment__config__unittest.cc) = 6cd6d2ff44aa7d6ef778c73a218f6e566346528d
 SHA1 (patch-src_3rdparty_chromium_base_test_BUILD.gn) = 955b7077afff6c72d7c4a28c61504d1de9150736
 SHA1 (patch-src_3rdparty_chromium_base_third__party_libevent_BUILD.gn) = cc598e28a342503766630307759052d695bc72c3
@@ -565,7 +565,7 @@
 SHA1 (patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_drop__privileges.cc) = d2b1d0f6d855413827b0f7483e650b9def987f69
 SHA1 (patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_signals.cc) = d87581f94d2995d7f9d5496fd9beb1192ed29770
 SHA1 (patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_symbolic__constants__posix.cc) = 1bb6d34f2c5b4a0c0e3e30c0ee2c464e6fa3fbf1
-SHA1 (patch-src_3rdparty_chromium_third__party_crc32c_BUILD.gn) = 80e5c5054294e73624d6b884f3cae04f3735fdaf
+SHA1 (patch-src_3rdparty_chromium_third__party_crc32c_BUILD.gn) = 612e8070e4ba133a1ef578d58fa87fe85756b79e
 SHA1 (patch-src_3rdparty_chromium_third__party_dav1d_BUILD.gn) = f65f1a7ab8ad5b4ad2ff3ef92618b7d8aa390aad
 SHA1 (patch-src_3rdparty_chromium_third__party_dawn_scripts_dawn__component.gni) = ee356269df97eb28b1f87ce2dab507000ec5249c
 SHA1 (patch-src_3rdparty_chromium_third__party_dawn_scripts_dawn__features.gni) = 52ef88d16caf2cfe4e1d61a9d0c93d5fed4f0607
@@ -709,7 +709,7 @@
 SHA1 (patch-src_3rdparty_chromium_third__party_webrtc_system__wrappers_source_cpu__info.cc) = 34c8f11a2211fc64fae3bec08bf9bebcb25e960b
 SHA1 (patch-src_3rdparty_chromium_third__party_webrtc_test_BUILD.gn) = 2df93c3a99f46a7bdabe74be43e2be6c426de0a6
 SHA1 (patch-src_3rdparty_chromium_third__party_webrtc_webrtc.gni) = 501ac49f4dd406057089ac65196a7c0eff2560c4
-SHA1 (patch-src_3rdparty_chromium_third__party_zlib_BUILD.gn) = e841d76dc7417676844f5f089893275c906acbbf
+SHA1 (patch-src_3rdparty_chromium_third__party_zlib_BUILD.gn) = 62aaf06c068908a61ad4cc484eeacce5f68386a6
 SHA1 (patch-src_3rdparty_chromium_third__party_zlib_cpu__features.c) = 2ae5c09b935a94fc50c052f199a945875d3d9127
 SHA1 (patch-src_3rdparty_chromium_tools_binary__size_BUILD.gn) = bae129d1c4771a4349ffdc6cab36e2b250fc2bc7
 SHA1 (patch-src_3rdparty_chromium_tools_binary__size_libsupersize_caspian_BUILD.gn) = d5db9eae64c975ce7770b9e1f2b5578c7c4883b6
@@ -827,6 +827,7 @@
 SHA1 (patch-src_3rdparty_gn_tools_gn_ninja_binary_target_writer.cc) = 81dc567ec158c4fd9cfd31c855b637201c822d24
 SHA1 (patch-src_3rdparty_gn_tools_gn_qmake_link_writer.cc) = f05536612a16c52c1cbcfc176aaf849285f8a2fe
 SHA1 (patch-src_3rdparty_gn_tools_gn_tool.h) = 9bf6c5101981dde11e89d5efb29add5092c47654
+SHA1 (patch-src_3rdparty_gn_util_sys__info.cc) = c99b378334e80342f2e33e1ca76b30a6744d0069
 SHA1 (patch-src_buildtools_buildtools.pro) = 95d6195a43e14eb246d97787ffb39c45d16729f5
 SHA1 (patch-src_buildtools_config_linking.pri) = c8b58ecc15e0ee3115745eb5abbbe187c832026a
 SHA1 (patch-src_buildtools_config_support.pri) = 9d8c631194fb506ea1b7b3d20c50f58626484445
Index: patches/patch-src_3rdparty_chromium_base_system_sys__info__posix.cc
===================================================================
RCS file: /cvsroot/pkgsrc/x11/qt5-qtwebengine/patches/patch-src_3rdparty_chromium_base_system_sys__info__posix.cc,v
retrieving revision 1.1
diff -u -r1.1 patch-src_3rdparty_chromium_base_system_sys__info__posix.cc
--- patches/patch-src_3rdparty_chromium_base_system_sys__info__posix.cc	3 Aug 2021 21:04:34 -0000	1.1
+++ patches/patch-src_3rdparty_chromium_base_system_sys__info__posix.cc	7 Nov 2022 19:22:59 -0000
@@ -1,9 +1,16 @@
 $NetBSD: patch-src_3rdparty_chromium_base_system_sys__info__posix.cc,v 1.1 2021/08/03 21:04:34 markd Exp $
 
---- src/3rdparty/chromium/base/system/sys_info_posix.cc.orig	2020-07-15 18:55:48.000000000 +0000
+--- src/3rdparty/chromium/base/system/sys_info_posix.cc.orig	2021-08-24 12:21:04.000000000 +0000
 +++ src/3rdparty/chromium/base/system/sys_info_posix.cc
-@@ -35,7 +35,7 @@
+@@ -34,9 +34,14 @@
+ #include <sys/vfs.h>
+ #endif
  
++#if defined(OS_NETBSD)
++#include <sys/param.h>
++#include <sys/sysctl.h>
++#endif
++
  namespace {
  
 -#if !defined(OS_OPENBSD)
@@ -11,7 +18,7 @@
  int NumberOfProcessors() {
    // sysconf returns the number of "logical" (not "physical") processors on both
    // Mac and Linux.  So we get the number of max available "logical" processors.
-@@ -127,7 +127,7 @@ bool GetDiskSpaceInfo(const base::FilePa
+@@ -128,7 +133,7 @@ bool GetDiskSpaceInfo(const base::FilePa
  
  namespace base {
  
@@ -20,7 +27,21 @@
  int SysInfo::NumberOfProcessors() {
    return g_lazy_number_of_processors.Get().value();
  }
-@@ -220,6 +220,8 @@ std::string SysInfo::OperatingSystemArch
+@@ -219,10 +224,22 @@ std::string SysInfo::OperatingSystemArch
+     return std::string();
+   }
+   std::string arch(info.machine);
++#if defined(OS_NETBSD)
++  int mib[] = {CTL_HW, HW_MACHINE_ARCH};
++  char name[32];
++  size_t len = base::size(name);
++  if (sysctl(mib, base::size(mib), name, &len, NULL, 0) < 0) {
++    NOTREACHED();
++    return std::string();
++  }
++  arch = name;
++#endif // defined(OS_NETBSD)
+   if (arch == "i386" || arch == "i486" || arch == "i586" || arch == "i686") {
      arch = "x86";
    } else if (arch == "amd64") {
      arch = "x86_64";
Index: patches/patch-src_3rdparty_chromium_base_third__party_libevent_BUILD.gn
===================================================================
RCS file: /cvsroot/pkgsrc/x11/qt5-qtwebengine/patches/patch-src_3rdparty_chromium_base_third__party_libevent_BUILD.gn,v
retrieving revision 1.2
diff -u -r1.2 patch-src_3rdparty_chromium_base_third__party_libevent_BUILD.gn
--- patches/patch-src_3rdparty_chromium_base_third__party_libevent_BUILD.gn	18 Apr 2022 11:18:18 -0000	1.2
+++ patches/patch-src_3rdparty_chromium_base_third__party_libevent_BUILD.gn	7 Nov 2022 19:22:59 -0000
@@ -1,31 +1,133 @@
 $NetBSD: patch-src_3rdparty_chromium_base_third__party_libevent_BUILD.gn,v 1.2 2022/04/18 11:18:18 adam Exp $
 
---- src/3rdparty/chromium/base/third_party/libevent/BUILD.gn.orig	2021-02-19 16:41:59.000000000 +0000
+--- src/3rdparty/chromium/base/third_party/libevent/BUILD.gn.orig	2022-11-02 21:44:41.313262986 +0000
 +++ src/3rdparty/chromium/base/third_party/libevent/BUILD.gn
-@@ -50,11 +50,25 @@ static_library("bundled_libevent") {
-     include_dirs = [ "mac" ]
-   } else if (is_linux || is_chromeos) {
-     sources += [
+@@ -1,125 +1,15 @@
+-# Copyright (c) 2013 The Chromium Authors. All rights reserved.
++# Copyright 2016 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.
+ 
+-import("//build/config/nacl/config.gni")
+ import("//build/shim_headers.gni")
+ 
+-declare_args() {
+-  use_system_libevent = false
+-}
+-
+-static_library("bundled_libevent") {
+-  sources = [
+-    "buffer.c",
+-    "evbuffer.c",
+-    "evdns.c",
+-    "evdns.h",
+-    "event-config.h",
+-    "event-internal.h",
+-    "event.c",
+-    "event.h",
+-    "event_tagging.c",
+-    "evhttp.h",
+-    "evrpc-internal.h",
+-    "evrpc.c",
+-    "evrpc.h",
+-    "evsignal.h",
+-    "evutil.c",
+-    "evutil.h",
+-    "http-internal.h",
+-    "http.c",
+-    "log.c",
+-    "log.h",
+-    "min_heap.h",
+-    "poll.c",
+-    "select.c",
+-    "signal.c",
+-    "strlcpy-internal.h",
+-    "strlcpy.c",
+-  ]
+-
+-  defines = [ "HAVE_CONFIG_H" ]
+-
+-  if (is_apple) {
+-    sources += [
+-      "kqueue.c",
+-      "mac/config.h",
+-      "mac/event-config.h",
+-    ]
+-    include_dirs = [ "mac" ]
+-  } else if (is_linux || is_chromeos) {
+-    sources += [
+-      "kqueue.c",
+-      "linux/config.h",
+-      "linux/event-config.h",
+-    ]
+-    include_dirs = [ "linux" ]
+-  } else if (is_freebsd) {
+-    sources += [
+-      "kqueue.c",
+-      "freebsd/config.h",
+-      "freebsd/event-config.h",
+-    ]
+-    include_dirs = [ "freebsd" ]
+-  } else if (is_netbsd) {
+-    sources += [
+-      "kqueue.c",
+-      "netbsd/config.h",
+-      "netbsd/event-config.h",
+-    ]
+-    include_dirs = [ "netbsd" ]
+-  } else if (is_android) {
+-    sources += [
+-      "android/config.h",
+-      "android/event-config.h",
 -      "epoll.c",
-+      "kqueue.c",
-       "linux/config.h",
-       "linux/event-config.h",
-     ]
-     include_dirs = [ "linux" ]
-+  } else if (is_freebsd) {
-+    sources += [
-+      "kqueue.c",
-+      "freebsd/config.h",
-+      "freebsd/event-config.h",
-+    ]
-+    include_dirs = [ "freebsd" ]
-+  } else if (is_netbsd) {
-+    sources += [
-+      "kqueue.c",
-+      "netbsd/config.h",
-+      "netbsd/event-config.h",
-+    ]
-+    include_dirs = [ "netbsd" ]
-   } else if (is_android) {
-     sources += [
-       "android/config.h",
+-    ]
+-    include_dirs = [ "android" ]
+-  } else if (is_nacl_nonsfi) {
+-    sources -= [
+-      "evdns.c",
+-      "event_tagging.c",
+-      "evrpc.c",
+-      "http.c",
+-      "select.c",
+-      "signal.c",
+-    ]
+-    sources += [
+-      "nacl_nonsfi/config.h",
+-      "nacl_nonsfi/event-config.h",
+-      "nacl_nonsfi/random.c",
+-      "nacl_nonsfi/signal_stub.c",
+-    ]
+-    include_dirs = [ "nacl_nonsfi" ]
+-  }
+-
+-  configs -= [ "//build/config/compiler:chromium_code" ]
+-  configs += [ "//build/config/compiler:no_chromium_code" ]
+-}
+-
+ shim_headers("libevent_shim") {
+   root_path = "."
+   headers = [ "event.h" ]
+ }
+ 
+-source_set("system_libevent") {
+-  deps = [
+-    ":libevent_shim",
+-  ]
++source_set("libevent") {
++  deps = [ ":libevent_shim" ]
+   libs = [ "event" ]
+ }
+-
+-group("libevent") {
+-  if (host_toolchain != current_toolchain) {
+-    if (use_system_libevent) {
+-       public_deps = [ ":system_libevent" ]
+-    } else {
+-       public_deps = [ ":bundled_libevent" ]
+-    }
+-  } else {
+-    # Fix me: unbundle for host build
+-    # this requires host pkg-config besides sysroot one.
+-    public_deps = [ ":bundled_libevent" ]
+-  }
+-}
Index: patches/patch-src_3rdparty_chromium_third__party_boringssl_BUILD.gn
===================================================================
RCS file: /cvsroot/pkgsrc/x11/qt5-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_boringssl_BUILD.gn,v
retrieving revision 1.2
diff -u -r1.2 patch-src_3rdparty_chromium_third__party_boringssl_BUILD.gn
--- patches/patch-src_3rdparty_chromium_third__party_boringssl_BUILD.gn	18 Apr 2022 11:18:19 -0000	1.2
+++ patches/patch-src_3rdparty_chromium_third__party_boringssl_BUILD.gn	7 Nov 2022 19:22:59 -0000
@@ -1,6 +1,6 @@
 $NetBSD: patch-src_3rdparty_chromium_third__party_boringssl_BUILD.gn,v 1.2 2022/04/18 11:18:19 adam Exp $
 
---- src/3rdparty/chromium/third_party/boringssl/BUILD.gn.orig	2021-02-19 16:41:59.000000000 +0000
+--- src/3rdparty/chromium/third_party/boringssl/BUILD.gn.orig	2021-10-19 12:46:32.000000000 +0000
 +++ src/3rdparty/chromium/third_party/boringssl/BUILD.gn
 @@ -35,7 +35,6 @@ config("internal_config") {
    ]
@@ -35,12 +35,3 @@
          sources += crypto_sources_linux_arm
        } else if (is_ios) {
          sources += crypto_sources_ios_arm
-@@ -94,7 +93,7 @@ if (is_win && !is_msan && current_cpu !=
-         public_configs = [ ":no_asm_config" ]
-       }
-     } else if (current_cpu == "arm64") {
--      if (is_linux || is_chromeos || is_android) {
-+      if (is_linux || is_chromeos || is_android || is_bsd) {
-         sources += crypto_sources_linux_aarch64
-       } else if (is_ios) {
-         sources += crypto_sources_ios_aarch64
Index: patches/patch-src_3rdparty_chromium_third__party_crc32c_BUILD.gn
===================================================================
RCS file: /cvsroot/pkgsrc/x11/qt5-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crc32c_BUILD.gn,v
retrieving revision 1.1
diff -u -r1.1 patch-src_3rdparty_chromium_third__party_crc32c_BUILD.gn
--- patches/patch-src_3rdparty_chromium_third__party_crc32c_BUILD.gn	3 Aug 2021 21:04:36 -0000	1.1
+++ patches/patch-src_3rdparty_chromium_third__party_crc32c_BUILD.gn	7 Nov 2022 19:22:59 -0000
@@ -1,8 +1,16 @@
 $NetBSD: patch-src_3rdparty_chromium_third__party_crc32c_BUILD.gn,v 1.1 2021/08/03 21:04:36 markd Exp $
 
---- src/3rdparty/chromium/third_party/crc32c/BUILD.gn.orig	2020-07-15 18:56:30.000000000 +0000
+--- src/3rdparty/chromium/third_party/crc32c/BUILD.gn.orig	2021-08-24 12:21:04.000000000 +0000
 +++ src/3rdparty/chromium/third_party/crc32c/BUILD.gn
-@@ -47,7 +47,7 @@ config("crc32c_config") {
+@@ -40,14 +40,14 @@ config("crc32c_config") {
+     defines += [ "HAVE_BUILTIN_PREFETCH=0" ]
+   }
+ 
+-  if (current_cpu == "arm64") {
++  if (current_cpu == "arm64" && !is_netbsd) {
+     defines += [ "HAVE_ARM64_CRC32C=1" ]
+   } else {
+     defines += [ "HAVE_ARM64_CRC32C=0" ]
    }
  
    # Android added <sys/auxv.h> in API level 18.
Index: patches/patch-src_3rdparty_chromium_third__party_libxslt_BUILD.gn
===================================================================
RCS file: /cvsroot/pkgsrc/x11/qt5-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libxslt_BUILD.gn,v
retrieving revision 1.2
diff -u -r1.2 patch-src_3rdparty_chromium_third__party_libxslt_BUILD.gn
--- patches/patch-src_3rdparty_chromium_third__party_libxslt_BUILD.gn	18 Apr 2022 11:18:19 -0000	1.2
+++ patches/patch-src_3rdparty_chromium_third__party_libxslt_BUILD.gn	7 Nov 2022 19:22:59 -0000
@@ -1,13 +1,140 @@
 $NetBSD: patch-src_3rdparty_chromium_third__party_libxslt_BUILD.gn,v 1.2 2022/04/18 11:18:19 adam Exp $
 
---- src/3rdparty/chromium/third_party/libxslt/BUILD.gn.orig	2021-02-19 16:41:59.000000000 +0000
+--- src/3rdparty/chromium/third_party/libxslt/BUILD.gn.orig	2022-11-02 21:44:41.314679004 +0000
 +++ src/3rdparty/chromium/third_party/libxslt/BUILD.gn
-@@ -92,7 +92,7 @@ static_library("bundled_libxslt") {
-   public_configs = [ ":libxslt_config" ]
+@@ -1,129 +1,13 @@
+-# Copyright 2014 The Chromium Authors. All rights reserved.
++# Copyright 2016 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.
  
-   cflags = []
--  if (is_linux || is_chromeos || is_android || is_fuchsia) {
-+  if (is_linux || is_chromeos || is_android || is_fuchsia || is_bsd) {
-     include_dirs = [ "linux" ]
-   } else if (is_win) {
-     include_dirs = [ "win32" ]
+-declare_args() {
+-  use_system_libxslt = false
+-}
+-
+-# This file depends on the legacy global sources assignment filter. It should
+-# be converted to check target platform before assigning source files to the
+-# sources variable. Remove this import and set_sources_assignment_filter call
+-# when the file has been converted. See https://crbug.com/1018739 for details.
+-import("//build/config/deprecated_default_sources_assignment_filter.gni")
+-set_sources_assignment_filter(deprecated_default_sources_assignment_filter)
+-
+-config("libxslt_config") {
+-  defines = [ "LIBXSLT_STATIC" ]
+-  include_dirs = [ "src" ]
+-}
+-
+-config("libxslt_warnings") {
+-  if (is_clang) {
+-    cflags = [
+-      # libxslt stores a char[3] in a `const unsigned char*`.
+-      "-Wno-pointer-sign",
+-
+-      # xsltDefaultRegion and xsltCalibrateTimestamps are only
+-      # used with certain preprocessor defines set.
+-      "-Wno-unused-function",
+-    ]
+-  }
+-}
+-
+-static_library("bundled_libxslt") {
+-  sources = [
+-    "linux/config.h",
+-    "mac/config.h",
+-    "src/libxslt/attributes.c",
+-    "src/libxslt/attributes.h",
+-    "src/libxslt/attrvt.c",
+-    "src/libxslt/documents.c",
+-    "src/libxslt/documents.h",
+-    "src/libxslt/extensions.c",
+-    "src/libxslt/extensions.h",
+-    "src/libxslt/extra.c",
+-    "src/libxslt/extra.h",
+-    "src/libxslt/functions.c",
+-    "src/libxslt/functions.h",
+-    "src/libxslt/imports.c",
+-    "src/libxslt/imports.h",
+-    "src/libxslt/keys.c",
+-    "src/libxslt/keys.h",
+-    "src/libxslt/libxslt.h",
+-    "src/libxslt/namespaces.c",
+-    "src/libxslt/namespaces.h",
+-    "src/libxslt/numbers.c",
+-    "src/libxslt/numbersInternals.h",
+-    "src/libxslt/pattern.c",
+-    "src/libxslt/pattern.h",
+-    "src/libxslt/preproc.c",
+-    "src/libxslt/preproc.h",
+-    "src/libxslt/security.c",
+-    "src/libxslt/security.h",
+-    "src/libxslt/templates.c",
+-    "src/libxslt/templates.h",
+-    "src/libxslt/transform.c",
+-    "src/libxslt/transform.h",
+-    "src/libxslt/trio.h",
+-    "src/libxslt/triodef.h",
+-    "src/libxslt/variables.c",
+-    "src/libxslt/variables.h",
+-    "src/libxslt/win32config.h",
+-    "src/libxslt/xslt.c",
+-    "src/libxslt/xslt.h",
+-    "src/libxslt/xsltInternals.h",
+-    "src/libxslt/xsltconfig.h",
+-    "src/libxslt/xsltexports.h",
+-    "src/libxslt/xsltlocale.c",
+-    "src/libxslt/xsltlocale.h",
+-    "src/libxslt/xsltutils.c",
+-    "src/libxslt/xsltutils.h",
+-    "win32/config.h",
+-  ]
+-
+-  configs -= [ "//build/config/compiler:chromium_code" ]
+-  configs += [
+-    "//build/config/compiler:no_chromium_code",
+-
+-    # Must be after no_chromium_code for warning flags to be ordered correctly.
+-    ":libxslt_warnings",
+-  ]
+-  public_configs = [ ":libxslt_config" ]
+-
+-  cflags = []
+-  if (is_linux || is_chromeos || is_android || is_fuchsia || is_bsd) {
+-    include_dirs = [ "linux" ]
+-  } else if (is_win) {
+-    include_dirs = [ "win32" ]
+-    cflags += [
+-      "/wd4267",  # size_t to int.
+-
+-      # TODO(brucedawson): http://crbug.com/554200 4311 is a VS
+-      # 2015 64-bit warning for pointer truncation
+-      "/wd4311",
+-    ]
+-  } else if (is_mac) {
+-    include_dirs = [ "mac" ]
+-  }
+-
+-  deps = [ "//third_party/libxml" ]
++import("//build/config/linux/pkg_config.gni")
+ 
+-  visibility = [ ":libxslt" ]
++pkg_config("system_libxslt") {
++  packages = [ "libxslt" ]
+ }
+ 
+-if (use_system_libxslt) {
+-  import("//build/config/linux/pkg_config.gni")
+-  pkg_config("system_libxslt") {
+-    packages = [ "libxslt" ]
+-  }
+-  source_set("libxslt") {
+-    public_configs = [ ":system_libxslt" ]
+-    visibility = [ "//third_party/blink/renderer/*" ]
+-  }
+-} else {
+-  group("libxslt") {
+-    public_deps = [ ":bundled_libxslt" ]
+-    visibility = [ "//third_party/blink/renderer/*" ]
+-  }
++source_set("libxslt") {
++  public_configs = [ ":system_libxslt" ]
+ }
Index: patches/patch-src_3rdparty_chromium_third__party_zlib_BUILD.gn
===================================================================
RCS file: /cvsroot/pkgsrc/x11/qt5-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_zlib_BUILD.gn,v
retrieving revision 1.2
diff -u -r1.2 patch-src_3rdparty_chromium_third__party_zlib_BUILD.gn
--- patches/patch-src_3rdparty_chromium_third__party_zlib_BUILD.gn	18 Apr 2022 11:18:19 -0000	1.2
+++ patches/patch-src_3rdparty_chromium_third__party_zlib_BUILD.gn	7 Nov 2022 19:22:59 -0000
@@ -1,7 +1,16 @@
 $NetBSD: patch-src_3rdparty_chromium_third__party_zlib_BUILD.gn,v 1.2 2022/04/18 11:18:19 adam Exp $
 
---- src/3rdparty/chromium/third_party/zlib/BUILD.gn.orig	2021-02-19 16:41:59.000000000 +0000
+--- src/3rdparty/chromium/third_party/zlib/BUILD.gn.orig	2021-08-24 12:21:04.000000000 +0000
 +++ src/3rdparty/chromium/third_party/zlib/BUILD.gn
+@@ -115,7 +115,7 @@ if (use_arm_neon_optimizations) {
+     # Disabled for iPhone, as described in DDI0487C_a_armv8_arm:
+     #  "All implementations of the ARMv8.1 architecture are required to
+     #   implement the CRC32* instructions. These are optional in ARMv8.0."
+-    if (!is_ios) {
++    if (!is_ios && !is_netbsd) {
+       defines = [ "CRC32_ARMV8_CRC32" ]
+       if (is_android) {
+         defines += [ "ARMV8_OS_ANDROID" ]
 @@ -438,7 +438,7 @@ static_library("bundled_minizip") {
      ]
    }


Home | Main Index | Thread Index | Old Index