Skip to content

Commit

Permalink
new package: electron-25.9.7 (#21)
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
licy183 authored Dec 9, 2023
1 parent 9281bbc commit d8e139f
Show file tree
Hide file tree
Showing 10 changed files with 515 additions and 0 deletions.
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/lib/get-version.js
+++ b/electron/script/lib/get-version.js
@@ -11,7 +11,7 @@
// 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'], {
+ const output = spawnSync('cat', ['ELECTRON_VERSION'], {
cwd: path.resolve(__dirname, '..', '..')
});
if (output.status !== 0) {
11 changes: 11 additions & 0 deletions tur-electron/electron-25.9.7/0002-v8-fix-trap-handler.patch
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.
24 changes: 24 additions & 0 deletions tur-electron/electron-25.9.7/0003-cares-config.patch
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 tur-electron/electron-25.9.7/0004-electron-disable-sandbox.patch
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();
14 changes: 14 additions & 0 deletions tur-electron/electron-25.9.7/0005-node-as-posix.patch
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,
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;
}

10 changes: 10 additions & 0 deletions tur-electron/electron-25.9.7/0007-electron-include-variant.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- a/electron/shell/browser/electron_browser_context.h
+++ b/electron/shell/browser/electron_browser_context.h
@@ -8,6 +8,7 @@
#include <map>
#include <memory>
#include <string>
+#include <variant>
#include <vector>

#include "base/memory/weak_ptr.h"
20 changes: 20 additions & 0 deletions tur-electron/electron-25.9.7/0008-remove-snapcraft.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- a/build/install-build-deps.sh
+++ b/build/install-build-deps.sh
@@ -395,6 +395,7 @@
msttcorefonts
python-dev
python-setuptools
+ snapcraft
ttf-dejavu-core
ttf-indic-fonts
ttf-kochi-gothic
@@ -580,9 +581,6 @@
if package_exists libinput-dev; then
dev_list="${dev_list} libinput-dev"
fi
-if package_exists snapcraft; then
- dev_list="${dev_list} snapcraft"
-fi

# Cross-toolchain strip is needed for building the sysroots.
if package_exists binutils-arm-linux-gnueabihf; then
Loading

0 comments on commit d8e139f

Please sign in to comment.