Skip to content

Commit

Permalink
addpatch: electron22
Browse files Browse the repository at this point in the history
- Apply patches from OpenSUSE
    - riscv patches
    - swiftshader patches
        - Use system llvm because the bundled llvm 10 won't work.
	- There are some llvm16 related patches in the SUSE repo. We don't need
	  them for now.
- Disable pulling of prebuilt binaries.
    - Use packaged versions if possible.
    - Build some of them ourselves.
- Replace the bundled & hardcoded x86_64 JDK11 with our system JDK11.
  • Loading branch information
kxxt committed Jun 29, 2023
1 parent 0dc90e2 commit 4c8a0ea
Show file tree
Hide file tree
Showing 9 changed files with 3,032 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- depot_tools/gclient.py.orig 2023-06-26 16:33:06.394443514 +0200
+++ depot_tools/gclient.py 2023-06-26 16:33:06.394443514 +0200
@@ -916,6 +916,9 @@
hooks_cwd = self.root.root_dir

for dep in deps_to_add:
+ if '${arch}' in dep.name or '${platform}' in dep.name:
+ print("WARN: ignoring platform-specific dep:", dep.name)
+ continue
if dep.verify_validity():
self.add_dependency(dep)
self._mark_as_parsed([
25 changes: 25 additions & 0 deletions electron22/electron22-grab-commit.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from importlib.util import spec_from_loader, module_from_spec
from importlib.machinery import SourceFileLoader
import sys

spec = spec_from_loader("deps", SourceFileLoader("deps", sys.argv[2]))
deps = module_from_spec(spec)

# The DEPS file is not a standard python file
# Let's apply some hacks to trick the interpreter.
deps.Str = str
deps.Var = str

spec.loader.exec_module(deps)

if sys.argv[1] == 'infra':
# Return the commit of infra repo
infra_rev = deps.vars['luci_go']
print(infra_rev.split(':')[-1])
elif sys.argv[1] == 'luci_go':
# Return the commit of luci repo
luci_go_rev = deps.deps["infra/go/src/go.chromium.org/luci"]
print(luci_go_rev.split('@')[-1])
else:
print("Unsupported arguments!", file=sys.stderr)
sys.exit(-1)
27 changes: 27 additions & 0 deletions electron22/electron22-riscv-angle.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Index: src/third_party/angle/gni/angle.gni
===================================================================
--- src.orig/third_party/angle/gni/angle.gni
+++ src/third_party/angle/gni/angle.gni
@@ -91,7 +91,8 @@ declare_args() {

if (current_cpu == "arm64" || current_cpu == "x64" ||
current_cpu == "mips64el" || current_cpu == "s390x" ||
- current_cpu == "ppc64" || current_cpu == "loong64") {
+ current_cpu == "ppc64" || current_cpu == "loong64" ||
+ current_cpu == "riscv64") {
angle_64bit_current_cpu = true
} else if (current_cpu == "arm" || current_cpu == "x86" ||
current_cpu == "mipsel" || current_cpu == "s390" ||
Index: src/third_party/angle/src/common/platform.h
===================================================================
--- src.orig/third_party/angle/src/common/platform.h
+++ src/third_party/angle/src/common/platform.h
@@ -102,7 +102,7 @@
#endif

// Mips and arm devices need to include stddef for size_t.
-#if defined(__mips__) || defined(__arm__) || defined(__aarch64__)
+#if defined(__mips__) || defined(__arm__) || defined(__aarch64__) || defined(__riscv)
# include <stddef.h>
#endif

Loading

0 comments on commit 4c8a0ea

Please sign in to comment.