From 344036f02a009ffec1290380e54cfb548319b00e Mon Sep 17 00:00:00 2001 From: dslm4515 <27793627+dslm4515@users.noreply.gitub.com> Date: Mon, 12 Feb 2024 10:14:20 -0600 Subject: [PATCH] Upgraded wpewebkit from 2.36.0 to 2.43.1 --- build-scripts/wpewebkit.build | 20 +++++++++++-------- patches/wpewebkit-alpine/initial-exec.patch | 22 +++++++++++++++++++++ 2 files changed, 34 insertions(+), 8 deletions(-) create mode 100644 patches/wpewebkit-alpine/initial-exec.patch diff --git a/build-scripts/wpewebkit.build b/build-scripts/wpewebkit.build index 5639e4f..4ca975c 100644 --- a/build-scripts/wpewebkit.build +++ b/build-scripts/wpewebkit.build @@ -1,7 +1,7 @@ #! /bin/bash # WPE WebKit -# Source: https://wpewebkit.org/releases/wpewebkit-2.36.0.tar.xz +# Source: https://wpewebkit.org/releases/wpewebkit-2.43.1.tar.xz # # $BUILD = Directory to temporarily install # $PKGS = Directory to store built packages @@ -11,7 +11,8 @@ # Required: ruby, cairo, GLib, fontconfig, freetype, harfBuzz, ICU, # Required: libjpeg-turbo, libepoxy, libgcrypt, libxml2, mesa, libpng, # Required: SQLite3, libwebp, libsoup, atk, openjpeg, libtasn1, libxslt, -# Required: LCM2, libseccomp, xdg-dbus-proxy +# Required: LCM2, libseccomp, xdg-dbus-proxy unifdef gi-docgen libjxl +# Required: libavif # Recommended: NONE # Optional: qt5-qtbase qt5-qttools libsoup3 @@ -33,17 +34,20 @@ export CMARGS+="-DCMAKE_INSTALL_LIBDIR=lib " export CMARGS+="-DBUILD_SHARED_LIBS=True " export CMARGS+="-DCMAKE_BUILD_TYPE=None " export CMARGS+="-DPORT=WPE " -export CMARGS+="-DENABLE_MINIBROWSER=On " -export CMARGS+="-DENABLE_GTKDOC=On " +export CMARGS+="-DENABLE_MINIBROWSER=ON " +export CMARGS+="-DENABLE_GTKDOC=OFF " export CMARGS+="-DUSE_SOUP2=On " export CMARGS+="-DUSE_SYSTEMD=OFF " export CMARGS+="-DENABLE_JOURNALD_LOG=OFF " export CMARGS+="-DENABLE_WEBGL2=ON " -export CMARGS+="-GNinja " -cmake -B build $CMARGS $QT5CMAKES && \ +export CMARGGS+="-G Ninja " -read -p "Compile?" && ninja -C build -j2 && +cmake -B build $CMARGS -DENABLE_DOCUMENTATION=OFF \ + -DUSE_LIBBACKTRACE=OFF $QT5CMAKES && \ + +#read -p "Compile?" && ninja -C build -j2 && +cmake --build build --parallel 2 sudo -S DESTDIR=$BUILD ninja -C build install && unset CMARGS QT5CMAKES && \ @@ -69,5 +73,5 @@ wpewebkit: https://wpewebkit.org/ wpewebkit: EOF sudo -S mv -v /tmp/slack-desc install/ && -sudo -S makepkg -l y -c n $PKGS/wpewebkit-2.36.0-$(uname -m)-mlfs.txz && +sudo -S makepkg -l y -c n $PKGS/wpewebkit-2.43.1-$PSUFFIX && sudo -S rm -rf ${BUILD}/* diff --git a/patches/wpewebkit-alpine/initial-exec.patch b/patches/wpewebkit-alpine/initial-exec.patch new file mode 100644 index 0000000..422df80 --- /dev/null +++ b/patches/wpewebkit-alpine/initial-exec.patch @@ -0,0 +1,22 @@ +it is not portable to use initial-exec in shared objects that are meant to be +dlopen'd. +glibc reserves some space to allow this anyway- but other libcs like musl do +not. +using an initial-exec variables forces the entire libwebkit2gtk.so to gain a TLS +program header, which makes it fail to dlopen with musl's loader. + +see https://gitlab.freedesktop.org/mesa/mesa/-/commit/8570a2a280587a1e43ac11ad46ad62dfdd6c7b39 +-- +diff --git a/Source/WebCore/platform/graphics/gbm/GraphicsContextGLANGLELinux.cpp b/Source/WebCore/platform/graphics/gbm/GraphicsContextGLANGLELinux.cpp +index f8627d2c..6666f6d0 100644 +--- a/Source/WebCore/platform/graphics/gbm/GraphicsContextGLANGLELinux.cpp ++++ b/Source/WebCore/platform/graphics/gbm/GraphicsContextGLANGLELinux.cpp +@@ -108,7 +108,7 @@ RefPtr GraphicsContextGLANGLE::readCompositedResults() + + bool GraphicsContextGLANGLE::makeContextCurrent() + { +- static thread_local TLS_MODEL_INITIAL_EXEC GraphicsContextGLANGLE* s_currentContext { nullptr }; ++ static thread_local GraphicsContextGLANGLE* s_currentContext { nullptr }; + + if (s_currentContext == this) + return true;