Added build for webkit2GTK

This commit is contained in:
dslm4515
2020-11-23 16:52:38 -06:00
parent b90ff894fb
commit 6997ebef97
6 changed files with 201 additions and 0 deletions

View File

@ -0,0 +1,78 @@
#! /bin/bash
# WebKit2 GTK+
# Source: https://webkitgtk.org/releases/webkitgtk-2.30.2.tar.xz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: Cairo, CMake, gst-plugins-base, gst-plugins-bad, GTK+3
# Required: ICU, libgudev, libsecret, libsoup, libwebp, Mesa, OpenJPEG
# Required: Ruby, SQLite, Which
# Recommended: enchant, GeoClue, goobject-introspection, hicolor-icon-theme, libnotify
# Optional: bubblewrap, GTK-Doc, harfuzz, Wayland, WOFF2, ccache, Hyphen, MathML,
# Optional: WPEBackend-fdo, and xdg-dbus-proxy, libseccomp, xdg-dbus-proxy
patch -Np1 -i ../patches/webkit2gtk-alpine/fix-fast-memory-disabled.patch
patch -Np1 -i ../patches/webkit2gtk-alpine/fix-openjpeg.patch
patch -Np1 -i ../patches/webkit2gtk-alpine/lower-stack-usage.patch
patch -Np1 -i ../patches/webkit2gtk-alpine/musl-fixes.patch
patch -Np1 -i ../patches/webkit2gtk-alpine/use-versioned-libwpe.patch
case $(uname -m) in
i686) export CXXFLAGS="$CXXFLAGS -U_FORTIFY_SOURCE -g1";;
arm*) export ECONFIG="-DENABLE_JIT=OFF"
export CXXFLAGS="$CXXFLAGS -g1" ;;
esac &&
mkdir build && cd build &&
cmake -GNinja \
-DPORT=GTK \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_SKIP_RPATH=ON \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLIB_INSTALL_DIR=/usr/lib \
-DENABLE_GTKDOC=OFF \
-DENABLE_GEOLOCATION=ON \
-DENABLE_SAMPLING_PROFILER=OFF \
-DENABLE_MINIBROWSER=ON \
-DUSE_WPE_RENDERER=ON \
-DUSE_WOFF2=ON \
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
-DUSE_LD_GOLD=OFF \
-DUSE_SYSTEMD=OFF \
-DUSE_LIBHYPHEN=OFF \
-DENABLE_GLES2=ON $ECONFIG ..
read -p "Compile?" && ninja JavaScriptCore-4-gir && ninja -j2 &&
sudo -S DESTDIR=$BUILD ninja install &&
unset CXXFLAGS ECONFIG CXXFLAGS
cd $BUILD && sudo -S mkdir -v ${BUILD}/install &&
cat > /tmp/slack-desc << "EOF"
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
webkit2gtk: webkit2gtk (Web content rendering)
webkit2gtk:
webkit2gtk: WebKitGTK+ is a full-featured port of the WebKit rendering engine,
webkit2gtk: suitable for projects requiring any kind of web integration, from
webkit2gtk: hybrid HTML/CSS applications to full-fledged web browsers.
webkit2gtk: It offers WebKit's full functionality and is useful in a wide range
webkit2gtk: of systems from desktop computers to embedded systems like phones,
webkit2gtk: tablets, and televisions.
webkit2gtk:
webkit2gtk: https://www.webkitgtk.org/
webkit2gtk:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/webkit2gtk-2.30.2-$(uname -m)-mlfs.txz &&
sudo -S rm -rf ${BUILD}/*

View File

@ -0,0 +1,14 @@
--- a/Source/JavaScriptCore/wasm/WasmFaultSignalHandler.cpp
+++ b/Source/JavaScriptCore/wasm/WasmFaultSignalHandler.cpp
@@ -118,7 +118,11 @@ void unregisterCode(void* start, void* e
bool fastMemoryEnabled()
{
+#if ENABLE(WEBASSEMBLY_FAST_MEMORY)
return fastHandlerInstalled;
+#else
+ return false;
+#endif // ENABLE(WEBASSEMBLY_FAST_MEMORY)
}
void enableFastMemory()

View File

@ -0,0 +1,11 @@
--- a/Source/WebCore/platform/image-decoders/jpeg2000/JPEG2000ImageDecoder.cpp
+++ b/Source/WebCore/platform/image-decoders/jpeg2000/JPEG2000ImageDecoder.cpp
@@ -28,7 +28,7 @@
#if USE(OPENJPEG)
-#include <openjpeg.h>
+#include <openjpeg-2.3/openjpeg.h>
namespace WebCore {

View File

@ -0,0 +1,17 @@
diff --git a/Source/JavaScriptCore/runtime/OptionsList.h b/Source/JavaScriptCore/runtime/OptionsList.h
index 41cab118..2ac66c7a 100644
--- a/Source/JavaScriptCore/runtime/OptionsList.h
+++ b/Source/JavaScriptCore/runtime/OptionsList.h
@@ -90,9 +90,9 @@ constexpr bool enableWebAssemblyStreamingApi = false;
\
v(Bool, reportMustSucceedExecutableAllocations, false, Normal, nullptr) \
\
- v(Unsigned, maxPerThreadStackUsage, 5 * MB, Normal, "Max allowed stack usage by the VM") \
- v(Unsigned, softReservedZoneSize, 128 * KB, Normal, "A buffer greater than reservedZoneSize that reserves space for stringifying exceptions.") \
- v(Unsigned, reservedZoneSize, 64 * KB, Normal, "The amount of stack space we guarantee to our clients (and to interal VM code that does not call out to clients).") \
+ v(Unsigned, maxPerThreadStackUsage, 80 * KB , Normal, "Max allowed stack usage by the VM") \
+ v(Unsigned, softReservedZoneSize, 32 * KB, Normal, "A buffer greater than reservedZoneSize that reserves space for stringifying exceptions.") \
+ v(Unsigned, reservedZoneSize, 16 * KB, Normal, "The amount of stack space we guarantee to our clients (and to interal VM code that does not call out to clients).") \
\
v(Bool, crashIfCantAllocateJITMemory, false, Normal, nullptr) \
v(Unsigned, jitMemoryReservationSize, 0, Normal, "Set this number to change the executable allocation size in ExecutableAllocatorFixedVMPool. (In bytes.)") \

View File

@ -0,0 +1,68 @@
--- a/Source/JavaScriptCore/runtime/MachineContext.h
+++ b/Source/JavaScriptCore/runtime/MachineContext.h
@@ -188,7 +188,7 @@ static inline void*& stackPointerImpl(mcontext_t& machineContext)
#error Unknown Architecture
#endif
-#elif OS(FUCHSIA) || defined(__GLIBC__) || defined(__BIONIC__)
+#elif OS(FUCHSIA) || defined(__linux__)
#if CPU(X86)
return reinterpret_cast<void*&>((uintptr_t&) machineContext.gregs[REG_ESP]);
@@ -335,7 +335,7 @@ static inline void*& framePointerImpl(mcontext_t& machineContext)
#error Unknown Architecture
#endif
-#elif OS(FUCHSIA) || defined(__GLIBC__) || defined(__BIONIC__)
+#elif OS(FUCHSIA) || defined(__linux__)
// The following sequence depends on glibc's sys/ucontext.h.
#if CPU(X86)
@@ -482,7 +482,7 @@ static inline void*& instructionPointerImpl(mcontext_t& machineContext)
#error Unknown Architecture
#endif
-#elif OS(FUCHSIA) || defined(__GLIBC__) || defined(__BIONIC__)
+#elif OS(FUCHSIA) || defined(__linux__)
// The following sequence depends on glibc's sys/ucontext.h.
#if CPU(X86)
@@ -639,7 +639,7 @@ inline void*& argumentPointer<1>(mcontext_t& machineContext)
#error Unknown Architecture
#endif
-#elif OS(FUCHSIA) || defined(__GLIBC__) || defined(__BIONIC__)
+#elif OS(FUCHSIA) || defined(__linux__)
// The following sequence depends on glibc's sys/ucontext.h.
#if CPU(X86)
@@ -756,7 +756,7 @@ inline void*& llintInstructionPointer(mcontext_t& machineContext)
#error Unknown Architecture
#endif
-#elif OS(FUCHSIA) || defined(__GLIBC__) || defined(__BIONIC__)
+#elif OS(FUCHSIA) || defined(__linux__)
// The following sequence depends on glibc's sys/ucontext.h.
#if CPU(X86)
--- a/Source/WebCore/xml/XPathGrammar.cpp
+++ b/Source/WebCore/xml/XPathGrammar.cpp
@@ -966,7 +966,7 @@ int yydebug;
#if YYERROR_VERBOSE
# ifndef yystrlen
-# if defined __GLIBC__ && defined _STRING_H
+# if defined __linux__ && defined _STRING_H
# define yystrlen strlen
# else
/* Return the length of YYSTR. */
@@ -989,7 +989,7 @@ yystrlen (yystr)
# endif
# ifndef yystpcpy
-# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+# if defined __linux__ && defined _STRING_H && defined _GNU_SOURCE
# define yystpcpy stpcpy
# else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in

View File

@ -0,0 +1,13 @@
diff --git a/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp b/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
index 180f392a..85639a11 100644
--- a/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
+++ b/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
@@ -115,7 +115,7 @@
#if PLATFORM(WAYLAND)
if (WebCore::PlatformDisplay::sharedDisplay().type() == WebCore::PlatformDisplay::Type::Wayland) {
#if USE(WPE_RENDERER)
- wpe_loader_init("libWPEBackend-fdo-1.0.so");
+ wpe_loader_init("libWPEBackend-fdo-1.0.so.1");
if (AcceleratedBackingStoreWayland::checkRequirements()) {
parameters.hostClientFileDescriptor = wpe_renderer_host_create_client();
parameters.implementationLibraryName = FileSystem::fileSystemRepresentation(wpe_loader_get_loaded_implementation_library_name());