Skip to content

Commit

Permalink
Show file tree
Hide file tree
Showing 22 changed files with 171 additions and 97 deletions.
3 changes: 1 addition & 2 deletions devel/electron19/Makefile
@@ -1,7 +1,6 @@
PORTNAME= electron
DISTVERSIONPREFIX= v
DISTVERSION= ${ELECTRON_VER:S/-beta./.b/}
PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= https://github.com/tagattie/FreeBSD-Electron/releases/download/v19.0.9/:chromium \
https://commondatastorage.googleapis.com/chromium-nodejs/:chromium_node \
Expand Down Expand Up @@ -155,7 +154,7 @@ REACTIVEOBJC_VER= 74ab5baccc6f7202c8ac69a8d1e152c29dc1ea76
# See ${WRKSRC}/electron/DEPS for MANTLE_VER
MANTLE_VER= 78d3966b3c331292ea29ec38661b25df0a245948

YARN_TIMESTAMP= 1662535038
YARN_TIMESTAMP= 1673511086

GN_ARGS+= clang_use_chrome_plugins=false \
enable_hangout_services_extension=true \
Expand Down
2 changes: 1 addition & 1 deletion devel/electron19/Makefile.version
@@ -1,2 +1,2 @@
ELECTRON_VER= 19.0.15
ELECTRON_VER= 19.1.9
ELECTRON_VER_MAJOR= ${ELECTRON_VER:C/\..*//}
10 changes: 5 additions & 5 deletions devel/electron19/distinfo
@@ -1,14 +1,14 @@
TIMESTAMP = 1662536492
TIMESTAMP = 1673767597
SHA256 (electron/chromium-102.0.5005.167.tar.xz) = 0ef31269e4fd0fe5871e29bb16a3a7aaea1de7eee5d7b2c4c209eff4b196d00e
SIZE (electron/chromium-102.0.5005.167.tar.xz) = 1302429260
SHA256 (electron/df473d4b1ab26ce6b669007521f2ffb8ff99f9d7) = 38fa60c59a8398ae33f8d12c1234735a74dc3c8d0c6d4bc7a9c212c2b4b7fef8
SIZE (electron/df473d4b1ab26ce6b669007521f2ffb8ff99f9d7) = 12046529
SHA256 (electron/cd96fc55dc243f6c6f4cb63ad117cad6cd48dceb) = ec973eccd669d417fbf2d0a4dac730744a3174268ff062db5451b55c82bc3492
SIZE (electron/cd96fc55dc243f6c6f4cb63ad117cad6cd48dceb) = 26759650
SHA256 (electron/electron-yarn-cache-19.0.15.tar.xz) = 0b39a12041b90a98204b67f69b3452bc45debf13a4b9753d88a70b5906a34541
SIZE (electron/electron-yarn-cache-19.0.15.tar.xz) = 37910588
SHA256 (electron/electron-electron-v19.0.15_GH0.tar.gz) = 47e01fa2778c9991a4c441b5e0e4c62543f890e27250354c4a7b0f5512215703
SIZE (electron/electron-electron-v19.0.15_GH0.tar.gz) = 10505520
SHA256 (electron/electron-yarn-cache-19.1.9.tar.xz) = aaf6879fc53c0b9aa8e9ab9589185d765a1d04e5829d48d3d0bf340a70d14f19
SIZE (electron/electron-yarn-cache-19.1.9.tar.xz) = 37894480
SHA256 (electron/electron-electron-v19.1.9_GH0.tar.gz) = 5ab0d40a1c6c0cd7b961724c4bb72c533a6a608c0f62bdb9eddcb9013dfcda98
SIZE (electron/electron-electron-v19.1.9_GH0.tar.gz) = 10583692
SHA256 (electron/nodejs-node-v16.14.2_GH0.tar.gz) = cc2331a5c35d3dda0035d9cba71c3b8e234bc68e18ffd955b385c1e97062528f
SIZE (electron/nodejs-node-v16.14.2_GH0.tar.gz) = 88432213
SHA256 (electron/nodejs-nan-65b32af46e9d7fab2e4ff657751205b3865f4920_GH0.tar.gz) = a649b75bfa9c1a0254c73d022c6e98924b9471f593bcc83832daaf68da4cae8d
Expand Down
10 changes: 5 additions & 5 deletions devel/electron19/files/package.json
@@ -1,12 +1,13 @@
{
"name": "electron",
"version": "19.0.15",
"version": "0.0.0-development",
"repository": "https://github.com/electron/electron",
"description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",
"devDependencies": {
"@azure/storage-blob": "^12.9.0",
"@electron/docs-parser": "^0.12.4",
"@electron/typescript-definitions": "^8.9.5",
"@electron/asar": "^3.2.1",
"@electron/docs-parser": "^1.0.0",
"@electron/typescript-definitions": "^8.10.0",
"@octokit/auth-app": "^2.10.0",
"@octokit/rest": "^18.0.3",
"@primer/octicons": "^10.0.0",
Expand All @@ -31,7 +32,6 @@
"@types/webpack-env": "^1.16.3",
"@typescript-eslint/eslint-plugin": "^4.4.1",
"@typescript-eslint/parser": "^4.4.1",
"asar": "^3.1.0",
"aws-sdk": "^2.814.0",
"check-for-leaks": "^1.2.1",
"colors": "1.4.0",
Expand Down Expand Up @@ -89,7 +89,7 @@
"lint:docs-relative-links": "python3 ./script/check-relative-doc-links.py",
"lint:markdownlint": "markdownlint \"*.md\" \"docs/**/*.md\"",
"lint:js-in-markdown": "standard-markdown docs",
"create-api-json": "electron-docs-parser --dir=./",
"create-api-json": "node script/create-api-json.js",
"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",
Expand Down
29 changes: 19 additions & 10 deletions devel/electron19/files/patch-electron_BUILD.gn
@@ -1,6 +1,15 @@
--- electron/BUILD.gn.orig 2022-06-30 15:53:29 UTC
--- electron/BUILD.gn.orig 2022-11-28 15:30:00 UTC
+++ electron/BUILD.gn
@@ -448,7 +448,7 @@ source_set("electron_lib") {
@@ -104,8 +104,6 @@ electron_version = exec_script("script/print-version.p
[],
"trim string",
[
- ".git/packed-refs",
- ".git/HEAD",
"script/lib/get-version.js",
])
@@ -486,7 +484,7 @@ source_set("electron_lib") {
defines += [ "GDK_DISABLE_DEPRECATION_WARNINGS" ]
}
Expand All @@ -9,7 +18,7 @@
deps += [
"//components/crash/core/app",
"//components/crash/core/browser",
@@ -490,6 +490,10 @@ source_set("electron_lib") {
@@ -528,6 +526,10 @@ source_set("electron_lib") {
]
}
Expand All @@ -20,7 +29,7 @@
if (is_mac) {
deps += [
"//components/remote_cocoa/app_shim",
@@ -546,6 +550,12 @@ source_set("electron_lib") {
@@ -584,6 +586,12 @@ source_set("electron_lib") {
cflags_objcc = [ "-fobjc-weak" ]
}
}
Expand All @@ -33,16 +42,16 @@
if (is_linux) {
libs = [ "xshmfence" ]
deps += [
@@ -1180,7 +1190,7 @@ if (is_mac) {
":electron_app_manifest",
@@ -1218,7 +1226,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",
@@ -1206,7 +1216,7 @@ if (is_mac) {
@@ -1244,7 +1252,7 @@ if (is_mac) {
public_deps = [ "//tools/v8_context_snapshot:v8_context_snapshot" ]
}
Expand All @@ -51,7 +60,7 @@
data_deps += [ "//components/crash/core/app:chrome_crashpad_handler" ]
}
@@ -1274,7 +1284,7 @@ if (is_mac) {
@@ -1311,7 +1319,7 @@ if (is_mac) {
configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
}
Expand All @@ -60,8 +69,8 @@
deps += [ "//sandbox/linux:chrome_sandbox" ]
}
}
@@ -1406,7 +1416,7 @@ dist_zip("electron_dist_zip") {
":electron_version",
@@ -1438,7 +1446,7 @@ dist_zip("electron_dist_zip") {
":electron_version_file",
":licenses",
]
- if (is_linux) {
Expand Down
@@ -1,6 +1,6 @@
--- electron/lib/common/api/clipboard.ts.orig 2021-12-03 01:46:05 UTC
--- electron/lib/common/api/clipboard.ts.orig 2022-11-28 15:30:00 UTC
+++ electron/lib/common/api/clipboard.ts
@@ -11,7 +11,7 @@ if (process.type === 'renderer') {
@@ -12,7 +12,7 @@ if (process.type === 'renderer') {
return (...args: any[]) => ipcRendererUtils.invokeSync(IPC_MESSAGES.BROWSER_CLIPBOARD_SYNC, method, ...args);
};

Expand Down
17 changes: 17 additions & 0 deletions devel/electron19/files/patch-electron_script_lib_get-version.js
@@ -0,0 +1,17 @@
--- electron/script/lib/get-version.js.orig 2023-01-15 07:43:40 UTC
+++ electron/script/lib/get-version.js
@@ -11,12 +11,10 @@ module.exports.getElectronVersion = () => {
// The only difference in the "git describe" technique is that technically a commit can "change" it's version
// number if a tag is created / removed retroactively. i.e. the first time a commit is pushed it will be 1.2.3
// and after the tag is made rebuilding the same commit will result in it being 1.2.4
- const output = spawnSync('git', ['describe', '--tags', '--abbrev=0'], {
- cwd: path.resolve(__dirname, '..', '..')
- });
+ const output = spawnSync('basename', [path.resolve(__dirname, '..', '..', '..', '..')]);
if (output.status !== 0) {
console.error(output.stderr);
throw new Error('Failed to get current electron version');
}
- return output.stdout.toString().trim().replace(/^v/g, '');
+ return output.stdout.toString().trim().replace(/^electron-/g, '');
};
@@ -0,0 +1,29 @@
--- electron/shell/browser/api/electron_api_desktop_capturer.cc.orig 2023-01-13 05:24:55 UTC
+++ electron/shell/browser/api/electron_api_desktop_capturer.cc
@@ -36,7 +36,7 @@
#include "third_party/webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h"
#include "third_party/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h"
#include "ui/display/win/display_info.h"
-#elif BUILDFLAG(IS_LINUX)
+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
#if defined(USE_OZONE_PLATFORM_X11)
#include "base/logging.h"
#include "ui/base/x/x11_display_util.h"
@@ -48,7 +48,7 @@
#endif // defined(USE_OZONE_PLATFORM_X11)
#endif // BUILDFLAG(IS_WIN)

-#if BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
// Private function in ui/base/x/x11_display_util.cc
std::map<x11::RandR::Output, int> GetMonitors(int version,
x11::RandR* randr,
@@ -295,7 +295,7 @@ void DesktopCapturer::UpdateSourcesList(DesktopMediaLi
for (auto& source : screen_sources) {
source.display_id = base::NumberToString(source.media_list_source.id.id);
}
-#elif BUILDFLAG(IS_LINUX)
+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
#if defined(USE_OZONE_PLATFORM_X11)
// On Linux, with X11, the source id is the numeric value of the
// display name atom and the display id is either the EDID or the
@@ -1,6 +1,6 @@
--- electron/shell/browser/api/electron_api_web_contents.cc.orig 2022-08-17 15:33:41 UTC
--- electron/shell/browser/api/electron_api_web_contents.cc.orig 2022-11-28 15:30:00 UTC
+++ electron/shell/browser/api/electron_api_web_contents.cc
@@ -150,11 +150,11 @@
@@ -154,11 +154,11 @@
#include "ui/base/cocoa/defaults_utils.h"
#endif

Expand All @@ -14,7 +14,7 @@
#include "ui/gfx/font_render_params.h"
#endif

@@ -396,7 +396,7 @@ absl::optional<base::TimeDelta> GetCursorBlinkInterval
@@ -399,7 +399,7 @@ absl::optional<base::TimeDelta> GetCursorBlinkInterval
ui::TextInsertionCaretBlinkPeriodFromDefaults());
if (system_value)
return *system_value;
Expand All @@ -23,7 +23,7 @@
if (auto* linux_ui = views::LinuxUI::instance())
return linux_ui->GetCursorBlinkInterval();
#elif BUILDFLAG(IS_WIN)
@@ -848,7 +848,7 @@ void WebContents::InitWithSessionAndOptions(
@@ -851,7 +851,7 @@ void WebContents::InitWithSessionAndOptions(
accept_languages.pop_back();
prefs->accept_languages = accept_languages;

Expand All @@ -32,7 +32,7 @@
// Update font settings.
static const gfx::FontRenderParams params(
gfx::GetFontRenderParams(gfx::FontRenderParamsQuery(), nullptr));
@@ -2373,7 +2373,7 @@ void WebContents::ForcefullyCrashRenderer() {
@@ -2371,7 +2371,7 @@ void WebContents::ForcefullyCrashRenderer() {

content::RenderProcessHost* rph = rwh->GetProcess();
if (rph) {
Expand All @@ -41,7 +41,7 @@
// A generic |CrashDumpHungChildProcess()| is not implemented for Linux.
// Instead we send an explicit IPC to crash on the renderer's IO thread.
rph->ForceCrash();
@@ -2942,7 +2942,7 @@ void WebContents::CopyImageAt(int x, int y) {
@@ -2941,7 +2941,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.
Expand All @@ -50,7 +50,7 @@
if (owner_window())
owner_window()->Focus(true);
#endif
@@ -3783,7 +3783,7 @@ ui::ImageModel WebContents::GetDevToolsWindowIcon() {
@@ -3782,7 +3782,7 @@ ui::ImageModel WebContents::GetDevToolsWindowIcon() {
}
#endif

Expand Down
@@ -1,6 +1,6 @@
--- electron/shell/browser/api/electron_api_web_contents.h.orig 2022-07-21 18:53:47 UTC
--- electron/shell/browser/api/electron_api_web_contents.h.orig 2022-11-28 15:30:00 UTC
+++ electron/shell/browser/api/electron_api_web_contents.h
@@ -719,7 +719,7 @@ class WebContents : public ExclusiveAccessContext,
@@ -718,7 +718,7 @@ class WebContents : public ExclusiveAccessContext,
#if defined(TOOLKIT_VIEWS) && !BUILDFLAG(IS_MAC)
ui::ImageModel GetDevToolsWindowIcon() override;
#endif
Expand Down
@@ -1,6 +1,6 @@
--- electron/shell/browser/electron_browser_client.cc.orig 2022-06-30 15:53:29 UTC
--- electron/shell/browser/electron_browser_client.cc.orig 2022-11-28 15:30:00 UTC
+++ electron/shell/browser/electron_browser_client.cc
@@ -186,7 +186,7 @@
@@ -187,7 +187,7 @@
#include "content/public/common/child_process_host.h"
#endif

Expand Down
@@ -1,4 +1,4 @@
--- electron/shell/browser/electron_browser_main_parts.cc.orig 2022-08-24 16:48:48 UTC
--- electron/shell/browser/electron_browser_main_parts.cc.orig 2022-11-28 15:30:00 UTC
+++ electron/shell/browser/electron_browser_main_parts.cc
@@ -66,7 +66,7 @@
#include "ui/wm/core/wm_state.h"
Expand All @@ -9,7 +9,7 @@
#include "base/environment.h"
#include "base/threading/thread_task_runner_handle.h"
#include "device/bluetooth/bluetooth_adapter_factory.h"
@@ -147,7 +147,7 @@ std::u16string MediaStringProvider(media::MessageId id
@@ -148,7 +148,7 @@ std::u16string MediaStringProvider(media::MessageId id
}
}

Expand All @@ -18,7 +18,7 @@
// GTK does not provide a way to check if current theme is dark, so we compare
// the text and background luminosity to get a result.
// This trick comes from FireFox.
@@ -165,7 +165,7 @@ void UpdateDarkThemeSetting() {
@@ -166,7 +166,7 @@ void UpdateDarkThemeSetting() {

} // namespace

Expand All @@ -27,7 +27,7 @@
class DarkThemeObserver : public ui::NativeThemeObserver {
public:
DarkThemeObserver() = default;
@@ -218,7 +218,7 @@ int ElectronBrowserMainParts::PreEarlyInitialization()
@@ -219,7 +219,7 @@ int ElectronBrowserMainParts::PreEarlyInitialization()
#if BUILDFLAG(IS_POSIX)
HandleSIGCHLD();
#endif
Expand All @@ -36,7 +36,7 @@
DetectOzonePlatform();
ui::OzonePlatform::PreEarlyInitialization();
#endif
@@ -283,7 +283,7 @@ int ElectronBrowserMainParts::PreCreateThreads() {
@@ -284,7 +284,7 @@ int ElectronBrowserMainParts::PreCreateThreads() {
#if defined(USE_AURA)
screen_ = views::CreateDesktopScreen();
display::Screen::SetScreenInstance(screen_.get());
Expand All @@ -45,7 +45,7 @@
views::LinuxUI::instance()->UpdateDeviceScaleFactor();
#endif
#endif
@@ -300,7 +300,7 @@ int ElectronBrowserMainParts::PreCreateThreads() {
@@ -301,7 +301,7 @@ int ElectronBrowserMainParts::PreCreateThreads() {
// happen before the ResourceBundle is loaded
if (locale.empty())
l10n_util::OverrideLocaleWithCocoaLocale();
Expand All @@ -54,7 +54,7 @@
// 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
@@ -323,7 +323,7 @@ int ElectronBrowserMainParts::PreCreateThreads() {
@@ -324,7 +324,7 @@ int ElectronBrowserMainParts::PreCreateThreads() {
ElectronBrowserClient::SetApplicationLocale(app_locale);
fake_browser_process_->SetApplicationLocale(app_locale);

Expand All @@ -63,7 +63,7 @@
// Reset to the original LC_ALL since we should not be changing it.
if (!locale.empty()) {
if (lc_all)
@@ -370,7 +370,7 @@ void ElectronBrowserMainParts::PostDestroyThreads() {
@@ -371,7 +371,7 @@ void ElectronBrowserMainParts::PostDestroyThreads() {
}

void ElectronBrowserMainParts::ToolkitInitialized() {
Expand All @@ -72,7 +72,16 @@
auto linux_ui = BuildGtkUi();
linux_ui->Initialize();
DCHECK(ui::LinuxInputMethodContextFactory::instance());
@@ -487,7 +487,9 @@ void ElectronBrowserMainParts::PostCreateMainMessageLo
@@ -482,7 +482,7 @@ void ElectronBrowserMainParts::WillRunMainMessageLoop(
}

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)
@@ -491,7 +491,9 @@ void ElectronBrowserMainParts::PostCreateMainMessageLo
ui::OzonePlatform::GetInstance()->PostCreateMainMessageLoop(
std::move(shutdown_cb));
bluez::DBusBluezManagerWrapperLinux::Initialize();
Expand All @@ -82,7 +91,7 @@
// 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.
@@ -546,7 +548,7 @@ void ElectronBrowserMainParts::PostMainMessageLoopRun(
@@ -553,7 +555,7 @@ void ElectronBrowserMainParts::PostMainMessageLoopRun(
fake_browser_process_->PostMainMessageLoopRun();
content::DevToolsAgentHost::StopRemoteDebuggingPipeHandler();

Expand Down
@@ -1,8 +1,8 @@
--- electron/shell/browser/net/system_network_context_manager.cc.orig 2022-05-18 15:31:32 UTC
--- electron/shell/browser/net/system_network_context_manager.cc.orig 2022-11-28 15:30:00 UTC
+++ electron/shell/browser/net/system_network_context_manager.cc
@@ -46,7 +46,7 @@
#include "components/os_crypt/keychain_password_mac.h"
#endif
@@ -42,7 +42,7 @@
#include "shell/common/options_switches.h"
#include "url/gurl.h"

-#if BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
Expand Down

0 comments on commit da0e26e

Please sign in to comment.