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 d406100
Show file tree
Hide file tree
Showing 8 changed files with 3,002 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([
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 d406100

Please sign in to comment.