diff --git a/devel/electron40/Makefile b/devel/electron40/Makefile index 238e382fe252..3863e0c69051 100644 --- a/devel/electron40/Makefile +++ b/devel/electron40/Makefile @@ -1,440 +1,440 @@ PORTNAME= electron DISTVERSIONPREFIX= v DISTVERSION= ${ELECTRON_VER} PULSEMV= 16 PULSEV= ${PULSEMV}.1 CATEGORIES= devel -MASTER_SITES= https://github.com/tagattie/FreeBSD-Electron/releases/download/v40.6.0/:chromium \ +MASTER_SITES= https://github.com/tagattie/FreeBSD-Electron/releases/download/v40.6.1/:chromium \ https://freedesktop.org/software/pulseaudio/releases/:pulseaudio 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 DIST_SUBDIR= ${PORTNAME} EXTRACT_ONLY= ${DISTFILES:C/:[^:]+$//:C/chromium-${CHROMIUM_VER}${EXTRACT_SUFX}\.[0-9]//} MAINTAINER= tagattie@FreeBSD.org COMMENT= Build cross-platform desktop apps with JavaScript, HTML, and CSS WWW= https://electronjs.org/ LICENSE= BSD3CLAUSE LGPL21 MPL11 MIT LICENSE_COMB= multi 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= 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 \ bindgen:devel/rust-bindgen-cli \ yasm:devel/yasm \ ${LOCALBASE}/libdata/pkgconfig/dri.pc:graphics/mesa-dri \ rustc:lang/rust \ ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat \ node${NODEJS_VERSION}>0:www/node${NODEJS_VERSION} \ npm${NODEJS_SUFFIX}>0:www/npm${NODEJS_SUFFIX} LIB_DEPENDS= libatk-bridge-2.0.so:accessibility/at-spi2-core \ libatspi.so:accessibility/at-spi2-core \ libFLAC.so:audio/flac \ libopus.so:audio/opus \ libdbus-1.so:devel/dbus \ libepoll-shim.so:devel/libepoll-shim \ libevent.so:devel/libevent \ libffi.so:devel/libffi \ libnotify.so:devel/libnotify \ libpci.so:devel/libpci \ libnspr4.so:devel/nspr \ libre2.so:devel/re2 \ libdrm.so:graphics/libdrm \ libpng.so:graphics/png \ libwayland-client.so:graphics/wayland \ libwebp.so:graphics/webp \ libdav1d.so:multimedia/dav1d \ libva.so:multimedia/libva \ libopenh264.so:multimedia/openh264 \ libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz \ libsecret-1.so:security/libsecret \ libnss3.so:security/nss \ libexpat.so:textproc/expat2 \ libxkbcommon.so:x11/libxkbcommon \ libxshmfence.so:x11/libxshmfence \ 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} USES= bison compiler:c++17-lang cpe display:test electron:env \ gettext-tools gl gmake gnome iconv:wchar_t jpeg \ localbase:ldflags ninja nodejs:24,build pkgconfig \ python:build,test qt:5 shebangfix tar:xz xorg CPE_VENDOR= electronjs USE_GITHUB= yes GH_TUPLE= nodejs:node:v${NODE_VER}:node \ nodejs:nan:${NAN_VER}:nan \ Squirrel:Squirrel.Mac:${SQUIRREL_MAC_VER}:squirrel_mac \ ReactiveCocoa:ReactiveObjC:${REACTIVEOBJC_VER}:reactiveobjc \ Mantle:Mantle:${MANTLE_VER}:mantle \ EngFlow:reclient-configs:${ENGFLOW_RECLIENT_CONFIGS_VER}:reclient_configs \ evanw:esbuild:v${ESBUILD_VER}:esbuild 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 \ 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 MAKE_ARGS= -C out/${BUILDTYPE} MAKE_ENV+= C_INCLUDE_PATH=${LOCALBASE}/include \ CPLUS_INCLUDE_PATH=${LOCALBASE}/include ALL_TARGET= electron electron:node_headers POST_BUILD_TARGETS= licenses version POST_BUILD_DIST_TARGETS=electron_dist_zip electron_chromedriver_zip \ electron_mksnapshot_zip DATADIR= ${PREFIX}/share/${PORTNAME}${PKGNAMESUFFIX} BINARY_ALIAS= python3=${PYTHON_CMD} BUNDLE_LIBS= yes NO_WRKSUBDIR= yes WRKSRC_SUBDIR= src GN_ARGS+= clang_use_chrome_plugins=false \ enable_backup_ref_ptr_support=false \ enable_hangout_services_extension=true \ enable_remoting=false \ fatal_linker_warnings=false \ icu_use_data_file=false \ is_clang=true \ moc_qt5_path="${QT_TOOLDIR}/moc" \ optimize_webui=true \ toolkit_views=true \ treat_warnings_as_errors=false \ use_allocator_shim=false \ use_aura=true \ use_custom_libcxx=true \ use_custom_libunwind=true \ use_lld=true \ use_partition_alloc=true \ use_partition_alloc_as_malloc=false \ use_qt5=true \ use_sysroot=false \ use_system_freetype=false \ use_system_harfbuzz=true \ use_system_libffi=true \ use_system_libjpeg=true \ use_udev=false \ chrome_pgo_phase=0 \ extra_cflags="${CFLAGS}" \ extra_cxxflags="${CXXFLAGS} -I${LOCALBASE}/include/libepoll-shim ${PINCLUDES}" \ extra_ldflags="${LDFLAGS}" \ ffmpeg_branding="${FFMPEG_BRAND}" \ override_electron_version="${ELECTRON_VER}" # TODO: investigate building with these options: # use_system_minigbm GN_BOOTSTRAP_FLAGS= --no-clean --no-rebuild --skip-generate-buildfiles PLIST_SUB= ELECTRON_VER=${ELECTRON_VER} \ ELECTRON_VER_MAJOR=${ELECTRON_VER_MAJOR} OPTIONS_DEFINE= CODECS CUPS DEBUG DIST DRIVER KERBEROS LTO PIPEWIRE OPTIONS_DEFAULT= CODECS CUPS DRIVER KERBEROS PIPEWIRE ALSA PULSEAUDIO SNDIO OPTIONS_EXCLUDE_aarch64=LTO OPTIONS_GROUP= AUDIO OPTIONS_GROUP_AUDIO= ALSA PULSEAUDIO SNDIO OPTIONS_RADIO= KERBEROS OPTIONS_RADIO_KERBEROS= HEIMDAL HEIMDAL_BASE MIT OPTIONS_SUB= yes CODECS_DESC= Compile and enable patented codecs like H.264 DIST_DESC= Build distribution zip files DRIVER_DESC= Install chromedriver HEIMDAL_BASE_DESC= Heimdal Kerberos (base) HEIMDAL_DESC= Heimdal Kerberos (security/heimdal) MIT_DESC= MIT Kerberos (security/krb5) PIPEWIRE_DESC= Screen capture via PipeWire ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib ALSA_RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins \ alsa-lib>=1.1.1_1:audio/alsa-lib ALSA_VARS= GN_ARGS+=use_alsa=true ALSA_VARS_OFF= GN_ARGS+=use_alsa=false CODECS_VARS= GN_ARGS+=proprietary_codecs=true \ FFMPEG_BRAND="Chrome" CODECS_VARS_OFF= GN_ARGS+=proprietary_codecs=false \ FFMPEG_BRAND="Chromium" CUPS_LIB_DEPENDS= libcups.so:print/cups CUPS_VARS= GN_ARGS+=use_cups=true CUPS_VARS_OFF= GN_ARGS+=use_cups=false DEBUG_MAKE_ENV= ELECTRON_OUT_DIR=Debug DEBUG_MAKE_ENV_OFF= ELECTRON_OUT_DIR=Release DEBUG_VARS= BUILDTYPE=Debug \ GN_FILE=testing.gn \ GN_ARGS+=is_debug=true \ GN_ARGS+=is_component_build=false \ GN_ARGS+=symbol_level=1 \ GN_BOOTSTRAP_FLAGS+=--debug \ WANTSPACE="21 GB" DEBUG_VARS_OFF= BUILDTYPE=Release \ GN_FILE=release.gn \ GN_ARGS+=blink_symbol_level=0 \ GN_ARGS+=is_debug=false \ GN_ARGS+=is_official_build=true \ GN_ARGS+=symbol_level=0 \ WANTSPACE="14 GB" DIST_IMPLIES= DRIVER DRIVER_MAKE_ARGS= chromedriver HEIMDAL_USES= gssapi:heimdal HEIMDAL_BASE_USES= gssapi:base KERBEROS_VARS= GN_ARGS+=use_kerberos=true KERBEROS_VARS_OFF= GN_ARGS+=use_kerberos=false LTO_VARS= GN_ARGS+=use_thin_lto=true \ GN_ARGS+=thin_lto_enable_optimizations=true \ WANTSPACE="14 GB" LTO_VARS_OFF= GN_ARGS+=use_thin_lto=false MIT_USES= gssapi:mit PIPEWIRE_LIB_DEPENDS= libpipewire-0.3.so:multimedia/pipewire PIPEWIRE_VARS= GN_ARGS+=rtc_use_pipewire=true \ GN_ARGS+=rtc_link_pipewire=true PIPEWIRE_VARS_OFF= GN_ARGS+=rtc_use_pipewire=false \ GN_ARGS+=rtc_link_pipewire=false PULSEAUDIO_VARS= GN_ARGS+=use_pulseaudio=true \ PINCLUDES="-I${WRKSRC:H}/pulseaudio-${PULSEV}/src -DPA_MAJOR=${PULSEMV}" PULSEAUDIO_VARS_OFF= GN_ARGS+=use_pulseaudio=false SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio SNDIO_VARS= GN_ARGS+=use_sndio=true SNDIO_VARS_OFF= GN_ARGS+=use_sndio=false # See ${WRKSRC}/electron/DEPS for CHROMIUM_VER -CHROMIUM_VER= 144.0.7559.177 +CHROMIUM_VER= 144.0.7559.220 # See ${WRKSRC}/electron/DEPS for NODE_VER NODE_VER= 24.13.1 # See ${WRKSRC}/electron/DEPS for NAN_VER NAN_VER= 675cefebca42410733da8a454c8d9391fcebfbc2 # See ${WRKSRC}/electron/DEPS for SQUIRREL_MAC_VER SQUIRREL_MAC_VER= 0e5d146ba13101a1302d59ea6e6e0b3cace4ae38 # See ${WRKSRC}/electron/DEPS for REACTIVEOBJC_VER REACTIVEOBJC_VER= 74ab5baccc6f7202c8ac69a8d1e152c29dc1ea76 # See ${WRKSRC}/electron/DEPS for MANTLE_VER MANTLE_VER= 78d3966b3c331292ea29ec38661b25df0a245948 # See ${WRKSRC}/electron/DEPS for ENGFLOW_RECLIENT_CONFIGS_VER ENGFLOW_RECLIENT_CONFIGS_VER= 955335c30a752e9ef7bff375baab5e0819b6c00d # Keep in sync with devel/esbuild ESBUILD_VER= 0.27.1 .include "Makefile.version" .include .if ${PORT_OPTIONS:MHEIMDAL_BASE} && !exists(/usr/lib/libkrb5.so) IGNORE= you have selected HEIMDAL_BASE but do not have Heimdal installed in base .endif LLVM_DEFAULT= 21 BUILD_DEPENDS+= clang${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT} BINARY_ALIAS+= cpp=${LOCALBASE}/bin/clang-cpp${LLVM_DEFAULT} \ cc=${LOCALBASE}/bin/clang${LLVM_DEFAULT} \ c++=${LOCALBASE}/bin/clang++${LLVM_DEFAULT} \ ar=${LOCALBASE}/bin/llvm-ar${LLVM_DEFAULT} \ nm=${LOCALBASE}/bin/llvm-nm${LLVM_DEFAULT} \ ld=${LOCALBASE}/bin/ld.lld${LLVM_DEFAULT} CFLAGS+= -Wno-error=implicit-function-declaration .if ${ARCH} == "aarch64" PLIST_SUB+= AARCH64="" \ AMD64="@comment " \ I386="@comment " \ NOT_AARCH64="@comment " FFMPEG_TARGET= arm64 .elif ${ARCH} == "amd64" BUILD_DEPENDS+= nasm:devel/nasm PLIST_SUB+= AARCH64="@comment " \ AMD64="" \ I386="@comment " \ NOT_AARCH64="" FFMPEG_TARGET= x64 .elif ${ARCH} == "i386" BUILD_DEPENDS+= nasm:devel/nasm PLIST_SUB+= AARCH64="@comment " \ AMD64="@comment " \ I386="" \ NOT_AARCH64="" FFMPEG_TARGET= ia32 .endif FFMPEG_BDIR= ${WRKSRC}/third_party/ffmpeg/build.${FFMPEG_TARGET}.freebsd/${FFMPEG_BRAND} FFMPEG_CDIR= ${WRKSRC}/third_party/ffmpeg/chromium/config/${FFMPEG_BRAND}/freebsd/${FFMPEG_TARGET} # Allow relocations against read-only segments (override lld default) LDFLAGS_i386= -Wl,-znotext # TODO: -isystem, would be just as ugly as this approach, but more reliably # build would fail without C_INCLUDE_PATH/CPLUS_INCLUDE_PATH env var set. MAKE_ENV+= C_INCLUDE_PATH=${LOCALBASE}/include \ CPLUS_INCLUDE_PATH=${LOCALBASE}/include # rust 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-extract: # Chromium source tarball is splitted into multiple fragments. Concatenate them # into a single one and manually extract it into WRKDIR. @${CAT} ${DISTDIR}/${DIST_SUBDIR}/chromium-${CHROMIUM_VER}${EXTRACT_SUFX}.? > \ ${WRKSRC:H}/chromium-${CHROMIUM_VER}${EXTRACT_SUFX} @cd ${WRKSRC:H} && \ ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} \ chromium-${CHROMIUM_VER}${EXTRACT_SUFX} ${EXTRACT_AFTER_ARGS} post-extract: # Move extracted sources to appropriate locations ${MV} ${WRKSRC:H}/chromium-${CHROMIUM_VER} ${WRKSRC} ${MV} ${WRKSRC:H}/${PORTNAME}-${ELECTRON_VER} ${WRKSRC}/electron ${MV} ${WRKSRC:H}/${GH_PROJECT_nan}-${NAN_VER} ${WRKSRC}/third_party/nan ${MV} ${WRKSRC:H}/${GH_PROJECT_node}-${NODE_VER} \ ${WRKSRC}/third_party/electron_node ${MV} ${WRKSRC:H}/${GH_PROJECT_squirrel_mac}-${SQUIRREL_MAC_VER} \ ${WRKSRC}/third_party/squirrel.mac @${MKDIR} ${WRKSRC}/third_party/squirrel.mac/vendor ${MV} ${WRKSRC:H}/${GH_PROJECT_reactiveobjc}-${REACTIVEOBJC_VER} \ ${WRKSRC}/third_party/squirrel.mac/vendor/ReactiveObjC ${MV} ${WRKSRC:H}/${GH_PROJECT_mantle}-${MANTLE_VER} \ ${WRKSRC}/third_party/squirrel.mac/vendor/Mantle ${MV} ${WRKSRC:H}/${GH_PROJECT_reclient_configs}-${ENGFLOW_RECLIENT_CONFIGS_VER} \ ${WRKSRC}/third_party/engflow-reclient-configs ${MV} ${WRKSRC:H}/${GH_PROJECT_esbuild}-${ESBUILD_VER} \ ${WRKSRC}/esbuild pre-patch: ${SH} ${FILESDIR}/apply-electron-patches.sh ${WRKSRC} # ${FIND} ${WRKSRC} -type f -name '*.orig' -print -delete # ${FIND} ${WRKSRC} -type f -name '*~' -print -delete pre-configure: # We used to remove bundled libraries to be sure that chromium uses # system libraries and not shipped ones. # cd ${WRKSRC} && ${PYTHON_CMD} \ #./build/linux/unbundle/remove_bundled_libraries.py [list of preserved] cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${PYTHON_CMD} \ ./build/linux/unbundle/replace_gn_files.py --system-libraries \ dav1d flac fontconfig harfbuzz-ng libdrm libpng \ libusb libwebp libxml libxslt openh264 opus || ${FALSE} # Chromium uses an unreleased version of FFmpeg, so configure it cd ${WRKSRC}/media/ffmpeg && \ ${PYTHON_CMD} scripts/build_ffmpeg.py freebsd ${FFMPEG_TARGET} \ --config-only --branding=${FFMPEG_BRAND} cd ${FFMPEG_BDIR} && ${GMAKE} ffversion.h ${MKDIR} ${FFMPEG_CDIR} .for _e in config.h config.asm config_components.asm config_components.h libavcodec libavformat libavutil -${CP} -pR ${FFMPEG_BDIR}/${_e} ${FFMPEG_CDIR} .endfor touch ${WRKSRC:H}/pulseaudio-${PULSEV}/src/pulse/version.h @${REINPLACE_CMD} -e 's|$${LOCALBASE}|${LOCALBASE}|;s|$${MODCLANG_VERSION}|${LLVM_DEFAULT}|' \ ${WRKSRC}/build/config/rust.gni \ ${WRKSRC}/build/linux/strip_binary.gni \ ${WRKSRC}/build/rust/rust_bindgen.gni \ ${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} \ ./tools/gn/bootstrap/bootstrap.py ${GN_BOOTSTRAP_FLAGS} cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./out/${BUILDTYPE}/gn gen out/${BUILDTYPE} \ --args='import("//electron/build/args/${GN_FILE}") ${GN_ARGS}' # Make GN available to python scripts called during build ${LN} -sf ${WRKSRC}/out/${BUILDTYPE}/gn ${WRKDIR}/.bin # Setup nodejs dependency @${MKDIR} ${WRKSRC}/third_party/node/freebsd/node-freebsd/bin ${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 # Setup buildtools/freebsd @${MKDIR} ${WRKSRC}/buildtools/freebsd ${LN} -sf ${WRKSRC}/buildtools/linux64/clang-format ${WRKSRC}/buildtools/freebsd ${LN} -sf ${WRKSRC}/out/${BUILDTYPE}/gn ${WRKSRC}/buildtools/freebsd ${LN} -sf /usr/bin/strip ${WRKSRC}/buildtools/freebsd/strip post-build: cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \ ${MAKE_CMD} ${MAKE_ARGS} ${POST_BUILD_TARGETS} post-build-DIST-on: cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \ ${MAKE_CMD} ${MAKE_ARGS} ${POST_BUILD_DIST_TARGETS} cd ${WRKSRC}/out/${BUILDTYPE} && \ ${CP} chromedriver.zip chromedriver-v${ELECTRON_VER}-freebsd-${ARCH:S/amd64/x64/:S/i386/ia32/}.zip && \ ${CP} dist.zip electron-v${ELECTRON_VER}-freebsd-${ARCH:S/amd64/x64/:S/i386/ia32/}.zip && \ ${CP} mksnapshot.zip mksnapshot-v${ELECTRON_VER}-freebsd-${ARCH:S/amd64/x64/:S/i386/ia32/}.zip && \ ${SHA256} -r *-v${ELECTRON_VER}-freebsd-*.zip | ${SED} -e 's/ / */' > SHASUMS256.txt do-install: ${MKDIR} ${STAGEDIR}${DATADIR} .for f in electron mksnapshot v8_context_snapshot_generator ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR} .endfor .for f in libEGL.so libGLESv2.so libffmpeg.so libvk_swiftshader.so ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR} .endfor ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/libvulkan.so.1 ${STAGEDIR}${DATADIR}/libvulkan.so .for f in LICENSE LICENSES.chromium.html snapshot_blob.bin v8_context_snapshot.bin version vk_swiftshader_icd.json ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR} .endfor .for f in chrome_100_percent.pak chrome_200_percent.pak resources.pak ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR} .endfor ${MKDIR} ${STAGEDIR}${DATADIR}/locales ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/locales/*.pak ${STAGEDIR}${DATADIR}/locales ${MKDIR} ${STAGEDIR}${DATADIR}/resources .for f in default_app.asar ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/resources/${f} ${STAGEDIR}${DATADIR}/resources .endfor cd ${WRKSRC}/out/${BUILDTYPE}/gen && ${COPYTREE_SHARE} node_headers ${STAGEDIR}${DATADIR} cd ${WRKSRC}/out/${BUILDTYPE} && ${COPYTREE_SHARE} gen/electron/buildflags ${STAGEDIR}${DATADIR} cd ${WRKSRC}/out/${BUILDTYPE} && ${COPYTREE_SHARE} gen/v8/embedded.S ${STAGEDIR}${DATADIR} ${RLN} ${STAGEDIR}${DATADIR}/electron ${STAGEDIR}${PREFIX}/bin/electron${PKGNAMESUFFIX} post-install-DIST-on: ${MKDIR} ${STAGEDIR}${DATADIR}/releases ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/SHASUMS256.txt ${STAGEDIR}${DATADIR}/releases ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/*-v${ELECTRON_VER}-freebsd-*.zip ${STAGEDIR}${DATADIR}/releases post-install-DRIVER-on: ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/chromedriver.unstripped \ ${STAGEDIR}${DATADIR}/chromedriver do-test: cd ${WRKSRC}/electron && \ ${SETENV} ${TEST_ENV} yarn run test -- --ci .include diff --git a/devel/electron40/Makefile.version b/devel/electron40/Makefile.version index 74607482c041..f2e99fc17100 100644 --- a/devel/electron40/Makefile.version +++ b/devel/electron40/Makefile.version @@ -1,2 +1,2 @@ -ELECTRON_VER= 40.6.0 +ELECTRON_VER= 40.6.1 ELECTRON_VER_MAJOR= ${ELECTRON_VER:C/\..*//} diff --git a/devel/electron40/distinfo b/devel/electron40/distinfo index 6ad2be5a36bd..95e9164b2318 100644 --- a/devel/electron40/distinfo +++ b/devel/electron40/distinfo @@ -1,29 +1,29 @@ -TIMESTAMP = 1771610184 -SHA256 (electron/chromium-144.0.7559.177.tar.xz.0) = e3dfc0ee0f0f3fd089dca0befafe5784cdeac2dafc399b7e42d6487323a016a7 -SIZE (electron/chromium-144.0.7559.177.tar.xz.0) = 2000000000 -SHA256 (electron/chromium-144.0.7559.177.tar.xz.1) = 203d35b3d576acdca08ac9447f24bcb4ae5771c2c04c831a72e59d2b73b3cfd6 -SIZE (electron/chromium-144.0.7559.177.tar.xz.1) = 2000000000 -SHA256 (electron/chromium-144.0.7559.177.tar.xz.2) = fc602368c39ac929bd08fbb4a7c7a9c67cd22ab9a6e551adb5168c641bc9f3aa -SIZE (electron/chromium-144.0.7559.177.tar.xz.2) = 307195328 +TIMESTAMP = 1772040585 +SHA256 (electron/chromium-144.0.7559.220.tar.xz.0) = 7f167d2121e6586cb75cd54d9bd5ee49dcda94891aa0cd81070b61a5bab03a20 +SIZE (electron/chromium-144.0.7559.220.tar.xz.0) = 2000000000 +SHA256 (electron/chromium-144.0.7559.220.tar.xz.1) = 4de57fa424177d631d80da16484a8e929096c09455b5e4d26c13789289e263b1 +SIZE (electron/chromium-144.0.7559.220.tar.xz.1) = 2000000000 +SHA256 (electron/chromium-144.0.7559.220.tar.xz.2) = 4717514631abea8d43f8a83ca497752a343b8698a8e8afe06160f1c540ee87a3 +SIZE (electron/chromium-144.0.7559.220.tar.xz.2) = 306999316 SHA256 (electron/pulseaudio-16.1.tar.gz) = 027266c62f2a84422ac45fa721a649508f0f1628fb1fd9242315ac54ce2d7c92 SIZE (electron/pulseaudio-16.1.tar.gz) = 2763111 SHA256 (electron/yarn-4.12.0.tgz) = bd58d06826ce9542c4cd904fe10bab7bc718ea2cc39a45d9fbd15f2edb45761c SIZE (electron/yarn-4.12.0.tgz) = 1056794 -SHA256 (electron/electron40-40.6.0-node-modules.tar.xz) = 5ead5307742772cd432cf026a946022a5f3e2b8b126d6eea5aaed20996608121 -SIZE (electron/electron40-40.6.0-node-modules.tar.xz) = 59675854 -SHA256 (electron/electron-electron-v40.6.0_GH0.tar.gz) = a3b72d020334fb5ddcbcb71f3520943b90453f652cf701ff4f6f381ae93a2cf5 -SIZE (electron/electron-electron-v40.6.0_GH0.tar.gz) = 17136067 +SHA256 (electron/electron40-40.6.1-node-modules.tar.xz) = 5ead5307742772cd432cf026a946022a5f3e2b8b126d6eea5aaed20996608121 +SIZE (electron/electron40-40.6.1-node-modules.tar.xz) = 59675854 +SHA256 (electron/electron-electron-v40.6.1_GH0.tar.gz) = 26d40a2b338ff30736c448df9080aa0f4e40e9d383ae507f26c45bc1f62e7aa4 +SIZE (electron/electron-electron-v40.6.1_GH0.tar.gz) = 17137652 SHA256 (electron/nodejs-node-v24.13.1_GH0.tar.gz) = a17a9ea377947cc19058276a9e9b3dce98e9ba5004b30745efdf0492f24a3293 SIZE (electron/nodejs-node-v24.13.1_GH0.tar.gz) = 123127962 SHA256 (electron/nodejs-nan-675cefebca42410733da8a454c8d9391fcebfbc2_GH0.tar.gz) = 3983c68f19ed75dd37dc228eab385093ae2533132730f253f0c3d19ff10788e3 SIZE (electron/nodejs-nan-675cefebca42410733da8a454c8d9391fcebfbc2_GH0.tar.gz) = 111323 SHA256 (electron/Squirrel-Squirrel.Mac-0e5d146ba13101a1302d59ea6e6e0b3cace4ae38_GH0.tar.gz) = f4ebb40a8d85dbb7ef02aa0571b2f8e22182c6d73b6992484a53c90047779d01 SIZE (electron/Squirrel-Squirrel.Mac-0e5d146ba13101a1302d59ea6e6e0b3cace4ae38_GH0.tar.gz) = 2112918 SHA256 (electron/ReactiveCocoa-ReactiveObjC-74ab5baccc6f7202c8ac69a8d1e152c29dc1ea76_GH0.tar.gz) = 88e65f116c7a06fccedb43970fba63080a57a4e5dc29147d2cdfe1ee58dd0546 SIZE (electron/ReactiveCocoa-ReactiveObjC-74ab5baccc6f7202c8ac69a8d1e152c29dc1ea76_GH0.tar.gz) = 1136238 SHA256 (electron/Mantle-Mantle-78d3966b3c331292ea29ec38661b25df0a245948_GH0.tar.gz) = a365df6d83e0be3cc000b70bd39734d80c28f0d9983ebe44698337a2ca464bb1 SIZE (electron/Mantle-Mantle-78d3966b3c331292ea29ec38661b25df0a245948_GH0.tar.gz) = 62962 SHA256 (electron/EngFlow-reclient-configs-955335c30a752e9ef7bff375baab5e0819b6c00d_GH0.tar.gz) = c148f76220fc41a89ffeaf370c2cc175577be184688b12aa6fec5f8ac6c714c4 SIZE (electron/EngFlow-reclient-configs-955335c30a752e9ef7bff375baab5e0819b6c00d_GH0.tar.gz) = 13014 SHA256 (electron/evanw-esbuild-v0.27.1_GH0.tar.gz) = bcc3abdc911961ef04340714dc69ddc34af6d2e2c60a1c4036d1c7f1a3fc4a23 SIZE (electron/evanw-esbuild-v0.27.1_GH0.tar.gz) = 1978868 diff --git a/devel/electron40/files/packagejsons/package.json b/devel/electron40/files/packagejsons/package.json index 349a12d9316a..114a94f3b7dc 100644 --- a/devel/electron40/files/packagejsons/package.json +++ b/devel/electron40/files/packagejsons/package.json @@ -1,156 +1,156 @@ { "name": "@electron-ci/dev-root", "version": "0.0.0-development", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { "@azure/storage-blob": "^12.28.0", "@datadog/datadog-ci": "^4.1.2", "@electron/asar": "^3.2.13", "@electron/docs-parser": "^2.0.0", "@electron/fiddle-core": "^1.3.4", "@electron/github-app-auth": "^3.2.0", "@electron/lint-roller": "^3.2.0", "@electron/typescript-definitions": "^9.1.5", "@octokit/rest": "^20.1.2", "@primer/octicons": "^10.0.0", "@types/minimist": "^1.2.5", "@types/node": "^24.9.0", "@types/semver": "^7.5.8", "@types/stream-json": "^1.7.8", "@types/temp": "^0.9.4", "@typescript-eslint/eslint-plugin": "^8.32.1", "@typescript-eslint/parser": "^8.7.0", "@xmldom/xmldom": "^0.8.11", "buffer": "^6.0.3", "chalk": "^4.1.0", "check-for-leaks": "^1.2.1", "eslint": "^8.57.1", "eslint-config-standard": "^17.1.0", "eslint-plugin-import": "^2.32.0", "eslint-plugin-markdown": "^5.1.0", "eslint-plugin-mocha": "^10.5.0", "eslint-plugin-n": "^16.6.2", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^6.6.0", "events": "^3.2.0", "folder-hash": "^4.1.1", "got": "^11.8.5", "husky": "^9.1.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", "remark-cli": "^12.0.1", "remark-preset-lint-markdown-style-guide": "^6.0.1", "semver": "^7.6.3", "stream-json": "^1.9.1", "tap-xunit": "^2.4.1", "temp": "^0.9.4", "timers-browserify": "1.4.2", "ts-loader": "^8.0.2", "ts-node": "6.2.0", "typescript": "^5.8.3", "url": "^0.11.4", "webpack": "^5.95.0", "webpack-cli": "^6.0.1", "wrapper-webpack-plugin": "^2.2.0", "yaml": "^2.8.1" }, "private": true, "scripts": { "asar": "asar", "generate-version-json": "node script/generate-version-json.js", "lint": "node ./script/lint.js && npm run lint:docs", "lint:js": "node ./script/lint.js --js", "lint:clang-format": "python3 script/run-clang-format.py -r -c shell/ || (echo \"\\nCode not formatted correctly.\" && exit 1)", "lint:clang-tidy": "ts-node ./script/run-clang-tidy.ts", "lint:cpp": "node ./script/lint.js --cc", "lint:objc": "node ./script/lint.js --objc", "lint:py": "node ./script/lint.js --py", "lint:gn": "node ./script/lint.js --gn", "lint:docs": "remark docs -qf && npm run lint:js-in-markdown && npm run create-typescript-definitions && npm run lint:ts-check-js-in-markdown && npm run lint:docs-fiddles && npm run lint:docs-relative-links && npm run lint:markdown && npm run lint:api-history", "lint:docs-fiddles": "standard \"docs/fiddles/**/*.js\"", - "lint:docs-relative-links": "lint-roller-markdown-links --root docs \"**/*.md\"", + "lint:docs-relative-links": "lint-roller-markdown-links --resource-root . --root docs \"**/*.md\"", "lint:markdown": "node ./script/lint.js --md", "lint:ts-check-js-in-markdown": "lint-roller-markdown-ts-check --root docs \"**/*.md\" --ignore \"breaking-changes.md\"", "lint:js-in-markdown": "lint-roller-markdown-standard --root docs \"**/*.md\"", "lint:api-history": "lint-roller-markdown-api-history --root \"./docs/api/\" --schema \"./docs/api-history.schema.json\" --breaking-changes-file \"./docs/breaking-changes.md\" --check-placement --check-strings \"*.md\"", "create-api-json": "node script/create-api-json.mjs", "create-typescript-definitions": "npm run create-api-json && electron-typescript-definitions --api=electron-api.json && node spec/ts-smoke/runner.js", "gn-typescript-definitions": "npm run create-typescript-definitions && node script/cp.mjs electron.d.ts", "pre-flight": "pre-flight", "gn-check": "node ./script/gn-check.js", "gn-format": "python3 script/run-gn-format.py", "precommit": "lint-staged", "preinstall": "node -e 'process.exit(0)'", "pretest": "npm run create-typescript-definitions", "prepack": "check-for-leaks", "repl": "node ./script/start.js --interactive", "start": "node ./script/start.js", "test": "node ./script/spec-runner.js", "tsc": "tsc", "webpack": "webpack" }, "license": "MIT", "author": "Electron Community", "keywords": [ "electron" ], "lint-staged": { "*.{js,ts}": [ "node script/lint.js --js --fix --only --" ], "*.{js,ts,d.ts}": [ "ts-node script/gen-filenames.ts" ], "*.{cc,mm,c,h}": [ "python3 script/run-clang-format.py -r -c --fix" ], "*.md": [ "npm run lint:docs" ], "*.{gn,gni}": [ "npm run gn-check", "npm run gn-format" ], "*.py": [ "node script/lint.js --py --fix --only --" ], "docs/api/**/*.md": [ "ts-node script/gen-filenames.ts", "markdownlint-cli2 --config .autofix.markdownlint-cli2.jsonc --fix", "git add filenames.auto.gni" ], "{*.patch,.patches}": [ "node script/lint.js --patches --only --", "ts-node script/check-patch-diff.ts" ], "DEPS": [ "node script/gen-hunspell-filenames.js", "node script/gen-libc++-filenames.js" ], ".github/workflows/pipeline-segment-electron-build.yml": [ "node script/copy-pipeline-segment-publish.js", "git add .github/workflows/pipeline-segment-electron-publish.yml" ] }, "resolutions": { "dbus-native/xml2js": "0.5.0", "abstract-socket": "github:deepak1556/node-abstractsocket#928cc591decd12aff7dad96449da8afc29832c19", "minimist@npm:~0.0.1": "0.2.4" }, "packageManager": "yarn@4.12.0", "workspaces": [ "spec", "spec/fixtures/native-addon/*" ], "dependenciesMeta": { "abstract-socket": { "built": true } } } diff --git a/devel/electron40/files/patch-chrome_common_chrome__features.cc b/devel/electron40/files/patch-chrome_common_chrome__features.cc index e1293a1d4cc1..3e3280ebeccf 100644 --- a/devel/electron40/files/patch-chrome_common_chrome__features.cc +++ b/devel/electron40/files/patch-chrome_common_chrome__features.cc @@ -1,56 +1,56 @@ ---- chrome/common/chrome_features.cc.orig 2026-02-09 21:25:07 UTC +--- chrome/common/chrome_features.cc.orig 2026-02-17 15:36:26 UTC +++ chrome/common/chrome_features.cc @@ -90,7 +90,7 @@ BASE_FEATURE(kUseKeychainKeyProvider, base::FEATURE_EN #endif // BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Enables or disables the Autofill survey triggered by opening a prompt to // save address info. BASE_FEATURE(kAutofillAddressSurvey, base::FEATURE_DISABLED_BY_DEFAULT); @@ -211,7 +211,7 @@ BASE_FEATURE(kDesktopPWAsRunOnOsLogin, // Enables or disables Desktop PWAs to be auto-started on OS login. BASE_FEATURE(kDesktopPWAsRunOnOsLogin, #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT @@ -248,7 +248,7 @@ BASE_FEATURE(kShowResetProfileBannerV2, base::FEATURE_ // Enables the new reset banner on the settings page. BASE_FEATURE(kShowResetProfileBannerV2, base::FEATURE_ENABLED_BY_DEFAULT); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Controls whether Chrome Apps are supported. See https://crbug.com/1221251. // If the feature is disabled, Chrome Apps continue to work. If enabled, Chrome // Apps will not launch and will be marked in the UI as deprecated. -@@ -782,7 +782,7 @@ BASE_FEATURE(kGlicGuestContentsVisibilityState, +@@ -785,7 +785,7 @@ BASE_FEATURE(kGlicGuestContentsVisibilityState, // Killswitch that controls whether the guest WebContents visibility state is // set to hidden when the Glic panel is warming. BASE_FEATURE(kGlicGuestContentsVisibilityState, -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT); #else base::FEATURE_DISABLED_BY_DEFAULT); -@@ -1326,7 +1326,7 @@ BASE_FEATURE(kKAnonymityServiceStorage, base::FEATURE_ +@@ -1329,7 +1329,7 @@ BASE_FEATURE(kKAnonymityServiceStorage, base::FEATURE_ // public keys. BASE_FEATURE(kKAnonymityServiceStorage, base::FEATURE_ENABLED_BY_DEFAULT); -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS) BASE_FEATURE(kLinuxLowMemoryMonitor, base::FEATURE_DISABLED_BY_DEFAULT); // Values taken from the low-memory-monitor documentation and also apply to the // portal API: -@@ -1337,7 +1337,7 @@ constexpr base::FeatureParam kLinuxLowMemoryMonit +@@ -1340,7 +1340,7 @@ constexpr base::FeatureParam kLinuxLowMemoryMonit &kLinuxLowMemoryMonitor, "critical_level", 255}; #endif // BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) BASE_FEATURE(kListWebAppsSwitch, base::FEATURE_DISABLED_BY_DEFAULT); #endif diff --git a/devel/electron40/files/patch-chrome_common_chrome__features.h b/devel/electron40/files/patch-chrome_common_chrome__features.h index 762911d4cd2a..ca8cc0f73bb8 100644 --- a/devel/electron40/files/patch-chrome_common_chrome__features.h +++ b/devel/electron40/files/patch-chrome_common_chrome__features.h @@ -1,38 +1,38 @@ ---- chrome/common/chrome_features.h.orig 2026-02-09 21:25:07 UTC +--- chrome/common/chrome_features.h.orig 2026-02-17 15:36:26 UTC +++ chrome/common/chrome_features.h @@ -85,7 +85,7 @@ BASE_DECLARE_FEATURE(kUseKeychainKeyProvider); #endif // BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAutofillAddressSurvey); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAutofillCardSurvey); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAutofillPasswordSurvey); @@ -173,7 +173,7 @@ BASE_DECLARE_FEATURE(kShowResetProfileBannerV2); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kShowResetProfileBannerV2); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kChromeAppsDeprecation); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kShortcutsNotApps); -@@ -973,7 +973,7 @@ BASE_DECLARE_FEATURE(kKAnonymityServiceStorage); +@@ -976,7 +976,7 @@ BASE_DECLARE_FEATURE(kKAnonymityServiceStorage); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kKAnonymityServiceStorage); -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kLinuxLowMemoryMonitor); COMPONENT_EXPORT(CHROME_FEATURES) extern const base::FeatureParam kLinuxLowMemoryMonitorModerateLevel; -@@ -981,7 +981,7 @@ extern const base::FeatureParam kLinuxLowMemoryMo +@@ -984,7 +984,7 @@ extern const base::FeatureParam kLinuxLowMemoryMo extern const base::FeatureParam kLinuxLowMemoryMonitorCriticalLevel; #endif // BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kListWebAppsSwitch); #endif diff --git a/devel/electron40/files/patch-electron_spec_api-browser-window-spec.ts b/devel/electron40/files/patch-electron_spec_api-browser-window-spec.ts index c74b14c0c005..2e0db8ec58cb 100644 --- a/devel/electron40/files/patch-electron_spec_api-browser-window-spec.ts +++ b/devel/electron40/files/patch-electron_spec_api-browser-window-spec.ts @@ -1,182 +1,200 @@ ---- electron/spec/api-browser-window-spec.ts.orig 2025-11-13 22:50:46 UTC +--- electron/spec/api-browser-window-spec.ts.orig 2026-02-24 02:09:51 UTC +++ electron/spec/api-browser-window-spec.ts @@ -69,7 +69,7 @@ describe('BrowserWindow module', () => { }).not.to.throw(); }); - ifit(process.platform === 'linux')('does not crash when setting large window icons', async () => { + ifit(process.platform === 'linux' || process.platform === 'freebsd')('does not crash when setting large window icons', async () => { const appPath = path.join(fixtures, 'apps', 'xwindow-icon'); const appProcess = childProcess.spawn(process.execPath, [appPath]); await once(appProcess, 'exit'); @@ -326,7 +326,7 @@ describe('BrowserWindow module', () => { }); }); - ifdescribe(process.platform !== 'linux')('BrowserWindow.getContentProtection', () => { + ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')('BrowserWindow.getContentProtection', () => { afterEach(closeAllWindows); it('can set content protection', async () => { const w = new BrowserWindow({ show: false }); @@ -1197,7 +1197,7 @@ describe('BrowserWindow module', () => { describe('BrowserWindow.minimize()', () => { // TODO(codebytere): Enable for Linux once maximize/minimize events work in CI. - ifit(process.platform !== 'linux')('should not be visible when the window is minimized', async () => { + ifit(process.platform !== 'linux' && process.platform !== 'freebsd')('should not be visible when the window is minimized', async () => { const minimize = once(w, 'minimize'); w.minimize(); await minimize; @@ -1214,7 +1214,7 @@ describe('BrowserWindow module', () => { }); // TODO(dsanders11): Enable for Linux once CI plays nice with these kinds of tests - ifit(process.platform !== 'linux')('should not restore maximized windows', async () => { + ifit(process.platform !== 'linux' && process.platform !== 'freebsd')('should not restore maximized windows', async () => { const maximize = once(w, 'maximize'); const shown = once(w, 'show'); w.maximize(); @@ -1279,7 +1279,7 @@ describe('BrowserWindow module', () => { expect(w.isFocused()).to.equal(true); }); - ifit(process.platform !== 'linux')('acquires focus status from the other windows', async () => { + ifit(process.platform !== 'linux' && process.platform !== 'freebsd')('acquires focus status from the other windows', async () => { const w1 = new BrowserWindow({ show: false }); const w2 = new BrowserWindow({ show: false }); const w3 = new BrowserWindow({ show: false }); @@ -1381,7 +1381,7 @@ describe('BrowserWindow module', () => { expect(w.isFocused()).to.equal(false); }); - ifit(process.platform !== 'linux')('transfers focus status to the next window', async () => { + ifit(process.platform !== 'linux' && process.platform !== 'freebsd')('transfers focus status to the next window', async () => { const w1 = new BrowserWindow({ show: false }); const w2 = new BrowserWindow({ show: false }); const w3 = new BrowserWindow({ show: false }); @@ -1840,7 +1840,7 @@ describe('BrowserWindow module', () => { }); }); - ifdescribe(process.platform !== 'linux')('Maximized state', () => { + ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')('Maximized state', () => { it('checks normal bounds when maximized', async () => { const bounds = w.getBounds(); const maximize = once(w, 'maximize'); @@ -2050,7 +2050,7 @@ describe('BrowserWindow module', () => { }); }); - ifdescribe(process.platform !== 'linux')('Minimized state', () => { + ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')('Minimized state', () => { it('checks normal bounds when minimized', async () => { const bounds = w.getBounds(); const minimize = once(w, 'minimize'); @@ -3124,7 +3124,7 @@ describe('BrowserWindow module', () => { describe('BrowserWindow.setOpacity(opacity)', () => { afterEach(closeAllWindows); - ifdescribe(process.platform !== 'linux')(('Windows and Mac'), () => { + ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')(('Windows and Mac'), () => { it('make window with initial opacity', () => { const w = new BrowserWindow({ show: false, opacity: 0.5 }); expect(w.getOpacity()).to.equal(0.5); @@ -3150,7 +3150,7 @@ describe('BrowserWindow module', () => { }); }); - ifdescribe(process.platform === 'linux')(('Linux'), () => { + ifdescribe(process.platform === 'linux' || process.platform === 'freebsd')(('Linux'), () => { it('sets 1 regardless of parameter', () => { const w = new BrowserWindow({ show: false }); w.setOpacity(0); @@ -3361,7 +3361,7 @@ describe('BrowserWindow module', () => { expect(overlayRectPreMax.height).to.equal(size); // 'maximize' event is not emitted on Linux in CI. - if (process.platform !== 'linux' && !w.isMaximized()) { + if ((process.platform !== 'linux' && process.platform !== 'freebsd') && !w.isMaximized()) { const maximize = once(w, 'maximize'); w.show(); w.maximize(); @@ -3427,7 +3427,7 @@ describe('BrowserWindow module', () => { expect(preMaxHeight).to.equal(size); // 'maximize' event is not emitted on Linux in CI. - if (process.platform !== 'linux' && !w.isMaximized()) { + if ((process.platform !== 'linux' && process.platform !== 'freebsd') && !w.isMaximized()) { const maximize = once(w, 'maximize'); w.show(); w.maximize(); -@@ -4098,7 +4098,7 @@ describe('BrowserWindow module', () => { +@@ -4120,7 +4120,7 @@ describe('BrowserWindow module', () => { expect(test.nodeTimers).to.equal(true); expect(test.nodeUrl).to.equal(true); - if (process.platform === 'linux' && test.osSandbox) { + if ((process.platform === 'linux' || process.platform === 'freebsd') && test.osSandbox) { expect(test.creationTime).to.be.null('creation time'); expect(test.systemMemoryInfo).to.be.null('system memory info'); } else { -@@ -4603,7 +4603,7 @@ describe('BrowserWindow module', () => { +@@ -4625,7 +4625,7 @@ describe('BrowserWindow module', () => { }); }); - ifdescribe(process.platform !== 'linux')('max/minimize events', () => { + ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')('max/minimize events', () => { afterEach(closeAllWindows); it('emits an event when window is maximized', async () => { const w = new BrowserWindow({ show: false }); -@@ -4874,7 +4874,7 @@ describe('BrowserWindow module', () => { +@@ -4896,7 +4896,7 @@ describe('BrowserWindow module', () => { // TODO(zcbenz): // This test does not run on Linux CI. See: // https://github.com/electron/electron/issues/28699 - ifit(process.platform === 'linux' && !process.env.CI)('should bring a minimized maximized window back to maximized state', async () => { + ifit((process.platform === 'linux' || process.platform === 'freebsd') && !process.env.CI)('should bring a minimized maximized window back to maximized state', async () => { const w = new BrowserWindow({}); const maximize = once(w, 'maximize'); w.maximize(); -@@ -4891,7 +4891,7 @@ describe('BrowserWindow module', () => { +@@ -4911,7 +4911,7 @@ describe('BrowserWindow module', () => { + expect(w.isMaximized()).to.equal(true); + }); + +- ifit(process.platform !== 'linux')('should not break fullscreen state', async () => { ++ ifit(process.platform !== 'linux' && process.platform !== 'freebsd')('should not break fullscreen state', async () => { + const w = new BrowserWindow({ show: false }); + w.show(); + +@@ -4934,7 +4934,7 @@ describe('BrowserWindow module', () => { }); // TODO(dsanders11): Enable once maximize event works on Linux again on CI - ifdescribe(process.platform !== 'linux')('BrowserWindow.maximize()', () => { + ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')('BrowserWindow.maximize()', () => { afterEach(closeAllWindows); it('should show the window if it is not currently shown', async () => { const w = new BrowserWindow({ show: false }); -@@ -4928,7 +4928,7 @@ describe('BrowserWindow module', () => { +@@ -4971,7 +4971,7 @@ describe('BrowserWindow module', () => { // TODO(dsanders11): Enable once minimize event works on Linux again. // See https://github.com/electron/electron/issues/28699 - ifit(process.platform !== 'linux')('should not restore a minimized window', async () => { + ifit(process.platform !== 'linux' && process.platform !== 'freebsd')('should not restore a minimized window', async () => { const w = new BrowserWindow(); const minimize = once(w, 'minimize'); w.minimize(); -@@ -5414,7 +5414,7 @@ describe('BrowserWindow module', () => { +@@ -5457,7 +5457,7 @@ describe('BrowserWindow module', () => { }); // On Linux there is no "resizable" property of a window. - ifit(process.platform !== 'linux')('does affect maximizability when disabled and enabled', () => { + ifit(process.platform !== 'linux' && process.platform !== 'freebsd')('does affect maximizability when disabled and enabled', () => { const w = new BrowserWindow({ show: false }); expect(w.resizable).to.be.true('resizable'); -@@ -5654,7 +5654,7 @@ describe('BrowserWindow module', () => { +@@ -5697,7 +5697,7 @@ describe('BrowserWindow module', () => { }); }); - ifdescribe(process.platform !== 'linux')('window states (excluding Linux)', () => { + ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')('window states (excluding Linux)', () => { // Not implemented on Linux. afterEach(closeAllWindows); -@@ -6825,7 +6825,7 @@ describe('BrowserWindow module', () => { +@@ -5931,7 +5931,7 @@ describe('BrowserWindow module', () => { + }); + }); + +- ifdescribe(process.platform === 'linux')('menu bar AltGr behavior', () => { ++ ifdescribe(process.platform === 'linux' || process.platform === 'freebsd')('menu bar AltGr behavior', () => { + it('does not toggle auto-hide menu bar visibility', async () => { + const w = new BrowserWindow({ show: false, autoHideMenuBar: true }); + w.setMenuBarVisibility(false); +@@ -6885,7 +6885,7 @@ describe('BrowserWindow module', () => { describe('"transparent" option', () => { afterEach(closeAllWindows); - ifit(process.platform !== 'linux')('correctly returns isMaximized() when the window is maximized then minimized', async () => { + ifit(process.platform !== 'linux' && process.platform !== 'freebsd')('correctly returns isMaximized() when the window is maximized then minimized', async () => { const w = new BrowserWindow({ frame: false, transparent: true