git: c8ee96bf65ad - main - devel/electron42: 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:11 UTC
The branch main has been updated by tagattie:
URL: https://cgit.FreeBSD.org/ports/commit/?id=c8ee96bf65adf08ff9c8a7a87cc7829eeb4858d3
commit c8ee96bf65adf08ff9c8a7a87cc7829eeb4858d3
Author: Hiroki Tagato <tagattie@FreeBSD.org>
AuthorDate: 2026-09-15 12:25:09 +0000
Commit: Hiroki Tagato <tagattie@FreeBSD.org>
CommitDate: 2026-09-15 12:29:55 +0000
devel/electron42: 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/electron42/Makefile | 33 ++++++++++++++++++---------------
devel/electron42/distinfo | 8 +++++---
2 files changed, 23 insertions(+), 18 deletions(-)
diff --git a/devel/electron42/Makefile b/devel/electron42/Makefile
index 81c6a63b2125..8fcb23609c06 100644
--- a/devel/electron42/Makefile
+++ b/devel/electron42/Makefile
@@ -14,6 +14,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/
@@ -29,8 +39,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 \
@@ -83,8 +92,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 \
@@ -241,8 +249,8 @@ MANTLE_VER= 2a8e2123a3931038179ee06105c9e6ec336b12ea
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>
@@ -305,6 +313,8 @@ TEST_ENV+= ${MAKE_ENV} \
DISABLE_CRASH_REPORTER_TESTS=1 \
SENTRYCLI_SKIP_DOWNLOAD=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"
@@ -341,8 +351,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}
@@ -383,12 +392,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} \
@@ -408,7 +411,7 @@ do-configure:
${LN} -sf ${LOCALBASE}/bin/rustc ${WRKSRC}/third_party/rust-toolchain/bin/rustc
# 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 gperf dependency
${LN} -sf ${LOCALBASE}/bin/gperf ${WRKSRC}/third_party/gperf/cipd/bin/gperf
diff --git a/devel/electron42/distinfo b/devel/electron42/distinfo
index 40fb2427fa42..7e8cced54baa 100644
--- a/devel/electron42/distinfo
+++ b/devel/electron42/distinfo
@@ -1,4 +1,4 @@
-TIMESTAMP = 1788931018
+TIMESTAMP = 1789470629
SHA256 (electron/chromium-148.0.7778.280.tar.xz.0) = cddbfeba5a50d950693590399df8df3a8ef5910eee367c76aec2541444c59dea
SIZE (electron/chromium-148.0.7778.280.tar.xz.0) = 2000000000
SHA256 (electron/chromium-148.0.7778.280.tar.xz.1) = cd2f2c3740c05eb549878ab6c6571f7858456c2c56cf798e60ffbaf7e651429f
@@ -7,6 +7,10 @@ SHA256 (electron/chromium-148.0.7778.280.tar.xz.2) = 252c5e676bb414ad9aa80399b31
SIZE (electron/chromium-148.0.7778.280.tar.xz.2) = 778320896
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