commit: f0375901ab1cc554239fa390459b8d69bf0a6a6f
parent: 198c4c4bc18fb66eab97314c54b39c06e04eeb59
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Mon, 30 Dec 2019 00:01:52 +0100
net-libs/webkit-gtk: Sync with ::gentoo
Diffstat:
4 files changed, 87 insertions(+), 18 deletions(-)
diff --git a/net-libs/webkit-gtk/files/webkit-gtk-2.24.4-eglmesaext-include.patch b/net-libs/webkit-gtk/files/webkit-gtk-2.24.4-eglmesaext-include.patch
@@ -0,0 +1,10 @@
+--- webkitgtk-2.24.4.orig/Source/WebKit/UIProcess/gtk/WaylandCompositor.cpp 2019-08-26 17:55:46.000000000 +0300
++++ webkitgtk-2.24.4.orig/Source/WebKit/UIProcess/gtk/WaylandCompositor.cpp 2019-11-04 23:33:44.146933810 +0300
+@@ -31,6 +31,7 @@
+ #include "WebKitWaylandServerProtocol.h"
+ #include <EGL/egl.h>
+ #include <EGL/eglext.h>
++#include <EGL/eglmesaext.h>
+ #include <WebCore/GLContext.h>
+ #include <WebCore/PlatformDisplayWayland.h>
+ #include <WebCore/Region.h>
diff --git a/net-libs/webkit-gtk/files/webkit-gtk-2.24.4-icu-65.patch b/net-libs/webkit-gtk/files/webkit-gtk-2.24.4-icu-65.patch
@@ -0,0 +1,53 @@
+From 9b60e834454dc93f46f05b1cfdc0aad0c6b7de97 Mon Sep 17 00:00:00 2001
+From: Heiko Becker <heirecka@exherbo.org>
+Date: Fri, 4 Oct 2019 22:17:11 +0200
+Subject: [PATCH] Add missing semicolons to fix build with icu 65.1
+
+---
+ Source/WTF/wtf/URLHelpers.cpp | 2 +-
+ Source/WebCore/dom/Document.cpp | 6 +++---
+ 4 files changed, 25 insertions(+), 4 deletions(-)
+
+diff --git a/Source/WTF/wtf/URLHelpers.cpp b/Source/WTF/wtf/URLHelpers.cpp
+index 18e7f13cd61..c584f1a0cb7 100644
+--- a/Source/WTF/wtf/URLHelpers.cpp
++++ b/Source/WTF/wtf/URLHelpers.cpp
+@@ -301,7 +301,7 @@ static bool allCharactersInIDNScriptWhiteList(const UChar* buffer, int32_t lengt
+ Optional<UChar32> previousCodePoint;
+ while (i < length) {
+ UChar32 c;
+- U16_NEXT(buffer, i, length, c)
++ U16_NEXT(buffer, i, length, c);
+ UErrorCode error = U_ZERO_ERROR;
+ UScriptCode script = uscript_getScript(c, &error);
+ if (error != U_ZERO_ERROR) {
+diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp
+index 0fd0fa090bf..01f76850f3d 100644
+--- a/Source/WebCore/dom/Document.cpp
++++ b/Source/WebCore/dom/Document.cpp
+@@ -4954,12 +4954,12 @@ static bool isValidNameNonASCII(const UChar* characters, unsigned length)
+ unsigned i = 0;
+
+ UChar32 c;
+- U16_NEXT(characters, i, length, c)
++ U16_NEXT(characters, i, length, c);
+ if (!isValidNameStart(c))
+ return false;
+
+ while (i < length) {
+- U16_NEXT(characters, i, length, c)
++ U16_NEXT(characters, i, length, c);
+ if (!isValidNamePart(c))
+ return false;
+ }
+@@ -5019,7 +5019,7 @@ ExceptionOr<std::pair<AtomString, AtomString>> Document::parseQualifiedName(cons
+
+ for (unsigned i = 0; i < length; ) {
+ UChar32 c;
+- U16_NEXT(qualifiedName, i, length, c)
++ U16_NEXT(qualifiedName, i, length, c);
+ if (c == ':') {
+ if (sawColon)
+ return Exception { InvalidCharacterError };
+--
+2.23.0
diff --git a/net-libs/webkit-gtk/metadata.xml b/net-libs/webkit-gtk/metadata.xml
@@ -8,13 +8,13 @@
<use>
<flag name="coverage">Enable code coverage support</flag>
<flag name="egl">Enable EGL support</flag>
+ <flag name="experimental">Enable experimental features</flag>
<flag name="geolocation">Enable geolocation support through <pkg>app-misc/geoclue</pkg></flag>
- <flag name="gles2">Enable GLESv2 support</flag>
- <flag name="nsplugin">Enable full nsplugin support (GTK2 plugins)</flag>
+ <flag name="gles2-only">Use GLES 2.0 or later instead of full OpenGL</flag>
+ <flag name="jumbo-build">Combine source files to speed up build process</flag>
+ <flag name="media-source">Enable support for Media Sources Extension (requires gstreamer 1.16+)</flag>
+ <flag name="seccomp">Enable sandboxing functionality through <pkg>sys-apps/bubblewrap</pkg></flag>
<flag name="webgl">Build support for the WebGL HTML API using <pkg>virtual/opengl</pkg></flag>
- <flag name="experimental">Enable experimental features</flag>
<flag name="wpe">Enable <pkg>gui-libs/libwpe</pkg> rendering</flag>
- <flag name="media-source">Enable support for Media Sources Extension (requires gstreamer 1.16+)</flag>
- <flag name="sandbox">Enable sandboxing functionality through <pkg>sys-apps/bubblewrap</pkg></flag>
</use>
</pkgmetadata>
diff --git a/net-libs/webkit-gtk/webkit-gtk-2.26.2.ebuild b/net-libs/webkit-gtk/webkit-gtk-2.26.2.ebuild
@@ -4,7 +4,8 @@
EAPI=6
CMAKE_MAKEFILE_GENERATOR="ninja"
PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} )
-USE_RUBY="ruby24 ruby25 ruby26"
+USE_RUBY="ruby24 ruby25 ruby26 ruby27"
+CMAKE_MIN_VERSION=3.10
inherit check-reqs cmake-utils flag-o-matic gnome2 pax-utils python-any-r1 ruby-single toolchain-funcs virtualx
@@ -17,7 +18,7 @@ LICENSE="LGPL-2+ BSD"
SLOT="4/37" # soname version of libwebkit2gtk-4.0
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~x86-macos"
-IUSE="aqua coverage doc +egl examples experimental +geolocation gles2-only gnome-keyring +gstreamer +introspection jpeg2k libnotify media-source +opengl sandbox spell wayland +wpe +webgl +X"
+IUSE="aqua coverage doc +egl examples experimental +geolocation gles2-only gnome-keyring +gstreamer +introspection jpeg2k +jumbo-build libnotify media-source +opengl seccomp spell wayland +wpe +webgl +X"
# webgl needs gstreamer, bug #560612
# gstreamer with opengl/gles2-only needs egl
@@ -43,7 +44,7 @@ RDEPEND="
>=media-libs/fontconfig-2.13.0:1.0
>=media-libs/freetype-2.9.0:2
>=dev-libs/libgcrypt-1.7.0:0=
- >=x11-libs/gtk+-3.22:3[aqua?,introspection?,wayland?,X?]
+ >=x11-libs/gtk+-3.22.0:3[aqua?,introspection?,wayland?,X?]
>=media-libs/harfbuzz-1.4.2:=[icu(+)]
>=dev-libs/icu-3.8.1-r1:=
virtual/jpeg:0=
@@ -55,7 +56,7 @@ RDEPEND="
>=dev-libs/atk-2.16.0
media-libs/libwebp:=
- >=dev-libs/glib-2.40:2
+ >=dev-libs/glib-2.44.0:2
>=dev-libs/libxslt-1.1.7
>=media-libs/woff2-1.0.2
gnome-keyring? ( app-crypt/libsecret )
@@ -93,8 +94,9 @@ RDEPEND="
>=gui-libs/libwpe-1.3.0:=
>=gui-libs/wpebackend-fdo-1.3.1:=
)
- sandbox? (
- sys-apps/bubblewrap
+ seccomp? (
+ >=sys-apps/bubblewrap-0.3.1
+ sys-libs/libseccomp
sys-apps/xdg-dbus-proxy
)
"
@@ -108,7 +110,7 @@ DEPEND="${RDEPEND}
>=dev-util/gtk-doc-am-1.10
>=dev-util/gperf-3.0.1
>=sys-devel/bison-2.4.3
- || ( >=sys-devel/gcc-6.0 >=sys-devel/clang-3.3 )
+ || ( >=sys-devel/gcc-7.3 >=sys-devel/clang-5 )
sys-devel/gettext
virtual/pkgconfig
@@ -137,18 +139,18 @@ pkg_pretend() {
check-reqs_pkg_pretend
fi
- if ! test-flag-CXX -std=c++11 ; then
- die "You need at least GCC 4.9.x or Clang >= 3.3 for C++11-specific compiler flags"
+ if ! test-flag-CXX -std=c++17 ; then
+ die "You need at least GCC 7.3.x or Clang >= 5 for C++11-specific compiler flags"
fi
- if tc-is-gcc && [[ $(gcc-version) < 4.9 ]] ; then
- die 'The active compiler needs to be gcc 4.9 (or newer)'
+ if tc-is-gcc && [[ $(gcc-version) < 7.3 ]] ; then
+ die 'The active compiler needs to be gcc 7.3 (or newer)'
fi
fi
if ! use opengl && ! use gles2-only; then
ewarn
- ewarn "You are disabling OpenGL usage (USE=opengl or USE=gles) completely."
+ ewarn "You are disabling OpenGL usage (USE=opengl or USE=gles2-only) completely."
ewarn "This is an unsupported configuration meant for very specific embedded"
ewarn "use cases, where there truly is no GL possible (and even that use case"
ewarn "is very unlikely to come by). If you have GL (even software-only), you"
@@ -166,6 +168,8 @@ pkg_setup() {
}
src_prepare() {
+ eapply "${FILESDIR}/${PN}-2.24.4-icu-65.patch" # bug 698596
+ eapply "${FILESDIR}/${PN}-2.24.4-eglmesaext-include.patch" # bug 699054 # https://bugs.webkit.org/show_bug.cgi?id=204108
cmake-utils_src_prepare
gnome2_src_prepare
}
@@ -235,6 +239,7 @@ src_configure() {
-DSHOULD_INSTALL_JS_SHELL=ON
-DENABLE_EXPERIMENTAL_FEATURES=$(usex experimental)
-DENABLE_MINIBROWSER=$(usex examples)
+ -DENABLE_UNIFIED_BUILDS=$(usex jumbo-build)
-DENABLE_QUARTZ_TARGET=$(usex aqua)
-DENABLE_API_TESTS=$(usex test)
-DENABLE_GTKDOC=$(usex doc)
@@ -256,10 +261,11 @@ src_configure() {
-DENABLE_X11_TARGET=$(usex X)
-DENABLE_OPENGL=${opengl_enabled}
-DUSE_WPE_RENDERER=$(usex wpe)
- -DENABLE_BUBBLEWRAP_SANDBOX=$(usex sandbox)
+ -DENABLE_BUBBLEWRAP_SANDBOX=$(usex seccomp)
-DENABLE_MEDIA_SOURCE=$(usex media-source)
# https://bugs.webkit.org/show_bug.cgi?id=197947
-DENABLE_DARK_MODE_CSS=OFF
++ -DBWRAP_EXECUTABLE="${EPREFIX}"/usr/bin/bwrap # If bubblewrap[suid] then portage makes it go-r and cmake find_program fails with that
-DCMAKE_BUILD_TYPE=Release
-DPORT=GTK
${ruby_interpreter}