diff --git a/devel/electron38/Makefile b/devel/electron38/Makefile index 6f8eace6a112..bb31e1ea2998 100644 --- a/devel/electron38/Makefile +++ b/devel/electron38/Makefile @@ -1,463 +1,462 @@ PORTNAME= electron DISTVERSIONPREFIX= v DISTVERSION= ${ELECTRON_VER} -PORTREVISION= 1 PULSEMV= 16 PULSEV= ${PULSEMV}.1 CATEGORIES= devel MASTER_SITES= https://github.com/tagattie/FreeBSD-Electron/releases/download/v38.5.0/: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 \ electron-yarn-cache-${ELECTRON_VER}${EXTRACT_SUFX}:prefetch 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= 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 \ 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 \ libicuuc.so:devel/icu \ 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} \ npm${NODEJS_SUFFIX}>0:www/npm${NODEJS_SUFFIX} 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 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 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 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_BUILD_DEPENDS= esbuild:devel/esbuild 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_LIB_DEPENDS= libkrb5.so.26:security/heimdal 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_LIB_DEPENDS= libkrb5.so.3:security/krb5 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= 140.0.7339.249 # See ${WRKSRC}/electron/DEPS for NODE_VER NODE_VER= 22.21.1 # See ${WRKSRC}/electron/DEPS for NAN_VER NAN_VER= e14bdcd1f72d62bca1d541b66da43130384ec213 # 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 YARN_TIMESTAMP= 61171200 .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= 20 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}" 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. @${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 # 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} # ${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.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/rust/rust_bindgen.gni \ ${WRKSRC}/build/rust/rust_bindgen_generator.gni do-configure: # 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 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: # 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 .include diff --git a/devel/electron38/Makefile.version b/devel/electron38/Makefile.version index 4752993fe343..bfffa322cf7e 100644 --- a/devel/electron38/Makefile.version +++ b/devel/electron38/Makefile.version @@ -1,2 +1,2 @@ -ELECTRON_VER= 38.6.0 +ELECTRON_VER= 38.7.0 ELECTRON_VER_MAJOR= ${ELECTRON_VER:C/\..*//} diff --git a/devel/electron38/distinfo b/devel/electron38/distinfo index 1dabe699c5cc..2616864b7e35 100644 --- a/devel/electron38/distinfo +++ b/devel/electron38/distinfo @@ -1,25 +1,25 @@ -TIMESTAMP = 1762582453 +TIMESTAMP = 1763104920 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 SIZE (electron/chromium-140.0.7339.249.tar.xz.1) = 2000000000 SHA256 (electron/chromium-140.0.7339.249.tar.xz.2) = 0a2a9977f5f34ac878b63e845ef8fcc52da628d952e83565cb308bc1925f69e8 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.6.0.tar.xz) = 7ed6fedc372c5bd23b38ed252c12ace0f0fbce096b5442add4501a965282eb04 -SIZE (electron/electron-yarn-cache-38.6.0.tar.xz) = 30044356 -SHA256 (electron/electron-electron-v38.6.0_GH0.tar.gz) = 49a77f3bb00c498ee2c456e126955cf17af5bd95d990de3b36d66b200f9b2b55 -SIZE (electron/electron-electron-v38.6.0_GH0.tar.gz) = 15867868 +SHA256 (electron/electron-yarn-cache-38.7.0.tar.xz) = 7ed6fedc372c5bd23b38ed252c12ace0f0fbce096b5442add4501a965282eb04 +SIZE (electron/electron-yarn-cache-38.7.0.tar.xz) = 30044356 +SHA256 (electron/electron-electron-v38.7.0_GH0.tar.gz) = cbfad53983c89458299fab543308c6866bf2502df43dce1904267f724085c749 +SIZE (electron/electron-electron-v38.7.0_GH0.tar.gz) = 15882611 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 SIZE (electron/nodejs-nan-e14bdcd1f72d62bca1d541b66da43130384ec213_GH0.tar.gz) = 180646 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 diff --git a/devel/electron38/files/patch-electron_shell_browser_api_electron__api__app.cc b/devel/electron38/files/patch-electron_shell_browser_api_electron__api__app.cc index 7779829716a3..d529620a1e00 100644 --- a/devel/electron38/files/patch-electron_shell_browser_api_electron__api__app.cc +++ b/devel/electron38/files/patch-electron_shell_browser_api_electron__api__app.cc @@ -1,74 +1,74 @@ ---- electron/shell/browser/api/electron_api_app.cc.orig 2025-10-28 14:56:59 UTC +--- electron/shell/browser/api/electron_api_app.cc.orig 2025-11-13 22:57:06 UTC +++ electron/shell/browser/api/electron_api_app.cc @@ -97,7 +97,7 @@ #include "shell/common/process_util.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/nix/scoped_xdg_activation_token_injector.h" #include "base/nix/xdg_util.h" #endif @@ -424,7 +424,7 @@ bool NotificationCallbackWrapper( base::CommandLine cmd, const base::FilePath& cwd, const std::vector additional_data) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Set the global activation token sent as a command line switch by another // electron app instance. This also removes the switch after use to prevent // any side effects of leaving it in the command line after this point. @@ -611,7 +611,7 @@ void App::OnFinishLaunching(base::Value::Dict launch_i } void App::OnFinishLaunching(base::Value::Dict launch_info) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Set the application name for audio streams shown in external // applications. Only affects pulseaudio currently. media::AudioManager::SetGlobalAppName(Browser::Get()->GetName()); @@ -954,7 +954,7 @@ void App::SetDesktopName(const std::string& desktop_na } void App::SetDesktopName(const std::string& desktop_name) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto env = base::Environment::Create(); env->SetVar("CHROME_DESKTOP", desktop_name); #endif @@ -1058,7 +1058,7 @@ bool App::RequestSingleInstanceLock(gin::Arguments* ar base::BindRepeating(NotificationCallbackWrapper, cb)); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Read the xdg-activation token and set it in the command line for the // duration of the notification in order to ensure this is propagated to an // already running electron app instance if it exists. -@@ -1435,7 +1435,7 @@ std::vector App::GetAppMetrics +@@ -1446,7 +1446,7 @@ std::vector App::GetAppMetrics pid_dict.Set("name", process_metric.second->name); } -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) auto memory_info = process_metric.second->GetMemoryInfo(); auto memory_dict = gin_helper::Dictionary::CreateEmpty(isolate); -@@ -1819,7 +1819,7 @@ gin::ObjectTemplateBuilder App::GetObjectTemplateBuild +@@ -1830,7 +1830,7 @@ gin::ObjectTemplateBuilder App::GetObjectTemplateBuild .SetMethod( "removeAsDefaultProtocolClient", base::BindRepeating(&Browser::RemoveAsDefaultProtocolClient, browser)) -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) .SetMethod( "getApplicationInfoForProtocol", base::BindRepeating(&Browser::GetApplicationInfoForProtocol, browser)) -@@ -1877,7 +1877,7 @@ gin::ObjectTemplateBuilder App::GetObjectTemplateBuild +@@ -1888,7 +1888,7 @@ gin::ObjectTemplateBuilder App::GetObjectTemplateBuild .SetMethod("getJumpListSettings", &App::GetJumpListSettings) .SetMethod("setJumpList", &App::SetJumpList) #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) .SetMethod("isUnityRunning", base::BindRepeating(&Browser::IsUnityRunning, browser)) #endif diff --git a/devel/electron38/files/patch-electron_shell_browser_api_electron__api__base__window.cc b/devel/electron38/files/patch-electron_shell_browser_api_electron__api__base__window.cc index 573b62a17559..6b34087432bc 100644 --- a/devel/electron38/files/patch-electron_shell_browser_api_electron__api__base__window.cc +++ b/devel/electron38/files/patch-electron_shell_browser_api_electron__api__base__window.cc @@ -1,38 +1,38 @@ ---- electron/shell/browser/api/electron_api_base_window.cc.orig 2025-09-02 20:56:04 UTC +--- electron/shell/browser/api/electron_api_base_window.cc.orig 2025-11-13 22:57:06 UTC +++ electron/shell/browser/api/electron_api_base_window.cc -@@ -42,7 +42,7 @@ +@@ -43,7 +43,7 @@ #include "shell/browser/ui/views/win_frame_view.h" #include "shell/browser/ui/win/taskbar_host.h" #include "ui/base/win/shell.h" -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "shell/browser/ui/views/opaque_frame_view.h" #endif -@@ -1030,7 +1030,7 @@ void BaseWindow::SetIconImpl(v8::Isolate* isolate, +@@ -1031,7 +1031,7 @@ void BaseWindow::SetIconImpl(v8::Isolate* isolate, static_cast(window_.get()) ->SetIcon(native_image->GetHICON(GetSystemMetrics(SM_CXSMICON)), native_image->GetHICON(GetSystemMetrics(SM_CXICON))); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) static_cast(window_.get()) ->SetIcon(native_image->image().AsImageSkia()); #endif -@@ -1118,7 +1118,7 @@ v8::Local BaseWindow::GetAccentColor() cons +@@ -1123,7 +1123,7 @@ v8::Local BaseWindow::GetAccentColor() cons } #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void BaseWindow::SetTitleBarOverlay(const gin_helper::Dictionary& options, gin_helper::Arguments* args) { static_cast(window_.get()) -@@ -1315,7 +1315,7 @@ void BaseWindow::BuildPrototype(v8::Isolate* isolate, +@@ -1320,7 +1320,7 @@ void BaseWindow::BuildPrototype(v8::Isolate* isolate, .SetMethod("setThumbnailToolTip", &BaseWindow::SetThumbnailToolTip) .SetMethod("setAppDetails", &BaseWindow::SetAppDetails) #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) .SetMethod("setTitleBarOverlay", &BaseWindow::SetTitleBarOverlay) #endif .SetProperty("id", &BaseWindow::GetID); diff --git a/devel/electron38/files/patch-electron_shell_browser_native__window.cc b/devel/electron38/files/patch-electron_shell_browser_native__window.cc index c831d05393b9..bcc768f02930 100644 --- a/devel/electron38/files/patch-electron_shell_browser_native__window.cc +++ b/devel/electron38/files/patch-electron_shell_browser_native__window.cc @@ -1,11 +1,11 @@ ---- electron/shell/browser/native_window.cc.orig 2025-09-02 20:56:04 UTC +--- electron/shell/browser/native_window.cc.orig 2025-11-13 22:57:06 UTC +++ electron/shell/browser/native_window.cc -@@ -184,7 +184,7 @@ void NativeWindow::InitFromOptions(const gin_helper::D +@@ -185,7 +185,7 @@ void NativeWindow::InitFromOptions(const gin_helper::D } else { SetSizeConstraints(size_constraints); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (bool val; options.Get(options::kClosable, &val)) SetClosable(val); #endif diff --git a/devel/electron38/files/patch-electron_shell_browser_ui_inspectable__web__contents.cc b/devel/electron38/files/patch-electron_shell_browser_ui_inspectable__web__contents.cc index abd8c6af7036..21396edfbf9b 100644 --- a/devel/electron38/files/patch-electron_shell_browser_ui_inspectable__web__contents.cc +++ b/devel/electron38/files/patch-electron_shell_browser_ui_inspectable__web__contents.cc @@ -1,11 +1,11 @@ ---- electron/shell/browser/ui/inspectable_web_contents.cc.orig 2025-07-02 15:59:39 UTC +--- electron/shell/browser/ui/inspectable_web_contents.cc.orig 2025-11-13 22:57:06 UTC +++ electron/shell/browser/ui/inspectable_web_contents.cc -@@ -548,7 +548,7 @@ void InspectableWebContents::LoadCompleted() { +@@ -554,7 +554,7 @@ void InspectableWebContents::LoadCompleted() { prefs.FindString("currentDockState"); base::RemoveChars(*current_dock_state, "\"", &dock_state_); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto* api_web_contents = api::WebContents::From(GetWebContents()); if (api_web_contents) { auto* win = diff --git a/devel/electron38/files/patch-electron_shell_browser_ui_inspectable__web__contents__view.cc b/devel/electron38/files/patch-electron_shell_browser_ui_inspectable__web__contents__view.cc index 080d256f9b7a..2c9b2e4fd663 100644 --- a/devel/electron38/files/patch-electron_shell_browser_ui_inspectable__web__contents__view.cc +++ b/devel/electron38/files/patch-electron_shell_browser_ui_inspectable__web__contents__view.cc @@ -1,11 +1,11 @@ ---- electron/shell/browser/ui/inspectable_web_contents_view.cc.orig 2025-09-02 20:56:04 UTC +--- electron/shell/browser/ui/inspectable_web_contents_view.cc.orig 2025-11-13 22:57:06 UTC +++ electron/shell/browser/ui/inspectable_web_contents_view.cc -@@ -181,7 +181,7 @@ void InspectableWebContentsView::SetIsDocked(bool dock +@@ -198,7 +198,7 @@ void InspectableWebContentsView::SetIsDocked(bool dock params.delegate = devtools_window_delegate_; params.bounds = inspectable_web_contents()->dev_tools_bounds(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) params.wm_role_name = "devtools"; if (GetDelegate()) GetDelegate()->GetDevToolsWindowWMClass(¶ms.wm_class_name, diff --git a/devel/electron38/files/patch-electron_shell_browser_ui_views_electron__views__delegate.cc b/devel/electron38/files/patch-electron_shell_browser_ui_views_electron__views__delegate.cc index 4f577ac81310..2adda32d82ef 100644 --- a/devel/electron38/files/patch-electron_shell_browser_ui_views_electron__views__delegate.cc +++ b/devel/electron38/files/patch-electron_shell_browser_ui_views_electron__views__delegate.cc @@ -1,38 +1,38 @@ ---- electron/shell/browser/ui/views/electron_views_delegate.cc.orig 2025-01-29 20:10:57 UTC +--- electron/shell/browser/ui/views/electron_views_delegate.cc.orig 2025-11-13 22:57:06 UTC +++ electron/shell/browser/ui/views/electron_views_delegate.cc -@@ -9,7 +9,7 @@ - #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" +@@ -10,7 +10,7 @@ #include "ui/views/widget/native_widget_aura.h" + #include "ui/views/window/default_frame_view.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/environment.h" #include "base/nix/xdg_util.h" #include "ui/linux/linux_ui.h" -@@ -17,7 +17,7 @@ namespace { +@@ -18,7 +18,7 @@ namespace { namespace { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool IsDesktopEnvironmentUnity() { auto env = base::Environment::Create(); base::nix::DesktopEnvironment desktop_env = -@@ -54,7 +54,7 @@ void ViewsDelegate::NotifyMenuItemFocused(const std::u +@@ -55,7 +55,7 @@ void ViewsDelegate::NotifyMenuItemFocused(const std::u int item_count, bool has_submenu) {} -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD) gfx::ImageSkia* ViewsDelegate::GetDefaultWindowIcon() const { return nullptr; } -@@ -82,7 +82,7 @@ bool ViewsDelegate::WindowManagerProvidesTitleBar(bool +@@ -83,7 +83,7 @@ bool ViewsDelegate::WindowManagerProvidesTitleBar(bool } bool ViewsDelegate::WindowManagerProvidesTitleBar(bool maximized) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On Ubuntu Unity, the system always provides a title bar for maximized // windows. if (!maximized) diff --git a/devel/electron38/files/patch-electron_spec_api-app-spec.ts b/devel/electron38/files/patch-electron_spec_api-app-spec.ts index 2d68e21081b7..b929d969aa83 100644 --- a/devel/electron38/files/patch-electron_spec_api-app-spec.ts +++ b/devel/electron38/files/patch-electron_spec_api-app-spec.ts @@ -1,133 +1,133 @@ ---- electron/spec/api-app-spec.ts.orig 2025-10-28 14:56:59 UTC +--- electron/spec/api-app-spec.ts.orig 2025-11-13 22:57:06 UTC +++ electron/spec/api-app-spec.ts @@ -129,11 +129,11 @@ describe('app module', () => { }); describe('app.getPreferredSystemLanguages()', () => { - ifit(process.platform !== 'linux')('should not be empty', () => { + ifit(process.platform !== 'linux' && process.platform !== 'freebsd')('should not be empty', () => { expect(app.getPreferredSystemLanguages().length).to.not.equal(0); }); - ifit(process.platform === 'linux')('should be empty or contain C entry', () => { + ifit(process.platform === 'linux' || process.platform === 'freebsd')('should be empty or contain C entry', () => { const languages = app.getPreferredSystemLanguages(); if (languages.length) { expect(languages).to.not.include('C'); -@@ -196,7 +196,7 @@ describe('app module', () => { +@@ -202,7 +202,7 @@ describe('app module', () => { expect(code).to.equal(123, 'exit code should be 123, if you see this please tag @MarshallOfSound'); }); - ifit(['darwin', 'linux'].includes(process.platform))('exits gracefully', async function () { + ifit(['darwin', 'linux', 'freebsd'].includes(process.platform))('exits gracefully', async function () { const electronPath = process.execPath; const appPath = path.join(fixturesPath, 'api', 'singleton'); appProcess = cp.spawn(electronPath, [appPath]); -@@ -360,7 +360,7 @@ describe('app module', () => { +@@ -366,7 +366,7 @@ describe('app module', () => { }); // GitHub Actions macOS-13 runners used for x64 seem to have a problem with this test. - ifdescribe(process.platform !== 'linux' && !isMacOSx64)('app.{add|get|clear}RecentDocument(s)', () => { + ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd' && !isMacOSx64)('app.{add|get|clear}RecentDocument(s)', () => { const tempFiles = [ path.join(fixturesPath, 'foo.txt'), path.join(fixturesPath, 'bar.txt'), -@@ -488,7 +488,7 @@ describe('app module', () => { +@@ -494,7 +494,7 @@ describe('app module', () => { // let w = null // before(function () { - // if (process.platform !== 'linux') { + // if (process.platform !== 'linux' && process.platform !== 'freebsd') { // this.skip() // } // }) -@@ -595,7 +595,7 @@ describe('app module', () => { +@@ -601,7 +601,7 @@ describe('app module', () => { describe('app.badgeCount', () => { const platformIsNotSupported = (process.platform === 'win32') || - (process.platform === 'linux' && !app.isUnityRunning()); + (process.platform === 'linux' && !app.isUnityRunning()) || (process.platform === 'freebsd'); const expectedBadgeCount = 42; -@@ -639,7 +639,7 @@ describe('app module', () => { +@@ -645,7 +645,7 @@ describe('app module', () => { }); }); - ifdescribe(process.platform !== 'linux' && !process.mas && (process.platform !== 'darwin' || process.arch === 'arm64'))('app.get/setLoginItemSettings API', function () { + ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd' && !process.mas && (process.platform !== 'darwin' || process.arch === 'arm64'))('app.get/setLoginItemSettings API', function () { const isMac = process.platform === 'darwin'; const isWin = process.platform === 'win32'; -@@ -1019,7 +1019,7 @@ describe('app module', () => { +@@ -1025,7 +1025,7 @@ describe('app module', () => { }); }); - ifdescribe(process.platform !== 'linux')('accessibility support functionality', () => { + ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')('accessibility support functionality', () => { it('is mutable', () => { const values = [false, true, false]; const setters: Array<(arg: boolean) => void> = [ -@@ -1288,7 +1288,7 @@ describe('app module', () => { +@@ -1294,7 +1294,7 @@ describe('app module', () => { }); }); - ifdescribe(process.platform !== 'linux')('select-client-certificate event', () => { + ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')('select-client-certificate event', () => { let w: BrowserWindow; before(function () { -@@ -1423,7 +1423,7 @@ describe('app module', () => { +@@ -1429,7 +1429,7 @@ describe('app module', () => { describe('getApplicationNameForProtocol()', () => { // TODO: Linux CI doesn't have registered http & https handlers - ifit(!(process.env.CI && process.platform === 'linux'))('returns application names for common protocols', function () { + ifit(!(process.env.CI && (process.platform === 'linux' || process.platform === 'freebsd')))('returns application names for common protocols', function () { // We can't expect particular app names here, but these protocols should // at least have _something_ registered. Except on our Linux CI // environment apparently. -@@ -1441,7 +1441,7 @@ describe('app module', () => { +@@ -1447,7 +1447,7 @@ describe('app module', () => { }); }); - ifdescribe(process.platform !== 'linux')('getApplicationInfoForProtocol()', () => { + ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')('getApplicationInfoForProtocol()', () => { it('returns promise rejection for a bogus protocol', async function () { await expect( app.getApplicationInfoForProtocol('bogus-protocol://') -@@ -1491,7 +1491,7 @@ describe('app module', () => { +@@ -1497,7 +1497,7 @@ describe('app module', () => { }); // FIXME Get these specs running on Linux CI - ifdescribe(process.platform !== 'linux')('getFileIcon() API', () => { + ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')('getFileIcon() API', () => { const iconPath = path.join(__dirname, 'fixtures/assets/icon.ico'); const sizes = { small: 16, -@@ -1573,7 +1573,7 @@ describe('app module', () => { +@@ -1579,7 +1579,7 @@ describe('app module', () => { expect(entry.memory).to.have.property('privateBytes').that.is.greaterThan(0); } - if (process.platform !== 'linux') { + if (process.platform !== 'linux' && process.platform !== 'freebsd') { expect(entry.sandboxed).to.be.a('boolean'); } -@@ -1647,7 +1647,7 @@ describe('app module', () => { +@@ -1653,7 +1653,7 @@ describe('app module', () => { it('succeeds with complete GPUInfo', async () => { const completeInfo = await getGPUInfo('complete'); - if (process.platform === 'linux') { + if (process.platform === 'linux' || process.platform === 'freebsd') { // For linux and macOS complete info is same as basic info await verifyBasicGPUInfo(completeInfo); const basicInfo = await getGPUInfo('basic'); -@@ -1671,7 +1671,7 @@ describe('app module', () => { +@@ -1677,7 +1677,7 @@ describe('app module', () => { }); }); - ifdescribe(!(process.platform === 'linux' && (process.arch === 'arm64' || process.arch === 'arm')))('sandbox options', () => { + ifdescribe(!((process.platform === 'linux' || process.platform === 'freebsd') && (process.arch === 'arm64' || process.arch === 'arm')))('sandbox options', () => { let appProcess: cp.ChildProcess = null as any; let server: net.Server = null as any; const socketPath = process.platform === 'win32' ? '\\\\.\\pipe\\electron-mixed-sandbox' : '/tmp/electron-mixed-sandbox'; diff --git a/devel/electron38/files/patch-electron_spec_api-browser-window-spec.ts b/devel/electron38/files/patch-electron_spec_api-browser-window-spec.ts index 1a400abf8c69..cbe6e31063e8 100644 --- a/devel/electron38/files/patch-electron_spec_api-browser-window-spec.ts +++ b/devel/electron38/files/patch-electron_spec_api-browser-window-spec.ts @@ -1,182 +1,182 @@ ---- electron/spec/api-browser-window-spec.ts.orig 2025-09-02 20:56:04 UTC +--- electron/spec/api-browser-window-spec.ts.orig 2025-11-13 22:57:06 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'); -@@ -3100,7 +3100,7 @@ describe('BrowserWindow module', () => { +@@ -3116,7 +3116,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); -@@ -3126,7 +3126,7 @@ describe('BrowserWindow module', () => { +@@ -3142,7 +3142,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); -@@ -3337,7 +3337,7 @@ describe('BrowserWindow module', () => { +@@ -3353,7 +3353,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(); -@@ -3403,7 +3403,7 @@ describe('BrowserWindow module', () => { +@@ -3419,7 +3419,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(); -@@ -4074,7 +4074,7 @@ describe('BrowserWindow module', () => { +@@ -4090,7 +4090,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 { -@@ -4579,7 +4579,7 @@ describe('BrowserWindow module', () => { +@@ -4595,7 +4595,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 }); -@@ -4850,7 +4850,7 @@ describe('BrowserWindow module', () => { +@@ -4866,7 +4866,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(); -@@ -4867,7 +4867,7 @@ describe('BrowserWindow module', () => { +@@ -4883,7 +4883,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 }); -@@ -4904,7 +4904,7 @@ describe('BrowserWindow module', () => { +@@ -4920,7 +4920,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(); -@@ -5390,7 +5390,7 @@ describe('BrowserWindow module', () => { +@@ -5406,7 +5406,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'); -@@ -5630,7 +5630,7 @@ describe('BrowserWindow module', () => { +@@ -5646,7 +5646,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); -@@ -6801,7 +6801,7 @@ describe('BrowserWindow module', () => { +@@ -6817,7 +6817,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 diff --git a/devel/electron38/files/patch-electron_spec_api-protocol-spec.ts b/devel/electron38/files/patch-electron_spec_api-protocol-spec.ts index 3195a7eabb74..75feeec7d07d 100644 --- a/devel/electron38/files/patch-electron_spec_api-protocol-spec.ts +++ b/devel/electron38/files/patch-electron_spec_api-protocol-spec.ts @@ -1,11 +1,11 @@ ---- electron/spec/api-protocol-spec.ts.orig 2024-11-07 16:14:43 UTC +--- electron/spec/api-protocol-spec.ts.orig 2025-11-13 22:57:06 UTC +++ electron/spec/api-protocol-spec.ts -@@ -1738,7 +1738,7 @@ describe('protocol module', () => { +@@ -1755,7 +1755,7 @@ describe('protocol module', () => { // TODO(nornagon): this test doesn't pass on Linux currently, investigate. // test is also flaky on CI on macOS so it is currently disabled there as well. - ifit(process.platform !== 'linux' && (!process.env.CI || process.platform !== 'darwin'))('is fast', async () => { + ifit((process.platform !== 'linux' && process.platform !== 'freebsd') && (!process.env.CI || process.platform !== 'darwin'))('is fast', async () => { // 128 MB of spaces. const chunk = new Uint8Array(128 * 1024 * 1024); chunk.fill(' '.charCodeAt(0)); diff --git a/devel/electron38/files/patch-electron_spec_api-web-contents-spec.ts b/devel/electron38/files/patch-electron_spec_api-web-contents-spec.ts index 001598b72527..e03f712f255b 100644 --- a/devel/electron38/files/patch-electron_spec_api-web-contents-spec.ts +++ b/devel/electron38/files/patch-electron_spec_api-web-contents-spec.ts @@ -1,11 +1,11 @@ ---- electron/spec/api-web-contents-spec.ts.orig 2025-08-13 14:21:20 UTC +--- electron/spec/api-web-contents-spec.ts.orig 2025-11-13 22:57:06 UTC +++ electron/spec/api-web-contents-spec.ts -@@ -2797,7 +2797,7 @@ describe('webContents module', () => { +@@ -2832,7 +2832,7 @@ describe('webContents module', () => { }); // TODO(codebytere): OOPIF printing is disabled on Linux at the moment due to crashes. - ifit(process.platform !== 'linux')('can print cross-origin iframes', async () => { + ifit(process.platform !== 'linux' && process.platform !== 'freebsd')('can print cross-origin iframes', async () => { server = http.createServer((_, res) => { res.writeHead(200); res.end(`