Skip to content

Commit

Permalink
qt5-webkit: add patches.
Browse files Browse the repository at this point in the history
  • Loading branch information
noptrix committed Feb 22, 2025
1 parent 77cd610 commit 4e1c89d
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/qt5-webkit/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,14 @@ sha512sums=('33f11270bd030599beff9c1983a6c5ff2d61f407cc8a6825f7f405d46f9184c720f
prepare() {
cd "qtwebkit-$_pkgver"

patch -p0 -i ../icu68.patch # Fix build with ICU 68.x
patch -p1 -i ../glib-2.68.patch # https://github.com/qtwebkit/qtwebkit/issues/1057
patch -p0 -i ../qt5-webkit-icu68.patch # Fix build with ICU 68.x
patch -p1 -i ../qt5-webkit-glib-2.68.patch # https://github.com/qtwebkit/qtwebkit/issues/1057
patch -p1 -i ../qt5-webkit-python-3.9.patch # Fix build with python 3.9
patch -p1 -i ../qt5-webkit-bison-3.7.patch # Fix build with bison 3.7
patch -p1 -i ../qtwebkit-cstdint.patch # gcc 11.1
patch -p1 -i ../qtwebkit-fix-build-gcc14.patch # GCC 14.1
patch -p1 -i ../qt5-webkit-icu75.patch
patch -p1 -i ../qt5-webkit-icu76.patch

#patch -Np1 -i ../qtwebkit-ruby3.2.patch
#echo "Done patch for Ruby 3.2"
Expand Down
11 changes: 11 additions & 0 deletions packages/qt5-webkit/qtwebkit-cstdint.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
diff -up qtwebkit-5.212.0-alpha4/Source/ThirdParty/ANGLE/src/common/mathutil.h.me qtwebkit-5.212.0-alpha4/Source/ThirdParty/ANGLE/src/common/mathutil.h
--- qtwebkit-5.212.0-alpha4/Source/ThirdParty/ANGLE/src/common/mathutil.h.me 2023-02-20 15:40:04.045911245 +0100
+++ qtwebkit-5.212.0-alpha4/Source/ThirdParty/ANGLE/src/common/mathutil.h 2023-02-20 15:40:39.038549787 +0100
@@ -16,6 +16,7 @@
#include <algorithm>
#include <string.h>
#include <stdlib.h>
+#include <cstdint>

namespace gl
{
15 changes: 15 additions & 0 deletions packages/qt5-webkit/qtwebkit-fix-build-gcc14.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/Source/WebCore/page/csp/ContentSecurityPolicy.cpp b/Source/WebCore/page/csp/ContentSecurityPolicy.cpp
index 9e726d5..4876f0f 100644
--- a/Source/WebCore/page/csp/ContentSecurityPolicy.cpp
+++ b/Source/WebCore/page/csp/ContentSecurityPolicy.cpp
@@ -231,8 +231,9 @@ bool isAllowedByAllWithHashFromContent(const CSPDirectiveListVector& policies, c
auto cryptoDigest = CryptoDigest::create(toCryptoDigestAlgorithm(algorithm));
cryptoDigest->addBytes(contentCString.data(), contentCString.length());
Vector<uint8_t> digest = cryptoDigest->computeHash();
+ ContentSecurityPolicyHash hash = std::make_pair(algorithm, digest);
for (auto& policy : policies) {
- if ((policy.get()->*allowed)(std::make_pair(algorithm, digest)))
+ if ((policy.get()->*allowed)(hash))
return true;
}
}

0 comments on commit 4e1c89d

Please sign in to comment.