devel/electron38: Update to 38.7.2

While here:
- switch to use USE_ELECTRON features of electron.mk for specifying
  node package manager, pre-fetching necessary node modules, and
  extracting the node modules into appropriate directories
- use USES=display for starting/stopping display server on testing
- specify TEST_ENV instead of listing env vars in test target

Changelog: https://github.com/electron/electron/releases/tag/v38.7.2
This commit is contained in:
Hiroki Tagato
2025-12-22 16:53:51 +09:00
parent 4df7fd52c8
commit 8e0af09fe5
16 changed files with 15557 additions and 8335 deletions
+14 -44
View File
@@ -1,7 +1,6 @@
PORTNAME= electron
DISTVERSIONPREFIX= v
DISTVERSION= ${ELECTRON_VER}
PORTREVISION= 1
PULSEMV= 16
PULSEV= ${PULSEMV}.1
CATEGORIES= devel
@@ -11,8 +10,7 @@ PKGNAMESUFFIX= ${ELECTRON_VER_MAJOR}
DISTFILES= chromium-${CHROMIUM_VER}${EXTRACT_SUFX}.0:chromium \
chromium-${CHROMIUM_VER}${EXTRACT_SUFX}.1:chromium \
chromium-${CHROMIUM_VER}${EXTRACT_SUFX}.2:chromium \
pulseaudio-${PULSEV}.tar.gz:pulseaudio \
electron-yarn-cache-${ELECTRON_VER}${EXTRACT_SUFX}:prefetch
pulseaudio-${PULSEV}.tar.gz:pulseaudio
DIST_SUBDIR= ${PORTNAME}
EXTRACT_ONLY= ${DISTFILES:C/:[^:]+$//:C/chromium-${CHROMIUM_VER}${EXTRACT_SUFX}\.[0-9]//}
@@ -27,8 +25,6 @@ LICENSE_FILE= ${WRKSRC}/electron/LICENSE
BROKEN_i386= fetch fails: node process stalls during fetch phase and eats up all CPUs
ONLY_FOR_ARCHS= aarch64 amd64 i386
FETCH_DEPENDS= yarn${NODEJS_SUFFIX}>0:www/yarn${NODEJS_SUFFIX}
EXTRACT_DEPENDS=yarn${NODEJS_SUFFIX}>0:www/yarn${NODEJS_SUFFIX}
PATCH_DEPENDS= git:devel/git \
jq:textproc/jq
BUILD_DEPENDS= gperf:devel/gperf \
@@ -69,12 +65,12 @@ LIB_DEPENDS= libatk-bridge-2.0.so:accessibility/at-spi2-core \
libfontconfig.so:x11-fonts/fontconfig
RUN_DEPENDS= xdg-open:devel/xdg-utils
TEST_DEPENDS= git:devel/git \
${PYTHON_PKGNAMEPREFIX}python-dbusmock>0:devel/py-python-dbusmock@${PY_FLAVOR} \
npm${NODEJS_SUFFIX}>0:www/npm${NODEJS_SUFFIX}
${PYTHON_PKGNAMEPREFIX}python-dbusmock>0:devel/py-python-dbusmock@${PY_FLAVOR}
USES= bison compiler:c++17-lang cpe gettext-tools gl gmake gnome \
iconv:wchar_t jpeg localbase:ldflags ninja nodejs:22,build \
pkgconfig python:build,test qt:5 shebangfix tar:xz xorg
USES= bison compiler:c++17-lang cpe display:test electron:env \
gettext-tools gl gmake gnome iconv:wchar_t jpeg \
localbase:ldflags ninja nodejs:22,build pkgconfig \
python:build,test qt:5 shebangfix tar:xz xorg
CPE_VENDOR= electronjs
USE_GITHUB= yes
@@ -89,6 +85,8 @@ USE_GNOME= atk cairo gdkpixbuf gtk30 libxml2 libxslt pango
USE_XORG= x11 xcb xcomposite xcursor xdamage xext xfixes xi xrandr \
xrender xscrnsaver xtst
USE_QT= buildtools:build core:build widgets:build
USE_ELECTRON= npm:yarn4 prefetch extract
NPM_EXTRACT_WRKSRC= ${WRKSRC:H}/${PORTNAME}-${ELECTRON_VER}
SHEBANG_FILES= chrome/tools/build/linux/chrome-wrapper buildtools/linux64/clang-format
@@ -238,8 +236,6 @@ MANTLE_VER= 78d3966b3c331292ea29ec38661b25df0a245948
# See ${WRKSRC}/electron/DEPS for ENGFLOW_RECLIENT_CONFIGS_VER
ENGFLOW_RECLIENT_CONFIGS_VER= 955335c30a752e9ef7bff375baab5e0819b6c00d
YARN_TIMESTAMP= 61171200
.include "Makefile.version"
.include <bsd.port.pre.mk>
@@ -295,33 +291,17 @@ MAKE_ENV+= RUSTC_BOOTSTRAP=1
GN_ARGS+= enable_rust=true \
rust_sysroot_absolute="${LOCALBASE}"
TEST_ENV+= ${MAKE_ENV} \
ELECTRON_OUT_DIR=${BUILDTYPE} \
LOCAL_GIT_DIRECTORY=${LOCALBASE} \
DISABLE_CRASH_REPORTER_TESTS=1
pre-everything::
@${ECHO_MSG}
@${ECHO_MSG} "To build electron, you should have around 2GB of memory"
@${ECHO_MSG} "and around ${WANTSPACE} of free disk space."
@${ECHO_MSG}
pre-fetch:
@${MKDIR} ${DISTDIR}/${DIST_SUBDIR}
if [ ! -f ${DISTDIR}/${DIST_SUBDIR}/electron-yarn-cache-${ELECTRON_VER}${EXTRACT_SUFX} ]; \
then ${MKDIR} ${WRKDIR}; \
${ECHO_CMD} 'yarn-offline-mirror "./yarn-offline-cache"' >> \
${WRKDIR}/.yarnrc; \
${CP} ${FILESDIR}/package.json ${FILESDIR}/yarn.lock ${WRKDIR}; \
cd ${WRKDIR} && ${SETENV} HOME=${WRKDIR} XDG_CACHE_HOME=${WRKDIR}/.cache \
yarn --frozen-lockfile --ignore-scripts; \
${MTREE_CMD} -cbnSp yarn-offline-cache | ${MTREE_CMD} -C | ${SED} \
-e 's:time=[0-9.]*:time=${YARN_TIMESTAMP}.000000000:' \
-e 's:\([gu]id\)=[0-9]*:\1=0:g' \
-e 's:mode=\([0-9]\)7[0-9][0-9]:mode=\1755:' \
-e 's:mode=\([0-9]\)6[0-9][0-9]:mode=\1644:' \
-e 's:flags=.*:flags=none:' \
-e 's:^\.:./yarn-offline-cache:' > yarn-offline-cache.mtree; \
${TAR} cJf ${DISTDIR}/${DIST_SUBDIR}/electron-yarn-cache-${ELECTRON_VER}${EXTRACT_SUFX} \
@yarn-offline-cache.mtree; \
${RM} -r ${WRKDIR}; \
fi
pre-extract:
# Chromium source tarball is splitted into multiple fragments. Concatenate them
# into a single one and manually extract it into WRKDIR.
@@ -347,13 +327,6 @@ post-extract:
${WRKSRC}/third_party/squirrel.mac/vendor/Mantle
${MV} ${WRKSRC:H}/${GH_PROJECT_reclient_configs}-${ENGFLOW_RECLIENT_CONFIGS_VER} \
${WRKSRC}/third_party/engflow-reclient-configs
# Install node modules for electron
${MV} ${WRKSRC:H}/yarn-offline-cache ${WRKDIR}
${ECHO_CMD} 'yarn-offline-mirror "../../../yarn-offline-cache"' >> ${WRKSRC}/electron/.yarnrc
${MV} ${WRKSRC}/electron/package.json ${WRKSRC}/electron/package.json.bak
${CP} ${FILESDIR}/package.json ${WRKSRC}/electron
cd ${WRKSRC}/electron && \
${SETENV} HOME=${WRKDIR} XDG_CACHE_HOME=${WRKDIR}/.cache yarn --frozen-lockfile --offline
pre-patch:
${SH} ${FILESDIR}/apply-electron-patches.sh ${WRKSRC}
@@ -454,10 +427,7 @@ post-install-DRIVER-on:
${STAGEDIR}${DATADIR}/chromedriver
do-test:
# Note 1: "npm install" will run before actual tests are executed
# Note 2: Xvfb or something similar is necessary for headless testing
cd ${WRKSRC}/electron && \
${SETENV} ${TEST_ENV} ELECTRON_OUT_DIR=${BUILDTYPE} LOCAL_GIT_DIRECTORY=${LOCALBASE} \
npm run test -- --ci
${SETENV} ${TEST_ENV} npm run test -- --ci
.include <bsd.port.post.mk>
+1 -1
View File
@@ -1,2 +1,2 @@
ELECTRON_VER= 38.7.1
ELECTRON_VER= 38.7.2
ELECTRON_VER_MAJOR= ${ELECTRON_VER:C/\..*//}
+7 -5
View File
@@ -1,4 +1,4 @@
TIMESTAMP = 1763701882
TIMESTAMP = 1764753880
SHA256 (electron/chromium-140.0.7339.249.tar.xz.0) = 138fc3e5eb2b5db406a7764a8e287a0d16640f83cbfb452d6e0f54de8eaf65c2
SIZE (electron/chromium-140.0.7339.249.tar.xz.0) = 2000000000
SHA256 (electron/chromium-140.0.7339.249.tar.xz.1) = 0b7ea85268dd4f6aacd0641a48d266eaa2eb9c79f2c528926bfcdc5aee36f1da
@@ -7,10 +7,12 @@ SHA256 (electron/chromium-140.0.7339.249.tar.xz.2) = 0a2a9977f5f34ac878b63e845ef
SIZE (electron/chromium-140.0.7339.249.tar.xz.2) = 331916124
SHA256 (electron/pulseaudio-16.1.tar.gz) = 027266c62f2a84422ac45fa721a649508f0f1628fb1fd9242315ac54ce2d7c92
SIZE (electron/pulseaudio-16.1.tar.gz) = 2763111
SHA256 (electron/electron-yarn-cache-38.7.1.tar.xz) = 7ed6fedc372c5bd23b38ed252c12ace0f0fbce096b5442add4501a965282eb04
SIZE (electron/electron-yarn-cache-38.7.1.tar.xz) = 30044356
SHA256 (electron/electron-electron-v38.7.1_GH0.tar.gz) = 741b64a2b3a161c1e0034fb8a798859eb75915255ed37d8528ccf77a8d0e83ac
SIZE (electron/electron-electron-v38.7.1_GH0.tar.gz) = 15888987
SHA256 (electron/yarn-4.11.0.tgz) = b7ade59ec8008b325eb4bed4360659e33c97942ab292d139c495dd6bdc0ad28c
SIZE (electron/yarn-4.11.0.tgz) = 1056157
SHA256 (electron/electron38-38.7.2-node-modules.tar.xz) = 82ef2cb7b2fed29490f36d6d54aac01ea039f2aff409f0e940ff85e690821863
SIZE (electron/electron38-38.7.2-node-modules.tar.xz) = 60258742
SHA256 (electron/electron-electron-v38.7.2_GH0.tar.gz) = 936b0b2cf041739b143f9475a4c3a28c9b42a389608c4d9e7ba63040e6babf85
SIZE (electron/electron-electron-v38.7.2_GH0.tar.gz) = 16945636
SHA256 (electron/nodejs-node-v22.21.1_GH0.tar.gz) = 4b5ad1795fb6adfb1862df9a626bdca85185866fcd7d0313e87a347eec293fd8
SIZE (electron/nodejs-node-v22.21.1_GH0.tar.gz) = 129440814
SHA256 (electron/nodejs-nan-e14bdcd1f72d62bca1d541b66da43130384ec213_GH0.tar.gz) = 02edf8d5b3fef9af94d8a1355da60564a57e7f2c99cb422bce042400607ed2eb
File diff suppressed because one or more lines are too long
@@ -0,0 +1,12 @@
enableScripts: false
nmHoistingLimits: workspaces
nodeLinker: node-modules
npmMinimalAgeGate: 10080
npmPreapprovedPackages:
- "@electron/*"
yarnPath: .yarn/releases/yarn-4.11.0.cjs
@@ -5,6 +5,7 @@
"description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",
"devDependencies": {
"@azure/storage-blob": "^12.25.0",
"@datadog/datadog-ci": "^4.1.2",
"@electron/asar": "^3.2.13",
"@electron/docs-parser": "^2.0.0",
"@electron/fiddle-core": "^1.3.4",
@@ -40,6 +41,7 @@
"lint-staged": "^16.1.0",
"markdownlint-cli2": "^0.18.0",
"minimist": "^1.2.8",
"node-gyp": "^11.4.2",
"null-loader": "^4.0.1",
"pre-flight": "^2.0.0",
"process": "^0.11.10",
@@ -132,7 +134,14 @@
"node script/gen-libc++-filenames.js"
]
},
"resolutions": {
"nan": "nodejs/nan#e14bdcd1f72d62bca1d541b66da43130384ec213"
"packageManager": "yarn@4.11.0",
"workspaces": [
"spec",
"spec/fixtures/native-addon/*"
],
"dependenciesMeta": {
"dugite": {
"built": true
}
}
}
@@ -0,0 +1,8 @@
{
"name": "@electron-ci/echo",
"version": "0.0.1",
"main": "./lib/echo.js",
"scripts": {
"install": "node-gyp configure && node-gyp build"
}
}
@@ -0,0 +1,8 @@
{
"name": "@electron-ci/external-ab",
"version": "0.0.1",
"main": "./lib/test-array-buffer.js",
"scripts": {
"install": "node-gyp configure && node-gyp build"
}
}
@@ -0,0 +1,13 @@
{
"name": "@electron-ci/is-valid-window",
"version": "0.0.5",
"main": "./lib/is-valid-window.js",
"private": true,
"licenses": "MIT",
"dependencies": {
"nan": "2.x"
},
"scripts": {
"install": "node-gyp configure && node-gyp build"
}
}
@@ -0,0 +1,9 @@
{
"name": "@electron-ci/osr-gpu",
"version": "0.0.1",
"main": "./lib/osr-gpu.js",
"private": true,
"scripts": {
"install": "node-gyp configure && node-gyp build"
}
}
@@ -0,0 +1,9 @@
{
"name": "@electron-ci/uv-dlopen",
"version": "0.0.1",
"main": "index.js",
"private": true,
"scripts": {
"install": "node-gyp configure && node-gyp build"
}
}
@@ -0,0 +1,54 @@
{
"name": "electron-test-main",
"productName": "Electron Test Main",
"main": "index.js",
"version": "0.1.0",
"scripts": {
"node-gyp-install": "node-gyp install"
},
"devDependencies": {
"@electron-ci/echo": "*",
"@electron-ci/external-ab": "*",
"@electron-ci/is-valid-window": "*",
"@electron-ci/osr-gpu": "*",
"@electron-ci/uv-dlopen": "*",
"@electron/fuses": "^1.8.0",
"@electron/packager": "^18.3.2",
"@types/basic-auth": "^1.1.8",
"@types/busboy": "^1.5.4",
"@types/chai": "^4.3.19",
"@types/chai-as-promised": "^7.1.3",
"@types/dirty-chai": "^2.0.5",
"@types/express": "^4.17.13",
"@types/mocha": "^7.0.2",
"@types/send": "^0.14.5",
"@types/sinon": "^9.0.4",
"@types/split": "^1.0.5",
"@types/uuid": "^3.4.6",
"@types/w3c-web-serial": "^1.0.7",
"@types/ws": "^7.2.0",
"basic-auth": "^2.0.1",
"busboy": "^1.6.0",
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"coffeescript": "^2.4.1",
"dbus-ts": "^0.0.7",
"dirty-chai": "^2.0.1",
"express": "^4.20.0",
"graceful-fs": "^4.1.15",
"mkdirp": "^0.5.1",
"mocha": "^10.0.0",
"mocha-junit-reporter": "^1.18.0",
"mocha-multi-reporters": "^1.1.7",
"pdfjs-dist": "4.2.67",
"ps-list": "^7.0.0",
"q": "^1.5.1",
"send": "^0.19.0",
"sinon": "^9.0.1",
"split": "^1.0.1",
"uuid": "^3.3.3",
"winreg": "1.2.4",
"ws": "^7.5.10",
"yargs": "^16.0.3"
}
}
File diff suppressed because it is too large Load Diff
@@ -1,4 +1,4 @@
--- electron/spec/api-power-monitor-spec.ts.orig 2024-10-09 13:53:06 UTC
--- electron/spec/api-power-monitor-spec.ts.orig 2025-11-24 19:50:40 UTC
+++ electron/spec/api-power-monitor-spec.ts
@@ -18,7 +18,7 @@ describe('powerMonitor', () => {
describe('powerMonitor', () => {
@@ -7,5 +7,5 @@
- ifdescribe(process.platform === 'linux' && process.env.DBUS_SYSTEM_BUS_ADDRESS != null)('when powerMonitor module is loaded with dbus mock', () => {
+ ifdescribe((process.platform === 'linux' || process.platform === 'freebsd') && process.env.DBUS_SYSTEM_BUS_ADDRESS != null)('when powerMonitor module is loaded with dbus mock', () => {
before(async () => {
const systemBus = dbus.systemBus();
const systemBus = await dbus.systemBus();
const loginService = systemBus.getService('org.freedesktop.login1');
@@ -1,6 +1,6 @@
--- electron/spec/api-web-contents-spec.ts.orig 2025-11-13 22:57:06 UTC
--- electron/spec/api-web-contents-spec.ts.orig 2025-11-24 19:50:40 UTC
+++ electron/spec/api-web-contents-spec.ts
@@ -2832,7 +2832,7 @@ describe('webContents module', () => {
@@ -2838,7 +2838,7 @@ describe('webContents module', () => {
});
// TODO(codebytere): OOPIF printing is disabled on Linux at the moment due to crashes.
File diff suppressed because it is too large Load Diff