pkgsrc-WIP-changes archive

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

electron43: add missing patches, dependencies



Module Name:	pkgsrc-wip
Committed By:	kikadf <kikadf.01%gmail.com@localhost>
Pushed By:	kikadf
Date:		Tue Oct 13 17:26:07 2026 +0200
Changeset:	bbd72236b4b0f1bfcdf1858728e3ad0a8848630e

Modified Files:
	electron43/Makefile
	electron43/distinfo
	electron43/options.mk
	electron43/patches/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc
	electron43/patches/patch-chrome_browser_process__singleton__posix.cc
	electron43/patches/patch-content_browser_child__process__launcher__helper__linux.cc
	electron43/patches/patch-net_dns_dns__config__service__posix.cc
	electron43/patches/patch-ui_gfx_font__util.cc
	electron43/patches/patch-ui_gtk_gtk__compat.cc
Added Files:
	electron43/patches/patch-electron_node__modules_@sentry_cli_scripts_install.js
	electron43/patches/patch-third__party_electron__node_tools_generate__config__gypi.py

Log Message:
electron43: add missing patches, dependencies

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=bbd72236b4b0f1bfcdf1858728e3ad0a8848630e

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 electron43/Makefile                                |  8 +++++-
 electron43/distinfo                                | 14 +++++-----
 electron43/options.mk                              | 31 +++++++++++++---------
 ...e__file__system__access__permission__context.cc |  4 +--
 ...tch-chrome_browser_process__singleton__posix.cc |  4 +--
 ...wser_child__process__launcher__helper__linux.cc |  2 +-
 ...on_node__modules_@sentry_cli_scripts_install.js | 16 +++++++++++
 .../patch-net_dns_dns__config__service__posix.cc   |  4 +--
 ..._electron__node_tools_generate__config__gypi.py | 17 ++++++++++++
 electron43/patches/patch-ui_gfx_font__util.cc      |  2 +-
 electron43/patches/patch-ui_gtk_gtk__compat.cc     |  2 +-
 11 files changed, 76 insertions(+), 28 deletions(-)

diffs:
diff --git a/electron43/Makefile b/electron43/Makefile
index 099539ce8e..544bc2b3d8 100644
--- a/electron43/Makefile
+++ b/electron43/Makefile
@@ -133,6 +133,7 @@ SUBST_FILES.path+=	services/device/hid/hid_service_freebsd.cc
 SUBST_FILES.path+=	services/device/time_zone_monitor/time_zone_monitor_linux.cc
 SUBST_FILES.path+=	third_party/blink/renderer/build/scripts/run_with_pythonpath.py
 SUBST_FILES.path+=	electron/spec/api-app.spec.ts
+SUBST_FILES.path+=	third_party/electron_node/tools/generate_config_gypi.py
 SUBST_FILES.path+=	third_party/perfetto/src/base/utils.cc
 SUBST_FILES.path+=	third_party/test_fonts/fontconfig/BUILD.gn
 SUBST_FILES.path+=	third_party/vulkan-loader/src/BUILD.gn
@@ -145,6 +146,7 @@ SUBST_VARS.path+=	WRKSRC SH
 
 .include "options.mk"
 
+BUILDTYPE=	Release
 MAKE_ENV+=	BUILDTYPE=${BUILDTYPE}
 MAKE_ENV+=	GPERF=${PREFIX}/bin/gperf
 TARGET=		electron electron:node_headers
@@ -176,6 +178,9 @@ GN_ARGS+=	fatal_linker_warnings=false
 GN_ARGS+=	icu_use_data_file=false
 GN_ARGS+=	is_cfi=false
 GN_ARGS+=	is_clang=true
+GN_ARGS+=	is_component_build=false
+GN_ARGS+=	is_debug=false
+GN_ARGS+=	is_official_build=true
 GN_ARGS+=	moc_qt6_path="${PREFIX}/qt6/libexec"
 GN_ARGS+=	optimize_webui=true
 GN_ARGS+=	override_electron_version="${ELECTRON_VER}"
@@ -198,16 +203,17 @@ GN_ARGS+=	use_system_harfbuzz=true
 GN_ARGS+=	use_system_libdrm=true
 GN_ARGS+=	use_system_libjpeg=true #libjpeg-turbo
 GN_ARGS+=	use_thin_lto=false
+#GN_ARGS+=	use_typescript_go=false
 GN_ARGS+=	use_udev=true
 GN_ARGS+=	use_vaapi=false
 GN_ARGS+=	v8_enable_cet_ibt=true
+GN_ARGS+=	v8_builtins_profiling_log_file=""
 
 # flags
 CFLAGS+=	-fno-stack-protector
 CFLAGS+=	-isystem${PREFIX}/lib/clang/${LLVM_MV}/include # third_party/zlib with clang
 CFLAGS+=	-Wno-error=unused-command-line-argument
 CFLAGS+=	-Wno-unknown-warning-option
-CFLAGS+=	-std=c++20
 CFLAGS+=	-I${PREFIX}/include/node
 
 EXTRA_LDFLAGS=	-L${PREFIX}/lib \
diff --git a/electron43/distinfo b/electron43/distinfo
index c4e3823c80..cc5b96e3d7 100644
--- a/electron43/distinfo
+++ b/electron43/distinfo
@@ -648,9 +648,9 @@ Size (zerovec-derive-0.11.3.crate) = 22115 bytes
 BLAKE2s (zmij-1.0.21.crate) = a2d1e7214230c8f4e8c946d28215765c131da3aac89f1001daf534335307648e
 SHA512 (zmij-1.0.21.crate) = a488f11ec8721ddfe42e61d028a128818551de8fccd69d7824504e4ae2efccdc38f716fa5a10ef4de07a8a087e75e819c4a1e0790817e8539b5db697bde14585
 Size (zmij-1.0.21.crate) = 26665 bytes
-SHA1 (patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc) = afa9e1301289de8fca504115ad0402e19bd48f2e
-SHA1 (patch-chrome_browser_process__singleton__posix.cc) = f5f6904b658d605fb03e2eca69837382452c2c9e
-SHA1 (patch-content_browser_child__process__launcher__helper__linux.cc) = aadd33161763dd1473ee47d9eb70398d94c553b6
+SHA1 (patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc) = cb3a369e8f3a301c471c21c5bea79927fb6b8f1e
+SHA1 (patch-chrome_browser_process__singleton__posix.cc) = 36547d0d5e402d024e8fb747914e3f182cc43946
+SHA1 (patch-content_browser_child__process__launcher__helper__linux.cc) = a4d9c366e1f332360b82bfee2ad94bbc5570966d
 SHA1 (patch-electron_BUILD.gn) = f9db129abbe651507986f7694ec8d8a0111cde6c
 SHA1 (patch-electron_build_args_all.gn) = 2714d4d17f1398e75979e79b89a039002013e673
 SHA1 (patch-electron_default__app_default__app.ts) = 7e563358dcac2757faf00251a3bcc1c1df6e419f
@@ -661,6 +661,7 @@ SHA1 (patch-electron_lib_browser_api_menu-item-roles.ts) = 479901d4e00efa5946a31
 SHA1 (patch-electron_lib_browser_api_power-monitor.ts) = 7d6da66672964cac7cdb77e28a2eecb563212fcd
 SHA1 (patch-electron_lib_browser_rpc-server.ts) = 350a5627419fa959069a6735a97048cd76e5a70f
 SHA1 (patch-electron_lib_renderer_api_clipboard.ts) = ebeae1a1631d98e0303d71f536a0c3a4f3704de0
+SHA1 (patch-electron_node__modules_@sentry_cli_scripts_install.js) = 4dca0832ae346d25b063bc66dc9c8b6e948f75d2
 SHA1 (patch-electron_script_lib_config.py) = 2f5721bdfd25689de2deef98f28ac440117f79d8
 SHA1 (patch-electron_script_lib_utils.js) = 360e4b8d5c44d6eabbe6cf66f24bde41d27b0495
 SHA1 (patch-electron_script_pgo_collect-profile.js) = 5471131b2915f56274c394dd6439541845f87ba5
@@ -764,7 +765,7 @@ SHA1 (patch-electron_spec_node.spec.ts) = e668d63219c7fd8296d9472ca26bc109b162ab
 SHA1 (patch-electron_spec_spellchecker.spec.ts) = 17ccb155ec0498edbc530da089c3427dc0fc21e4
 SHA1 (patch-electron_spec_visibility-state.spec.ts) = 1a11ae6f9d2ebe5e78b62f58840f4a0cb87207c2
 SHA1 (patch-electron_spec_webview.spec.ts) = e63a886b4624c37cf14250dd525731003cb11ed8
-SHA1 (patch-net_dns_dns__config__service__posix.cc) = aaca298a30b3816351f4d3fb33a08a017fa3df82
+SHA1 (patch-net_dns_dns__config__service__posix.cc) = 76de643a3421c0954265e5afa4dddded3bc47540
 SHA1 (patch-rollup_rust_bindings__napi_Cargo.toml) = 6a5074ac4cb3c094b5721bcdcee47fc75bc19423
 SHA1 (patch-rollup_rust_bindings__napi_src_lib.rs) = 064e4c9c76b33a88907d3ee2229ce4bcb07f1a8c
 SHA1 (patch-third__party_electron__node_deps_cares_unofficial.gni) = e79c6ad50d841ffac4c814ce1a950d35f1dbd966
@@ -772,5 +773,6 @@ SHA1 (patch-third__party_electron__node_deps_histogram_unofficial.gni) = e59cfb4
 SHA1 (patch-third__party_electron__node_deps_openssl_unofficial.gni) = d8e39606897dd307ce6f6aaad1809812c5d42a42
 SHA1 (patch-third__party_electron__node_deps_uv_src_unix_pipe.c) = 222820401799a208cbeeb323e446ee578fa58e02
 SHA1 (patch-third__party_electron__node_deps_uv_unofficial.gni) = 4b84a766b7dc912f985e2a9089f29eda3df3e884
-SHA1 (patch-ui_gfx_font__util.cc) = f04033109e67798036792fc8c6837c81f373d06a
-SHA1 (patch-ui_gtk_gtk__compat.cc) = 8a5084603dff308eb0b1a9fec14eaf343042e704
+SHA1 (patch-third__party_electron__node_tools_generate__config__gypi.py) = 4a7fe62b07b69104e7cc215bcada3d013ed0fc3c
+SHA1 (patch-ui_gfx_font__util.cc) = cbec735158349cd0a81e167c2a3fa4151f032a1b
+SHA1 (patch-ui_gtk_gtk__compat.cc) = 0d0afa082c866f40434463a193ff7bfd938b09f1
diff --git a/electron43/options.mk b/electron43/options.mk
index 9375a18f7a..661bd7ef52 100644
--- a/electron43/options.mk
+++ b/electron43/options.mk
@@ -1,9 +1,9 @@
-# $NetBSD: options.mk,v 1.32 2016/08/20 11:17:32 ryoon Exp $
+# $NetBSD: $
 
 PKG_OPTIONS_VAR=		PKG_OPTIONS.electron
 PKG_OPTIONS_REQUIRED_GROUPS=	audio
 PKG_OPTIONS_GROUP.audio=	alsa pulseaudio sunaudio
-PKG_SUPPORTED_OPTIONS+=		debug
+PKG_SUPPORTED_OPTIONS+=		debug wayland
 
 .if ${OPSYS} == "NetBSD"
 PKG_SUGGESTED_OPTIONS+=		sunaudio
@@ -11,6 +11,15 @@ PKG_SUGGESTED_OPTIONS+=		sunaudio
 PKG_SUGGESTED_OPTIONS+=		pulseaudio
 .endif
 
+.include "../../devel/wayland/platform.mk"
+.if ${PLATFORM_SUPPORTS_WAYLAND} == "yes"
+.  if ${OPSYS} == "NetBSD" && ${OPSYS_VERSION} < 110000 && ${X11_TYPE} == "native"
+# Need libdrm >= 2.4.116 for wayland support
+.  else
+PKG_SUGGESTED_OPTIONS+=	wayland
+.  endif
+.endif
+
 .include "../../mk/bsd.options.mk"
 
 .if !empty(PKG_OPTIONS:Msunaudio)
@@ -27,28 +36,26 @@ GN_ARGS+=	use_alsa=false
 .endif
 
 .if !empty(PKG_OPTIONS:Mpulseaudio)
-#WITH_PA=	yes
 GN_ARGS+=	use_pulseaudio=true
 .include "../../audio/pulseaudio/buildlink3.mk"
 .else
-#WITH_PA=	no
 GN_ARGS+=	use_pulseaudio=false
 .endif
 
+.if !empty(PKG_OPTIONS:Mwayland)
+GN_ARGS+=	use_system_libffi=true
+.include "../../devel/libffi/buildlink3.mk"
+.include "../../devel/wayland/buildlink3.mk"
+.else
+GN_ARGS+=	ozone_platform_wayland=false
+.endif
+
 .if !empty(PKG_OPTIONS:Mdebug)
-BUILDTYPE=		Debug
 GN_FILE=		testing.gn
-GN_ARGS+=		is_debug=true
 GN_ARGS+=		symbol_level=1
-GN_BOOTSTRAP_FLAGS+=	--debug
-GN_VERBOSE=		#-v
 INSTALL_UNSTRIPPED=	yes
 .else
-BUILDTYPE=		Release
 GN_FILE=		release.gn
-GN_ARGS+=		is_official_build=true
-GN_ARGS+=		is_component_build=false
-GN_ARGS+=		is_debug=false
 GN_ARGS+=		blink_symbol_level=0
 GN_ARGS+=		symbol_level=0
 GN_VERBOSE=		# empty
diff --git a/electron43/patches/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc b/electron43/patches/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc
index 02aaf4f3e4..9541da2d9a 100644
--- a/electron43/patches/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc
+++ b/electron43/patches/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc
@@ -4,9 +4,9 @@ $NetBSD$
 * Based on OpenBSD's chromium patches, and
   FreeBSD's electron patches
 
---- chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc.orig	2026-08-17 18:32:36.000000000 +0000
+--- chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc.orig	2026-10-13 15:23:13.173208718 +0000
 +++ chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
-@@ -289,214 +289,10 @@ bool MaybeIsLocalUNCPath(const base::Fil
+@@ -291,214 +291,10 @@ bool MaybeIsLocalUNCPath(const base::Fil
  }
  #endif
  
diff --git a/electron43/patches/patch-chrome_browser_process__singleton__posix.cc b/electron43/patches/patch-chrome_browser_process__singleton__posix.cc
index d492494121..e3c76b8e96 100644
--- a/electron43/patches/patch-chrome_browser_process__singleton__posix.cc
+++ b/electron43/patches/patch-chrome_browser_process__singleton__posix.cc
@@ -4,9 +4,9 @@ $NetBSD$
 * Based on OpenBSD's chromium patches, and
   FreeBSD's electron patches
 
---- chrome/browser/process_singleton_posix.cc.orig	2026-08-17 18:32:36.000000000 +0000
+--- chrome/browser/process_singleton_posix.cc.orig	2026-10-13 15:23:13.063642925 +0000
 +++ chrome/browser/process_singleton_posix.cc
-@@ -102,7 +102,7 @@
+@@ -105,7 +105,7 @@
  #include "ui/base/l10n/l10n_util.h"
  #include "ui/base/resource/scoped_startup_resource_bundle.h"
  
diff --git a/electron43/patches/patch-content_browser_child__process__launcher__helper__linux.cc b/electron43/patches/patch-content_browser_child__process__launcher__helper__linux.cc
index 00f3e28dec..4b90c4f410 100644
--- a/electron43/patches/patch-content_browser_child__process__launcher__helper__linux.cc
+++ b/electron43/patches/patch-content_browser_child__process__launcher__helper__linux.cc
@@ -4,7 +4,7 @@ $NetBSD$
 * Based on OpenBSD's chromium patches, and
   FreeBSD's electron patches
 
---- content/browser/child_process_launcher_helper_linux.cc.orig	2026-08-17 18:32:36.000000000 +0000
+--- content/browser/child_process_launcher_helper_linux.cc.orig	2026-10-13 15:23:13.100904163 +0000
 +++ content/browser/child_process_launcher_helper_linux.cc
 @@ -73,7 +73,25 @@ bool ChildProcessLauncherHelper::BeforeL
        options->fds_to_remap.emplace_back(sandbox_fd, GetSandboxFD());
diff --git a/electron43/patches/patch-electron_node__modules_@sentry_cli_scripts_install.js b/electron43/patches/patch-electron_node__modules_@sentry_cli_scripts_install.js
new file mode 100644
index 0000000000..bf21f56f5c
--- /dev/null
+++ b/electron43/patches/patch-electron_node__modules_@sentry_cli_scripts_install.js
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build electron on NetBSD
+* Based on OpenBSD's chromium patches, and
+  FreeBSD's electron patches
+
+--- electron/node_modules/@sentry/cli/scripts/install.js.orig	2026-10-13 15:23:07.411766406 +0000
++++ electron/node_modules/@sentry/cli/scripts/install.js
+@@ -79,6 +79,7 @@ function getDownloadUrl(platform, arch) 
+       return `${releasesUrl}-Windows-${archString}.exe`;
+     case 'linux':
+     case 'freebsd':
++    case 'netbsd':
+       return `${releasesUrl}-Linux-${archString}`;
+     default:
+       return null;
diff --git a/electron43/patches/patch-net_dns_dns__config__service__posix.cc b/electron43/patches/patch-net_dns_dns__config__service__posix.cc
index 16834b318c..914e3fca02 100644
--- a/electron43/patches/patch-net_dns_dns__config__service__posix.cc
+++ b/electron43/patches/patch-net_dns_dns__config__service__posix.cc
@@ -4,9 +4,9 @@ $NetBSD$
 * Based on OpenBSD's chromium patches, and
   FreeBSD's electron patches
 
---- net/dns/dns_config_service_posix.cc.orig	2026-08-17 18:32:36.000000000 +0000
+--- net/dns/dns_config_service_posix.cc.orig	2026-10-13 15:23:12.816437074 +0000
 +++ net/dns/dns_config_service_posix.cc
-@@ -145,6 +145,7 @@ class DnsConfigServicePosix::Watcher : p
+@@ -146,6 +146,7 @@ class DnsConfigServicePosix::Watcher : p
  #endif
  
      bool success = true;
diff --git a/electron43/patches/patch-third__party_electron__node_tools_generate__config__gypi.py b/electron43/patches/patch-third__party_electron__node_tools_generate__config__gypi.py
new file mode 100644
index 0000000000..2d515e17b4
--- /dev/null
+++ b/electron43/patches/patch-third__party_electron__node_tools_generate__config__gypi.py
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build electron on NetBSD
+* Based on OpenBSD's chromium patches, and
+  FreeBSD's electron patches
+
+--- third_party/electron_node/tools/generate_config_gypi.py.orig	2026-09-07 09:57:40.000000000 +0000
++++ third_party/electron_node/tools/generate_config_gypi.py
+@@ -19,7 +19,7 @@ import getnapibuildversion
+ 
+ # Regex used for parsing results of "gn args".
+ GN_RE = re.compile(r'(\w+)\s+=\s+(.*?)$', re.MULTILINE)
+-GN = 'gn.bat' if sys.platform == 'win32' else 'gn'
++GN = 'gn.bat' if sys.platform == 'win32' else '@WRKSRC@/out/Release/gn'
+ 
+ def bool_to_number(v):
+   return 1 if v else 0
diff --git a/electron43/patches/patch-ui_gfx_font__util.cc b/electron43/patches/patch-ui_gfx_font__util.cc
index f705dbef43..c3cc0d2641 100644
--- a/electron43/patches/patch-ui_gfx_font__util.cc
+++ b/electron43/patches/patch-ui_gfx_font__util.cc
@@ -4,7 +4,7 @@ $NetBSD$
 * Based on OpenBSD's chromium patches, and
   FreeBSD's electron patches
 
---- ui/gfx/font_util.cc.orig	2026-08-17 18:32:36.000000000 +0000
+--- ui/gfx/font_util.cc.orig	2026-10-13 15:23:13.892834818 +0000
 +++ ui/gfx/font_util.cc
 @@ -26,8 +26,11 @@ void InitializeFonts() {
    // the long delay the user would have seen on first rendering.
diff --git a/electron43/patches/patch-ui_gtk_gtk__compat.cc b/electron43/patches/patch-ui_gtk_gtk__compat.cc
index a48c26e52c..c309196aef 100644
--- a/electron43/patches/patch-ui_gtk_gtk__compat.cc
+++ b/electron43/patches/patch-ui_gtk_gtk__compat.cc
@@ -4,7 +4,7 @@ $NetBSD$
 * Based on OpenBSD's chromium patches, and
   FreeBSD's electron patches
 
---- ui/gtk/gtk_compat.cc.orig	2026-08-17 18:32:36.000000000 +0000
+--- ui/gtk/gtk_compat.cc.orig	2026-10-13 15:23:13.076754965 +0000
 +++ ui/gtk/gtk_compat.cc
 @@ -82,15 +82,6 @@ void* GetLibGio() {
    return libgio;


Home | Main Index | Thread Index | Old Index