From d49a1152d04cc9b8a57e69b9efe9412af7599cd5 Mon Sep 17 00:00:00 2001 From: John McQuah Date: Wed, 29 Nov 2023 18:31:32 +0000 Subject: [PATCH] webkitgtk-60: rebuild for icu 74 --- REPO | 6 +- webkitgtk-60/.signature | 5 +- ...176b2496579d760852c80cff3ad9fb7c3a4b.patch | 56 +++++++++++++++++++ webkitgtk-60/Pkgfile | 11 +++- webkitgtk-60/bwrap-pipewire.patch | 43 -------------- 5 files changed, 70 insertions(+), 51 deletions(-) create mode 100644 webkitgtk-60/1bad176b2496579d760852c80cff3ad9fb7c3a4b.patch delete mode 100644 webkitgtk-60/bwrap-pipewire.patch diff --git a/REPO b/REPO index d5c14f3..5a5da25 100644 --- a/REPO +++ b/REPO @@ -185,10 +185,10 @@ f:e1cf1c12ed92637910cf5b565c97070c:recode/.footprint f:93b0c55f975a99354fc78cc8a0d6506c:zathura-pdf-poppler/.signature f:ae30d3e814516e1b46ffe0900f5b6b22:zathura-pdf-poppler/Pkgfile f:3961411333908c5200c5ba74f8240798:zathura-pdf-poppler/.footprint -f:0b8c32b92dddd063c5fbaff3cec96e44:webkitgtk-60/bwrap-pipewire.patch f:95ed2c92dd96132378050eca03da25c6:webkitgtk-60/README -f:5c0428478cf9978b55104d77ad7fddcc:webkitgtk-60/.signature -f:6f8f1f43c1563e894171b4c6cbebaced:webkitgtk-60/Pkgfile +f:cad94c47b122c27d68dfc0b8eb02831c:webkitgtk-60/1bad176b2496579d760852c80cff3ad9fb7c3a4b.patch +f:689def4cd2753cc704c0d0e38eefc6b2:webkitgtk-60/.signature +f:906c84f2660c92040cdaee890f7866ad:webkitgtk-60/Pkgfile f:a6a01373c6f9e7ee98a04ff2fae200f6:webkitgtk-60/.footprint f:0cc425d03faffdcc793b0af7ec749893:libfreeimage-lite/.signature f:c4a660d93a260478a5f4d246be1c260d:libfreeimage-lite/Pkgfile diff --git a/webkitgtk-60/.signature b/webkitgtk-60/.signature index b363683..764f76a 100644 --- a/webkitgtk-60/.signature +++ b/webkitgtk-60/.signature @@ -1,5 +1,6 @@ untrusted comment: verify with /etc/ports/jmq.pub -RWTTPlFarK9CxNojlECwNgjLNGQS0GufRgUQq8B22eqOxNMPwIdKOZzW6ATpdwWmr6Ax2VRv4G1bhAogkFRsy/4cZqn0v1RVhQk= -SHA256 (Pkgfile) = 9cd7a9111c2f9970216f503a012fc978d88d1828ab5a2bb57b48b022cf695ebb +RWTTPlFarK9CxEqF8i5jiF7NqtjdRD8jwVqkNua9IneND3K2lCy7id573d5Q2Q1bKd5KKiBvEpHfCDWjS8WaAc+8AOn4Y6wNcQs= +SHA256 (Pkgfile) = ee0a24e466793bcf334ebc2606511e622f4490bf0234f0f8cfbf78fe3f33eab3 SHA256 (.footprint) = a284c7299c97bda7812829e51f3e9d22dd94e9572aa57f143dec01544d1e2f4e SHA256 (webkitgtk-2.42.2.tar.xz) = 5720aa3e8627f1b9f63252187d4df0f8233ae71d697b1796ebfbe5ca750bd118 +SHA256 (1bad176b2496579d760852c80cff3ad9fb7c3a4b.patch) = c286efbff5b3693a155040eb6d81cd7096e75276cd632ae0c83d059f03b9bd9f diff --git a/webkitgtk-60/1bad176b2496579d760852c80cff3ad9fb7c3a4b.patch b/webkitgtk-60/1bad176b2496579d760852c80cff3ad9fb7c3a4b.patch new file mode 100644 index 0000000..0529514 --- /dev/null +++ b/webkitgtk-60/1bad176b2496579d760852c80cff3ad9fb7c3a4b.patch @@ -0,0 +1,56 @@ +From 1bad176b2496579d760852c80cff3ad9fb7c3a4b Mon Sep 17 00:00:00 2001 +From: Adrian Perez de Castro +Date: Mon, 20 Nov 2023 07:42:30 -0800 +Subject: [PATCH] Build fails with libxml2 version 2.12.0 due to API change + https://bugs.webkit.org/show_bug.cgi?id=265128 + +Reviewed by Philippe Normand. + +Starting with libxml2 2.12.0, the API has changed the const-ness of the +xmlError pointers, which results in a build error due to a mismatched +type in the parsing error callback. This papers over the difference by +using preprocessor conditionals. + +* Source/WebCore/xml/XSLTProcessor.h: Use const when building against + libxml2 2.12.0 or newer. +* Source/WebCore/xml/XSLTProcessorLibxslt.cpp: +(WebCore::XSLTProcessor::parseErrorFunc): Ditto. + +Canonical link: https://commits.webkit.org/270977@main +--- + Source/WebCore/xml/XSLTProcessor.h | 4 ++++ + Source/WebCore/xml/XSLTProcessorLibxslt.cpp | 4 ++++ + 2 files changed, 8 insertions(+) + +diff --git a/Source/WebCore/xml/XSLTProcessor.h b/Source/WebCore/xml/XSLTProcessor.h +index 21bb45b5cbe1..5cf20557918f 100644 +--- a/Source/WebCore/xml/XSLTProcessor.h ++++ b/Source/WebCore/xml/XSLTProcessor.h +@@ -61,7 +61,11 @@ class XSLTProcessor : public RefCounted { + + void reset(); + ++#if LIBXML_VERSION >= 21200 ++ static void parseErrorFunc(void* userData, const xmlError*); ++#else + static void parseErrorFunc(void* userData, xmlError*); ++#endif + static void genericErrorFunc(void* userData, const char* msg, ...); + + // Only for libXSLT callbacks +diff --git a/Source/WebCore/xml/XSLTProcessorLibxslt.cpp b/Source/WebCore/xml/XSLTProcessorLibxslt.cpp +index a65691087e3c..9f6b363dfc6c 100644 +--- a/Source/WebCore/xml/XSLTProcessorLibxslt.cpp ++++ b/Source/WebCore/xml/XSLTProcessorLibxslt.cpp +@@ -59,7 +59,11 @@ void XSLTProcessor::genericErrorFunc(void*, const char*, ...) + // It would be nice to do something with this error message. + } + ++#if LIBXML_VERSION >= 21200 ++void XSLTProcessor::parseErrorFunc(void* userData, const xmlError* error) ++#else + void XSLTProcessor::parseErrorFunc(void* userData, xmlError* error) ++#endif + { + PageConsoleClient* console = static_cast(userData); + if (!console) diff --git a/webkitgtk-60/Pkgfile b/webkitgtk-60/Pkgfile index 9f844fc..efe23b7 100644 --- a/webkitgtk-60/Pkgfile +++ b/webkitgtk-60/Pkgfile @@ -6,14 +6,19 @@ name=webkitgtk-60 version=2.42.2 -release=1 -source=(https://webkitgtk.org/releases/webkitgtk-$version.tar.xz) +release=2 +source=(https://webkitgtk.org/releases/webkitgtk-$version.tar.xz + 1bad176b2496579d760852c80cff3ad9fb7c3a4b.patch) build() { # fail the build if dependencies are not met [ -e /usr/include/harfbuzz/hb-icu.h ] || \ { echo "Rebuild harfbuzz with icu present; otherwise webkitgtk will not work."; exit 1; } + for p in $SRC/*.patch; do + patch -Np1 -d webkitgtk-$version -i $p + done + PKGMK_WEBKITGTK=(-G Ninja -D CMAKE_BUILD_TYPE=Release -Wno-dev -D CMAKE_INSTALL_PREFIX:PATH=/usr -D CMAKE_INSTALL_LIBEXECDIR:PATH=/usr/lib @@ -45,7 +50,7 @@ build() { prt-get isinst libavif || PKGMK_WEBKITGTK+=(-DUSE_AVIF=OFF) cmake -S ${name%-*}-$version -B build "${PKGMK_WEBKITGTK[@]}" \ - -D CMAKE_CXX_FLAGS_RELEASE="${CXXFLAGS} -DNDEBUG -ffat-lto-objects -fpermissive" \ + -D CMAKE_CXX_FLAGS_RELEASE="${CXXFLAGS} -DNDEBUG -ffat-lto-objects" \ -D CMAKE_C_FLAGS_RELEASE="${CFLAGS} -DNDEBUG -ffat-lto-objects" \ -D CMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" diff --git a/webkitgtk-60/bwrap-pipewire.patch b/webkitgtk-60/bwrap-pipewire.patch deleted file mode 100644 index fc5cb05..0000000 --- a/webkitgtk-60/bwrap-pipewire.patch +++ /dev/null @@ -1,43 +0,0 @@ ---- BubblewrapLauncher.cpp 2023-01-03 04:46:43.369643000 -0700 -+++ BubblewrapLauncher.cpp.new 2023-04-03 18:17:29.815248828 -0600 -@@ -302,6 +302,28 @@ - bindIfExists(args, sndioHomeDir.get(), BindFlags::ReadWrite); - } - -+static void bindPipewire(Vector& args) -+{ -+ const char* xdgRuntimeDir = g_get_user_runtime_dir(); -+ const char* pwRuntimeDir = g_getenv("PIPEWIRE_RUNTIME_DIR"); -+ const char* pwRemote = g_getenv("PIPEWIRE_REMOTE"); -+ -+ if (!pwRemote) -+ pwRemote = "pipewire-0"; -+ -+ if (pwRuntimeDir) { -+ GUniquePtr pwRuntimeFile(g_build_filename(pwRuntimeDir, pwRemote, nullptr)); -+ bindIfExists(args, pwRuntimeFile.get(), BindFlags::ReadWrite); -+ } else { -+ GUniquePtr xdgRuntimeFile(g_build_filename(xdgRuntimeDir, pwRemote, nullptr)); -+ bindIfExists(args, xdgRuntimeFile.get(), BindFlags::ReadWrite); -+ } -+ -+ // System-wide pipewire -+ GUniquePtr sysRuntimeFile(g_build_filename("/run/pipewire", pwRemote, nullptr)); -+ bindIfExists(args, sysRuntimeFile.get(), BindFlags::ReadWrite); -+} -+ - static void bindFonts(Vector& args) - { - const char* configDir = g_get_user_config_dir(); -@@ -797,9 +819,10 @@ - static std::unique_ptr dbusProxy = makeUnique(); - if (dbusProxy) - bindDBusSession(sandboxArgs, *dbusProxy, flatpakInfoFd != -1); -- // FIXME: We should move to Pipewire as soon as viable, Pulse doesn't restrict clients atm. -+ // FIXME: Disable PulseAudio access when Pipewire is available. - bindPulse(sandboxArgs); - bindSndio(sandboxArgs); -+ bindPipewire(sandboxArgs); - bindFonts(sandboxArgs); - bindGStreamerData(sandboxArgs); - bindOpenGL(sandboxArgs);