git: 6c03dd9f652d - main - devel/electron41: Use esbuild binary provided by npm package registry
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 15 Sep 2026 12:30:10 UTC
The branch main has been updated by tagattie:
URL: https://cgit.FreeBSD.org/ports/commit/?id=6c03dd9f652d1d83322f918d80a5657ab88d4c98
commit 6c03dd9f652d1d83322f918d80a5657ab88d4c98
Author: Hiroki Tagato <tagattie@FreeBSD.org>
AuthorDate: 2026-09-15 12:23:12 +0000
Commit: Hiroki Tagato <tagattie@FreeBSD.org>
CommitDate: 2026-09-15 12:29:55 +0000
devel/electron41: Use esbuild binary provided by npm package registry
The chromium upstream expects a specific version of esbuild for
building, which is sometimes different from the one we have in the
ports tree. To prevent such a discrepancy, always use the binary of
the same version as the upstream one which is provided by the npm
package registry.
Reported by: Andrea Venturoli <ml@netfence.it> (via ports)
---
devel/electron41/Makefile | 33 ++++++++++++++++++---------------
devel/electron41/distinfo | 8 +++++---
2 files changed, 23 insertions(+), 18 deletions(-)
diff --git a/devel/electron41/Makefile b/devel/electron41/Makefile
index 7fa20d2e2578..f57e2bb4cbb5 100644
--- a/devel/electron41/Makefile
+++ b/devel/electron41/Makefile
@@ -15,6 +15,16 @@ DISTFILES= chromium-${CHROMIUM_VER}${EXTRACT_SUFX}.0:chromium \
DIST_SUBDIR= ${PORTNAME}
EXTRACT_ONLY= ${DISTFILES:C/:[^:]+$//:C/chromium-${CHROMIUM_VER}${EXTRACT_SUFX}\.[0-9]//}
+.if make(makesum)
+MASTER_SITES+= https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-${ESBUILD_VER}.tgz?dummy=/:esbuild_arm64 \
+ https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-${ESBUILD_VER}.tgz?dummy=/:esbuild_x64
+DISTFILES+= esbuild-freebsd-arm64-${ESBUILD_VER}.tgz:esbuild_arm64 \
+ esbuild-freebsd-x64-${ESBUILD_VER}.tgz:esbuild_x64
+.else
+MASTER_SITES+= https://registry.npmjs.org/@esbuild/freebsd-${GO_ARCH}/-/freebsd-${GO_ARCH}-${ESBUILD_VER}.tgz?dummy=/:esbuild_${GO_ARCH}
+DISTFILES+= esbuild-freebsd-${GO_ARCH}-${ESBUILD_VER}.tgz:esbuild_${GO_ARCH}
+.endif
+
MAINTAINER= tagattie@FreeBSD.org
COMMENT= Build cross-platform desktop apps with JavaScript, HTML, and CSS
WWW= https://electronjs.org/
@@ -33,8 +43,7 @@ FETCH_DEPENDS= git:devel/git \
npm${NODEJS_SUFFIX}>0:www/npm${NODEJS_SUFFIX}
PATCH_DEPENDS= git:devel/git \
jq:textproc/jq
-BUILD_DEPENDS= esbuild:devel/esbuild \
- gperf:devel/gperf \
+BUILD_DEPENDS= gperf:devel/gperf \
bindgen:devel/rust-bindgen-cli \
yasm:devel/yasm \
${LOCALBASE}/libdata/pkgconfig/dri.pc:graphics/mesa-libs \
@@ -86,8 +95,7 @@ GH_TUPLE= electron:electron:${DISTVERSIONFULL}:electron \
ReactiveCocoa:ReactiveObjC:${REACTIVEOBJC_VER}:reactiveobjc \
Mantle:Mantle:${MANTLE_VER}:mantle \
EngFlow:reclient-configs:${ENGFLOW_RECLIENT_CONFIGS_VER}:reclient_configs \
- rollup:rollup:v${ROLLUP_VER}:rollup \
- evanw:esbuild:v${ESBUILD_VER}:esbuild
+ rollup:rollup:v${ROLLUP_VER}:rollup
USE_GL= gbm gl glesv2
USE_GNOME= atk cairo gdkpixbuf gtk30 libxml2 libxslt pango
USE_XORG= x11 xcb xcomposite xcursor xdamage xext xfixes xi xrandr \
@@ -243,8 +251,8 @@ MANTLE_VER= 78d3966b3c331292ea29ec38661b25df0a245948
ENGFLOW_RECLIENT_CONFIGS_VER= 955335c30a752e9ef7bff375baab5e0819b6c00d
# See ${WRKSRC}/third_party/devtools-frontend/src/node_modules/rollup/package.json
ROLLUP_VER= 4.22.4
-# Keep in sync with devel/esbuild
-ESBUILD_VER= 0.28.1
+# See ${WRKSRC}/third_party/devtools-frontend/src/node_modules/esbuild/package.json
+ESBUILD_VER= 0.25.1
.include "Makefile.version"
.include <bsd.port.pre.mk>
@@ -306,6 +314,8 @@ TEST_ENV+= ${MAKE_ENV} \
LOCAL_GIT_DIRECTORY=${LOCALBASE} \
DISABLE_CRASH_REPORTER_TESTS=1
+GO_ARCH= ${ARCH:S/aarch64/arm64/:S/amd64/x64/}
+
pre-everything::
@${ECHO_MSG}
@${ECHO_MSG} "To build electron, you should have around 2GB of memory"
@@ -342,8 +352,7 @@ post-extract:
${WRKSRC}/third_party/engflow-reclient-configs
${MV} ${WRKDIR}/${GH_PROJECT_rollup}-${ROLLUP_VER} \
${WRKSRC}/rollup
- ${MV} ${WRKDIR}/${GH_PROJECT_esbuild}-${ESBUILD_VER} \
- ${WRKSRC}/esbuild
+ ${MV} ${WRKDIR}/package ${WRKSRC}/esbuild
pre-patch:
${SH} ${FILESDIR}/apply-electron-patches.sh ${WRKSRC}
@@ -376,12 +385,6 @@ pre-configure:
${WRKSRC}/build/rust/rust_bindgen_generator.gni
do-configure:
- cd ${WRKSRC}/esbuild && \
- ${LOCALBASE}/bin/node scripts/esbuild.js \
- ${LOCALBASE}/bin/esbuild --neutral && \
- ${RM} -r ${WRKSRC}/third_party/devtools-frontend/src/node_modules/esbuild && \
- ${LN} -sf ${WRKSRC}/esbuild/npm/esbuild \
- ${WRKSRC}/third_party/devtools-frontend/src/node_modules/esbuild \
# GN generator bootstrapping and generating ninja files
cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} CC=${CC} CXX=${CXX} LD=${CXX} \
READELF=${READELF} AR=${AR} NM=${NM} ${PYTHON_CMD} \
@@ -397,7 +400,7 @@ do-configure:
${LN} -sf ${LOCALBASE}/bin/node ${WRKSRC}/third_party/node/freebsd/node-freebsd/bin/node
# Setup esbuild dependency
- ${LN} -sf ${LOCALBASE}/bin/esbuild ${WRKSRC}/third_party/devtools-frontend/src/third_party/esbuild/esbuild
+ ${LN} -sf ${WRKSRC}/esbuild/bin/esbuild ${WRKSRC}/third_party/devtools-frontend/src/third_party/esbuild/esbuild
# Setup buildtools/freebsd
@${MKDIR} ${WRKSRC}/buildtools/freebsd
diff --git a/devel/electron41/distinfo b/devel/electron41/distinfo
index bd8df62ca19b..ed4e13b4c406 100644
--- a/devel/electron41/distinfo
+++ b/devel/electron41/distinfo
@@ -1,4 +1,4 @@
-TIMESTAMP = 1787645265
+TIMESTAMP = 1789473744
SHA256 (electron/chromium-146.0.7680.216.tar.xz.0) = 975c7b752e7b89c72b6e85f458db893c84bf3de42b7eb954bea2b6fda8e9786b
SIZE (electron/chromium-146.0.7680.216.tar.xz.0) = 2000000000
SHA256 (electron/chromium-146.0.7680.216.tar.xz.1) = 35b9287cf3cdefcf443f5b6e96198a82de7d89b8f33b6784f74ab85957f56f01
@@ -7,6 +7,10 @@ SHA256 (electron/chromium-146.0.7680.216.tar.xz.2) = 4f11b63dd52e789323c182d35d5
SIZE (electron/chromium-146.0.7680.216.tar.xz.2) = 741064124
SHA256 (electron/pulseaudio-16.1.tar.gz) = 027266c62f2a84422ac45fa721a649508f0f1628fb1fd9242315ac54ce2d7c92
SIZE (electron/pulseaudio-16.1.tar.gz) = 2763111
+SHA256 (electron/esbuild-freebsd-arm64-0.25.1.tgz) = ef95ca9f5d3e7406d93912b4d8d063222a662a34ca24d45110d7e9d49b79c31b
+SIZE (electron/esbuild-freebsd-arm64-0.25.1.tgz) = 3998443
+SHA256 (electron/esbuild-freebsd-x64-0.25.1.tgz) = 97a6cdd73ec397219fdbcedc0cedc8258155c50e493d7abd4248b1bb453a6a35
+SIZE (electron/esbuild-freebsd-x64-0.25.1.tgz) = 4343765
SHA256 (electron/rust/crates/Inflector-0.11.4.crate) = fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3
SIZE (electron/rust/crates/Inflector-0.11.4.crate) = 17438
SHA256 (electron/rust/crates/ahash-0.8.11.crate) = e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011
@@ -361,5 +365,3 @@ SHA256 (electron/EngFlow-reclient-configs-955335c30a752e9ef7bff375baab5e0819b6c0
SIZE (electron/EngFlow-reclient-configs-955335c30a752e9ef7bff375baab5e0819b6c00d_GH0.tar.gz) = 13014
SHA256 (electron/rollup-rollup-v4.22.4_GH0.tar.gz) = a7e5c09f00fe50adabe27fef8455510f156cf73fee8aef1faf3804b653988e4c
SIZE (electron/rollup-rollup-v4.22.4_GH0.tar.gz) = 1732642
-SHA256 (electron/evanw-esbuild-v0.28.1_GH0.tar.gz) = 65c756fa87d43178ac4a5242454c2bd0fde325f8ecf77997f8fa4b88f94d5cd2
-SIZE (electron/evanw-esbuild-v0.28.1_GH0.tar.gz) = 1997481