diff --git a/devel/electron31/Makefile b/devel/electron31/Makefile index a941fe8447c3..bef35a57c0b7 100644 --- a/devel/electron31/Makefile +++ b/devel/electron31/Makefile @@ -1,453 +1,452 @@ PORTNAME= electron DISTVERSIONPREFIX= v DISTVERSION= ${ELECTRON_VER:S/-beta./.b/} -PORTREVISION= 2 PULSEMV= 16 PULSEV= ${PULSEMV}.1 CATEGORIES= devel MASTER_SITES= https://github.com/tagattie/FreeBSD-Electron/releases/download/v31.4.0/:chromium \ https://commondatastorage.googleapis.com/chromium-nodejs/:chromium_node \ 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_NODE_MODULES_HASH}:chromium_node \ pulseaudio-${PULSEV}.tar.gz:pulseaudio \ electron-yarn-cache-${ELECTRON_VER}${EXTRACT_SUFX}:prefetch DIST_SUBDIR= ${PORTNAME} EXTRACT_ONLY= chromium-${CHROMIUM_VER}${EXTRACT_SUFX} \ ${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 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 \ 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 \ libasound.so:audio/alsa-lib \ libFLAC.so:audio/flac \ libopus.so:audio/opus \ libsndio.so:audio/sndio \ 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:20,build \ pkgconfig python:build,test shebangfix tar:xz xorg CPE_VENDOR= electronjs USE_GITHUB= yes GH_TAGNAME= ${DISTVERSIONPREFIX}${ELECTRON_VER} 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 gdkpixbuf2 gtk30 libxml2 libxslt pango USE_LDCONFIG= ${DATADIR} USE_XORG= x11 xcb xcomposite xcursor xdamage xext xfixes xi xrandr \ xrender xscrnsaver xtst 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} 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_log_error_not_reached=true \ enable_nacl=false \ enable_remoting=false \ fatal_linker_warnings=false \ icu_use_data_file=false \ is_clang=true \ 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_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${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/pulseaudio-${PULSEV}/src -DPA_MAJOR=${PULSEMV}" \ extra_ldflags="${LDFLAGS}" \ ffmpeg_branding="${FFMPEG_BRAND}" \ override_electron_version="${ELECTRON_VER}" # Audio backends GN_ARGS+= use_alsa=true \ use_pulseaudio=true \ use_sndio=true # 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 OPTIONS_EXCLUDE_aarch64=LTO 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 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_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 # See ${WRKSRC}/electron/DEPS for CHROMIUM_VER CHROMIUM_VER= 126.0.6478.234 # See ${WRKSRC}/third_party/node/node_modules.tar.gz.sha1 for CHROMIUM_NODE_MODULES_HASH CHROMIUM_NODE_MODULES_HASH= 97a0b3c4c39cf05de1eafb6ffdec0fddd643f0a2 # See ${WRKSRC}/electron/DEPS for NODE_VER -NODE_VER= 20.16.0 +NODE_VER= 20.17.0 # 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 .if ${COMPILER_VERSION} < 180 LLVM_DEFAULT= 18 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} .else BINARY_ALIAS+= ar=/usr/bin/llvm-ar \ nm=/usr/bin/llvm-nm .endif 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 RUSTC_VERSION!= rustc -V 2>/dev/null || true MAKE_ENV+= RUSTC_BOOTSTRAP=1 GN_ARGS+= enable_rust=true \ rust_sysroot_absolute="${LOCALBASE}" \ rustc_version="${RUSTC_VERSION}" 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 post-fetch: @if [ ! -f ${DISTDIR}/${DIST_SUBDIR}/chromium-${CHROMIUM_VER}${EXTRACT_SUFX} ]; then \ ${CAT} ${DISTDIR}/${DIST_SUBDIR}/chromium-${CHROMIUM_VER}${EXTRACT_SUFX}.? > \ ${DISTDIR}/${DIST_SUBDIR}/chromium-${CHROMIUM_VER}${EXTRACT_SUFX}; \ fi post-extract: # Move extracted sources to appropriate locations ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/chromium-${CHROMIUM_VER} ${WRKSRC} ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/${PORTNAME}-${ELECTRON_VER} ${WRKSRC}/electron ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/${GH_PROJECT_nan}-${NAN_VER} \ ${WRKSRC}/third_party/nan ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/${GH_PROJECT_node}-${NODE_VER} \ ${WRKSRC}/third_party/electron_node ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/${GH_PROJECT_squirrel_mac}-${SQUIRREL_MAC_VER} \ ${WRKSRC}/third_party/squirrel.mac ${MKDIR} ${WRKSRC}/third_party/squirrel.mac/vendor ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/${GH_PROJECT_reactiveobjc}-${REACTIVEOBJC_VER} \ ${WRKSRC}/third_party/squirrel.mac/vendor/ReactiveObjC ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/${GH_PROJECT_mantle}-${MANTLE_VER} \ ${WRKSRC}/third_party/squirrel.mac/vendor/Mantle ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/${GH_PROJECT_reclient_configs}-${ENGFLOW_RECLIENT_CONFIGS_VER} \ ${WRKSRC}/third_party/engflow-reclient-configs ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/node_modules ${WRKSRC}/third_party/node # Install node modules for electron ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/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 freetype harfbuzz-ng icu libdrm libevent \ 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 ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/pulseaudio-${PULSEV}/src/pulse/version.h 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}' # 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/electron31/Makefile.version b/devel/electron31/Makefile.version index 4d020001fbfe..1b7443641a2b 100644 --- a/devel/electron31/Makefile.version +++ b/devel/electron31/Makefile.version @@ -1,2 +1,2 @@ -ELECTRON_VER= 31.4.0 +ELECTRON_VER= 31.6.0 ELECTRON_VER_MAJOR= ${ELECTRON_VER:C/\..*//} diff --git a/devel/electron31/distinfo b/devel/electron31/distinfo index 24c44fb51eb8..7e7d45ba8fff 100644 --- a/devel/electron31/distinfo +++ b/devel/electron31/distinfo @@ -1,25 +1,25 @@ -TIMESTAMP = 1724068640 +TIMESTAMP = 1726142476 SHA256 (electron/chromium-126.0.6478.234.tar.xz.0) = 5940007a2cc926c0eac498ab5121727f903a60b87c7b5a5216921c4ee1028d07 SIZE (electron/chromium-126.0.6478.234.tar.xz.0) = 2000000000 SHA256 (electron/chromium-126.0.6478.234.tar.xz.1) = 977c9af967876a9a362038dea652c4be55a71a9758cb1c538bfc8a5a0ee27962 SIZE (electron/chromium-126.0.6478.234.tar.xz.1) = 303263696 SHA256 (electron/97a0b3c4c39cf05de1eafb6ffdec0fddd643f0a2) = dcfaea4d353d1df3d4ac2d245ea7e32ad177d4bea1351f363714c9c22ca5c4f8 SIZE (electron/97a0b3c4c39cf05de1eafb6ffdec0fddd643f0a2) = 9761601 SHA256 (electron/pulseaudio-16.1.tar.gz) = 027266c62f2a84422ac45fa721a649508f0f1628fb1fd9242315ac54ce2d7c92 SIZE (electron/pulseaudio-16.1.tar.gz) = 2763111 -SHA256 (electron/electron-yarn-cache-31.4.0.tar.xz) = 8b9a13b091dacb8b4f3ea7bb44826d7cf3062bc2700462d20a261da3d61ca189 -SIZE (electron/electron-yarn-cache-31.4.0.tar.xz) = 29172376 -SHA256 (electron/electron-electron-v31.4.0_GH0.tar.gz) = d98dcf735b2c9ad2a83b819ccc51b637b157102b7ff6216bb2e2fac87197a28e -SIZE (electron/electron-electron-v31.4.0_GH0.tar.gz) = 13823290 -SHA256 (electron/nodejs-node-v20.16.0_GH0.tar.gz) = d78104796225bcc150adf8ce4c486abfb390e1c71d0af7f28343803fe8588491 -SIZE (electron/nodejs-node-v20.16.0_GH0.tar.gz) = 115322530 +SHA256 (electron/electron-yarn-cache-31.6.0.tar.xz) = 8b9a13b091dacb8b4f3ea7bb44826d7cf3062bc2700462d20a261da3d61ca189 +SIZE (electron/electron-yarn-cache-31.6.0.tar.xz) = 29172376 +SHA256 (electron/electron-electron-v31.6.0_GH0.tar.gz) = 904579a00dc16bfe6fe92df532a46945c31074f1ed97f7ca6e930f7f6023ad22 +SIZE (electron/electron-electron-v31.6.0_GH0.tar.gz) = 13824822 +SHA256 (electron/nodejs-node-v20.17.0_GH0.tar.gz) = f0bdfe0e2c12524ebc24811e405926299241c11a829ef72562e14fee52eb385c +SIZE (electron/nodejs-node-v20.17.0_GH0.tar.gz) = 115353463 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/electron31/files/patch-electron_BUILD.gn b/devel/electron31/files/patch-electron_BUILD.gn index c503cc8dd259..46c5497afbf8 100644 --- a/devel/electron31/files/patch-electron_BUILD.gn +++ b/devel/electron31/files/patch-electron_BUILD.gn @@ -1,60 +1,60 @@ ---- electron/BUILD.gn.orig 2024-06-24 09:53:23 UTC +--- electron/BUILD.gn.orig 2024-09-11 03:18:31 UTC +++ electron/BUILD.gn @@ -523,7 +523,7 @@ source_set("electron_lib") { defines += [ "GDK_DISABLE_DEPRECATION_WARNINGS" ] } - if (!is_mas_build) { + if (!is_mas_build && !is_bsd) { deps += [ "//components/crash/core/app", "//components/crash/core/browser", @@ -616,6 +616,12 @@ source_set("electron_lib") { cflags_objcc = [ "-fobjc-weak" ] } } + if (is_bsd) { + sources -= [ + "shell/common/crash_keys.cc", + "shell/common/crash_keys.h", + ] + } if (is_linux) { libs = [ "xshmfence" ] deps += [ -@@ -1196,7 +1202,7 @@ if (is_mac) { +@@ -1197,7 +1203,7 @@ if (is_mac) { ":electron_lib", ":electron_win32_resources", ":packed_resources", - "//components/crash/core/app", + # "//components/crash/core/app", "//content:sandbox_helper_win", "//electron/buildflags", "//ui/strings", -@@ -1222,7 +1228,7 @@ if (is_mac) { +@@ -1223,7 +1229,7 @@ if (is_mac) { public_deps = [ "//tools/v8_context_snapshot:v8_context_snapshot" ] } - if (is_linux) { + if (is_linux && !is_bsd) { data_deps += [ "//components/crash/core/app:chrome_crashpad_handler" ] } -@@ -1289,7 +1295,7 @@ if (is_mac) { +@@ -1290,7 +1296,7 @@ if (is_mac) { configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ] } - if (is_linux) { + if (is_linux && !is_bsd) { deps += [ "//sandbox/linux:chrome_sandbox" ] } } -@@ -1397,7 +1403,7 @@ dist_zip("electron_dist_zip") { +@@ -1398,7 +1404,7 @@ dist_zip("electron_dist_zip") { ":electron_version_file", ":licenses", ] - if (is_linux) { + if (is_linux && !is_bsd) { data_deps += [ "//sandbox/linux:chrome_sandbox" ] } deps = data_deps diff --git a/devel/electron31/files/patch-electron_shell_app_electron__main__delegate.cc b/devel/electron31/files/patch-electron_shell_app_electron__main__delegate.cc index f078734cac0f..49967d25df80 100644 --- a/devel/electron31/files/patch-electron_shell_app_electron__main__delegate.cc +++ b/devel/electron31/files/patch-electron_shell_app_electron__main__delegate.cc @@ -1,54 +1,63 @@ ---- electron/shell/app/electron_main_delegate.cc.orig 2024-06-24 09:53:23 UTC +--- electron/shell/app/electron_main_delegate.cc.orig 2024-09-11 03:18:31 UTC +++ electron/shell/app/electron_main_delegate.cc @@ -59,13 +59,13 @@ #include "chrome/child/v8_crashpad_support_win.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/nix/xdg_util.h" #include "v8/include/v8-wasm-trap-handler-posix.h" #include "v8/include/v8.h" #endif -#if !IS_MAS_BUILD() +#if !IS_MAS_BUILD() && !BUILDFLAG(IS_BSD) #include "components/crash/core/app/crash_switches.h" // nogncheck #include "components/crash/core/app/crashpad.h" // nogncheck #include "components/crash/core/common/crash_key.h" @@ -157,7 +157,7 @@ bool ElectronPathProvider(int key, base::FilePath* res create_dir = true; break; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) case DIR_APP_DATA: { auto env = base::Environment::Create(); cur = base::nix::GetXDGDirectory( @@ -289,7 +289,7 @@ std::optional ElectronMainDelegate::BasicStartupC base::win::PinUser32(); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Check for --no-sandbox parameter when running as root. if (getuid() == 0 && IsSandboxEnabled(command_line)) LOG(FATAL) << "Running as root without --" @@ -339,7 +339,7 @@ void ElectronMainDelegate::PreSandboxStartup() { /* is_preinit = */ IsBrowserProcess() || IsZygoteProcess()); #endif -#if !IS_MAS_BUILD() +#if !IS_MAS_BUILD() && !BUILDFLAG(IS_BSD) crash_reporter::InitializeCrashKeys(); #endif @@ -374,7 +374,7 @@ void ElectronMainDelegate::PreSandboxStartup() { } #endif -#if !IS_MAS_BUILD() +#if !IS_MAS_BUILD() && !BUILDFLAG(IS_BSD) crash_keys::SetCrashKeysFromCommandLine(*command_line); crash_keys::SetPlatformCrashKey(); #endif +@@ -409,7 +409,7 @@ std::optional ElectronMainDelegate::PreBrowserMai + #if BUILDFLAG(IS_MAC) + RegisterAtomCrApp(); + #endif +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Set the global activation token sent as an environment variable. + auto env = base::Environment::Create(); + base::nix::ExtractXdgActivationTokenFromEnv(*env); diff --git a/devel/electron31/files/patch-electron_shell_app_node__main.cc b/devel/electron31/files/patch-electron_shell_app_node__main.cc index 887eeee21238..a9953764f23d 100644 --- a/devel/electron31/files/patch-electron_shell_app_node__main.cc +++ b/devel/electron31/files/patch-electron_shell_app_node__main.cc @@ -1,38 +1,37 @@ ---- electron/shell/app/node_main.cc.orig 2024-04-16 14:29:17 UTC +--- electron/shell/app/node_main.cc.orig 2024-09-11 03:18:31 UTC +++ electron/shell/app/node_main.cc @@ -48,7 +48,7 @@ #include "shell/common/mac/codesign_util.h" #endif -#if !IS_MAS_BUILD() +#if !IS_MAS_BUILD() && !BUILDFLAG(IS_BSD) #include "components/crash/core/app/crashpad.h" // nogncheck #include "shell/app/electron_crash_reporter_client.h" #include "shell/common/crash_keys.h" -@@ -99,7 +99,7 @@ bool UnsetHijackableEnvs(base::Environment* env) { +@@ -99,14 +99,14 @@ bool UnsetHijackableEnvs(base::Environment* env) { } #endif -#if IS_MAS_BUILD() +#if IS_MAS_BUILD() || BUILDFLAG(IS_BSD) void SetCrashKeyStub(const std::string& key, const std::string& value) {} void ClearCrashKeyStub(const std::string& key) {} #endif -@@ -110,7 +110,7 @@ v8::Local GetParameters(v8::Isolate* isolat v8::Local GetParameters(v8::Isolate* isolate) { std::map keys; -#if !IS_MAS_BUILD() +#if !IS_MAS_BUILD() && !BUILDFLAG(IS_BSD) electron::crash_keys::GetCrashKeys(&keys); #endif return gin::ConvertToV8(isolate, keys); @@ -271,7 +271,7 @@ int NodeMain(int argc, char* argv[]) { // Setup process.crashReporter in child node processes auto reporter = gin_helper::Dictionary::CreateEmpty(isolate); reporter.SetMethod("getParameters", &GetParameters); -#if IS_MAS_BUILD() +#if IS_MAS_BUILD() || BUILDFLAG(IS_BSD) reporter.SetMethod("addExtraParameter", &SetCrashKeyStub); reporter.SetMethod("removeExtraParameter", &ClearCrashKeyStub); #else diff --git a/devel/electron31/files/patch-electron_shell_browser_api_electron__api__app.cc b/devel/electron31/files/patch-electron_shell_browser_api_electron__api__app.cc index 6dbc74d6c9f6..45f7731b6967 100644 --- a/devel/electron31/files/patch-electron_shell_browser_api_electron__api__app.cc +++ b/devel/electron31/files/patch-electron_shell_browser_api_electron__api__app.cc @@ -1,47 +1,74 @@ ---- electron/shell/browser/api/electron_api_app.cc.orig 2024-06-24 09:53:23 UTC +--- electron/shell/browser/api/electron_api_app.cc.orig 2024-09-11 03:18:31 UTC +++ electron/shell/browser/api/electron_api_app.cc -@@ -591,7 +591,7 @@ void App::OnFinishLaunching(base::Value::Dict launch_i +@@ -92,7 +92,7 @@ + #include "shell/browser/ui/cocoa/electron_bundle_mover.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 +@@ -416,7 +416,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. +@@ -602,7 +602,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()); -@@ -916,7 +916,7 @@ void App::SetDesktopName(const std::string& desktop_na +@@ -927,7 +927,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 -@@ -1300,7 +1300,7 @@ std::vector App::GetAppMetrics +@@ -1032,7 +1032,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. +@@ -1320,7 +1320,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); -@@ -1683,7 +1683,7 @@ gin::ObjectTemplateBuilder App::GetObjectTemplateBuild +@@ -1703,7 +1703,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)) -@@ -1741,7 +1741,7 @@ gin::ObjectTemplateBuilder App::GetObjectTemplateBuild +@@ -1761,7 +1761,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/electron31/files/patch-electron_shell_browser_api_electron__api__base__window.cc b/devel/electron31/files/patch-electron_shell_browser_api_electron__api__base__window.cc index fa2d043a22cf..806d6d4025e5 100644 --- a/devel/electron31/files/patch-electron_shell_browser_api_electron__api__base__window.cc +++ b/devel/electron31/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 2024-08-12 10:09:34 UTC +--- electron/shell/browser/api/electron_api_base_window.cc.orig 2024-09-11 03:18:31 UTC +++ electron/shell/browser/api/electron_api_base_window.cc @@ -40,7 +40,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 @@ -993,7 +993,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 @@ -1050,7 +1050,7 @@ void BaseWindow::SetAppDetails(const gin_helper::Dicti } #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) { // Ensure WCO is already enabled on this window -@@ -1301,7 +1301,7 @@ void BaseWindow::BuildPrototype(v8::Isolate* isolate, +@@ -1300,7 +1300,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/electron31/files/patch-electron_shell_browser_api_electron__api__crash__reporter.cc b/devel/electron31/files/patch-electron_shell_browser_api_electron__api__crash__reporter.cc index f229a1bde031..d90945f84df3 100644 --- a/devel/electron31/files/patch-electron_shell_browser_api_electron__api__crash__reporter.cc +++ b/devel/electron31/files/patch-electron_shell_browser_api_electron__api__crash__reporter.cc @@ -1,72 +1,72 @@ ---- electron/shell/browser/api/electron_api_crash_reporter.cc.orig 2023-06-07 10:09:25 UTC +--- electron/shell/browser/api/electron_api_crash_reporter.cc.orig 2024-09-11 03:18:31 UTC +++ electron/shell/browser/api/electron_api_crash_reporter.cc @@ -31,7 +31,7 @@ #include "shell/common/process_util.h" #include "shell/common/thread_restrictions.h" -#if !IS_MAS_BUILD() +#if !IS_MAS_BUILD() && !BUILDFLAG(IS_BSD) #include "components/crash/core/app/crashpad.h" // nogncheck #include "components/crash/core/browser/crash_upload_list_crashpad.h" // nogncheck #include "components/crash/core/common/crash_key.h" -@@ -66,7 +66,7 @@ bool g_crash_reporter_initialized = false; +@@ -66,7 +66,7 @@ namespace electron::api::crash_reporter { namespace electron::api::crash_reporter { -#if IS_MAS_BUILD() +#if IS_MAS_BUILD() || BUILDFLAG(IS_BSD) namespace { void NoOp() {} -@@ -133,7 +133,7 @@ void Start(const std::string& submit_url, +@@ -137,7 +137,7 @@ void Start(const std::string& submit_url, const std::map& extra, bool is_node_process) { TRACE_EVENT0("electron", "crash_reporter::Start"); -#if !IS_MAS_BUILD() +#if !IS_MAS_BUILD() && !BUILDFLAG(IS_BSD) if (g_crash_reporter_initialized) return; g_crash_reporter_initialized = true; -@@ -179,7 +179,7 @@ void Start(const std::string& submit_url, +@@ -183,7 +183,7 @@ namespace { namespace { -#if IS_MAS_BUILD() +#if IS_MAS_BUILD() || BUILDFLAG(IS_BSD) void GetUploadedReports( v8::Isolate* isolate, base::OnceCallback)> callback) { -@@ -235,13 +235,13 @@ v8::Local GetUploadedReports(v8::Isolate* i +@@ -239,13 +239,13 @@ void SetUploadToServer(bool upload) { #endif void SetUploadToServer(bool upload) { -#if !IS_MAS_BUILD() +#if !IS_MAS_BUILD() && !BUILDFLAG(IS_BSD) ElectronCrashReporterClient::Get()->SetCollectStatsConsent(upload); #endif } bool GetUploadToServer() { -#if IS_MAS_BUILD() +#if IS_MAS_BUILD() || BUILDFLAG(IS_BSD) return false; #else return ElectronCrashReporterClient::Get()->GetCollectStatsConsent(); -@@ -250,7 +250,7 @@ bool GetUploadToServer() { +@@ -254,7 +254,7 @@ v8::Local GetParameters(v8::Isolate* isolat v8::Local GetParameters(v8::Isolate* isolate) { std::map keys; -#if !IS_MAS_BUILD() +#if !IS_MAS_BUILD() && !BUILDFLAG(IS_BSD) electron::crash_keys::GetCrashKeys(&keys); #endif return gin::ConvertToV8(isolate, keys); -@@ -262,7 +262,7 @@ void Initialize(v8::Local exports, +@@ -266,7 +266,7 @@ void Initialize(v8::Local exports, void* priv) { gin_helper::Dictionary dict(context->GetIsolate(), exports); dict.SetMethod("start", &electron::api::crash_reporter::Start); -#if IS_MAS_BUILD() +#if IS_MAS_BUILD() || BUILDFLAG(IS_BSD) dict.SetMethod("addExtraParameter", &electron::api::crash_reporter::NoOp); dict.SetMethod("removeExtraParameter", &electron::api::crash_reporter::NoOp); #else diff --git a/devel/electron31/files/patch-electron_shell_browser_api_electron__api__desktop__capturer.cc b/devel/electron31/files/patch-electron_shell_browser_api_electron__api__desktop__capturer.cc index 8ae2b228901e..77c32f5597c8 100644 --- a/devel/electron31/files/patch-electron_shell_browser_api_electron__api__desktop__capturer.cc +++ b/devel/electron31/files/patch-electron_shell_browser_api_electron__api__desktop__capturer.cc @@ -1,11 +1,11 @@ ---- electron/shell/browser/api/electron_api_desktop_capturer.cc.orig 2024-08-12 10:09:34 UTC +--- electron/shell/browser/api/electron_api_desktop_capturer.cc.orig 2024-09-11 03:18:31 UTC +++ electron/shell/browser/api/electron_api_desktop_capturer.cc -@@ -45,7 +45,7 @@ - #include "ui/base/cocoa/permissions_utils.h" +@@ -46,7 +46,7 @@ namespace { #endif + namespace { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Private function in ui/base/x/x11_display_util.cc base::flat_map GetMonitors( std::pair version, diff --git a/devel/electron31/files/patch-electron_shell_browser_api_electron__api__web__contents.cc b/devel/electron31/files/patch-electron_shell_browser_api_electron__api__web__contents.cc index 4d57cda7b7af..4f29b01ae033 100644 --- a/devel/electron31/files/patch-electron_shell_browser_api_electron__api__web__contents.cc +++ b/devel/electron31/files/patch-electron_shell_browser_api_electron__api__web__contents.cc @@ -1,61 +1,61 @@ ---- electron/shell/browser/api/electron_api_web_contents.cc.orig 2024-07-24 17:23:33 UTC +--- electron/shell/browser/api/electron_api_web_contents.cc.orig 2024-09-11 03:18:31 UTC +++ electron/shell/browser/api/electron_api_web_contents.cc @@ -153,11 +153,11 @@ #include "ui/base/cocoa/defaults_utils.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/linux/linux_ui.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "ui/gfx/font_render_params.h" #endif @@ -517,7 +517,7 @@ std::optional GetCursorBlinkInterval( ui::TextInsertionCaretBlinkPeriodFromDefaults()); if (system_value) return *system_value; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (auto* linux_ui = ui::LinuxUi::instance()) return linux_ui->GetCursorBlinkInterval(); #elif BUILDFLAG(IS_WIN) @@ -881,7 +881,7 @@ void WebContents::InitWithSessionAndOptions( accept_languages.pop_back(); prefs->accept_languages = accept_languages; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Update font settings. static const gfx::FontRenderParams params( gfx::GetFontRenderParams(gfx::FontRenderParamsQuery(), nullptr)); @@ -2618,7 +2618,7 @@ void WebContents::ForcefullyCrashRenderer() { content::RenderProcessHost* rph = rwh->GetProcess(); if (rph) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // A generic |CrashDumpHungChildProcess()| is not implemented for Linux. // Instead we send an explicit IPC to crash on the renderer's IO thread. rph->ForceCrash(); -@@ -3300,7 +3300,7 @@ void WebContents::Focus() { +@@ -3296,7 +3296,7 @@ void WebContents::Focus() { void WebContents::Focus() { // Focusing on WebContents does not automatically focus the window on macOS // and Linux, do it manually to match the behavior on Windows. -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (owner_window()) owner_window()->Focus(true); #endif @@ -4150,7 +4150,7 @@ ui::ImageModel WebContents::GetDevToolsWindowIcon() { } #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void WebContents::GetDevToolsWindowWMClass(std::string* name, std::string* class_name) { *class_name = Browser::Get()->GetName(); diff --git a/devel/electron31/files/patch-electron_shell_browser_api_electron__api__web__contents.h b/devel/electron31/files/patch-electron_shell_browser_api_electron__api__web__contents.h index e168c2a1099c..fe90986cebd0 100644 --- a/devel/electron31/files/patch-electron_shell_browser_api_electron__api__web__contents.h +++ b/devel/electron31/files/patch-electron_shell_browser_api_electron__api__web__contents.h @@ -1,11 +1,11 @@ ---- electron/shell/browser/api/electron_api_web_contents.h.orig 2024-06-24 09:53:23 UTC +--- electron/shell/browser/api/electron_api_web_contents.h.orig 2024-09-11 03:18:31 UTC +++ electron/shell/browser/api/electron_api_web_contents.h -@@ -762,7 +762,7 @@ class WebContents : public ExclusiveAccessContext, +@@ -764,7 +764,7 @@ class WebContents : public ExclusiveAccessContext, #if defined(TOOLKIT_VIEWS) && !BUILDFLAG(IS_MAC) ui::ImageModel GetDevToolsWindowIcon() override; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void GetDevToolsWindowWMClass(std::string* name, std::string* class_name) override; #endif diff --git a/devel/electron31/files/patch-electron_shell_browser_electron__browser__main__parts.cc b/devel/electron31/files/patch-electron_shell_browser_electron__browser__main__parts.cc index afe7b88d8ce1..8a16f5112ee2 100644 --- a/devel/electron31/files/patch-electron_shell_browser_electron__browser__main__parts.cc +++ b/devel/electron31/files/patch-electron_shell_browser_electron__browser__main__parts.cc @@ -1,84 +1,84 @@ ---- electron/shell/browser/electron_browser_main_parts.cc.orig 2024-07-24 17:23:33 UTC +--- electron/shell/browser/electron_browser_main_parts.cc.orig 2024-09-11 03:18:31 UTC +++ electron/shell/browser/electron_browser_main_parts.cc @@ -78,7 +78,7 @@ #include "ui/wm/core/wm_state.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/environment.h" #include "chrome/browser/ui/views/dark_mode_manager_linux.h" #include "device/bluetooth/bluetooth_adapter_factory.h" @@ -131,7 +131,7 @@ namespace { namespace { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) class LinuxUiGetterImpl : public ui::LinuxUiGetter { public: LinuxUiGetterImpl() = default; -@@ -214,7 +214,7 @@ int ElectronBrowserMainParts::PreEarlyInitialization() +@@ -209,7 +209,7 @@ int ElectronBrowserMainParts::PreEarlyInitialization() #if BUILDFLAG(IS_POSIX) HandleSIGCHLD(); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) DetectOzonePlatform(); ui::OzonePlatform::PreEarlyInitialization(); #endif -@@ -304,7 +304,7 @@ int ElectronBrowserMainParts::PreCreateThreads() { +@@ -299,7 +299,7 @@ int ElectronBrowserMainParts::PreCreateThreads() { // happen before the ResourceBundle is loaded if (locale.empty()) l10n_util::OverrideLocaleWithCocoaLocale(); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // l10n_util::GetApplicationLocaleInternal uses g_get_language_names(), // which keys off of getenv("LC_ALL"). // We must set this env first to make ui::ResourceBundle accept the custom -@@ -335,7 +335,7 @@ int ElectronBrowserMainParts::PreCreateThreads() { +@@ -330,7 +330,7 @@ int ElectronBrowserMainParts::PreCreateThreads() { ElectronBrowserClient::SetApplicationLocale(app_locale); fake_browser_process_->SetApplicationLocale(app_locale); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Reset to the original LC_ALL since we should not be changing it. if (!locale.empty()) { if (lc_all) -@@ -395,7 +395,7 @@ void ElectronBrowserMainParts::ToolkitInitialized() { +@@ -390,7 +390,7 @@ void ElectronBrowserMainParts::ToolkitInitialized() { } void ElectronBrowserMainParts::ToolkitInitialized() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto* linux_ui = ui::GetDefaultLinuxUi(); CHECK(linux_ui); linux_ui_getter_ = std::make_unique(); -@@ -501,7 +501,7 @@ void ElectronBrowserMainParts::PostCreateMainMessageLo +@@ -496,7 +496,7 @@ void ElectronBrowserMainParts::PostCreateMainMessageLo } void ElectronBrowserMainParts::PostCreateMainMessageLoop() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) std::string app_name = electron::Browser::Get()->GetName(); #endif #if BUILDFLAG(IS_LINUX) -@@ -513,7 +513,9 @@ void ElectronBrowserMainParts::PostCreateMainMessageLo +@@ -508,7 +508,9 @@ void ElectronBrowserMainParts::PostCreateMainMessageLo if (!bluez::BluezDBusManager::IsInitialized()) bluez::DBusBluezManagerWrapperLinux::Initialize(); +#endif +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Set up crypt config. This needs to be done before anything starts the // network service, as the raw encryption key needs to be shared with the // network service for encrypted cookie storage. -@@ -614,7 +616,7 @@ void ElectronBrowserMainParts::PostMainMessageLoopRun( +@@ -609,7 +611,7 @@ void ElectronBrowserMainParts::PostMainMessageLoopRun( fake_browser_process_->PostMainMessageLoopRun(); content::DevToolsAgentHost::StopRemoteDebuggingPipeHandler(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ui::OzonePlatform::GetInstance()->PostMainMessageLoopRun(); #endif } diff --git a/devel/electron31/files/patch-electron_shell_browser_native__window__views.cc b/devel/electron31/files/patch-electron_shell_browser_native__window__views.cc index e13b55bfbc57..f734a5dbeef6 100644 --- a/devel/electron31/files/patch-electron_shell_browser_native__window__views.cc +++ b/devel/electron31/files/patch-electron_shell_browser_native__window__views.cc @@ -1,200 +1,200 @@ ---- electron/shell/browser/native_window_views.cc.orig 2024-07-15 15:22:56 UTC +--- electron/shell/browser/native_window_views.cc.orig 2024-09-11 03:18:31 UTC +++ electron/shell/browser/native_window_views.cc -@@ -52,7 +52,7 @@ +@@ -53,7 +53,7 @@ #include "ui/wm/core/shadow_types.h" #include "ui/wm/core/window_util.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/strings/string_util.h" #include "shell/browser/browser.h" #include "shell/browser/linux/unity_service.h" -@@ -297,7 +297,7 @@ NativeWindowViews::NativeWindowViews(const gin_helper: +@@ -298,7 +298,7 @@ NativeWindowViews::NativeWindowViews(const gin_helper: params.parent = parent->GetNativeWindow(); params.native_widget = new ElectronDesktopNativeWidgetAura(this); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::string name = Browser::Get()->GetName(); // Set WM_WINDOW_ROLE. params.wm_role_name = "browser-window"; -@@ -323,7 +323,7 @@ NativeWindowViews::NativeWindowViews(const gin_helper: +@@ -324,7 +324,7 @@ NativeWindowViews::NativeWindowViews(const gin_helper: std::string window_type; options.Get(options::kType, &window_type); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Set _GTK_THEME_VARIANT to dark if we have "dark-theme" option set. bool use_dark_theme = false; if (options.Get(options::kDarkTheme, &use_dark_theme) && use_dark_theme) { -@@ -425,7 +425,7 @@ NativeWindowViews::NativeWindowViews(const gin_helper: +@@ -426,7 +426,7 @@ NativeWindowViews::NativeWindowViews(const gin_helper: if (window) window->AddPreTargetHandler(this); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On linux after the widget is initialized we might have to force set the // bounds if the bounds are smaller than the current display SetBounds(gfx::Rect(GetPosition(), bounds.size()), false); -@@ -461,7 +461,7 @@ void NativeWindowViews::SetGTKDarkThemeEnabled(bool us +@@ -462,7 +462,7 @@ void NativeWindowViews::SetGTKDarkThemeEnabled(bool us } void NativeWindowViews::SetGTKDarkThemeEnabled(bool use_dark_theme) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (IsX11()) { const std::string color = use_dark_theme ? "dark" : "light"; auto* connection = x11::Connection::Get(); -@@ -523,7 +523,7 @@ void NativeWindowViews::Show() { +@@ -524,7 +524,7 @@ void NativeWindowViews::Show() { NotifyWindowShow(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (global_menu_bar_) global_menu_bar_->OnWindowMapped(); -@@ -539,7 +539,7 @@ void NativeWindowViews::ShowInactive() { +@@ -540,7 +540,7 @@ void NativeWindowViews::ShowInactive() { NotifyWindowShow(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (global_menu_bar_) global_menu_bar_->OnWindowMapped(); #endif -@@ -553,7 +553,7 @@ void NativeWindowViews::Hide() { +@@ -554,7 +554,7 @@ void NativeWindowViews::Hide() { NotifyWindowHide(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (global_menu_bar_) global_menu_bar_->OnWindowUnmapped(); #endif -@@ -584,7 +584,7 @@ bool NativeWindowViews::IsEnabled() const { +@@ -585,7 +585,7 @@ bool NativeWindowViews::IsEnabled() const { bool NativeWindowViews::IsEnabled() const { #if BUILDFLAG(IS_WIN) return ::IsWindowEnabled(GetAcceleratedWidget()); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (IsX11()) return !event_disabler_.get(); NOTIMPLEMENTED(); -@@ -640,7 +640,7 @@ void NativeWindowViews::SetEnabledInternal(bool enable +@@ -641,7 +641,7 @@ void NativeWindowViews::SetEnabledInternal(bool enable #endif } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void NativeWindowViews::Maximize() { if (IsVisible()) { widget()->Maximize(); -@@ -780,7 +780,7 @@ void NativeWindowViews::SetBounds(const gfx::Rect& bou +@@ -781,7 +781,7 @@ void NativeWindowViews::SetBounds(const gfx::Rect& bou } #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On Linux and Windows the minimum and maximum size should be updated with // window size when window is not resizable. if (!resizable_) { -@@ -1040,7 +1040,7 @@ bool NativeWindowViews::IsClosable() const { +@@ -1041,7 +1041,7 @@ bool NativeWindowViews::IsClosable() const { return false; } return !(info.fState & MFS_DISABLED); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return true; #endif } -@@ -1080,7 +1080,7 @@ void NativeWindowViews::Center() { +@@ -1081,7 +1081,7 @@ void NativeWindowViews::Center() { // for now to avoid breaking API contract, but should consider the long // term plan for this aligning with upstream. void NativeWindowViews::Center() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto display = display::Screen::GetScreen()->GetDisplayNearestWindow(GetNativeWindow()); gfx::Rect window_bounds_in_screen = display.work_area(); -@@ -1303,7 +1303,7 @@ void NativeWindowViews::SetMenu(ElectronMenuModel* men +@@ -1304,7 +1304,7 @@ void NativeWindowViews::SetMenu(ElectronMenuModel* men } void NativeWindowViews::SetMenu(ElectronMenuModel* menu_model) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Remove global menu bar. if (global_menu_bar_ && menu_model == nullptr) { global_menu_bar_.reset(); -@@ -1358,7 +1358,7 @@ void NativeWindowViews::SetParentWindow(NativeWindow* +@@ -1359,7 +1359,7 @@ void NativeWindowViews::SetParentWindow(NativeWindow* void NativeWindowViews::SetParentWindow(NativeWindow* parent) { NativeWindow::SetParentWindow(parent); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (IsX11()) { auto* connection = x11::Connection::Get(); connection->SetProperty( -@@ -1404,7 +1404,7 @@ void NativeWindowViews::SetProgressBar(double progress +@@ -1405,7 +1405,7 @@ void NativeWindowViews::SetProgressBar(double progress NativeWindow::ProgressState state) { #if BUILDFLAG(IS_WIN) taskbar_host_.SetProgressBar(GetAcceleratedWidget(), progress, state); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (unity::IsRunning()) { unity::SetProgressFraction(progress); } -@@ -1475,7 +1475,7 @@ bool NativeWindowViews::IsVisibleOnAllWorkspaces() con +@@ -1476,7 +1476,7 @@ bool NativeWindowViews::IsVisibleOnAllWorkspaces() con } bool NativeWindowViews::IsVisibleOnAllWorkspaces() const { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (IsX11()) { // Use the presence/absence of _NET_WM_STATE_STICKY in _NET_WM_STATE to // determine whether the current window is visible on all workspaces. -@@ -1498,7 +1498,7 @@ content::DesktopMediaID NativeWindowViews::GetDesktopM +@@ -1499,7 +1499,7 @@ content::DesktopMediaID NativeWindowViews::GetDesktopM #if BUILDFLAG(IS_WIN) window_handle = reinterpret_cast(accelerated_widget); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) window_handle = static_cast(accelerated_widget); #endif aura::WindowTreeHost* const host = -@@ -1596,7 +1596,7 @@ void NativeWindowViews::SetIcon(HICON window_icon, HIC +@@ -1597,7 +1597,7 @@ void NativeWindowViews::SetIcon(HICON window_icon, HIC SendMessage(hwnd, WM_SETICON, ICON_BIG, reinterpret_cast(app_icon_.get())); } -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void NativeWindowViews::SetIcon(const gfx::ImageSkia& icon) { auto* tree_host = views::DesktopWindowTreeHostLinux::GetHostForWidget( GetAcceleratedWidget()); -@@ -1674,7 +1674,7 @@ bool NativeWindowViews::CanMinimize() const { +@@ -1683,7 +1683,7 @@ bool NativeWindowViews::CanMinimize() const { bool NativeWindowViews::CanMinimize() const { #if BUILDFLAG(IS_WIN) return minimizable_; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return true; #endif } -@@ -1730,7 +1730,7 @@ void NativeWindowViews::HandleKeyboardEvent( +@@ -1739,7 +1739,7 @@ void NativeWindowViews::HandleKeyboardEvent( if (widget_destroyed_) return; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (event.windows_key_code == ui::VKEY_BROWSER_BACK) NotifyWindowExecuteAppCommand(kBrowserBackward); else if (event.windows_key_code == ui::VKEY_BROWSER_FORWARD) -@@ -1749,7 +1749,7 @@ void NativeWindowViews::OnMouseEvent(ui::MouseEvent* e +@@ -1758,7 +1758,7 @@ void NativeWindowViews::OnMouseEvent(ui::MouseEvent* e // Alt+Click should not toggle menu bar. root_view_.ResetAltState(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (event->changed_button_flags() == ui::EF_BACK_MOUSE_BUTTON) NotifyWindowExecuteAppCommand(kBrowserBackward); else if (event->changed_button_flags() == ui::EF_FORWARD_MOUSE_BUTTON) diff --git a/devel/electron31/files/patch-electron_shell_browser_printing_printing__utils.cc b/devel/electron31/files/patch-electron_shell_browser_printing_printing__utils.cc index 887b92fbeaef..91d5e8fe6678 100644 --- a/devel/electron31/files/patch-electron_shell_browser_printing_printing__utils.cc +++ b/devel/electron31/files/patch-electron_shell_browser_printing_printing__utils.cc @@ -1,11 +1,11 @@ ---- electron/shell/browser/printing/printing_utils.cc.orig 2024-04-19 08:41:45 UTC +--- electron/shell/browser/printing/printing_utils.cc.orig 2024-09-11 03:18:31 UTC +++ electron/shell/browser/printing/printing_utils.cc -@@ -20,7 +20,7 @@ +@@ -28,7 +28,7 @@ #include #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include #endif diff --git a/devel/electron31/files/patch-electron_shell_browser_ui_inspectable__web__contents.cc b/devel/electron31/files/patch-electron_shell_browser_ui_inspectable__web__contents.cc new file mode 100644 index 000000000000..f7085669fdb6 --- /dev/null +++ b/devel/electron31/files/patch-electron_shell_browser_ui_inspectable__web__contents.cc @@ -0,0 +1,11 @@ +--- electron/shell/browser/ui/inspectable_web_contents.cc.orig 2024-09-12 12:29:05 UTC ++++ electron/shell/browser/ui/inspectable_web_contents.cc +@@ -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/electron31/files/patch-third__party_electron__node_deps_cares_BUILD.gn b/devel/electron31/files/patch-third__party_electron__node_deps_cares_BUILD.gn index 5bdbfac73b1c..bb1fb556c07f 100644 --- a/devel/electron31/files/patch-third__party_electron__node_deps_cares_BUILD.gn +++ b/devel/electron31/files/patch-third__party_electron__node_deps_cares_BUILD.gn @@ -1,18 +1,18 @@ ---- third_party/electron_node/deps/cares/BUILD.gn.orig 2024-08-19 07:26:00 UTC +--- third_party/electron_node/deps/cares/BUILD.gn.orig 2024-09-12 12:23:36 UTC +++ third_party/electron_node/deps/cares/BUILD.gn -@@ -154,9 +154,14 @@ static_library("cares") { +@@ -156,9 +156,14 @@ static_library("cares") { defines += [ "HAVE_CONFIG_H" ] } - if (is_linux) { + if (is_linux && !is_bsd) { include_dirs += [ "config/linux" ] sources += [ "config/linux/ares_config.h" ] + } + + if (is_freebsd) { + include_dirs += [ "config/freebsd" ] + sources += [ "config/freebsd/ares_config.h" ] } if (is_mac) {