pkgsrc-WIP-changes archive

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

electron43: fixes to successful configure phase



Module Name:	pkgsrc-wip
Committed By:	kikadf <kikadf.01%gmail.com@localhost>
Pushed By:	kikadf
Date:		Sat Oct 10 20:31:02 2026 +0200
Changeset:	fdf7a91d9a8ed8fd62e0876f292a7261966814b2

Modified Files:
	electron43/Makefile
	electron43/files/apply-electron-patches.sh
	electron43/platform.mk

Log Message:
electron43: fixes to successful configure phase

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

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

diffstat:
 electron43/Makefile                        | 25 +++++++++++++++----------
 electron43/files/apply-electron-patches.sh |  2 +-
 electron43/platform.mk                     |  8 +++++---
 3 files changed, 21 insertions(+), 14 deletions(-)

diffs:
diff --git a/electron43/Makefile b/electron43/Makefile
index 31985fe71d..099539ce8e 100644
--- a/electron43/Makefile
+++ b/electron43/Makefile
@@ -127,23 +127,17 @@ SUBST_FILES.path+=	build/gn_run_binary.py
 SUBST_FILES.path+=	build/rust/rust_bindgen.gni
 SUBST_FILES.path+=	build/rust/rust_bindgen_generator.gni
 SUBST_FILES.path+=	chrome/common/chrome_paths.cc
-SUBST_FILES.path+=	chrome/browser/file_system_access/chrome_file_system_access_permission_context.h
 SUBST_FILES.path+=	components/policy/core/common/policy_paths.cc
 SUBST_FILES.path+=	sandbox/policy/openbsd/sandbox_openbsd.cc
 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/dawn/tools/generate-sources-gn.py
 SUBST_FILES.path+=	third_party/blink/renderer/build/scripts/run_with_pythonpath.py
-SUBST_FILES.path+=	third_party/dawn/tools/generate-sources-gn.py
-SUBST_FILES.path+=	third_party/electron_node/tools/generate_gn_filenames_json.py
-SUBST_FILES.path+=	third_party/engflow-reclient-configs/python/python_remote_wrapper.template
-SUBST_FILES.path+=	third_party/squirrel.mac/build/xcrun.py
+SUBST_FILES.path+=	electron/spec/api-app.spec.ts
 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
 SUBST_FILES.path+=	third_party/wayland/BUILD.gn
 SUBST_FILES.path+=	tools/protoc_wrapper/protoc_wrapper.py
-SUBST_FILES.path+=	ui/qt/qt.gni
 SUBST_FILES.path+=	v8/tools/run.py
 SUBST_FILES.path+=	v8/tools/run-paxctl.py
 SUBST_VARS.path+=	PREFIX PKG_SYSCONFBASE VARBASE QTDIR X11BASE PYTHONBIN
@@ -164,7 +158,6 @@ GN_SYSTEM_LIBS=		dav1d
 GN_SYSTEM_LIBS+=	fontconfig
 #GN_SYSTEM_LIBS+=	icu
 GN_SYSTEM_LIBS+=	libaom
-GN_SYSTEM_LIBS+=	libevent # TODO: removed?
 GN_SYSTEM_LIBS+=	libjpeg # libjpeg-turbo
 GN_SYSTEM_LIBS+=	libpng
 GN_SYSTEM_LIBS+=	libvpx
@@ -178,7 +171,6 @@ GN_ARGS+=	clang_use_chrome_plugins=false
 GN_ARGS+=	disable_fieldtrial_testing_config=true
 GN_ARGS+=	enable_backup_ref_ptr_support=false
 GN_ARGS+=	enable_hangout_services_extension=true
-GN_ARGS+=	enable_nacl=false
 GN_ARGS+=	enable_remoting=false
 GN_ARGS+=	fatal_linker_warnings=false
 GN_ARGS+=	icu_use_data_file=false
@@ -215,6 +207,8 @@ 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 \
 		-L${X11BASE}/lib \
@@ -271,7 +265,8 @@ post-extract:
 	# Make source tree
 	${MV} ${WRKSRC} ${WRKDIR}/temp
 	${MV} ${WRKDIR}/chromium-${CHROMIUM_VERSION} ${WRKSRC}
-	${MV} ${WRKDIR}/temp/pkgsrc/chromium-nb ${WRKSRC}
+	cd ${WRKDIR}/temp/pkgsrc/chromium-nb && \
+		${FIND} . -type f -print | pax -rw -pmp ${WRKSRC}
 	${MV} ${WRKDIR}/temp/pkgsrc/electron_node ${WRKSRC}/third_party/electron_node
 	${MV} ${WRKDIR}/temp/pkgsrc/nan ${WRKSRC}/third_party/nan
 	${MV} ${WRKDIR}/temp/pkgsrc/squirrel.mac ${WRKSRC}/third_party/squirrel.mac
@@ -295,6 +290,16 @@ post-extract:
 		${SH} ${FILESDIR}/apply-electron-patches.sh
 
 pre-configure:
+	# Prepare node modules for electron
+	cd ${WRKSRC}/electron && ${SETENV} ${MAKE_ENV} \
+		HOME=${WRKDIR}/.home XDG_CACHE_HOME=${WRKDIR}/.cache \
+		YARN_GLOBAL_FOLDER=${WRKDIR}/.home/.yarn-global \
+		YARN_CACHE_FOLDER=${WRKDIR}/${ELECTRON}-node_modules-${ELECTRON_VER} \
+		YARN_ENABLE_GLOBAL_CACHE=false YARN_ENABLE_NETWORK=0 \
+		YARN_ENABLE_TELEMETRY=0 YARN_ENABLE_PROGRESS_BARS=0 \
+		npm_config_nodedir=${PREFIX} SENTRYCLI_SKIP_DOWNLOAD=1 \
+		yarn rebuild
+
 	# Prepare internal ffmpeg
 	cd ${WRKSRC}/media/ffmpeg && \
 		${PYTHONBIN} scripts/build_ffmpeg.py \
diff --git a/electron43/files/apply-electron-patches.sh b/electron43/files/apply-electron-patches.sh
index 1f6b83d7b6..e07069b0c3 100644
--- a/electron43/files/apply-electron-patches.sh
+++ b/electron43/files/apply-electron-patches.sh
@@ -4,7 +4,7 @@ PATH=/bin:/usr/bin:/usr/pkg/bin
 BASEDIR=$PWD
 PATCHCONF="${BASEDIR}/electron/patches/config.json"
 
-for _dirs in $(sed -n 's|.*patch_dir": "src/\(.*\)", "repo": "src/\(.*\)".*|\1:\2|p'  < ${PATCHCONF}); do
+for _dirs in $(sed -n 's|.*patch_dir": "src\(.*\)", "repo": "src\(.*\)".*|.\1:.\2|p' < ${PATCHCONF}); do
 	_patchdir=$(echo "$_dirs" | cut -d: -f1)
 	_srcdir=$(echo "$_dirs" | cut -d: -f2)
 	cd "$BASEDIR/$_srcdir"
diff --git a/electron43/platform.mk b/electron43/platform.mk
index 2fc7f02921..9eae662835 100644
--- a/electron43/platform.mk
+++ b/electron43/platform.mk
@@ -6,7 +6,7 @@
 
 ELECTRON_VER=		43.7.9
 ELECTRON_MAJOR=		${ELECTRON_VER:tu:C/\\.[[:digit:]\.]*//}
-NODE_VERSION_DEFAULT=	24
+NODE_VERSIONS_ACCEPTED=	24
 ELECTRON=		electron${ELECTRON_MAJOR}
 
 # Package-settable variable
@@ -26,7 +26,8 @@ PKG_FAIL_REASON+=	"Should be \"bundled\" or \"dependency\"."
 PKG_FAIL_REASON+=	"USE_ELECTRON is defined for ${PKGPATH} package."
 .endif
 
-TOOL_DEPENDS+=		nodejs-${NODE_VERSION_DEFAULT}.*:../../lang/nodejs${NODE_VERSION_DEFAULT}
+TOOL_DEPENDS+=		cmake-[0-9]*:../../devel/cmake
+
 .if ${USE_ELECTRON} == "dependency"
 DEPENDS+=		${ELECTRON}>=${ELECTRON_VER}:../../wip/${ELECTRON}
 .elif ${USE_ELECTRON} == "bundled"
@@ -64,7 +65,6 @@ PLIST.swiftshader=	yes
 .include "../../devel/input-headers/buildlink3.mk"
 .include "../../devel/libatomic/buildlink3.mk"
 .include "../../devel/libepoll-shim/buildlink3.mk"
-.include "../../devel/libevent/buildlink3.mk" # TODO: removed?
 .include "../../devel/libusb1/buildlink3.mk"
 .include "../../devel/nspr/buildlink3.mk"
 .include "../../devel/nss/buildlink3.mk"
@@ -77,6 +77,8 @@ PLIST.swiftshader=	yes
 .include "../../graphics/libwebp/buildlink3.mk"
 .include "../../graphics/png/buildlink3.mk"
 .include "../../lang/compiler-rt/buildlink3.mk"
+BUILDLINK_DEPMETHOD.nodejs=	build
+.include "../../lang/nodejs/nodeversion.mk"
 .include "../../lang/python/tool.mk"
 .include "../../lang/rust/cargo.mk"
 .include "../../lang/rust/rust.mk"


Home | Main Index | Thread Index | Old Index