HaikuWebKit 1.9.15

This commit is contained in:
PulkoMandy
2024-12-07 08:10:27 +01:00
parent 266fa43976
commit 2aa079ccc1
2 changed files with 2 additions and 149 deletions

View File

@@ -11,10 +11,9 @@ LICENSE="GNU LGPL v2
MIT"
REVISION="1"
SOURCE_URI="https://github.com/haiku/haikuwebkit/archive/HaikuWebKit-$portVersion.tar.gz"
CHECKSUM_SHA256="ee0ea9a478f2b825430dc86c6c7586dc020f02ab8ec3ec9a2ddb4b427677da63"
SOURCE_FILENAME="haikuwebkit-$portVersion.tar.gz"
CHECKSUM_SHA256="ee3368ff475c646cf8942349a44126718b8196ce04e762e01dbaa9104da53b17"
SOURCE_DIR="haikuwebkit-HaikuWebKit-$portVersion"
PATCHES="haikuwebkit-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
@@ -95,8 +94,6 @@ BUILD_PREREQUIRES="
cmd:cmake >= 3.0.0
cmd:flex
cmd:gcc$secondaryArchSuffix
cmd:clang >= 18
cmd:clang++ >= 18
cmd:gperf
cmd:llvm_config >= 18
cmd:m4
@@ -113,9 +110,7 @@ BUILD()
{
export DISABLE_ASLR=1
export PKG_CONFIG_LIBDIR="`finddir B_SYSTEM_DIRECTORY`/$relativeDevelopLibDir/pkgconfig"
export CC="/bin/clang"
export CXX="/bin/clang++"
Tools/Scripts/build-webkit --haiku --no-webkit2 --no-fatal-warnings \
Tools/Scripts/build-webkit --haiku --no-webkit2 --no-fatal-warnings --makeargs $jobArgs \
--cmakeargs="-DCMAKE_INSTALL_PREFIX=$prefix -DCMAKE_BUILD_TYPE=Release -DSHOULD_INSTALL_JS_SHELL=ON"
}

View File

@@ -1,142 +0,0 @@
From ce8b6293327006e34b2a26eea4ca523647520a45 Mon Sep 17 00:00:00 2001
From: Augustin Cavalier <waddlesplash@gmail.com>
Date: Wed, 4 Sep 2024 21:29:17 -0400
Subject: Hacks to fix the build on Haiku with Clang.
diff --git a/Source/WebCore/platform/graphics/PlatformDisplay.cpp b/Source/WebCore/platform/graphics/PlatformDisplay.cpp
index 1b12e87..f4c1a8e 100644
--- a/Source/WebCore/platform/graphics/PlatformDisplay.cpp
+++ b/Source/WebCore/platform/graphics/PlatformDisplay.cpp
@@ -83,6 +83,9 @@
#if USE(LIBEPOXY)
#include <epoxy/egl.h>
#else
+#if PLATFORM(HAIKU)
+#define EGL_NO_X11
+#endif
#include <EGL/egl.h>
#include <EGL/eglext.h>
#endif
diff --git a/Source/WebCore/platform/graphics/egl/GLContext.h b/Source/WebCore/platform/graphics/egl/GLContext.h
index 4485676..3a16aa6 100644
--- a/Source/WebCore/platform/graphics/egl/GLContext.h
+++ b/Source/WebCore/platform/graphics/egl/GLContext.h
@@ -25,6 +25,9 @@
#include <wtf/Noncopyable.h>
#if !PLATFORM(GTK) && !PLATFORM(WPE)
+#if PLATFORM(HAIKU)
+#define EGL_NO_X11
+#endif
#include <EGL/eglplatform.h>
typedef EGLNativeWindowType GLNativeWindowType;
#else
diff --git a/Source/WebCore/platform/haiku/MIMETypeRegistryHaiku.cpp b/Source/WebCore/platform/haiku/MIMETypeRegistryHaiku.cpp
index 39c0353..caba9ba 100644
--- a/Source/WebCore/platform/haiku/MIMETypeRegistryHaiku.cpp
+++ b/Source/WebCore/platform/haiku/MIMETypeRegistryHaiku.cpp
@@ -71,7 +71,7 @@ String MIMETypeRegistry::mimeTypeForExtension(const StringView ext)
// Try WebCore built-in types.
const ExtensionMap* extMap = extensionMap;
while (extMap->extension) {
- if (str == extMap->extension)
+ if (str == StringView::fromLatin1(extMap->extension))
return String::fromUTF8(extMap->mimeType);
++extMap;
}
diff --git a/Source/WebKitLegacy/haiku/WebCoreSupport/IconDatabase.cpp b/Source/WebKitLegacy/haiku/WebCoreSupport/IconDatabase.cpp
index 7371818..d45fe88 100644
--- a/Source/WebKitLegacy/haiku/WebCoreSupport/IconDatabase.cpp
+++ b/Source/WebKitLegacy/haiku/WebCoreSupport/IconDatabase.cpp
@@ -1079,7 +1079,7 @@ bool IconDatabase::checkIntegrity()
String resultText = integrity->columnText(0);
// A successful, no-error integrity check will be "ok" - all other strings imply failure
- if (resultText == "ok")
+ if (resultText == StringView::fromLatin1("ok"))
return true;
LOG_ERROR("Icon database integrity check failed - \n%s", resultText.ascii().data());
diff --git a/Tools/DumpRenderTree/haiku/DumpRenderTree.cpp b/Tools/DumpRenderTree/haiku/DumpRenderTree.cpp
index dab51a2..27abd62 100644
--- a/Tools/DumpRenderTree/haiku/DumpRenderTree.cpp
+++ b/Tools/DumpRenderTree/haiku/DumpRenderTree.cpp
@@ -163,7 +163,7 @@ static void dumpFrameScrollPosition(BWebFrame* frame)
static void adjustOutputTypeByMimeType(BWebFrame* frame)
{
const String responseMimeType(WebCore::DumpRenderTreeClient::responseMimeType(frame));
- if (responseMimeType == "text/plain") {
+ if (responseMimeType == StringView::fromLatin1("text/plain")) {
gTestRunner->setDumpAsText(true);
gTestRunner->setGeneratePixelResults(false);
}
@@ -408,7 +408,7 @@ static void runTest(const string& inputLine)
webView->UnlockLooper();
// TODO efl does some history cleanup here
-
+
webView->WebPage()->MainFrame()->LoadURL(BString(testURL));
}
--
2.45.2
From 75402bb8945a624cc64f5b1e403a3e5b169a3dae Mon Sep 17 00:00:00 2001
From: Augustin Cavalier <waddlesplash@gmail.com>
Date: Fri, 6 Sep 2024 16:29:59 -0400
Subject: Fix and enable precompiled headers on Haiku.
WebKit enables them only for Windows by default for some reason.
diff --git a/Source/WebCore/testing/js/WebCoreTestSupportPrefix.h b/Source/WebCore/testing/js/WebCoreTestSupportPrefix.h
index ffba977..19283e7 100644
--- a/Source/WebCore/testing/js/WebCoreTestSupportPrefix.h
+++ b/Source/WebCore/testing/js/WebCoreTestSupportPrefix.h
@@ -18,7 +18,7 @@
*
*/
-/* This prefix file should contain only:
+/* This prefix file should contain only:
* 1) files to precompile for faster builds
* 2) in one case at least: OS-X-specific performance bug workarounds
* 3) the special trick to catch us using new or delete without including "config.h"
@@ -108,7 +108,7 @@
#endif
#include <windows.h>
#else
-#if !PLATFORM(IOS_FAMILY)
+#if defined(__APPLE__) && !PLATFORM(IOS_FAMILY)
#include <CoreServices/CoreServices.h>
#endif // !PLATFORM(IOS_FAMILY)
#endif // OS(WINDOWS)
@@ -124,8 +124,8 @@
#endif
#ifdef __cplusplus
-#define new ("if you use new/delete make sure to include config.h at the top of the file"())
-#define delete ("if you use new/delete make sure to include config.h at the top of the file"())
+#define new ("if you use new/delete make sure to include config.h at the top of the file"())
+#define delete ("if you use new/delete make sure to include config.h at the top of the file"())
#endif
/* When C++ exceptions are disabled, the C++ library defines |try| and |catch|
diff --git a/Source/cmake/OptionsHaiku.cmake b/Source/cmake/OptionsHaiku.cmake
index 3b46cd7..4434036 100644
--- a/Source/cmake/OptionsHaiku.cmake
+++ b/Source/cmake/OptionsHaiku.cmake
@@ -11,6 +11,8 @@ add_definitions(-DBUILDING_HAIKU__=1)
CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(JAVASCRIPTCORE 25 4 7)
+set(CMAKE_DISABLE_PRECOMPILE_HEADERS OFF)
+
# Force libstdc++ to export std::isinf and friends. This should be fixed on
# Haiku side ultimately.
add_definitions(-D_GLIBCXX_USE_C99_MATH)
--
2.45.2