-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
592 additions
and
0 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
tur-electron/electron-30/0001-electron-getversion-from-file.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
We pass `--no-history` to gclient, so there will be no version for electron. | ||
--- a/electron/script/get-git-version.py | ||
+++ b/electron/script/get-git-version.py | ||
@@ -20,7 +20,7 @@ | ||
|
||
try: | ||
output = subprocess.check_output( | ||
- ['git', 'describe', '--tags', '--abbrev=0'], | ||
+ ['cat', 'ELECTRON_VERSION'], | ||
cwd=os.path.abspath(os.path.join(os.path.dirname(__file__), '..')), | ||
stderr=subprocess.PIPE, | ||
universal_newlines=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- a/third_party/electron_node/deps/v8/src/trap-handler/trap-handler.h | ||
+++ b/third_party/electron_node/deps/v8/src/trap-handler/trap-handler.h | ||
@@ -19,7 +19,7 @@ | ||
|
||
// X64 on Linux, Windows, MacOS, FreeBSD. | ||
#if V8_HOST_ARCH_X64 && V8_TARGET_ARCH_X64 && \ | ||
- ((V8_OS_LINUX && !V8_OS_ANDROID) || V8_OS_WIN || V8_OS_DARWIN || \ | ||
+ (V8_OS_LINUX || V8_OS_WIN || V8_OS_DARWIN || \ | ||
V8_OS_FREEBSD) | ||
#define V8_TRAP_HANDLER_SUPPORTED true | ||
// Arm64 (non-simulator) on Mac. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- a/third_party/electron_node/deps/cares/config/linux/ares_config.h | ||
+++ b/third_party/electron_node/deps/cares/config/linux/ares_config.h | ||
@@ -59,10 +59,10 @@ | ||
#define HAVE_ARPA_INET_H 1 | ||
|
||
/* Define to 1 if you have the <arpa/nameser_compat.h> header file. */ | ||
-#define HAVE_ARPA_NAMESER_COMPAT_H 1 | ||
+// #define HAVE_ARPA_NAMESER_COMPAT_H 1 | ||
|
||
/* Define to 1 if you have the <arpa/nameser.h> header file. */ | ||
-#define HAVE_ARPA_NAMESER_H 1 | ||
+// #define HAVE_ARPA_NAMESER_H 1 | ||
|
||
/* Define to 1 if you have the <assert.h> header file. */ | ||
#define HAVE_ASSERT_H 1 | ||
@@ -128,7 +128,7 @@ | ||
#define HAVE_GETNAMEINFO 1 | ||
|
||
/* Define to 1 if you have the getservbyport_r function. */ | ||
-#define HAVE_GETSERVBYPORT_R 1 | ||
+// #define HAVE_GETSERVBYPORT_R 1 | ||
|
||
/* Define to 1 if you have the `gettimeofday' function. */ | ||
#define HAVE_GETTIMEOFDAY 1 |
16 changes: 16 additions & 0 deletions
16
tur-electron/electron-30/0004-electron-disable-sandbox.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- a/electron/shell/app/electron_main_delegate.cc | ||
+++ b/electron/shell/app/electron_main_delegate.cc | ||
@@ -256,8 +256,13 @@ | ||
if (env->HasVar(kElectronEnableStackDumping)) | ||
base::debug::EnableInProcessStackDumping(); | ||
|
||
+#ifndef __TERMUX__ | ||
if (env->HasVar(kElectronDisableSandbox)) | ||
command_line->AppendSwitch(sandbox::policy::switches::kNoSandbox); | ||
+#else | ||
+ command_line->AppendSwitch(sandbox::policy::switches::kNoSandbox); | ||
+ command_line->AppendSwitch(sandbox::policy::switches::kDisableSeccompFilterSandbox); | ||
+#endif | ||
|
||
tracing_sampler_profiler_ = | ||
tracing::TracingSamplerProfiler::CreateOnMainThread(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- a/third_party/electron_node/src/node_internals.h | ||
+++ b/third_party/electron_node/src/node_internals.h | ||
@@ -287,9 +287,9 @@ | ||
|
||
// Functions defined in node.cc that are exposed via the bootstrapper object | ||
|
||
-#if defined(__POSIX__) && !defined(__ANDROID__) && !defined(__CloudABI__) | ||
+#if defined(__POSIX__) && !defined(__CloudABI__) | ||
#define NODE_IMPLEMENTS_POSIX_CREDENTIALS 1 | ||
-#endif // defined(__POSIX__) && !defined(__ANDROID__) && !defined(__CloudABI__) | ||
+#endif // defined(__POSIX__) && !defined(__CloudABI__) | ||
|
||
namespace credentials { | ||
bool SafeGetenv(const char* key, |
53 changes: 53 additions & 0 deletions
53
tur-electron/electron-30/0006-gtk-fix-dynamic-loaded-libraries.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- a/ui/gtk/gtk_compat.cc | ||
+++ b/ui/gtk/gtk_compat.cc | ||
@@ -62,22 +62,38 @@ | ||
} | ||
|
||
void* GetLibGio() { | ||
+#ifdef __TERMUX__ | ||
+ static void* libgio = DlOpen("libgio-2.0.so"); | ||
+#else | ||
static void* libgio = DlOpen("libgio-2.0.so.0"); | ||
+#endif | ||
return libgio; | ||
} | ||
|
||
void* GetLibGdk3() { | ||
+#ifdef __TERMUX__ | ||
+ static void* libgdk3 = DlOpen("libgdk-3.so"); | ||
+#else | ||
static void* libgdk3 = DlOpen("libgdk-3.so.0"); | ||
+#endif | ||
return libgdk3; | ||
} | ||
|
||
void* GetLibGtk3(bool check = true) { | ||
+#ifdef __TERMUX__ | ||
+ static void* libgtk3 = DlOpen("libgtk-3.so", check); | ||
+#else | ||
static void* libgtk3 = DlOpen("libgtk-3.so.0", check); | ||
+#endif | ||
return libgtk3; | ||
} | ||
|
||
void* GetLibGtk4(bool check = true) { | ||
+#ifdef __TERMUX__ | ||
+ static void* libgtk4 = DlOpen("libgtk-4.so", check); | ||
+#else | ||
static void* libgtk4 = DlOpen("libgtk-4.so.1", check); | ||
+#endif | ||
return libgtk4; | ||
} | ||
|
||
@@ -124,7 +140,11 @@ | ||
} // namespace | ||
|
||
void* GetLibGdkPixbuf() { | ||
+#ifdef __TERMUX__ | ||
+ static void* libgdk_pixbuf = DlOpen("libgdk_pixbuf-2.0.so"); | ||
+#else | ||
static void* libgdk_pixbuf = DlOpen("libgdk_pixbuf-2.0.so.0"); | ||
+#endif | ||
return libgdk_pixbuf; | ||
} | ||
|
16 changes: 16 additions & 0 deletions
16
tur-electron/electron-30/0007-add-missing-function-for-extension_action_api.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- a/electron/shell/browser/extensions/api/extension_action/extension_action_api.cc | ||
+++ b/electron/shell/browser/extensions/api/extension_action/extension_action_api.cc | ||
@@ -154,6 +154,13 @@ | ||
} | ||
|
||
ExtensionFunction::ResponseAction | ||
+ExtensionActionOpenPopupFunction::RunExtensionAction() { | ||
+ LOG(INFO) << "chrome.action.openPopup is not supported in Electron"; | ||
+ | ||
+ return RespondNow(NoArguments()); | ||
+} | ||
+ | ||
+ExtensionFunction::ResponseAction | ||
ExtensionActionGetBadgeTextFunction::RunExtensionAction() { | ||
LOG(INFO) << "chrome.action.getBadgeText is not supported in Electron"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- a/build/config/compiler/BUILD.gn | ||
+++ b/build/config/compiler/BUILD.gn | ||
@@ -1913,6 +1913,11 @@ | ||
} | ||
} | ||
|
||
+ cflags += [ | ||
+ "-Wno-unknown-warning-option", | ||
+ "-Wno-unknown-pragmas", | ||
+ ] | ||
+ | ||
# Rust warnings | ||
|
||
# Require `unsafe` blocks even in `unsafe` fns. This is intended to become |
20 changes: 20 additions & 0 deletions
20
tur-electron/electron-30/0100-z-iwyu-blink-include-atomic.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
https://github.com/chromium/chromium/commit/8be4d17beb71c29118c3337268f3e7b3930a657f | ||
|
||
--- a/third_party/blink/renderer/bindings/core/v8/script_streamer.cc | ||
+++ b/third_party/blink/renderer/bindings/core/v8/script_streamer.cc | ||
@@ -4,6 +4,7 @@ | ||
|
||
#include "third_party/blink/renderer/bindings/core/v8/script_streamer.h" | ||
|
||
+#include <atomic> | ||
#include <memory> | ||
#include <utility> | ||
|
||
@@ -60,7 +61,6 @@ | ||
#include "third_party/blink/renderer/platform/wtf/shared_buffer.h" | ||
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h" | ||
#include "third_party/blink/renderer/platform/wtf/text/text_encoding_registry.h" | ||
-#include "third_party/libc++/src/include/__atomic/atomic.h" | ||
|
||
namespace blink { | ||
namespace { |
12 changes: 12 additions & 0 deletions
12
...ron/electron-30/0101-new_tab_page-add-missing-dep-to-cr_components-history_clusters.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
https://github.com/chromium/chromium/commit/18681c656c989a954657a559b9c123f046b04250 | ||
|
||
--- a/chrome/browser/resources/new_tab_page/BUILD.gn | ||
+++ b/chrome/browser/resources/new_tab_page/BUILD.gn | ||
@@ -101,6 +101,7 @@ | ||
"//ui/webui/resources/cr_components/color_change_listener:build_ts", | ||
"//ui/webui/resources/cr_components/customize_themes:build_ts", | ||
"//ui/webui/resources/cr_components/help_bubble:build_ts", | ||
+ "//ui/webui/resources/cr_components/history_clusters:build_ts", | ||
"//ui/webui/resources/cr_components/most_visited:build_ts", | ||
"//ui/webui/resources/cr_components/omnibox:build_ts", | ||
"//ui/webui/resources/cr_components/page_image_service:build_ts", |
12 changes: 12 additions & 0 deletions
12
tur-electron/electron-30/0102-fix-missing-build-deps.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
https://github.com/chromium/chromium/commit/a976cb05b4024b7a6452d1541378d718cdfe33e6 | ||
|
||
--- a/chrome/browser/devtools/BUILD.gn | ||
+++ b/chrome/browser/devtools/BUILD.gn | ||
@@ -113,6 +113,7 @@ | ||
"//chrome/browser/autofill:autofill", | ||
"//components/autofill/content/browser:browser", | ||
"//components/autofill/core/browser:browser", | ||
+ "//components/enterprise/buildflags", | ||
"//components/paint_preview/buildflags:buildflags", | ||
"//content/public/browser", | ||
"//net", |
Oops, something went wrong.