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