Gentoo Archives: gentoo-commits

From: Mart Raudsepp <leio@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/webkit-gtk/, net-libs/webkit-gtk/files/
Date: Tue, 18 Jan 2022 21:39:40
Message-Id: 1642541952.9e7aaec2b8595b132f68dcb2fa1151b128be5af7.leio@gentoo
1 commit: 9e7aaec2b8595b132f68dcb2fa1151b128be5af7
2 Author: Mart Raudsepp <leio <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 18 21:39:12 2022 +0000
4 Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 18 21:39:12 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e7aaec2
7
8 net-libs/webkit-gtk: security cleanup
9
10 Package-Manager: Portage-3.0.20, Repoman-3.0.2
11 Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>
12
13 net-libs/webkit-gtk/Manifest | 1 -
14 .../files/2.28.2-opengl-without-X-fixes.patch | 55 ----
15 net-libs/webkit-gtk/webkit-gtk-2.32.4.ebuild | 300 ---------------------
16 3 files changed, 356 deletions(-)
17
18 diff --git a/net-libs/webkit-gtk/Manifest b/net-libs/webkit-gtk/Manifest
19 index 5da5a930fec9..e3070fd7c047 100644
20 --- a/net-libs/webkit-gtk/Manifest
21 +++ b/net-libs/webkit-gtk/Manifest
22 @@ -1,2 +1 @@
23 -DIST webkitgtk-2.32.4.tar.xz 23327956 BLAKE2B 13762828c39ea55dcdc65be6561fd1ce33fa8c83c1750807fa56a05adfa3604992d0c532ca0466295e6b0e0174dbbda93ebd8082b1ad06b597b54ad8e3a69bd6 SHA512 c2d72850097da72a82faab0a1218b312668b88bc8b67fcd62f08368c71d46bc833e08b3e095eb286beeae59ee88ac74c8393caee8a4ec5a8e90e02425e43350b
24 DIST webkitgtk-2.34.3.tar.xz 24996976 BLAKE2B 03e9d15e956eddb516e7d1c74b2b0adc99659e6121aaa7795fe8d5348b25b909ed08dc6f85ec26a8058331ffbfd2e9e3f7f6e8effe0353270c7bd419171492a0 SHA512 f3d0ad2e051fc177e1a478908ad806e0a094ac7ab1d9e40049a67e868974278dd5fa84d911bed2eb356022fbe020d985370c69af70efa0e223221e9be607efbc
25
26 diff --git a/net-libs/webkit-gtk/files/2.28.2-opengl-without-X-fixes.patch b/net-libs/webkit-gtk/files/2.28.2-opengl-without-X-fixes.patch
27 deleted file mode 100644
28 index 7feb2fac42c3..000000000000
29 --- a/net-libs/webkit-gtk/files/2.28.2-opengl-without-X-fixes.patch
30 +++ /dev/null
31 @@ -1,55 +0,0 @@
32 -https://bugs.webkit.org/show_bug.cgi?id=208907
33 -
34 -From c67efa2bbe2094b40b4e104bb26497c2aff5ce68 Mon Sep 17 00:00:00 2001
35 -From: Mart Raudsepp <leio@g.o>
36 -Date: Sat, 9 May 2020 23:11:52 +0300
37 -Subject: [PATCH] Clean up OpenGLShims.h conditionals in a few places to fix
38 - some build configurations
39 -
40 ----
41 - Source/WebCore/platform/graphics/GLContext.cpp | 5 ++++-
42 - Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp | 5 ++++-
43 - 2 files changed, 8 insertions(+), 2 deletions(-)
44 -
45 -diff --git a/Source/WebCore/platform/graphics/GLContext.cpp b/Source/WebCore/platform/graphics/GLContext.cpp
46 -index b217988b990..1ba0eb8a482 100644
47 ---- a/Source/WebCore/platform/graphics/GLContext.cpp
48 -+++ b/Source/WebCore/platform/graphics/GLContext.cpp
49 -@@ -28,6 +28,9 @@
50 -
51 - #if USE(GLX)
52 - #include "GLContextGLX.h"
53 -+#endif
54 -+
55 -+#if !USE(OPENGL_ES) && !USE(LIBEPOXY) && !USE(ANGLE)
56 - #include "OpenGLShims.h"
57 - #endif
58 -
59 -@@ -57,7 +60,7 @@ inline ThreadGlobalGLContext* currentContext()
60 -
61 - static bool initializeOpenGLShimsIfNeeded()
62 - {
63 --#if USE(OPENGL_ES) || USE(LIBEPOXY)
64 -+#if USE(OPENGL_ES) || USE(LIBEPOXY) || USE(ANGLE)
65 - return true;
66 - #else
67 - static bool initialized = false;
68 -diff --git a/Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp b/Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp
69 -index 3515be452b2..82cce70f14b 100644
70 ---- a/Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp
71 -+++ b/Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp
72 -@@ -64,7 +64,10 @@
73 -
74 - #if USE(GLX)
75 - #include <GL/glx.h>
76 --#include <WebCore/OpenGLShims.h>
77 -+#endif
78 -+
79 -+#if !USE(OPENGL_ES) && !USE(LIBEPOXY) && !USE(ANGLE)
80 -+#include "WebCore/OpenGLShims.h"
81 - #endif
82 -
83 - #if USE(GSTREAMER)
84 ---
85 -2.20.1
86 -
87
88 diff --git a/net-libs/webkit-gtk/webkit-gtk-2.32.4.ebuild b/net-libs/webkit-gtk/webkit-gtk-2.32.4.ebuild
89 deleted file mode 100644
90 index 50c1d19b401f..000000000000
91 --- a/net-libs/webkit-gtk/webkit-gtk-2.32.4.ebuild
92 +++ /dev/null
93 @@ -1,300 +0,0 @@
94 -# Copyright 1999-2021 Gentoo Authors
95 -# Distributed under the terms of the GNU General Public License v2
96 -
97 -EAPI=7
98 -PYTHON_COMPAT=( python3_{8..10} )
99 -USE_RUBY="ruby26 ruby27 ruby30"
100 -
101 -inherit check-reqs cmake flag-o-matic gnome2 pax-utils python-any-r1 ruby-single toolchain-funcs virtualx
102 -
103 -MY_P="webkitgtk-${PV}"
104 -DESCRIPTION="Open source web browser engine"
105 -HOMEPAGE="https://www.webkitgtk.org"
106 -SRC_URI="https://www.webkitgtk.org/releases/${MY_P}.tar.xz"
107 -
108 -LICENSE="LGPL-2+ BSD"
109 -SLOT="4/37" # soname version of libwebkit2gtk-4.0
110 -KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv ~sparc x86"
111 -
112 -IUSE="aqua +egl examples gamepad +geolocation gles2-only gnome-keyring +gstreamer gtk-doc +introspection +jpeg2k +jumbo-build libnotify +opengl seccomp spell systemd wayland +X"
113 -
114 -# gstreamer with opengl/gles2 needs egl
115 -REQUIRED_USE="
116 - gles2-only? ( egl !opengl )
117 - gstreamer? ( opengl? ( egl ) )
118 - wayland? ( egl )
119 - || ( aqua wayland X )
120 -"
121 -
122 -# Tests fail to link for inexplicable reasons
123 -# https://bugs.webkit.org/show_bug.cgi?id=148210
124 -RESTRICT="test"
125 -
126 -# Aqua support in gtk3 is untested
127 -# Dependencies found at Source/cmake/OptionsGTK.cmake
128 -# Various compile-time optionals for gtk+-3.22.0 - ensure it
129 -# Missing WebRTC support, but ENABLE_MEDIA_STREAM/ENABLE_WEB_RTC is experimental upstream (PRIVATE OFF) and shouldn't be used yet in 2.30
130 -# >=gst-plugins-opus-1.14.4-r1 for opusparse (required by MSE)
131 -wpe_depend="
132 - >=gui-libs/libwpe-1.5.0:1.0
133 - >=gui-libs/wpebackend-fdo-1.7.0:1.0
134 -"
135 -# TODO: gst-plugins-base[X] is only needed when build configuration ends up with GLX set, but that's a bit automagic too to fix
136 -RDEPEND="
137 - >=x11-libs/cairo-1.16.0:=[X?]
138 - >=media-libs/fontconfig-2.13.0:1.0
139 - >=media-libs/freetype-2.9.0:2
140 - >=dev-libs/libgcrypt-1.7.0:0=
141 - >=x11-libs/gtk+-3.22.0:3[aqua?,introspection?,wayland?,X?]
142 - >=media-libs/harfbuzz-1.4.2:=[icu(+)]
143 - >=dev-libs/icu-60.2:=
144 - virtual/jpeg:0=
145 - >=net-libs/libsoup-2.54:2.4[introspection?]
146 - >=dev-libs/libxml2-2.8.0:2
147 - >=media-libs/libpng-1.4:0=
148 - dev-db/sqlite:3=
149 - sys-libs/zlib:0
150 - >=dev-libs/atk-2.16.0
151 - media-libs/libwebp:=
152 -
153 - >=dev-libs/glib-2.67.1:2
154 - >=dev-libs/libxslt-1.1.7
155 - media-libs/woff2
156 - gnome-keyring? ( app-crypt/libsecret )
157 - introspection? ( >=dev-libs/gobject-introspection-1.59.1:= )
158 - dev-libs/libtasn1:=
159 - spell? ( >=app-text/enchant-0.22:2 )
160 - gstreamer? (
161 - >=media-libs/gstreamer-1.14:1.0
162 - >=media-libs/gst-plugins-base-1.14:1.0[egl?,opengl?,X?]
163 - gles2-only? ( media-libs/gst-plugins-base:1.0[gles2] )
164 - >=media-plugins/gst-plugins-opus-1.14.4-r1:1.0
165 - >=media-libs/gst-plugins-bad-1.14:1.0 )
166 -
167 - X? (
168 - x11-libs/libX11
169 - x11-libs/libXcomposite
170 - x11-libs/libXdamage
171 - x11-libs/libXrender
172 - x11-libs/libXt )
173 -
174 - libnotify? ( x11-libs/libnotify )
175 - dev-libs/hyphen
176 - jpeg2k? ( >=media-libs/openjpeg-2.2.0:2= )
177 -
178 - egl? ( media-libs/mesa[egl(+)] )
179 - gles2-only? ( media-libs/mesa[gles2] )
180 - opengl? ( virtual/opengl )
181 - wayland? (
182 - dev-libs/wayland
183 - >=dev-libs/wayland-protocols-1.12
184 - opengl? ( ${wpe_depend} )
185 - gles2-only? ( ${wpe_depend} )
186 - )
187 -
188 - seccomp? (
189 - >=sys-apps/bubblewrap-0.3.1
190 - sys-libs/libseccomp
191 - sys-apps/xdg-dbus-proxy
192 - )
193 -
194 - systemd? ( sys-apps/systemd:= )
195 - gamepad? ( >=dev-libs/libmanette-0.2.4 )
196 -"
197 -unset wpe_depend
198 -DEPEND="${RDEPEND}"
199 -# paxctl needed for bug #407085
200 -# Need real bison, not yacc
201 -BDEPEND="
202 - ${PYTHON_DEPS}
203 - ${RUBY_DEPS}
204 - >=app-accessibility/at-spi2-core-2.5.3
205 - dev-util/glib-utils
206 - >=dev-util/gperf-3.0.1
207 - >=sys-devel/bison-2.4.3
208 - || ( >=sys-devel/gcc-7.3 >=sys-devel/clang-5 )
209 - sys-devel/gettext
210 - virtual/pkgconfig
211 -
212 - >=dev-lang/perl-5.10
213 - virtual/perl-Data-Dumper
214 - virtual/perl-Carp
215 - virtual/perl-JSON-PP
216 -
217 - gtk-doc? ( >=dev-util/gtk-doc-1.32 )
218 - geolocation? ( dev-util/gdbus-codegen )
219 - >=dev-util/cmake-3.10
220 -"
221 -# test? (
222 -# dev-python/pygobject:3[python_targets_python2_7]
223 -# x11-themes/hicolor-icon-theme
224 -# jit? ( sys-apps/paxctl ) )
225 -RDEPEND="${RDEPEND}
226 - geolocation? ( >=app-misc/geoclue-2.1.5:2.0 )
227 -"
228 -
229 -S="${WORKDIR}/${MY_P}"
230 -
231 -CHECKREQS_DISK_BUILD="18G" # and even this might not be enough, bug #417307
232 -
233 -pkg_pretend() {
234 - if [[ ${MERGE_TYPE} != "binary" ]] ; then
235 - if is-flagq "-g*" && ! is-flagq "-g*0" ; then
236 - einfo "Checking for sufficient disk space to build ${PN} with debugging CFLAGS"
237 - check-reqs_pkg_pretend
238 - fi
239 -
240 - if ! test-flag-CXX -std=c++17 ; then
241 - die "You need at least GCC 7.3.x or Clang >= 5 for C++17-specific compiler flags"
242 - fi
243 - fi
244 -
245 - if ! use opengl && ! use gles2-only; then
246 - ewarn
247 - ewarn "You are disabling OpenGL usage (USE=opengl or USE=gles2-only) completely."
248 - ewarn "This is an unsupported configuration meant for very specific embedded"
249 - ewarn "use cases, where there truly is no GL possible (and even that use case"
250 - ewarn "is very unlikely to come by). If you have GL (even software-only), you"
251 - ewarn "really really should be enabling OpenGL!"
252 - ewarn
253 - fi
254 -}
255 -
256 -pkg_setup() {
257 - if [[ ${MERGE_TYPE} != "binary" ]] && is-flagq "-g*" && ! is-flagq "-g*0" ; then
258 - check-reqs_pkg_setup
259 - fi
260 -
261 - python-any-r1_pkg_setup
262 -}
263 -
264 -src_prepare() {
265 - eapply "${FILESDIR}"/2.28.2-opengl-without-X-fixes.patch
266 - cmake_src_prepare
267 - gnome2_src_prepare
268 -}
269 -
270 -src_configure() {
271 - # Respect CC, otherwise fails on prefix #395875
272 - tc-export CC
273 -
274 - # It does not compile on alpha without this in LDFLAGS
275 - # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648761
276 - use alpha && append-ldflags "-Wl,--no-relax"
277 -
278 - # ld segfaults on ia64 with LDFLAGS --as-needed, bug #555504
279 - use ia64 && append-ldflags "-Wl,--no-as-needed"
280 -
281 - # Sigbuses on SPARC with mcpu and co., bug #???
282 - use sparc && filter-flags "-mvis"
283 -
284 - # https://bugs.webkit.org/show_bug.cgi?id=42070 , #301634
285 - use ppc64 && append-flags "-mminimal-toc"
286 -
287 - # Try to use less memory, bug #469942 (see Fedora .spec for reference)
288 - # --no-keep-memory doesn't work on ia64, bug #502492
289 - if ! use ia64; then
290 - append-ldflags "-Wl,--no-keep-memory"
291 - fi
292 -
293 - # We try to use gold when possible for this package
294 -# if ! tc-ld-is-gold ; then
295 -# append-ldflags "-Wl,--reduce-memory-overheads"
296 -# fi
297 -
298 - # Ruby situation is a bit complicated. See bug 513888
299 - local rubyimpl
300 - local ruby_interpreter=""
301 - for rubyimpl in ${USE_RUBY}; do
302 - if has_version -b "virtual/rubygems[ruby_targets_${rubyimpl}]"; then
303 - ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ${rubyimpl})"
304 - fi
305 - done
306 - # This will rarely occur. Only a couple of corner cases could lead us to
307 - # that failure. See bug 513888
308 - [[ -z $ruby_interpreter ]] && die "No suitable ruby interpreter found"
309 -
310 - # TODO: Check Web Audio support
311 - # should somehow let user select between them?
312 - #
313 - # opengl needs to be explicetly handled, bug #576634
314 -
315 - local use_wpe_renderer=OFF
316 - local opengl_enabled
317 - if use opengl || use gles2-only; then
318 - opengl_enabled=ON
319 - use wayland && use_wpe_renderer=ON
320 - else
321 - opengl_enabled=OFF
322 - fi
323 -
324 - local mycmakeargs=(
325 - -DENABLE_UNIFIED_BUILDS=$(usex jumbo-build)
326 - -DENABLE_QUARTZ_TARGET=$(usex aqua)
327 - -DENABLE_API_TESTS=$(usex test)
328 - -DENABLE_GTKDOC=$(usex gtk-doc)
329 - -DENABLE_GEOLOCATION=$(usex geolocation) # Runtime optional (talks over dbus service)
330 - $(cmake_use_find_package gles2-only OpenGLES2)
331 - -DENABLE_GLES2=$(usex gles2-only)
332 - -DENABLE_MINIBROWSER=$(usex examples)
333 - -DENABLE_VIDEO=$(usex gstreamer)
334 - -DENABLE_WEB_AUDIO=$(usex gstreamer)
335 - -DENABLE_INTROSPECTION=$(usex introspection)
336 - -DUSE_LIBNOTIFY=$(usex libnotify)
337 - -DUSE_LIBSECRET=$(usex gnome-keyring)
338 - -DUSE_OPENJPEG=$(usex jpeg2k)
339 - -DUSE_WOFF2=ON
340 - -DENABLE_SPELLCHECK=$(usex spell)
341 - -DUSE_SYSTEMD=$(usex systemd) # Whether to enable journald logging
342 - -DENABLE_GAMEPAD=$(usex gamepad)
343 - -DENABLE_WAYLAND_TARGET=$(usex wayland)
344 - -DUSE_WPE_RENDERER=${use_wpe_renderer} # WPE renderer is used to implement accelerated compositing under wayland
345 - $(cmake_use_find_package egl EGL)
346 - $(cmake_use_find_package opengl OpenGL)
347 - -DENABLE_X11_TARGET=$(usex X)
348 - -DUSE_OPENGL_OR_ES=${opengl_enabled}
349 - -DENABLE_WEBGL=${opengl_enabled}
350 - # Supported only under ANGLE, see
351 - # https://bugs.webkit.org/show_bug.cgi?id=225563
352 - # https://bugs.webkit.org/show_bug.cgi?id=224888
353 - -DENABLE_WEBGL2=OFF
354 - -DENABLE_BUBBLEWRAP_SANDBOX=$(usex seccomp)
355 - -DBWRAP_EXECUTABLE:FILEPATH="${EPREFIX}"/usr/bin/bwrap # If bubblewrap[suid] then portage makes it go-r and cmake find_program fails with that
356 - -DDBUS_PROXY_EXECUTABLE:FILEPATH="${EPREFIX}"/usr/bin/xdg-dbus-proxy
357 - -DPORT=GTK
358 - ${ruby_interpreter}
359 - )
360 -
361 - # Allow it to use GOLD when possible as it has all the magic to
362 - # detect when to use it and using gold for this concrete package has
363 - # multiple advantages and is also the upstream default, bug #585788
364 -# if tc-ld-is-gold ; then
365 -# mycmakeargs+=( -DUSE_LD_GOLD=ON )
366 -# else
367 -# mycmakeargs+=( -DUSE_LD_GOLD=OFF )
368 -# fi
369 -
370 - # https://bugs.gentoo.org/761238
371 - append-cppflags -DNDEBUG
372 -
373 - WK_USE_CCACHE=NO cmake_src_configure
374 -}
375 -
376 -src_compile() {
377 - cmake_src_compile
378 -}
379 -
380 -src_test() {
381 - # Prevents test failures on PaX systems
382 - pax-mark m $(list-paxables Programs/*[Tt]ests/*) # Programs/unittests/.libs/test*
383 -
384 - cmake_src_test
385 -}
386 -
387 -src_install() {
388 - cmake_src_install
389 -
390 - # Prevents crashes on PaX systems, bug #522808
391 - pax-mark m "${ED}/usr/libexec/webkit2gtk-4.0/jsc" "${ED}/usr/libexec/webkit2gtk-4.0/WebKitWebProcess"
392 - pax-mark m "${ED}/usr/libexec/webkit2gtk-4.0/WebKitPluginProcess"
393 -}