Skip to content

Commit dd8f3bc

Browse files
committed
webkitgtk3: update patch and dependencies
1 parent fc5703d commit dd8f3bc

File tree

2 files changed

+131
-63
lines changed

2 files changed

+131
-63
lines changed

recipes/wip/libs/other/webkitgtk3/recipe.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ dependencies = [
4444
"libxrandr",
4545
"libxrender",
4646
"libxslt",
47+
"libxxf86vm",
4748
"mesa-x11",
4849
"nghttp2",
4950
"pango",
@@ -79,6 +80,7 @@ cookbook_cmake \
7980
-DUSE_LIBSECRET=OFF \
8081
-DUSE_SKIA=OFF \
8182
-DUSE_SYSPROF_CAPTURE=OFF \
83+
-DUSE_SYSTEM_MALLOC=ON \
8284
-DUSE_SYSTEM_SYSPROF_CAPTURE=OFF \
8385
-DUSE_WOFF2=OFF
8486
"""

recipes/wip/libs/other/webkitgtk3/redox.patch

Lines changed: 129 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
1-
diff -ruwN webkitgtk-2.49.1/Source/bmalloc/bmalloc/AvailableMemory.cpp source/Source/bmalloc/bmalloc/AvailableMemory.cpp
2-
--- webkitgtk-2.49.1/Source/bmalloc/bmalloc/AvailableMemory.cpp 2023-09-18 01:56:46.719077300 -0600
3-
+++ source/Source/bmalloc/bmalloc/AvailableMemory.cpp 2025-05-10 19:08:48.967816054 -0600
4-
@@ -166,7 +166,7 @@
5-
if (!sysinfo(&info))
6-
return info.totalram * info.mem_unit;
7-
return availableMemoryGuess;
8-
-#elif BOS(UNIX)
9-
+#elif BOS(UNIX) && !defined(__redox__)
10-
long pages = sysconf(_SC_PHYS_PAGES);
11-
long pageSize = sysconf(_SC_PAGE_SIZE);
12-
if (pages == -1 || pageSize == -1)
1+
diff -ruwN webkitgtk-2.49.1/Source/bmalloc/bmalloc/BPlatform.h source/Source/bmalloc/bmalloc/BPlatform.h
2+
--- webkitgtk-2.49.1/Source/bmalloc/bmalloc/BPlatform.h 2025-03-28 00:18:28.347204000 -0600
3+
+++ source/Source/bmalloc/bmalloc/BPlatform.h 2025-05-12 20:54:40.104051612 -0600
4+
@@ -40,7 +40,7 @@
5+
#define BOS_DARWIN 1
6+
#endif
7+
8+
-#if defined(__unix) || defined(__unix__)
9+
+#if defined(__unix) || defined(__unix__) || defined(__redox__)
10+
#define BOS_UNIX 1
11+
#endif
12+
13+
@@ -339,7 +339,7 @@
14+
15+
/* BENABLE(LIBPAS) is enabling libpas build. But this does not mean we use libpas for bmalloc replacement. */
16+
#if !defined(BENABLE_LIBPAS)
17+
-#if BCPU(ADDRESS64) && (BOS(DARWIN) || (BOS(LINUX) && (BCPU(X86_64) || BCPU(ARM64))) || BPLATFORM(PLAYSTATION))
18+
+#if BCPU(ADDRESS64) && (BOS(DARWIN) || (BOS(LINUX) && (BCPU(X86_64) || BCPU(ARM64))) || BPLATFORM(PLAYSTATION)) || defined(__redox__)
19+
#define BENABLE_LIBPAS 1
20+
#ifndef PAS_BMALLOC
21+
#define PAS_BMALLOC 1
1322
diff -ruwN webkitgtk-2.49.1/Source/JavaScriptCore/heap/BlockDirectory.cpp source/Source/JavaScriptCore/heap/BlockDirectory.cpp
1423
--- webkitgtk-2.49.1/Source/JavaScriptCore/heap/BlockDirectory.cpp 2025-03-20 11:07:59.015023500 -0600
1524
+++ source/Source/JavaScriptCore/heap/BlockDirectory.cpp 2025-05-10 21:38:36.889325942 -0600
@@ -48,6 +57,18 @@ Binary files webkitgtk-2.49.1/Source/JavaScriptCore/inspector/scripts/codegen/__
4857
Binary files webkitgtk-2.49.1/Source/JavaScriptCore/inspector/scripts/codegen/__pycache__/models.cpython-311.pyc and source/Source/JavaScriptCore/inspector/scripts/codegen/__pycache__/models.cpython-311.pyc differ
4958
Binary files webkitgtk-2.49.1/Source/JavaScriptCore/inspector/scripts/codegen/__pycache__/objc_generator.cpython-311.pyc and source/Source/JavaScriptCore/inspector/scripts/codegen/__pycache__/objc_generator.cpython-311.pyc differ
5059
Binary files webkitgtk-2.49.1/Source/JavaScriptCore/inspector/scripts/codegen/__pycache__/objc_generator_templates.cpython-311.pyc and source/Source/JavaScriptCore/inspector/scripts/codegen/__pycache__/objc_generator_templates.cpython-311.pyc differ
60+
diff -ruwN webkitgtk-2.49.1/Source/JavaScriptCore/jsc.cpp source/Source/JavaScriptCore/jsc.cpp
61+
--- webkitgtk-2.49.1/Source/JavaScriptCore/jsc.cpp 2025-03-21 05:07:10.820055200 -0600
62+
+++ source/Source/JavaScriptCore/jsc.cpp 2025-05-12 21:27:55.789300618 -0600
63+
@@ -208,6 +208,8 @@
64+
for (;;) {
65+
#if OS(WINDOWS)
66+
Sleep(1000);
67+
+#elif defined(__redox__)
68+
+ //TODO
69+
#else
70+
pause();
71+
#endif
5172
diff -ruwN webkitgtk-2.49.1/Source/JavaScriptCore/runtime/JSCBytecodeCacheVersion.cpp source/Source/JavaScriptCore/runtime/JSCBytecodeCacheVersion.cpp
5273
--- webkitgtk-2.49.1/Source/JavaScriptCore/runtime/JSCBytecodeCacheVersion.cpp 2025-03-20 11:07:59.015023500 -0600
5374
+++ source/Source/JavaScriptCore/runtime/JSCBytecodeCacheVersion.cpp 2025-05-11 08:15:28.272811727 -0600
@@ -71,61 +92,66 @@ diff -ruwN webkitgtk-2.49.1/Source/JavaScriptCore/runtime/JSCBytecodeCacheVersio
7192
if (!dladdr(jsFunctionAddr, &info))
7293
diff -ruwN webkitgtk-2.49.1/Source/JavaScriptCore/runtime/MachineContext.h source/Source/JavaScriptCore/runtime/MachineContext.h
7394
--- webkitgtk-2.49.1/Source/JavaScriptCore/runtime/MachineContext.h 2025-03-20 11:07:59.015023500 -0600
74-
+++ source/Source/JavaScriptCore/runtime/MachineContext.h 2025-05-11 08:58:07.039826666 -0600
75-
@@ -188,7 +188,7 @@
76-
#error Unknown Architecture
77-
#endif
78-
79-
-#elif OS(FUCHSIA) || OS(LINUX) || OS(HURD)
80-
+#elif OS(FUCHSIA) || OS(LINUX) || OS(HURD) || defined(__redox__)
81-
95+
+++ source/Source/JavaScriptCore/runtime/MachineContext.h 2025-05-12 20:27:42.492098710 -0600
96+
@@ -158,7 +158,7 @@
97+
{
98+
#if OS(DARWIN)
99+
return stackPointerImpl(machineContext->__ss);
100+
-#elif OS(HAIKU)
101+
+#elif OS(HAIKU) || defined(__redox__)
82102
#if CPU(X86_64)
83-
return reinterpret_cast<void*&>((uintptr_t&) machineContext.gregs[REG_RSP]);
84-
@@ -317,7 +317,7 @@
85-
#error Unknown Architecture
86-
#endif
87-
88-
-#elif OS(FUCHSIA) || OS(LINUX) || OS(HURD)
89-
+#elif OS(FUCHSIA) || OS(LINUX) || OS(HURD) || defined(__redox__)
90-
91-
// The following sequence depends on glibc's sys/ucontext.h.
103+
return reinterpret_cast<void*&>(machineContext.rsp);
104+
#else
105+
@@ -287,7 +287,7 @@
106+
{
107+
#if OS(DARWIN)
108+
return framePointerImpl(machineContext->__ss);
109+
-#elif OS(HAIKU)
110+
+#elif OS(HAIKU) || defined(__redox__)
92111
#if CPU(X86_64)
93-
@@ -485,7 +485,7 @@
94-
#error Unknown Architecture
95-
#endif
96-
97-
-#elif OS(FUCHSIA) || OS(LINUX) || OS(HURD)
98-
+#elif OS(FUCHSIA) || OS(LINUX) || OS(HURD) || defined(__redox__)
99-
100-
// The following sequence depends on glibc's sys/ucontext.h.
112+
return reinterpret_cast<void*&>(machineContext.rbp);
113+
#else
114+
@@ -455,7 +455,7 @@
115+
{
116+
#if OS(DARWIN)
117+
return instructionPointerImpl(machineContext->__ss);
118+
-#elif OS(HAIKU)
119+
+#elif OS(HAIKU) || defined(__redox__)
101120
#if CPU(X86_64)
102-
@@ -679,7 +679,7 @@
103-
#error Unknown Architecture
104-
#endif
105-
106-
-#elif OS(FUCHSIA) || OS(LINUX) || OS(HURD)
107-
+#elif OS(FUCHSIA) || OS(LINUX) || OS(HURD) || defined(__redox__)
108-
109-
// The following sequence depends on glibc's sys/ucontext.h.
121+
return reinterpret_cast<void*&>((uintptr_t&) machineContext.rip);
122+
#else
123+
@@ -649,7 +649,7 @@
124+
{
125+
#if OS(DARWIN)
126+
return argumentPointer<1>(machineContext->__ss);
127+
-#elif OS(HAIKU)
128+
+#elif OS(HAIKU) || defined(__redox__)
110129
#if CPU(X86_64)
111-
@@ -736,7 +736,7 @@
130+
return reinterpret_cast<void*&>((uintptr_t&) machineContext.rsi);
131+
#else
132+
@@ -760,6 +760,13 @@
112133
#error Unknown Architecture
113134
#endif
114135

115-
-#elif OS(FUCHSIA) || OS(LINUX) || OS(HURD)
116-
+#elif OS(FUCHSIA) || OS(LINUX) || OS(HURD) || defined(__redox__)
117-
118-
// The following sequence depends on glibc's sys/ucontext.h.
119-
#if CPU(X86_64)
120-
@@ -864,7 +864,7 @@
121-
#error Unknown Architecture
136+
+#elif defined(__redox__)
137+
+#if CPU(X86_64)
138+
+ return reinterpret_cast<void*>((uintptr_t) machineContext.rbx);
139+
+#else
140+
+#error Unknown Architecture
141+
+#endif
142+
+
143+
#else
144+
#error Need a way to get the frame pointer for another thread on this platform
122145
#endif
123-
124-
-#elif OS(FUCHSIA) || OS(LINUX) || OS(HURD)
125-
+#elif OS(FUCHSIA) || OS(LINUX) || OS(HURD) || defined(__redox__)
126-
127-
// The following sequence depends on glibc's sys/ucontext.h.
146+
@@ -834,7 +841,7 @@
147+
// LLInt uses regT4 as PC.
148+
#if OS(DARWIN)
149+
return llintInstructionPointer(machineContext->__ss);
150+
-#elif OS(HAIKU)
151+
+#elif OS(HAIKU) || defined(__redox__)
128152
#if CPU(X86_64)
153+
return reinterpret_cast<void*&>((uintptr_t&) machineContext.r8);
154+
#else
129155
Binary files webkitgtk-2.49.1/Source/JavaScriptCore/wasm/__pycache__/generateWasm.cpython-311.pyc and source/Source/JavaScriptCore/wasm/__pycache__/generateWasm.cpython-311.pyc differ
130156
Binary files webkitgtk-2.49.1/Source/JavaScriptCore/yarr/__pycache__/hasher.cpython-311.pyc and source/Source/JavaScriptCore/yarr/__pycache__/hasher.cpython-311.pyc differ
131157
diff -ruwN webkitgtk-2.49.1/Source/ThirdParty/ANGLE/GLESv2.cmake source/Source/ThirdParty/ANGLE/GLESv2.cmake
@@ -249,6 +275,20 @@ diff -ruwN webkitgtk-2.49.1/Source/ThirdParty/skia/src/ports/SkMemory_malloc.cpp
249275
completeSize = malloc_usable_size(addr);
250276
SkASSERT(completeSize >= size);
251277
#elif defined(SK_BUILD_FOR_WIN)
278+
diff -ruwN webkitgtk-2.49.1/Source/WebCore/page/Page.cpp source/Source/WebCore/page/Page.cpp
279+
--- webkitgtk-2.49.1/Source/WebCore/page/Page.cpp 2025-04-01 01:53:09.527295000 -0600
280+
+++ source/Source/WebCore/page/Page.cpp 2025-05-12 21:46:50.795767586 -0600
281+
@@ -536,8 +536,10 @@
282+
if (RefPtr scrollingCoordinator = m_scrollingCoordinator)
283+
scrollingCoordinator->pageDestroyed();
284+
285+
+#if ENABLE(RESOURCE_USAGE)
286+
if (RefPtr resourceUsageOverlay = m_resourceUsageOverlay)
287+
resourceUsageOverlay->detachFromPage();
288+
+#endif
289+
290+
checkedBackForward()->close();
291+
if (!isUtilityPage())
252292
diff -ruwN webkitgtk-2.49.1/Source/WebCore/PlatformGTK.cmake source/Source/WebCore/PlatformGTK.cmake
253293
--- webkitgtk-2.49.1/Source/WebCore/PlatformGTK.cmake 2024-12-16 02:07:48.162613200 -0700
254294
+++ source/Source/WebCore/PlatformGTK.cmake 2025-05-10 19:05:57.526658690 -0600
@@ -274,6 +314,18 @@ diff -ruwN webkitgtk-2.49.1/Source/WebCore/PlatformGTK.cmake source/Source/WebCo
274314
${GIO_UNIX_INCLUDE_DIRS}
275315
${GLIB_INCLUDE_DIRS}
276316
${LIBSECRET_INCLUDE_DIRS}
317+
diff -ruwN webkitgtk-2.49.1/Source/WebKit/Platform/IPC/unix/ConnectionUnix.cpp source/Source/WebKit/Platform/IPC/unix/ConnectionUnix.cpp
318+
--- webkitgtk-2.49.1/Source/WebKit/Platform/IPC/unix/ConnectionUnix.cpp 2025-03-31 03:35:43.461813700 -0600
319+
+++ source/Source/WebKit/Platform/IPC/unix/ConnectionUnix.cpp 2025-05-13 09:38:21.678926942 -0600
320+
@@ -48,7 +48,7 @@
321+
#include <wtf/glib/GUniquePtr.h>
322+
#endif
323+
324+
-#if OS(DARWIN)
325+
+#if OS(DARWIN) || defined(__redox__)
326+
#define MSG_NOSIGNAL 0
327+
#endif
328+
277329
diff -ruwN webkitgtk-2.49.1/Source/WebKit/PlatformGTK.cmake source/Source/WebKit/PlatformGTK.cmake
278330
--- webkitgtk-2.49.1/Source/WebKit/PlatformGTK.cmake 2025-03-05 03:09:47.273706000 -0700
279331
+++ source/Source/WebKit/PlatformGTK.cmake 2025-05-10 18:54:43.437475299 -0600
@@ -285,6 +337,10 @@ diff -ruwN webkitgtk-2.49.1/Source/WebKit/PlatformGTK.cmake source/Source/WebKit
285337
${GIO_UNIX_INCLUDE_DIRS}
286338
${GLIB_INCLUDE_DIRS}
287339
${GSTREAMER_INCLUDE_DIRS}
340+
Binary files webkitgtk-2.49.1/Source/WebKit/Scripts/webkit/__pycache__/__init__.cpython-311.pyc and source/Source/WebKit/Scripts/webkit/__pycache__/__init__.cpython-311.pyc differ
341+
Binary files webkitgtk-2.49.1/Source/WebKit/Scripts/webkit/__pycache__/messages.cpython-311.pyc and source/Source/WebKit/Scripts/webkit/__pycache__/messages.cpython-311.pyc differ
342+
Binary files webkitgtk-2.49.1/Source/WebKit/Scripts/webkit/__pycache__/model.cpython-311.pyc and source/Source/WebKit/Scripts/webkit/__pycache__/model.cpython-311.pyc differ
343+
Binary files webkitgtk-2.49.1/Source/WebKit/Scripts/webkit/__pycache__/parser.cpython-311.pyc and source/Source/WebKit/Scripts/webkit/__pycache__/parser.cpython-311.pyc differ
288344
diff -ruwN webkitgtk-2.49.1/Source/WTF/wtf/glib/FileSystemGlib.cpp source/Source/WTF/wtf/glib/FileSystemGlib.cpp
289345
--- webkitgtk-2.49.1/Source/WTF/wtf/glib/FileSystemGlib.cpp 2024-12-16 02:07:48.134613800 -0700
290346
+++ source/Source/WTF/wtf/glib/FileSystemGlib.cpp 2025-05-10 20:14:04.266843426 -0600
@@ -393,16 +449,26 @@ diff -ruwN webkitgtk-2.49.1/Source/WTF/wtf/posix/ThreadingPOSIX.cpp source/Sourc
393449
int policy;
394450
diff -ruwN webkitgtk-2.49.1/Source/WTF/wtf/RAMSize.cpp source/Source/WTF/wtf/RAMSize.cpp
395451
--- webkitgtk-2.49.1/Source/WTF/wtf/RAMSize.cpp 2024-10-01 01:40:32.303785300 -0600
396-
+++ source/Source/WTF/wtf/RAMSize.cpp 2025-05-10 19:09:18.889830704 -0600
397-
@@ -64,7 +64,7 @@
452+
+++ source/Source/WTF/wtf/RAMSize.cpp 2025-05-12 21:08:59.548628775 -0600
453+
@@ -46,7 +46,7 @@
454+
455+
namespace WTF {
456+
457+
-#if OS(WINDOWS)
458+
+#if OS(WINDOWS) || defined(__redox__)
459+
static constexpr size_t ramSizeGuess = 512 * MB;
460+
#endif
461+
462+
@@ -64,6 +64,9 @@
398463
struct sysinfo si;
399464
sysinfo(&si);
400465
return si.totalram * si.mem_unit;
401-
-#elif OS(UNIX) || OS(HAIKU)
402-
+#elif (OS(UNIX) && !defined(__redox__)) || OS(HAIKU)
466+
+#elif defined(__redox__)
467+
+ //TODO: implement using /scheme/mem
468+
+ return ramSizeGuess;
469+
#elif OS(UNIX) || OS(HAIKU)
403470
long pages = sysconf(_SC_PHYS_PAGES);
404471
long pageSize = sysconf(_SC_PAGE_SIZE);
405-
return pages * pageSize;
406472
diff -ruwN webkitgtk-2.49.1/Source/WTF/wtf/StackBounds.cpp source/Source/WTF/wtf/StackBounds.cpp
407473
--- webkitgtk-2.49.1/Source/WTF/wtf/StackBounds.cpp 2025-03-18 02:33:00.063181400 -0600
408474
+++ source/Source/WTF/wtf/StackBounds.cpp 2025-05-10 19:16:43.976048337 -0600

0 commit comments

Comments
 (0)