Gentoo Archives: gentoo-commits

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