diff --git a/devel/electron22/Makefile b/devel/electron22/Makefile index 5d5767fb718a..849e05479a74 100644 --- a/devel/electron22/Makefile +++ b/devel/electron22/Makefile @@ -1,412 +1,411 @@ PORTNAME= electron DISTVERSIONPREFIX= v DISTVERSION= ${ELECTRON_VER:S/-beta./.b/} -PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= https://github.com/tagattie/FreeBSD-Electron/releases/download/v22.2.0/:chromium \ https://commondatastorage.googleapis.com/chromium-nodejs/:chromium_node \ https://commondatastorage.googleapis.com/chromium-fonts/:chromium_testfonts PKGNAMESUFFIX= ${ELECTRON_VER_MAJOR} DISTFILES= chromium-${CHROMIUM_VER}${EXTRACT_SUFX}:chromium \ ${CHROMIUM_NODE_MODULES_HASH}:chromium_node \ ${CHROMIUM_TEST_FONTS_HASH}:chromium_testfonts \ electron-yarn-cache-${ELECTRON_VER}${EXTRACT_SUFX}:prefetch DIST_SUBDIR= ${PORTNAME} 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-node16>0:www/yarn-node16 EXTRACT_DEPENDS=yarn-node16>0:www/yarn-node16 PATCH_DEPENDS= git:devel/git BUILD_DEPENDS= gperf:devel/gperf \ yasm:devel/yasm \ ${LOCALBASE}/libdata/pkgconfig/dri.pc:graphics/mesa-dri \ ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat \ node16>0:www/node16 \ npm-node16>0:www/npm-node16 LIB_DEPENDS= libatk-bridge-2.0.so:accessibility/at-spi2-core \ libatspi.so:accessibility/at-spi2-core \ libsnappy.so:archivers/snappy \ libFLAC.so:audio/flac \ libopus.so:audio/opus \ libdbus-1.so:devel/dbus \ libicuuc.so:devel/icu \ libevent.so:devel/libevent \ 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 \ 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-node16>0:www/npm-node16 USES= bison compiler:c++17-lang cpe gettext-tools gl gnome \ iconv:wchar_t jpeg localbase:ldflags ninja 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 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 third_party/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_hangout_services_extension=true \ enable_js_type_check=false \ 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="none" \ use_allocator_shim=false \ use_aura=true \ use_custom_libcxx=false \ use_gnome_keyring=false \ 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_libjpeg=true \ use_system_libwayland=true \ use_system_wayland_scanner=true \ use_udev=false \ chrome_pgo_phase=0 \ extra_cxxflags="${CXXFLAGS}" \ extra_ldflags="${LDFLAGS}" # 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 OPTIONS_DEFAULT= CODECS CUPS DRIVER KERBEROS 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) 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+=ffmpeg_branding="Chrome" \ GN_ARGS+=proprietary_codecs=true CODECS_VARS_OFF= GN_ARGS+=ffmpeg_branding="Chromium" \ GN_ARGS+=proprietary_codecs=false 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= libkrb.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= libkrb.so.3:security/krb5 PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio PULSEAUDIO_VARS= GN_ARGS+=use_pulseaudio=true PULSEAUDIO_VARS_OFF= GN_ARGS+=use_pulseaudio=false # With SNDIO=on we exclude audio_manager_linux from the build (see # media/audio/BUILD.gn) and use audio_manager_openbsd which does not # support falling back to ALSA or PulseAudio. SNDIO_PREVENTS= ALSA PULSEAUDIO 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= 108.0.5359.215 # See ${WRKSRC}/third_party/node/node_modules.tar.gz.sha1 for CHROMIUM_NODE_MODULES_HASH CHROMIUM_NODE_MODULES_HASH= f8b5da24d33317766d3933fb6711b0603fc4fb6f # See ${WRKSRC}/third_party/test_fonts/test_fonts.tar.gz.sha1 for CHROMIUM_TEST_FONTS_HASH CHROMIUM_TEST_FONTS_HASH= 336e775eec536b2d785cc80eff6ac39051931286 # See ${WRKSRC}/electron/DEPS for NODE_VER NODE_VER= 16.17.1 # See ${WRKSRC}/electron/DEPS for NAN_VER NAN_VER= 16fa32231e2ccd89d2804b3f765319128b20c4ac # 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 -YARN_TIMESTAMP= 1681568942 +YARN_TIMESTAMP= 1682663940 .include "Makefile.version" .include # required for COMPILER_VERSION .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} != 130 LLVM_DEFAULT= 13 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 .if ${ARCH} == "amd64" PLIST_SUB+= AMD64="" .else PLIST_SUB+= AMD64="@comment " .endif .if ${ARCH} == "i386" PLIST_SUB+= I386="" .else PLIST_SUB+= I386="@comment " .endif # 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 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: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-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}/node_modules ${WRKSRC}/third_party/node ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/test_fonts ${WRKSRC}/third_party/test_fonts # 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 \ flac fontconfig freetype harfbuzz-ng icu libdrm libevent libpng \ libusb libwebp libxml libxslt openh264 opus snappy || ${FALSE} # Chromium uses an unreleased version of FFmpeg, so configure it .for brand in Chrome Chromium ${CP} -R \ ${WRKSRC}/third_party/ffmpeg/chromium/config/${brand}/linux/ \ ${WRKSRC}/third_party/ffmpeg/chromium/config/${brand}/freebsd .endfor 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/electron22/Makefile.version b/devel/electron22/Makefile.version index 37de820c4fe7..629fd61eab16 100644 --- a/devel/electron22/Makefile.version +++ b/devel/electron22/Makefile.version @@ -1,2 +1,2 @@ -ELECTRON_VER= 22.3.6 +ELECTRON_VER= 22.3.7 ELECTRON_VER_MAJOR= ${ELECTRON_VER:C/\..*//} diff --git a/devel/electron22/distinfo b/devel/electron22/distinfo index d65639a77cd7..4ddfcdfdd4f6 100644 --- a/devel/electron22/distinfo +++ b/devel/electron22/distinfo @@ -1,21 +1,21 @@ -TIMESTAMP = 1681569109 +TIMESTAMP = 1682664964 SHA256 (electron/chromium-108.0.5359.215.tar.xz) = aba0730b347269efda217affe804f6fced296aa02f810c8c9a6fd7d46cd7bf9a SIZE (electron/chromium-108.0.5359.215.tar.xz) = 1584734880 SHA256 (electron/f8b5da24d33317766d3933fb6711b0603fc4fb6f) = 63706737ca75e0e5c97885186b2a7ab019ca71d1315ee08870193bbfa7486bfc SIZE (electron/f8b5da24d33317766d3933fb6711b0603fc4fb6f) = 9900677 SHA256 (electron/336e775eec536b2d785cc80eff6ac39051931286) = a2ca2962daf482a8f943163541e1c73ba4b2694fabcd2510981f2db4eda493c8 SIZE (electron/336e775eec536b2d785cc80eff6ac39051931286) = 32624734 -SHA256 (electron/electron-yarn-cache-22.3.6.tar.xz) = 21cd90eea32dc0902831f9c5680b0cadc6388e9e9d44fcdf21bf65450e4b2979 -SIZE (electron/electron-yarn-cache-22.3.6.tar.xz) = 38901104 -SHA256 (electron/electron-electron-v22.3.6_GH0.tar.gz) = 58018da98189a0a0c35a4e89db2e3dd4f6af9ab923297dbf63e3e5ade8dd74dc -SIZE (electron/electron-electron-v22.3.6_GH0.tar.gz) = 10574442 +SHA256 (electron/electron-yarn-cache-22.3.7.tar.xz) = 7103735f1e82d32af8cc57f258f13e0af8e69732d47a42aeca27a97933c7038d +SIZE (electron/electron-yarn-cache-22.3.7.tar.xz) = 38905036 +SHA256 (electron/electron-electron-v22.3.7_GH0.tar.gz) = 8ac137bc3c82342547bbea55da9f841a3441c5b8b0a42291fb88794c058bb3f0 +SIZE (electron/electron-electron-v22.3.7_GH0.tar.gz) = 10592235 SHA256 (electron/nodejs-node-v16.17.1_GH0.tar.gz) = e63378aa6aa18b9e05486e46eaca6c6e09904366e5100d7e04c6dbd344a42f60 SIZE (electron/nodejs-node-v16.17.1_GH0.tar.gz) = 90485310 SHA256 (electron/nodejs-nan-16fa32231e2ccd89d2804b3f765319128b20c4ac_GH0.tar.gz) = 3807ae6a1e451a29f068540472f100f9718d457c60ac62f2f8469d1d57475d39 SIZE (electron/nodejs-nan-16fa32231e2ccd89d2804b3f765319128b20c4ac_GH0.tar.gz) = 179355 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 diff --git a/devel/electron22/files/patch-electron_shell_browser_ui_views_menu__bar.cc b/devel/electron22/files/patch-electron_shell_browser_ui_views_menu__bar.cc index 382b3b8541c9..8d75e4f39110 100644 --- a/devel/electron22/files/patch-electron_shell_browser_ui_views_menu__bar.cc +++ b/devel/electron22/files/patch-electron_shell_browser_ui_views_menu__bar.cc @@ -1,38 +1,38 @@ ---- electron/shell/browser/ui/views/menu_bar.cc.orig 2023-01-24 16:58:16 UTC +--- electron/shell/browser/ui/views/menu_bar.cc.orig 2023-04-26 08:11:51 UTC +++ electron/shell/browser/ui/views/menu_bar.cc @@ -13,7 +13,7 @@ #include "ui/views/background.h" #include "ui/views/layout/box_layout.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/gtk/gtk_util.h" // nogncheck #endif -@@ -211,7 +211,7 @@ void MenuBar::ButtonPressed(size_t id, const ui::Event +@@ -218,7 +218,7 @@ void MenuBar::ViewHierarchyChanged( void MenuBar::RefreshColorCache(const ui::NativeTheme* theme) { if (theme) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) background_color_ = gtk::GetBgColor("GtkMenuBar#menubar"); enabled_color_ = gtk::GetFgColor("GtkMenuBar#menubar GtkMenuItem#menuitem GtkLabel"); -@@ -234,7 +234,7 @@ void MenuBar::RebuildChildren() { +@@ -243,7 +243,7 @@ void MenuBar::RebuildChildren() { } void MenuBar::UpdateViewColors() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // set menubar background color SetBackground(views::CreateSolidBackground(background_color_)); #endif -@@ -242,7 +242,7 @@ void MenuBar::UpdateViewColors() { +@@ -251,7 +251,7 @@ void MenuBar::UpdateViewColors() { // set child colors if (menu_model_ == nullptr) return; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const auto& textColor = window_->IsFocused() ? enabled_color_ : disabled_color_; for (auto* child : GetChildrenInZOrder()) { diff --git a/devel/electron22/files/patch-electron_shell_browser_ui_views_menu__bar.h b/devel/electron22/files/patch-electron_shell_browser_ui_views_menu__bar.h index af98f7bbd56b..57a5906f1ac6 100644 --- a/devel/electron22/files/patch-electron_shell_browser_ui_views_menu__bar.h +++ b/devel/electron22/files/patch-electron_shell_browser_ui_views_menu__bar.h @@ -1,11 +1,11 @@ ---- electron/shell/browser/ui/views/menu_bar.h.orig 2022-05-18 15:31:32 UTC +--- electron/shell/browser/ui/views/menu_bar.h.orig 2023-04-26 08:11:51 UTC +++ electron/shell/browser/ui/views/menu_bar.h -@@ -79,7 +79,7 @@ class MenuBar : public views::AccessiblePaneView, +@@ -82,7 +82,7 @@ class MenuBar : public views::AccessiblePaneView, View* FindAccelChild(char16_t key); SkColor background_color_; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) SkColor enabled_color_; SkColor disabled_color_; #endif diff --git a/devel/electron22/files/patch-electron_spec_api-browser-window-spec.ts b/devel/electron22/files/patch-electron_spec_api-browser-window-spec.ts index cd599979236d..25aebdf69587 100644 --- a/devel/electron22/files/patch-electron_spec_api-browser-window-spec.ts +++ b/devel/electron22/files/patch-electron_spec_api-browser-window-spec.ts @@ -1,137 +1,137 @@ ---- electron/spec/api-browser-window-spec.ts.orig 2023-03-02 11:49:02 UTC +--- electron/spec/api-browser-window-spec.ts.orig 2023-04-26 08:11:51 UTC +++ electron/spec/api-browser-window-spec.ts @@ -58,7 +58,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 new Promise((resolve) => { appProcess.once('exit', resolve); }); @@ -736,7 +736,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 = emittedOnce(w, 'maximize'); const shown = emittedOnce(w, 'show'); w.maximize(); @@ -773,7 +773,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 }); @@ -840,7 +840,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 }); @@ -1238,7 +1238,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 = emittedOnce(w, 'maximize'); @@ -1365,7 +1365,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 = emittedOnce(w, 'minimize'); @@ -2277,7 +2277,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); @@ -2303,7 +2303,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); @@ -3231,7 +3231,7 @@ describe('BrowserWindow module', () => { expect(test.versions).to.deep.equal(process.versions); expect(test.contextId).to.be.a('string'); - 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 { -@@ -3721,7 +3721,7 @@ describe('BrowserWindow module', () => { +@@ -3737,7 +3737,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 }); -@@ -3981,7 +3981,7 @@ describe('BrowserWindow module', () => { +@@ -3997,7 +3997,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 = emittedOnce(w, 'maximize'); w.maximize(); -@@ -3998,7 +3998,7 @@ describe('BrowserWindow module', () => { +@@ -4014,7 +4014,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 }); -@@ -4035,7 +4035,7 @@ describe('BrowserWindow module', () => { +@@ -4051,7 +4051,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 = emittedOnce(w, 'minimize'); w.minimize(); -@@ -4398,7 +4398,7 @@ describe('BrowserWindow module', () => { +@@ -4414,7 +4414,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'); -@@ -4490,7 +4490,7 @@ describe('BrowserWindow module', () => { +@@ -4506,7 +4506,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); diff --git a/devel/electron22/files/patch-third__party_angle_src_libANGLE_formatutils.cpp b/devel/electron22/files/patch-third__party_angle_src_libANGLE_formatutils.cpp index 0515d9b55035..b59a949c8207 100644 --- a/devel/electron22/files/patch-third__party_angle_src_libANGLE_formatutils.cpp +++ b/devel/electron22/files/patch-third__party_angle_src_libANGLE_formatutils.cpp @@ -1,11 +1,11 @@ ---- third_party/angle/src/libANGLE/formatutils.cpp.orig 2022-11-30 08:12:58 UTC +--- third_party/angle/src/libANGLE/formatutils.cpp.orig 2023-04-28 07:14:34 UTC +++ third_party/angle/src/libANGLE/formatutils.cpp -@@ -1466,7 +1466,7 @@ static InternalFormatInfoMap BuildInternalFormatInfoMa +@@ -1481,7 +1481,7 @@ static InternalFormatInfoMap BuildInternalFormatInfoMa AddYUVFormat(&map, GL_G8_B8R8_2PLANE_420_UNORM_ANGLE, true, 8, 8, 8, 0, 0, GL_G8_B8R8_2PLANE_420_UNORM_ANGLE, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, false, RequireExt<&Extensions::yuvInternalFormatANGLE>, RequireExt<&Extensions::yuvInternalFormatANGLE>, RequireExt<&Extensions::yuvInternalFormatANGLE>, NeverSupported, NeverSupported); AddYUVFormat(&map, GL_G8_B8_R8_3PLANE_420_UNORM_ANGLE, true, 8, 8, 8, 0, 0, GL_G8_B8_R8_3PLANE_420_UNORM_ANGLE, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, false, RequireExt<&Extensions::yuvInternalFormatANGLE>, RequireExt<&Extensions::yuvInternalFormatANGLE>, RequireExt<&Extensions::yuvInternalFormatANGLE>, NeverSupported, NeverSupported); -#if defined(ANGLE_PLATFORM_LINUX) +#if defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) // From GL_OES_required_internalformat // The |shared| bit shouldn't be 2. But given this hits assertion when bits // are checked, it's fine to have this bit set as 2 as a workaround.