This commit is contained in:
Mario Fetka
2025-06-06 03:35:14 +02:00
parent b56141d74d
commit 0dba7be35f
91 changed files with 5377 additions and 809 deletions

6
dev-qt/qtwebkit/Manifest Normal file
View File

@@ -0,0 +1,6 @@
AUX qtwebkit-5.212.0_pre20200309-bison-3.7.patch 1613 BLAKE2B 0d2d173b5575ed5e1c52a07c5ceb14210bfb0a91e50a064df1e293451d64708822eb54d65947413efb13711d4c0c8e01441869248a4461446bd2bc122f07746b
AUX qtwebkit-5.212.0_pre20200309-glib-2.68.patch 887 BLAKE2B 1a191fd47693d70bc6ddbafcc8031bdd511c3be63121c1014471a93ebf3f1326a922277c42520a878192e0db4bb679cc007f27451ffac1aecdd86032b9d383c2
AUX qtwebkit-5.212.0_pre20200309-icu-68.patch 4981 BLAKE2B c031aa8ec816749fa35e3876d007a02d60a3a5ff0fc57a2774a13fc23559b39cc5bfeec6fedd96cb36d7eed5d1b388049d190673afbe5b0fd2f0343f8afd5344
AUX qtwebkit-5.212.0_pre20200309-python-3.9.patch 1100 BLAKE2B 2b44f8614a81141fd372d97cec2661b712e3cc68a01d5ed83d89c778eacc218a95a3273b7f464bbcd5380806859a40598cc166a8473fb30e76ca7e6b002b460f
DIST qtwebkit-5.212.0-alpha4.tar.xz 12528508 BLAKE2B 72d7444f270f47b62044cf683ed306803660bfbafe1450440ea29e43e3c0e6e841b6e860dfa8affc1b32b7c539448f04e22a7ae38cce055d37905dfb3240aab0
EBUILD qtwebkit-5.212.0_pre20200309-r3.ebuild 4094 BLAKE2B b983b77f55525691e93f1c89060cabb3609c63effece0021136f99a91c5096b4d45425984a703ed061231de4480f541f5f9a08c6cd5e0290742aec0a356f2196

View File

@@ -0,0 +1,46 @@
From d92b11fea65364fefa700249bd3340e0cd4c5b31 Mon Sep 17 00:00:00 2001
From: Dmitry Shachnev <mitya57@gmail.com>
Date: Tue, 4 Aug 2020 21:04:06 +0300
Subject: [PATCH] Let Bison generate the header directly, to fix build with
Bison 3.7
Starting with Bison 3.7, the generated C++ file #include's the header
by default, instead of duplicating it. So we should not delete it.
Remove the code to add #ifdef guards to the header, since Bison adds
them itself since version 2.6.3.
---
Source/WebCore/css/makegrammar.pl | 21 +--------------------
1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/Source/WebCore/css/makegrammar.pl b/Source/WebCore/css/makegrammar.pl
index 5d63b08102eb..9435701c7061 100644
--- a/Source/WebCore/css/makegrammar.pl
+++ b/Source/WebCore/css/makegrammar.pl
@@ -73,25 +73,6 @@
}
my $fileBase = File::Spec->join($outputDir, $filename);
-my @bisonCommand = ($bison, "-d", "-p", $symbolsPrefix, $grammarFilePath, "-o", "$fileBase.cpp");
+my @bisonCommand = ($bison, "--defines=$fileBase.h", "-p", $symbolsPrefix, $grammarFilePath, "-o", "$fileBase.cpp");
push @bisonCommand, "--no-lines" if $^O eq "MSWin32"; # Work around bug in bison >= 3.0 on Windows where it puts backslashes into #line directives.
system(@bisonCommand) == 0 or die;
-
-open HEADER, ">$fileBase.h" or die;
-print HEADER << "EOF";
-#ifndef CSSGRAMMAR_H
-#define CSSGRAMMAR_H
-EOF
-
-open HPP, "<$fileBase.cpp.h" or open HPP, "<$fileBase.hpp" or die;
-while (<HPP>) {
- print HEADER;
-}
-close HPP;
-
-print HEADER "#endif\n";
-close HEADER;
-
-unlink("$fileBase.cpp.h");
-unlink("$fileBase.hpp");
-

View File

@@ -0,0 +1,28 @@
https://github.com/qtwebkit/qtwebkit/pull/1058
From 5b698ba3faffd4e198a45be9fe74f53307395e4b Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fvogt@suse.de>
Date: Wed, 7 Apr 2021 13:38:09 +0200
Subject: [PATCH] Remove invalid g_object declarations to fix build with glib
>= 2.68
g_object_ref_sink is defined as a macro meanwhile and so the build fails.
Just remove the declarations, glib.h is included anyway.
---
Source/WTF/wtf/glib/GRefPtr.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/Source/WTF/wtf/glib/GRefPtr.h b/Source/WTF/wtf/glib/GRefPtr.h
index 06133d82cb35..d9a1d2f145f5 100644
--- a/Source/WTF/wtf/glib/GRefPtr.h
+++ b/Source/WTF/wtf/glib/GRefPtr.h
@@ -29,9 +29,6 @@
#include <algorithm>
#include <glib.h>
-extern "C" void g_object_unref(gpointer);
-extern "C" gpointer g_object_ref_sink(gpointer);
-
namespace WTF {
enum GRefPtrAdoptType { GRefPtrAdopt };

View File

@@ -0,0 +1,120 @@
--- a/Source/WebCore/platform/text/icu/UTextProvider.h
+++ b/Source/WebCore/platform/text/icu/UTextProvider.h
@@ -80,12 +80,12 @@
// Ensure chunk offset is well formed if computed offset exceeds int32_t range.
ASSERT(offset < std::numeric_limits<int32_t>::max());
text->chunkOffset = offset < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0;
- isAccessible = TRUE;
+ isAccessible = true;
return true;
}
if (nativeIndex >= nativeLength && text->chunkNativeLimit == nativeLength) {
text->chunkOffset = text->chunkLength;
- isAccessible = FALSE;
+ isAccessible = false;
return true;
}
} else {
@@ -94,12 +94,12 @@
// Ensure chunk offset is well formed if computed offset exceeds int32_t range.
ASSERT(offset < std::numeric_limits<int32_t>::max());
text->chunkOffset = offset < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0;
- isAccessible = TRUE;
+ isAccessible = true;
return true;
}
if (nativeIndex <= 0 && !text->chunkNativeStart) {
text->chunkOffset = 0;
- isAccessible = FALSE;
+ isAccessible = false;
return true;
}
}
--- a/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp
+++ b/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp
@@ -100,23 +100,23 @@
if (index < uText->chunkNativeLimit && index >= uText->chunkNativeStart) {
// Already inside the buffer. Set the new offset.
uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart);
- return TRUE;
+ return true;
}
if (index >= length && uText->chunkNativeLimit == length) {
// Off the end of the buffer, but we can't get it.
uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart);
- return FALSE;
+ return false;
}
} else {
if (index <= uText->chunkNativeLimit && index > uText->chunkNativeStart) {
// Already inside the buffer. Set the new offset.
uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart);
- return TRUE;
+ return true;
}
if (!index && !uText->chunkNativeStart) {
// Already at the beginning; can't go any farther.
uText->chunkOffset = 0;
- return FALSE;
+ return false;
}
}
@@ -144,7 +144,7 @@
uText->nativeIndexingLimit = uText->chunkLength;
- return TRUE;
+ return true;
}
static int32_t uTextLatin1Extract(UText* uText, int64_t start, int64_t limit, UChar* dest, int32_t destCapacity, UErrorCode* status)
@@ -336,7 +336,7 @@
static UBool uTextLatin1ContextAwareAccess(UText* text, int64_t nativeIndex, UBool forward)
{
if (!text->context)
- return FALSE;
+ return false;
int64_t nativeLength = uTextLatin1ContextAwareNativeLength(text);
UBool isAccessible;
if (uTextAccessInChunkOrOutOfRange(text, nativeIndex, nativeLength, forward, isAccessible))
@@ -356,7 +356,7 @@
ASSERT(newContext == UTextProviderContext::PriorContext);
textLatin1ContextAwareSwitchToPriorContext(text, nativeIndex, nativeLength, forward);
}
- return TRUE;
+ return true;
}
static int32_t uTextLatin1ContextAwareExtract(UText*, int64_t, int64_t, UChar*, int32_t, UErrorCode* errorCode)
--- a/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp
+++ b/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp
@@ -125,7 +125,7 @@
static UBool uTextUTF16ContextAwareAccess(UText* text, int64_t nativeIndex, UBool forward)
{
if (!text->context)
- return FALSE;
+ return false;
int64_t nativeLength = uTextUTF16ContextAwareNativeLength(text);
UBool isAccessible;
if (uTextAccessInChunkOrOutOfRange(text, nativeIndex, nativeLength, forward, isAccessible))
@@ -145,7 +145,7 @@
ASSERT(newContext == UTextProviderContext::PriorContext);
textUTF16ContextAwareSwitchToPriorContext(text, nativeIndex, nativeLength, forward);
}
- return TRUE;
+ return true;
}
static int32_t uTextUTF16ContextAwareExtract(UText*, int64_t, int64_t, UChar*, int32_t, UErrorCode* errorCode)
--- a/Source/WebCore/platform/text/TextCodecICU.cpp
+++ b/Source/WebCore/platform/text/TextCodecICU.cpp
@@ -308,7 +308,7 @@
m_converterICU = ucnv_open(m_canonicalConverterName, &err);
ASSERT(U_SUCCESS(err));
if (m_converterICU)
- ucnv_setFallback(m_converterICU, TRUE);
+ ucnv_setFallback(m_converterICU, true);
}
int TextCodecICU::decodeToBuffer(UChar* target, UChar* targetLimit, const char*& source, const char* sourceLimit, int32_t* offsets, bool flush, UErrorCode& err)

View File

@@ -0,0 +1,27 @@
From 78360c01c796b6260bf828bc9c8a0ef73c5132fd Mon Sep 17 00:00:00 2001
From: Konstantin Tokarev <annulen@yandex.ru>
Date: Wed, 3 Jun 2020 15:01:42 +0300
Subject: [PATCH] Fix compilation with Python 3.9: avoid passing encoding to
json.load()
In Python 2.7 UTF-8 is assumed by default, while in Python 3 this argument
is not supported.
Change-Id: Ic459d60a6b20bc1838d8771bc36ac41614fe61a9
---
Source/JavaScriptCore/generate-bytecode-files | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Source/JavaScriptCore/generate-bytecode-files b/Source/JavaScriptCore/generate-bytecode-files
index c5dab429c7b0..af3431275ecf 100644
--- a/Source/JavaScriptCore/generate-bytecode-files
+++ b/Source/JavaScriptCore/generate-bytecode-files
@@ -163,7 +163,7 @@ if __name__ == "__main__":
initBytecodesFile = openOrExit(initASMFileName, "w")
try:
- bytecodeSections = json.load(bytecodeFile, encoding = "utf-8")
+ bytecodeSections = json.load(bytecodeFile)
except:
print("Unexpected error parsing {0}: {1}".format(bytecodeJSONFile, sys.exc_info()))

View File

@@ -0,0 +1,154 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
if [[ ${PV} = *9999 ]]; then
EGIT_BRANCH="qtwebkit-5.212"
EGIT_REPO_URI="https://github.com/qtwebkit/qtwebkit.git"
inherit git-r3
else
MY_P="${PN}-${PV/_pre20200309/-alpha4}" # present as upgrade over previous snapshot
SRC_URI="https://github.com/annulen/webkit/releases/download/${MY_P}/${MY_P}.tar.xz"
KEYWORDS="amd64 arm arm64 ppc64 x86"
S="${WORKDIR}/${MY_P}"
fi
PYTHON_COMPAT=( python3_{7..13} )
USE_RUBY="ruby25 ruby26 ruby27 ruby30 ruby31"
inherit check-reqs cmake flag-o-matic python-any-r1 qmake-utils ruby-single toolchain-funcs
DESCRIPTION="WebKit rendering library for the Qt5 framework (deprecated)"
HOMEPAGE="https://www.qt.io/"
LICENSE="BSD LGPL-2+"
SLOT="5/5.212"
IUSE="geolocation gles2-only +gstreamer +hyphen +jit multimedia nsplugin opengl orientation +printsupport qml webp X"
REQUIRED_USE="
nsplugin? ( X )
qml? ( opengl )
?? ( gstreamer multimedia )
"
# Dependencies found at Source/cmake/OptionsQt.cmake
QT_MIN_VER="5.12.3:5"
BDEPEND="
${PYTHON_DEPS}
${RUBY_DEPS}
dev-lang/perl
dev-util/gperf
>=sys-devel/bison-2.4.3
sys-devel/flex
virtual/pkgconfig
"
DEPEND="
dev-db/sqlite:3
dev-libs/icu:=
dev-libs/libxml2
dev-libs/libxslt
>=dev-qt/qtcore-${QT_MIN_VER}
>=dev-qt/qtgui-${QT_MIN_VER}
>=dev-qt/qtnetwork-${QT_MIN_VER}
>=dev-qt/qtwidgets-${QT_MIN_VER}=
media-libs/libpng:0=
media-libs/woff2
virtual/jpeg:0
geolocation? ( >=dev-qt/qtpositioning-${QT_MIN_VER} )
gstreamer? (
dev-libs/glib:2
media-libs/gstreamer:1.0
media-libs/gst-plugins-bad:1.0
media-libs/gst-plugins-base:1.0
)
hyphen? ( dev-libs/hyphen )
multimedia? ( >=dev-qt/qtmultimedia-${QT_MIN_VER}[widgets] )
opengl? (
>=dev-qt/qtgui-${QT_MIN_VER}[gles2-only=]
>=dev-qt/qtopengl-${QT_MIN_VER}[gles2-only=]
)
orientation? ( >=dev-qt/qtsensors-${QT_MIN_VER} )
printsupport? ( >=dev-qt/qtprintsupport-${QT_MIN_VER} )
qml? (
>=dev-qt/qtdeclarative-${QT_MIN_VER}
>=dev-qt/qtwebchannel-${QT_MIN_VER}[qml]
)
webp? ( media-libs/libwebp:= )
X? (
x11-libs/libX11
x11-libs/libXcomposite
x11-libs/libXrender
)
"
RDEPEND="${DEPEND}"
CHECKREQS_DISK_BUILD="16G" # bug 417307
PATCHES=(
"${FILESDIR}/${P}-bison-3.7.patch" # bug 736499
"${FILESDIR}/${P}-icu-68.patch" # bug 753260
"${FILESDIR}/${P}-python-3.9.patch" # bug 766303
"${FILESDIR}/${P}-glib-2.68.patch" # bug 777759
)
_check_reqs() {
if [[ ${MERGE_TYPE} != binary ]] && is-flagq "-g*" && ! is-flagq "-g*0"; then
einfo "Checking for sufficient disk space to build ${PN} with debugging flags"
check-reqs_$1
fi
}
pkg_pretend() {
_check_reqs pkg_pretend
}
pkg_setup() {
_check_reqs pkg_setup
python-any-r1_pkg_setup
}
src_configure() {
# Respect CC, otherwise fails on prefix, bug #395875
tc-export CC
# Multiple rendering bugs on youtube, github, etc without this, bug #547224
append-flags $(test-flags -fno-strict-aliasing)
local mycmakeargs=(
-DPORT=Qt
-DENABLE_API_TESTS=OFF
-DENABLE_TOOLS=OFF
-DENABLE_GEOLOCATION=$(usex geolocation)
-DUSE_GSTREAMER=$(usex gstreamer)
-DUSE_LIBHYPHEN=$(usex hyphen)
-DENABLE_JIT=$(usex jit)
-DUSE_QT_MULTIMEDIA=$(usex multimedia)
-DENABLE_NETSCAPE_PLUGIN_API=$(usex nsplugin)
-DENABLE_OPENGL=$(usex opengl)
-DENABLE_PRINT_SUPPORT=$(usex printsupport)
-DENABLE_DEVICE_ORIENTATION=$(usex orientation)
-DENABLE_WEBKIT2=$(usex qml)
$(cmake_use_find_package webp WebP)
-DENABLE_X11_TARGET=$(usex X)
)
if has_version "virtual/rubygems[ruby_targets_ruby27]"; then
mycmakeargs+=( -DRUBY_EXECUTABLE=$(type -P ruby27) )
elif has_version "virtual/rubygems[ruby_targets_ruby26]"; then
mycmakeargs+=( -DRUBY_EXECUTABLE=$(type -P ruby26) )
else
mycmakeargs+=( -DRUBY_EXECUTABLE=$(type -P ruby25) )
fi
cmake_src_configure
}
src_install() {
cmake_src_install
# bug 572056
if [[ ! -f ${ED}$(qt5_get_libdir)/libQt5WebKit.so ]]; then
eerror "${CATEGORY}/${PF} could not build due to a broken ruby environment."
die 'Check "eselect ruby" and ensure you have a working ruby in your $PATH'
fi
}