diff --git a/devel/electron12/Makefile b/devel/electron12/Makefile index 7f524e31ae07..e9de6ba17e97 100644 --- a/devel/electron12/Makefile +++ b/devel/electron12/Makefile @@ -1,292 +1,292 @@ PORTNAME= electron DISTVERSIONPREFIX= v DISTVERSION= ${ELECTRON_VER:S/-beta./.b/} CATEGORIES= devel java MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/:chromium \ https://commondatastorage.googleapis.com/chromium-fonts/:chromium_testfonts PKGNAMESUFFIX= ${ELECTRON_VER_MAJOR} DISTFILES= chromium-${CHROMIUM_VER}${EXTRACT_SUFX}:chromium \ ${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 LICENSE= MIT LICENSE_FILE= ${WRKSRC}/electron/LICENSE FETCH_DEPENDS= yarn-node14>0:www/yarn-node14 EXTRACT_DEPENDS= yarn-node14>0:www/yarn-node14 PATCH_DEPENDS= git:devel/git BUILD_DEPENDS= ${LOCALBASE}/bin/ar:devel/binutils \ gperf:devel/gperf \ yasm:devel/yasm \ ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat \ node14>0:www/node14 \ npm-node14>0:www/npm-node14 LIB_DEPENDS= libatk-bridge-2.0.so:accessibility/at-spi2-atk \ libatspi.so:accessibility/at-spi2-core \ libsnappy.so:archivers/snappy \ libFLAC.so:audio/flac \ libopus.so:audio/opus \ libdbus-1.so:devel/dbus \ libnotify.so:devel/libnotify \ libpci.so:devel/libpci \ libnspr4.so:devel/nspr \ libre2.so:devel/re2 \ libdrm.so:graphics/libdrm \ libpng.so:graphics/png \ libwebp.so:graphics/webp \ libavcodec.so:multimedia/ffmpeg \ 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-node14>0:www/npm-node14 USES= bison dos2unix gettext-tools gl gnome jpeg localbase:ldflags \ ninja pkgconfig python:2.7,build,test shebangfix tar:xz xorg DOS2UNIX_FILES= third_party/skia/third_party/vulkanmemoryallocator/include/vk_mem_alloc.h USE_GITHUB= yes GH_TAGNAME= ${DISTVERSIONPREFIX}${ELECTRON_VER} GH_TUPLE= nodejs:node:v${NODE_VER}:node \ nodejs:nan:${NAN_VER}:nan USE_GL= gbm gl glesv2 USE_GNOME= atk cairo gdkpixbuf2 gtk30 libxml2 libxslt pango USE_JAVA= yes JAVA_VERSION= 1.8 JAVA_BUILD= yes USE_LDCONFIG= ${DATADIR} USE_XORG= x11 xcb xcomposite xcursor xdamage xext xfixes xi xrandr \ xrender xscrnsaver xtst SHEBANG_FILES= buildtools/freebsd/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= python=${PYTHON_CMD} NO_WRKSUBDIR= yes WRKSRC_SUBDIR= src PLIST_SUB= ELECTRON_VER=${ELECTRON_VER} \ ELECTRON_VER_MAJOR=${ELECTRON_VER_MAJOR} OPTIONS_DEFINE= CUPS DEBUG DIST DRIVER KERBEROS OPTIONS_DEFAULT= CUPS DRIVER KERBEROS ALSA OPTIONS_GROUP= AUDIO OPTIONS_GROUP_AUDIO= ALSA PULSEAUDIO OPTIONS_SUB= yes DIST_DESC= Build distribution zip files DRIVER_DESC= Install chromedriver ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib ALSA_RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins ALSA_VARS= GN_ARGS+=use_alsa=true ALSA_VARS_OFF= GN_ARGS+=use_alsa=false CUPS_LIB_DEPENDS= libcups.so:print/cups CUPS_VARS= GN_ARGS+=use_cups=true CUPS_VARS_OFF= GN_ARGS+=use_cups=false DEBUG_VARS= BUILDTYPE=Testing DEBUG_VARS_OFF= BUILDTYPE=Release DIST_IMPLIES= DRIVER DRIVER_ALL_TARGET= chromedriver KERBEROS_VARS= GN_ARGS+=use_kerberos=true KERBEROS_VARS_OFF= GN_ARGS+=use_kerberos=false PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio PULSEAUDIO_VARS= GN_ARGS+=use_pulseaudio=true PULSEAUDIO_VARS_OFF= GN_ARGS+=use_pulseaudio=false # See ${WRKSRC}/electron/DEPS for CHROMIUM_VER CHROMIUM_VER= 89.0.4389.128 # See ${WRKSRC}/third_party/test_fonts/test_fonts.tar.gz.sha1 for CHROMIUM_TEST_FONTS_HASH CHROMIUM_TEST_FONTS_HASH= cd96fc55dc243f6c6f4cb63ad117cad6cd48dceb # See ${WRKSRC}/electron/DEPS for NODE_VER NODE_VER= 14.16.0 # See ${WRKSRC}/electron/DEPS for NAN_VER NAN_VER= 2c4ee8a32a299eada3cd6e468bbd0a473bfea96d -YARN_TIMESTAMP= 1620459581 +YARN_TIMESTAMP= 1621487762 GN_ARGS+= clang_use_chrome_plugins=false \ enable_hangout_services_extension=true \ enable_nacl=false \ enable_one_click_signin=true \ enable_remoting=false \ fieldtrial_testing_like_official_build=true \ is_clang=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_sysroot=false \ use_system_freetype=true \ use_system_harfbuzz=true \ use_system_libjpeg=true \ extra_cxxflags="${CXXFLAGS}" \ extra_ldflags="${LDFLAGS}" GN_BOOTSTRAP_FLAGS= --no-clean --no-rebuild --skip-generate-buildfiles .include "Makefile.version" .include .if ${ARCH} == "amd64" PLIST_SUB+= AMD64="" .else PLIST_SUB+= AMD64="@comment " .endif .if ${ARCH} == "i386" PLIST_SUB+= I386="" .else PLIST_SUB+= I386="@comment " .endif 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}/test_fonts ${WRKSRC}/third_party/test_fonts # Take in clang-format from official chromium distribution ${MKDIR} ${WRKSRC}/buildtools/freebsd ${CP} ${WRKSRC}/buildtools/linux64/clang-format ${WRKSRC}/buildtools/freebsd # Remove unnecessary files ${RM} -r ${WRKSRC}/third_party/jdk/current ${RM} -r ${WRKSRC}/third_party/jdk/extras # 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 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 \ ffmpeg flac fontconfig freetype harfbuzz-ng libdrm libpng \ libusb libwebp libxml libxslt openh264 opus snappy || ${FALSE} 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/Release/gn gen out/${BUILDTYPE} \ --args='import("//electron/build/args/${BUILDTYPE:tl}.gn") ${GN_ARGS}' # Setup nodejs dependency ${MKDIR} ${WRKSRC}/third_party/node/freebsd/node-freebsd-x64/bin ${LN} -sf ${LOCALBASE}/bin/node ${WRKSRC}/third_party/node/freebsd/node-freebsd-x64/bin/node # Setup java dependency ${MKDIR} ${WRKDIR}/bin ${LN} -sf ${LOCALBASE}/openjdk8/bin/java ${WRKDIR}/bin/java 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 libvk_swiftshader.so libvulkan.so.1 ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR} .endfor ${MKDIR} ${STAGEDIR}${DATADIR}/swiftshader .for f in libEGL.so libGLESv2.so ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/swiftshader/${f} ${STAGEDIR}${DATADIR}/swiftshader .endfor .for f in LICENSE LICENSES.chromium.html icudtl.dat 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 ${STAGEDIR}${DATADIR} 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/electron12/Makefile.version b/devel/electron12/Makefile.version index 6d4ae3f3b0d4..5fcb64dc06ab 100644 --- a/devel/electron12/Makefile.version +++ b/devel/electron12/Makefile.version @@ -1,2 +1,2 @@ -ELECTRON_VER= 12.0.7 +ELECTRON_VER= 12.0.9 ELECTRON_VER_MAJOR= ${ELECTRON_VER:C/\..*//} diff --git a/devel/electron12/distinfo b/devel/electron12/distinfo index d4d7a3cb4648..1ac75fbe82d8 100644 --- a/devel/electron12/distinfo +++ b/devel/electron12/distinfo @@ -1,13 +1,13 @@ -TIMESTAMP = 1620460454 +TIMESTAMP = 1621488488 SHA256 (electron/chromium-89.0.4389.128.tar.xz) = 1a75ea6aeb98f2d3b6feae1fbf5692679e93d5b7631bc7c762dd873499deda5b SIZE (electron/chromium-89.0.4389.128.tar.xz) = 890850492 SHA256 (electron/cd96fc55dc243f6c6f4cb63ad117cad6cd48dceb) = ec973eccd669d417fbf2d0a4dac730744a3174268ff062db5451b55c82bc3492 SIZE (electron/cd96fc55dc243f6c6f4cb63ad117cad6cd48dceb) = 26759650 -SHA256 (electron/electron-yarn-cache-12.0.7.tar.xz) = 03bde46e775e771238c38b64b0ca88feddbe332cd495bac9adf73d317cf40c20 -SIZE (electron/electron-yarn-cache-12.0.7.tar.xz) = 33907768 -SHA256 (electron/electron-electron-v12.0.7_GH0.tar.gz) = 59deac4ab3d050f88bbfe22408afc10775f49083b3f0c04a8775296c5a026b8f -SIZE (electron/electron-electron-v12.0.7_GH0.tar.gz) = 9990283 +SHA256 (electron/electron-yarn-cache-12.0.9.tar.xz) = 1ff7d74d4523d886375f9c695f47dcaa5e5754fd719a6547fbd276f440c3298c +SIZE (electron/electron-yarn-cache-12.0.9.tar.xz) = 33907800 +SHA256 (electron/electron-electron-v12.0.9_GH0.tar.gz) = 1b4073baa3e93bb410591688b7ca6e59201ae9c8cf18f05e5a05ecfd7ffebfc8 +SIZE (electron/electron-electron-v12.0.9_GH0.tar.gz) = 9995422 SHA256 (electron/nodejs-node-v14.16.0_GH0.tar.gz) = bcdf869b0743405515ee897b1047b5e851a717e426b4974d26537c9b10dfd53a SIZE (electron/nodejs-node-v14.16.0_GH0.tar.gz) = 87850748 SHA256 (electron/nodejs-nan-2c4ee8a32a299eada3cd6e468bbd0a473bfea96d_GH0.tar.gz) = e4ff33afb043329429c9551d3cc983786553a310a7d61ee313485ba3ac9b2b15 SIZE (electron/nodejs-nan-2c4ee8a32a299eada3cd6e468bbd0a473bfea96d_GH0.tar.gz) = 178328 diff --git a/devel/electron12/files/package.json b/devel/electron12/files/package.json index a7026366ed2e..d343bf4941a9 100644 --- a/devel/electron12/files/package.json +++ b/devel/electron12/files/package.json @@ -1,151 +1,151 @@ { "name": "electron", - "version": "12.0.7", + "version": "12.0.9", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { "@electron/docs-parser": "^0.10.1", "@electron/typescript-definitions": "^8.8.0", "@octokit/auth-app": "^2.10.0", "@octokit/rest": "^18.0.3", "@primer/octicons": "^10.0.0", "@types/basic-auth": "^1.1.3", "@types/busboy": "^0.2.3", "@types/chai": "^4.2.12", "@types/chai-as-promised": "^7.1.3", "@types/dirty-chai": "^2.0.2", "@types/express": "^4.17.7", "@types/fs-extra": "^9.0.1", "@types/klaw": "^3.0.1", "@types/minimist": "^1.2.0", "@types/mocha": "^7.0.2", "@types/node": "^14.6.2", "@types/semver": "^7.3.3", "@types/send": "^0.14.5", "@types/split": "^1.0.0", "@types/stream-json": "^1.5.1", "@types/uuid": "^3.4.6", "@types/webpack": "^4.41.21", "@types/webpack-env": "^1.15.2", "@typescript-eslint/eslint-plugin": "^4.4.1", "@typescript-eslint/parser": "^4.4.1", "asar": "^3.0.3", "check-for-leaks": "^1.2.1", "colors": "^1.4.0", "dotenv-safe": "^4.0.4", "dugite": "^1.45.0", "eslint": "^7.4.0", "eslint-config-standard": "^14.1.1", "eslint-plugin-import": "^2.22.0", "eslint-plugin-mocha": "^7.0.1", "eslint-plugin-node": "^11.1.0", "eslint-plugin-standard": "^4.0.1", "eslint-plugin-typescript": "^0.14.0", "express": "^4.16.4", "folder-hash": "^2.1.1", "fs-extra": "^9.0.1", "got": "^6.3.0", "husky": "^2.2.0", "klaw": "^3.0.0", "lint": "^1.1.2", "lint-staged": "^10.2.11", "minimist": "^1.2.5", "nugget": "^2.0.1", "null-loader": "^4.0.0", "pre-flight": "^1.1.0", "remark-cli": "^4.0.0", "remark-preset-lint-markdown-style-guide": "^2.1.1", "request": "^2.88.2", "semver": "^5.6.0", "shx": "^0.3.2", "standard-markdown": "^6.0.0", "stream-json": "^1.7.1", "sumchecker": "^2.0.2", "tap-xunit": "^2.4.1", "temp": "^0.8.3", "timers-browserify": "1.4.2", "ts-loader": "^8.0.2", "ts-node": "6.2.0", "typescript": "^4.0.2", "webpack": "^4.43.0", "webpack-cli": "^3.3.12", "wrapper-webpack-plugin": "^2.1.0" }, "private": true, "scripts": { "asar": "asar", "generate-version-json": "node script/generate-version-json.js", "lint": "node ./script/lint.js && npm run lint:clang-format && npm run lint:docs", "lint:js": "node ./script/lint.js --js", "lint:clang-format": "python script/run-clang-format.py -r -c chromium_src/ shell/ || (echo \"\\nCode not formatted correctly.\" && exit 1)", "lint:clang-tidy": "ts-node ./script/run-clang-tidy.ts", "lint:cpp": "node ./script/lint.js --cc", "lint:objc": "node ./script/lint.js --objc", "lint:py": "node ./script/lint.js --py", "lint:gn": "node ./script/lint.js --gn", "lint:docs": "remark docs -qf && npm run lint:js-in-markdown && npm run create-typescript-definitions && npm run lint:docs-relative-links && npm run lint:check-trailing-whitespace", "lint:docs-relative-links": "python ./script/check-relative-doc-links.py", "lint:check-trailing-whitespace": "python ./script/check-trailing-whitespace.py", "lint:js-in-markdown": "standard-markdown docs", "create-api-json": "electron-docs-parser --dir=./", "create-typescript-definitions": "npm run create-api-json && electron-typescript-definitions --api=electron-api.json && node spec/ts-smoke/runner.js", "gn-typescript-definitions": "npm run create-typescript-definitions && shx cp electron.d.ts", "pre-flight": "pre-flight", "gn-check": "node ./script/gn-check.js", "preinstall": "node -e 'process.exit(0)'", "prepack": "check-for-leaks", "repl": "node ./script/start.js --interactive", "start": "node ./script/start.js", "test": "node ./script/spec-runner.js", "tsc": "tsc", "webpack": "webpack" }, "license": "MIT", "author": "Electron Community", "keywords": [ "electron" ], "husky": { "hooks": { "pre-commit": "lint-staged", "pre-push": "check-for-leaks" } }, "lint-staged": { "*.{js,ts}": [ "node script/lint.js --js --fix --only --" ], "*.{js,ts,d.ts}": [ "ts-node script/gen-filenames.ts" ], "*.{cc,mm,c,h}": [ "python script/run-clang-format.py -r -c --fix" ], "*.md": [ "npm run lint:docs" ], "*.{gn,gni}": [ "npm run gn-check", "python script/run-gn-format.py" ], "*.py": [ "node script/lint.js --py --fix --only --" ], "docs/api/**/*.md": [ "ts-node script/gen-filenames.ts", "python script/check-trailing-whitespace.py --fix", "git add filenames.auto.gni" ], "{*.patch,.patches}": [ "node script/lint.js --patches --only --", "ts-node script/check-patch-diff.ts" ], "DEPS": [ "node script/gen-hunspell-filenames.js" ] }, "dependencies": { "@types/temp": "^0.8.34", "aws-sdk": "^2.727.1" } } diff --git a/devel/electron12/files/patch-electron_shell_browser_api_electron__api__web__contents.cc b/devel/electron12/files/patch-electron_shell_browser_api_electron__api__web__contents.cc index e7cd26aa69c1..2600da81a196 100644 --- a/devel/electron12/files/patch-electron_shell_browser_api_electron__api__web__contents.cc +++ b/devel/electron12/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 2021-04-20 23:32:33 UTC +--- electron/shell/browser/api/electron_api_web_contents.cc.orig 2021-05-19 20:52:49 UTC +++ electron/shell/browser/api/electron_api_web_contents.cc @@ -145,11 +145,11 @@ #include "ui/base/cocoa/defaults_utils.h" #endif -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) #include "ui/views/linux_ui/linux_ui.h" #endif -#if defined(OS_LINUX) || defined(OS_WIN) +#if defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) #include "ui/gfx/font_render_params.h" #endif @@ -388,7 +388,7 @@ base::Optional GetCursorBlinkInterval base::TimeDelta interval; if (ui::TextInsertionCaretBlinkPeriod(&interval)) return interval; -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) if (auto* linux_ui = views::LinuxUI::instance()) return linux_ui->GetCursorBlinkInterval(); #elif defined(OS_WIN) @@ -801,7 +801,7 @@ void WebContents::InitWithSessionAndOptions( accept_languages.pop_back(); prefs->accept_languages = accept_languages; -#if defined(OS_LINUX) || defined(OS_WIN) +#if defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) // Update font settings. static const base::NoDestructor params( gfx::GetFontRenderParams(gfx::FontRenderParamsQuery(), nullptr)); -@@ -2102,7 +2102,7 @@ void WebContents::ForcefullyCrashRenderer() { +@@ -2123,7 +2123,7 @@ void WebContents::ForcefullyCrashRenderer() { content::RenderProcessHost* rph = rwh->GetProcess(); if (rph) { -#if defined(OS_LINUX) || defined(OS_CHROMEOS) +#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_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(); -@@ -2668,7 +2668,7 @@ void WebContents::CopyImageAt(int x, int y) { +@@ -2689,7 +2689,7 @@ void WebContents::CopyImageAt(int x, int y) { 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 defined(OS_MAC) || defined(OS_LINUX) +#if defined(OS_MAC) || defined(OS_LINUX) || defined(OS_BSD) if (owner_window()) owner_window()->Focus(true); #endif -@@ -3455,7 +3455,7 @@ gfx::ImageSkia WebContents::GetDevToolsWindowIcon() { +@@ -3472,7 +3472,7 @@ gfx::ImageSkia WebContents::GetDevToolsWindowIcon() { } #endif -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) void WebContents::GetDevToolsWindowWMClass(std::string* name, std::string* class_name) { *class_name = Browser::Get()->GetName(); diff --git a/devel/electron12/files/patch-electron_shell_browser_api_electron__api__web__contents.h b/devel/electron12/files/patch-electron_shell_browser_api_electron__api__web__contents.h index 685943a16d78..ac6b81db2d0c 100644 --- a/devel/electron12/files/patch-electron_shell_browser_api_electron__api__web__contents.h +++ b/devel/electron12/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 2021-04-22 15:13:27 UTC +--- electron/shell/browser/api/electron_api_web_contents.h.orig 2021-05-19 20:52:49 UTC +++ electron/shell/browser/api/electron_api_web_contents.h -@@ -669,7 +669,7 @@ class WebContents : public gin::Wrappable +@@ -670,7 +670,7 @@ class WebContents : public gin::Wrappable #if defined(TOOLKIT_VIEWS) && !defined(OS_MAC) gfx::ImageSkia GetDevToolsWindowIcon() override; #endif -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) void GetDevToolsWindowWMClass(std::string* name, std::string* class_name) override; #endif diff --git a/devel/electron12/files/patch-electron_shell_browser_electron__browser__client.cc b/devel/electron12/files/patch-electron_shell_browser_electron__browser__client.cc index b5f1da38f90b..fef1f3621234 100644 --- a/devel/electron12/files/patch-electron_shell_browser_electron__browser__client.cc +++ b/devel/electron12/files/patch-electron_shell_browser_electron__browser__client.cc @@ -1,11 +1,11 @@ ---- electron/shell/browser/electron_browser_client.cc.orig 2021-04-20 23:32:33 UTC +--- electron/shell/browser/electron_browser_client.cc.orig 2021-05-17 18:04:51 UTC +++ electron/shell/browser/electron_browser_client.cc -@@ -169,7 +169,7 @@ +@@ -171,7 +171,7 @@ #include "content/public/common/child_process_host.h" #endif -#if defined(OS_LINUX) && !defined(MAS_BUILD) +#if defined(OS_LINUX) && !defined(MAS_BUILD) && !defined(OS_BSD) #include "base/debug/leak_annotations.h" #include "components/crash/content/browser/crash_handler_host_linux.h" #include "components/crash/core/app/breakpad_linux.h" // nogncheck diff --git a/devel/electron12/files/patch-electron_shell_browser_native__window__views.cc b/devel/electron12/files/patch-electron_shell_browser_native__window__views.cc index 3aaa28f24ed0..411ff4d112c9 100644 --- a/devel/electron12/files/patch-electron_shell_browser_native__window__views.cc +++ b/devel/electron12/files/patch-electron_shell_browser_native__window__views.cc @@ -1,146 +1,146 @@ ---- electron/shell/browser/native_window_views.cc.orig 2021-04-30 18:57:27 UTC +--- electron/shell/browser/native_window_views.cc.orig 2021-05-19 20:52:49 UTC +++ electron/shell/browser/native_window_views.cc @@ -44,7 +44,7 @@ #include "ui/wm/core/shadow_types.h" #include "ui/wm/core/window_util.h" -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) #include "base/strings/string_util.h" #include "shell/browser/browser.h" #include "shell/browser/linux/unity_service.h" -@@ -203,7 +203,7 @@ NativeWindowViews::NativeWindowViews(const gin_helper: +@@ -207,7 +207,7 @@ NativeWindowViews::NativeWindowViews(const gin_helper: params.parent = parent->GetNativeWindow(); params.native_widget = new ElectronDesktopNativeWidgetAura(this); -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) std::string name = Browser::Get()->GetName(); // Set WM_WINDOW_ROLE. params.wm_role_name = "browser-window"; -@@ -233,7 +233,7 @@ NativeWindowViews::NativeWindowViews(const gin_helper: +@@ -237,7 +237,7 @@ NativeWindowViews::NativeWindowViews(const gin_helper: } #endif -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) if (parent) SetParentWindow(parent); #endif -@@ -328,7 +328,7 @@ NativeWindowViews::NativeWindowViews(const gin_helper: +@@ -332,7 +332,7 @@ NativeWindowViews::NativeWindowViews(const gin_helper: last_window_state_ = ui::SHOW_STATE_NORMAL; #endif -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) // Listen to move events. aura::Window* window = GetNativeWindow(); if (window) -@@ -348,7 +348,7 @@ NativeWindowViews::~NativeWindowViews() { +@@ -352,7 +352,7 @@ NativeWindowViews::~NativeWindowViews() { SetForwardMouseMessages(false); #endif -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) aura::Window* window = GetNativeWindow(); if (window) window->RemovePreTargetHandler(this); -@@ -463,7 +463,7 @@ bool NativeWindowViews::IsVisible() { +@@ -467,7 +467,7 @@ bool NativeWindowViews::IsVisible() { bool NativeWindowViews::IsEnabled() { #if defined(OS_WIN) return ::IsWindowEnabled(GetAcceleratedWidget()); -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) #if defined(USE_X11) if (!features::IsUsingOzonePlatform()) { return !event_disabler_.get(); -@@ -522,7 +522,7 @@ void NativeWindowViews::SetEnabledInternal(bool enable +@@ -526,7 +526,7 @@ void NativeWindowViews::SetEnabledInternal(bool enable #endif } -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) void NativeWindowViews::Maximize() { if (IsVisible()) widget()->Maximize(); -@@ -638,7 +638,7 @@ bool NativeWindowViews::IsFullscreen() const { +@@ -642,7 +642,7 @@ bool NativeWindowViews::IsFullscreen() const { } void NativeWindowViews::SetBounds(const gfx::Rect& bounds, bool animate) { -#if defined(OS_WIN) || defined(OS_LINUX) +#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD) // On Linux and Windows the minimum and maximum size should be updated with // window size when window is not resizable. if (!resizable_) { -@@ -855,7 +855,7 @@ bool NativeWindowViews::IsClosable() { +@@ -859,7 +859,7 @@ bool NativeWindowViews::IsClosable() { return false; } return !(info.fState & MFS_DISABLED); -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) return true; #endif } -@@ -1231,7 +1231,7 @@ void NativeWindowViews::SetProgressBar(double progress +@@ -1235,7 +1235,7 @@ void NativeWindowViews::SetProgressBar(double progress NativeWindow::ProgressState state) { #if defined(OS_WIN) taskbar_host_.SetProgressBar(GetAcceleratedWidget(), progress, state); -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) if (unity::IsRunning()) { unity::SetProgressFraction(progress); } -@@ -1291,7 +1291,7 @@ content::DesktopMediaID NativeWindowViews::GetDesktopM +@@ -1295,7 +1295,7 @@ content::DesktopMediaID NativeWindowViews::GetDesktopM #if defined(OS_WIN) window_handle = reinterpret_cast(accelerated_widget); -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) window_handle = static_cast(accelerated_widget); #endif aura::WindowTreeHost* const host = -@@ -1394,7 +1394,7 @@ void NativeWindowViews::SetIcon(HICON window_icon, HIC +@@ -1398,7 +1398,7 @@ void NativeWindowViews::SetIcon(HICON window_icon, HIC SendMessage(hwnd, WM_SETICON, ICON_BIG, reinterpret_cast(app_icon_.get())); } -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) void NativeWindowViews::SetIcon(const gfx::ImageSkia& icon) { auto* tree_host = views::DesktopWindowTreeHostLinux::GetHostForWidget( GetAcceleratedWidget()); -@@ -1444,7 +1444,7 @@ void NativeWindowViews::OnWidgetBoundsChanged(views::W +@@ -1448,7 +1448,7 @@ void NativeWindowViews::OnWidgetBoundsChanged(views::W } void NativeWindowViews::OnWidgetDestroying(views::Widget* widget) { -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) aura::Window* window = GetNativeWindow(); if (window) window->RemovePreTargetHandler(this); -@@ -1482,7 +1482,7 @@ bool NativeWindowViews::CanMaximize() const { +@@ -1486,7 +1486,7 @@ bool NativeWindowViews::CanMaximize() const { bool NativeWindowViews::CanMinimize() const { #if defined(OS_WIN) return minimizable_; -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) return true; #endif } -@@ -1554,7 +1554,7 @@ void NativeWindowViews::HandleKeyboardEvent( +@@ -1558,7 +1558,7 @@ void NativeWindowViews::HandleKeyboardEvent( if (widget_destroyed_) return; -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) if (event.windows_key_code == ui::VKEY_BROWSER_BACK) NotifyWindowExecuteAppCommand(kBrowserBackward); else if (event.windows_key_code == ui::VKEY_BROWSER_FORWARD) -@@ -1566,7 +1566,7 @@ void NativeWindowViews::HandleKeyboardEvent( +@@ -1570,7 +1570,7 @@ void NativeWindowViews::HandleKeyboardEvent( root_view_->HandleKeyEvent(event); } -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) void NativeWindowViews::OnMouseEvent(ui::MouseEvent* event) { if (event->type() != ui::ET_MOUSE_PRESSED) return; diff --git a/devel/electron12/files/patch-electron_shell_browser_native__window__views.h b/devel/electron12/files/patch-electron_shell_browser_native__window__views.h index 52d981d93c52..aeb0716937e4 100644 --- a/devel/electron12/files/patch-electron_shell_browser_native__window__views.h +++ b/devel/electron12/files/patch-electron_shell_browser_native__window__views.h @@ -1,20 +1,20 @@ ---- electron/shell/browser/native_window_views.h.orig 2021-04-20 23:32:33 UTC +--- electron/shell/browser/native_window_views.h.orig 2021-05-19 20:52:49 UTC +++ electron/shell/browser/native_window_views.h -@@ -159,7 +159,7 @@ class NativeWindowViews : public NativeWindow, +@@ -163,7 +163,7 @@ class NativeWindowViews : public NativeWindow, LPARAM l_param, LRESULT* result); void SetIcon(HICON small_icon, HICON app_icon); -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) void SetIcon(const gfx::ImageSkia& icon); #endif -@@ -219,7 +219,7 @@ class NativeWindowViews : public NativeWindow, +@@ -223,7 +223,7 @@ class NativeWindowViews : public NativeWindow, content::WebContents*, const content::NativeWebKeyboardEvent& event) override; -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) // ui::EventHandler: void OnMouseEvent(ui::MouseEvent* event) override; #endif diff --git a/devel/electron12/files/patch-electron_spec-main_chromium-spec.ts b/devel/electron12/files/patch-electron_spec-main_chromium-spec.ts index 3b533d761069..042c11ba4f41 100644 --- a/devel/electron12/files/patch-electron_spec-main_chromium-spec.ts +++ b/devel/electron12/files/patch-electron_spec-main_chromium-spec.ts @@ -1,44 +1,44 @@ ---- electron/spec-main/chromium-spec.ts.orig 2021-04-20 23:32:33 UTC +--- electron/spec-main/chromium-spec.ts.orig 2021-05-19 20:52:49 UTC +++ electron/spec-main/chromium-spec.ts @@ -397,13 +397,13 @@ describe('command line switches', () => { it('should not set an invalid locale', async () => testLocale('asdfkl', currentLocale)); const lcAll = String(process.env.LC_ALL); - ifit(process.platform === 'linux')('current process has a valid LC_ALL env', async () => { + ifit(process.platform === 'linux' || process.platform === 'freebsd')('current process has a valid LC_ALL env', async () => { // The LC_ALL env should not be set to DOM locale string. expect(lcAll).to.not.equal(app.getLocale()); }); - ifit(process.platform === 'linux')('should not change LC_ALL', async () => testLocale('fr', lcAll, true)); - ifit(process.platform === 'linux')('should not change LC_ALL when setting invalid locale', async () => testLocale('asdfkl', lcAll, true)); - ifit(process.platform === 'linux')('should not change LC_ALL when --lang is not set', async () => testLocale('', lcAll, true)); + ifit(process.platform === 'linux' || process.platform === 'freebsd')('should not change LC_ALL', async () => testLocale('fr', lcAll, true)); + ifit(process.platform === 'linux' || process.platform === 'freebsd')('should not change LC_ALL when setting invalid locale', async () => testLocale('asdfkl', lcAll, true)); + ifit(process.platform === 'linux' || process.platform === 'freebsd')('should not change LC_ALL when --lang is not set', async () => testLocale('', lcAll, true)); }); describe('--remote-debugging-pipe switch', () => { -@@ -1453,12 +1453,12 @@ describe('font fallback', () => { +@@ -1478,12 +1478,12 @@ describe('font fallback', () => { expect(fonts[0].familyName).to.equal('Arial'); } else if (process.platform === 'darwin') { expect(fonts[0].familyName).to.equal('Helvetica'); - } else if (process.platform === 'linux') { + } else if (process.platform === 'linux' || process.platform === 'freebsd') { expect(fonts[0].familyName).to.equal('DejaVu Sans'); } // I think this depends on the distro? We don't specify a default. }); - ifit(process.platform !== 'linux')('should fall back to Japanese font for sans-serif Japanese script', async function () { + ifit(process.platform !== 'linux' && process.platform !== 'freebsd')('should fall back to Japanese font for sans-serif Japanese script', async function () { const html = ` -@@ -1659,7 +1659,7 @@ describe('navigator.clipboard', () => { +@@ -1683,7 +1683,7 @@ describe('navigator.clipboard', () => { }); }); -ifdescribe((process.platform !== 'linux' || app.isUnityRunning()))('navigator.setAppBadge/clearAppBadge', () => { +ifdescribe(((process.platform !== 'linux' && process.platform !== 'freebsd') || app.isUnityRunning()))('navigator.setAppBadge/clearAppBadge', () => { let w: BrowserWindow; const expectedBadgeCount = 42;