From 4a2824ad318409557b50f494b2fa20728377b273 Mon Sep 17 00:00:00 2001 From: q66 Date: Mon, 4 Jan 2021 17:24:45 +0100 Subject: [PATCH] webkit2gtk: fix bubblewrap launcher on 32-bit systems since glibc's ld cache now points to lib32 rather than lib, and the launcher was bind-mounting just lib+lib64, the web process was failing to find the webkit libs; so patch the lib64 export to deal with lib32/lib64 properly just a rebuild would've fixed this too, since they also export LIBDIR and LIBDIR would be lib32 after rebuild (since the cmake build-style was changed), but since we need a rebuild anyway, might as well fix it right --- .../webkit2gtk/patches/bwrap-libdir32.patch | 45 +++++++++++++++++++ srcpkgs/webkit2gtk/template | 6 ++- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/webkit2gtk/patches/bwrap-libdir32.patch diff --git a/srcpkgs/webkit2gtk/patches/bwrap-libdir32.patch b/srcpkgs/webkit2gtk/patches/bwrap-libdir32.patch new file mode 100644 index 00000000000..1c83d3f4eb3 --- /dev/null +++ b/srcpkgs/webkit2gtk/patches/bwrap-libdir32.patch @@ -0,0 +1,45 @@ +From a558bfcedf9d87d12f158a6917383d228da7ca75 Mon Sep 17 00:00:00 2001 +From: q66 +Date: Mon, 4 Jan 2021 17:17:28 +0100 +Subject: [PATCH] fix bubblewrap libdir mounts for 32-bit systems + +an upstream fix should be better than this, but this is good +enough for void, since we strictly build with gcc anyway. and +having a small patch is more important than portable patch +--- + .../UIProcess/Launcher/glib/BubblewrapLauncher.cpp | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp +index 889388a..a7a75a8 100644 +--- Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp ++++ Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp +@@ -733,6 +733,12 @@ GRefPtr bubblewrapSpawn(GSubprocessLauncher* launcher, const Proces + if (launchOptions.processType == ProcessLauncher::ProcessType::Network) + return adoptGRef(g_subprocess_launcher_spawnv(launcher, argv, error)); + ++#if __UINTPTR_MAX__ > 0xFFFFFFFF ++# define LIB_DIR_WS "lib64" ++#else ++# define LIB_DIR_WS "lib32" ++#endif ++ + Vector sandboxArgs = { + "--die-with-parent", + "--unshare-pid", +@@ -765,9 +771,9 @@ GRefPtr bubblewrapSpawn(GSubprocessLauncher* launcher, const Proces + "--ro-bind-try", "/usr/lib", "/usr/lib", + "--ro-bind-try", "/usr/local/lib", "/usr/local/lib", + "--ro-bind-try", LIBDIR, LIBDIR, +- "--ro-bind-try", "/lib64", "/lib64", +- "--ro-bind-try", "/usr/lib64", "/usr/lib64", +- "--ro-bind-try", "/usr/local/lib64", "/usr/local/lib64", ++ "--ro-bind-try", "/lib" LIB_DIR_WS, "/lib" LIB_DIR_WS, ++ "--ro-bind-try", "/usr/lib" LIB_DIR_WS, "/usr/lib" LIB_DIR_WS, ++ "--ro-bind-try", "/usr/local/lib" LIB_DIR_WS, "/usr/local/lib" LIB_DIR_WS, + + "--ro-bind-try", PKGLIBEXECDIR, PKGLIBEXECDIR, + }; +-- +2.30.0 + diff --git a/srcpkgs/webkit2gtk/template b/srcpkgs/webkit2gtk/template index 7a596a6eaa2..2259ad80b17 100644 --- a/srcpkgs/webkit2gtk/template +++ b/srcpkgs/webkit2gtk/template @@ -1,7 +1,7 @@ # Template file for 'webkit2gtk' pkgname=webkit2gtk version=2.30.4 -revision=1 +revision=2 wrksrc="webkitgtk-${version}" build_style=cmake build_helper="gir" @@ -49,6 +49,10 @@ desc_option_jit="JavaScript JIT (Only some architectures)" desc_option_sampling_profiler="Sampling profiler support (JIT + glibc only)" desc_option_minibrowser="Build the minibrowser" +# on musl this is not defined and webkit uses it, so define it +export CFLAGS="-D__WORDSIZE=${XBPS_TARGET_WORDSIZE}" +export CXXFLAGS="$CFLAGS" + do_check() { : }