Index | Thread | Search

From:
Claudio Jeker <cjeker@diehard.n-r-g.com>
Subject:
fix qtwebkit on sparc64
To:
Rafael Sadowski <rsadowski@openbsd.org>
Cc:
ports@openbsd.org
Date:
Wed, 28 Jan 2026 14:17:13 +0100

Download raw body.

Thread
With this qtwebkit builds and packages on sparc64.
The patch is to fix another strange type_traits errors that
-fdelete-null-pointer-checks is not enough for:

/usr/local/include/c++/15.2.0/type_traits:1297:52: error: 'constexpr
std::true_type std::__is_complete_or_unbounded(__type_identity<_Tp>) [with
_Tp = WTF::Vector<unsigned char>; long unsigned int <anonymous> = 16;
true_type = true_type]' used before its definition

-- 
:wq Claudio

Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/Makefile,v
diff -u -p -r1.51 Makefile
--- Makefile	28 Jun 2025 00:36:32 -0000	1.51
+++ Makefile	28 Jan 2026 13:03:26 -0000
@@ -14,7 +14,7 @@ PKGNAME =		qtwebkit-${VERSION}
 PKGSPEC =		qtwebkit->=${VERSION}v0
 
 EPOCH =			0
-REVISION =		16
+REVISION =		17
 
 SHARED_LIBS +=  Qt5WebKit               3.1 # 5.9
 SHARED_LIBS +=  Qt5WebKitWidgets        3.1 # 5.9
@@ -39,6 +39,12 @@ WANTLIB += gstvideo-1.0 hyphen icui18n i
 WANTLIB += webp xml2 xslt z
 
 SITES =		https://github.com/annulen/webkit/releases/download/${DISTNAME}/
+
+# needs python and c++
+COMPILER =		base-clang ports-gcc
+COMPILER_LANGS =	c c++
+
+CXXFLAGS_ports-gcc =	-fdelete-null-pointer-checks
 
 MODULES =		devel/cmake \
 			lang/python \
Index: patches/patch-Source_WebCore_page_csp_ContentSecurityPolicy_cpp
===================================================================
RCS file: patches/patch-Source_WebCore_page_csp_ContentSecurityPolicy_cpp
diff -N patches/patch-Source_WebCore_page_csp_ContentSecurityPolicy_cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-Source_WebCore_page_csp_ContentSecurityPolicy_cpp	28 Jan 2026 10:02:36 -0000
@@ -0,0 +1,16 @@
+https://src.fedoraproject.org/rpms/qt5-qtwebkit/raw/rawhide/f/qtwebkit-fix-build-gcc14.patch
+
+Index: Source/WebCore/page/csp/ContentSecurityPolicy.cpp
+--- Source/WebCore/page/csp/ContentSecurityPolicy.cpp.orig
++++ Source/WebCore/page/csp/ContentSecurityPolicy.cpp
+@@ -231,8 +231,9 @@ bool isAllowedByAllWithHashFromContent(const CSPDirect
+         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;
+         }
+     }