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: Fri, 31 Jan 2020 19:19:25
Message-Id: 1580498290.b6825b367eab5028b16c0907070129c85c71b767.leio@gentoo
1 commit: b6825b367eab5028b16c0907070129c85c71b767
2 Author: Mart Raudsepp <leio <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jan 31 18:07:29 2020 +0000
4 Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 31 19:18:10 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6825b36
7
8 net-libs/webkit-gtk: security bump to 2.26.3, fix gtk-doc
9
10 Move gtk-doc building from USE=doc to USE=gtk-doc, as the latter is the
11 one to use now for when generating gtk-doc from scratch. Fix it with
12 perl-based gtk-doc by stripping out some tags in the docs completely;
13 this was already fixed upstream, but that fix seems dependent on newer
14 gtk-doc handling the markdown quoting that got added. So remove the
15 tags completely until we can depend on a newer gtk-doc that doesn't
16 have trouble with the upstream way.
17
18 Also a build fix for USE="wayland -opengl -gles2-only" (but remember:
19 you shouldn't disable both opengl and gles2-only on any real desktop
20 system).
21
22 Bug: https://bugs.gentoo.org/706374
23 Bug: https://bugs.gentoo.org/704550
24 Package-Manager: Portage-2.3.84, Repoman-2.3.20
25 Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>
26
27 net-libs/webkit-gtk/Manifest | 1 +
28 net-libs/webkit-gtk/files/2.26.3-fix-gtk-doc.patch | 27 ++
29 .../files/2.26.3-fix-noGL-wayland-build.patch | 39 +++
30 net-libs/webkit-gtk/webkit-gtk-2.26.3.ebuild | 287 +++++++++++++++++++++
31 4 files changed, 354 insertions(+)
32
33 diff --git a/net-libs/webkit-gtk/Manifest b/net-libs/webkit-gtk/Manifest
34 index db8394225ff..b34080964f4 100644
35 --- a/net-libs/webkit-gtk/Manifest
36 +++ b/net-libs/webkit-gtk/Manifest
37 @@ -1,2 +1,3 @@
38 DIST webkitgtk-2.24.4.tar.xz 17575784 BLAKE2B c30683ea365a50d7def572305b49278343d67739f9bd3cfd78cb08b5cc87b5453504df9b09752f8d6483b18b9b812f3d3cddc084762cfa8990fcc651660b89c2 SHA512 1d713955a735ae2e2229beea7bda7f518a6247c6aa7f5753aeb5b5c6395339d451d0d146f7188e7ba65cb82ea5a74a5e73e956fe59d5f5f97659a44af33df112
39 DIST webkitgtk-2.26.2.tar.xz 19330000 BLAKE2B c0142aa19572c96e3dff11251316a4527be0357cf101177e056dd40aa9b5346216a4dcc14071d9c1240c101bd03f2179559d0d2bd81308967aba8530208186e0 SHA512 98d47282fd8f766dbe4a74c1a3f618aaeeeed69bd0666ed4e8674ae562b634681b3bd18b0d428df6bfefbaa3e18eb4cfb2fb077f5be4fed34cbc81c8293ec33e
40 +DIST webkitgtk-2.26.3.tar.xz 19331900 BLAKE2B 14c31b0f640b0f859a3c1eeda542f176f6c7981270c5be3225556eb4a1027a2511039cf0f33682faa93846c4ca5ed64158574a9b8a662a4a200b97cad28d5ed0 SHA512 9575c86ab5752c09841878cf55134e7de9a87200e55017859cd02affb1cadd58031a7b6f67a580e87a1dfe4fc830fed9774ba289e7244d3ead9eb9328e76d7c9
41
42 diff --git a/net-libs/webkit-gtk/files/2.26.3-fix-gtk-doc.patch b/net-libs/webkit-gtk/files/2.26.3-fix-gtk-doc.patch
43 new file mode 100644
44 index 00000000000..85328be1a5c
45 --- /dev/null
46 +++ b/net-libs/webkit-gtk/files/2.26.3-fix-gtk-doc.patch
47 @@ -0,0 +1,27 @@
48 +Upstream commit 41455af5d76a726f195838846b61e1693a2da99c is supposed to fix this,
49 +but it looks like it's not enough with older perl-based gtk-doc.
50 +Keep this extra patch only until we can't depend on a newer gtk-doc version, which
51 +should be retested whether this patch is unnecessary then.
52 +
53 +Upstream extra reference for the above reference commit:
54 +git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245027 268f45cc-cd09-0410-ab3c-d52691b4dbfc
55 +---
56 + Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp | 2 +-
57 + 1 file changed, 1 insertion(+), 1 deletion(-)
58 +
59 +diff --git a/Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp b/Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp
60 +index 023b14c33f4..657b1febf5d 100644
61 +--- a/Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp
62 ++++ b/Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp
63 +@@ -1505,7 +1505,7 @@ static void webkit_settings_class_init(WebKitSettingsClass* klass)
64 + * WebKitSettings:enable-media:
65 + *
66 + * Enable or disable support for media playback on pages. This setting is enabled by
67 +- * default. Disabling it means `<audio>`, `<track>` and `<video>` elements will have
68 ++ * default. Disabling it means audio, track and video elements will have
69 + * playback support disabled.
70 + *
71 + * Since: 2.26
72 +--
73 +2.20.1
74 +
75
76 diff --git a/net-libs/webkit-gtk/files/2.26.3-fix-noGL-wayland-build.patch b/net-libs/webkit-gtk/files/2.26.3-fix-noGL-wayland-build.patch
77 new file mode 100644
78 index 00000000000..4549f1712e6
79 --- /dev/null
80 +++ b/net-libs/webkit-gtk/files/2.26.3-fix-noGL-wayland-build.patch
81 @@ -0,0 +1,39 @@
82 +From 874dceeafc08edc979093509dff3ee6a8b25c432 Mon Sep 17 00:00:00 2001
83 +From: "commit-queue@××××××.org"
84 + <commit-queue@××××××.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
85 +Date: Thu, 19 Sep 2019 02:34:49 +0000
86 +Subject: [PATCH] [GTK] Compilation errors when GL is disabled
87 + https://bugs.webkit.org/show_bug.cgi?id=200223
88 +
89 +Fix following compilation error when building with ENABLE_OPENGL=OFF
90 +../../Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp:123:51: error: use of undeclared identifier 'WaylandCompositor'
91 +parameters.waylandCompositorDisplayName = WaylandCompositor::singleton().displayName();
92 + ^
93 +Patch by Yury Semikhatsky <yurys@××××××××.org> on 2019-09-18
94 +Reviewed by Philippe Normand.
95 +
96 +* UIProcess/glib/WebProcessPoolGLib.cpp:
97 +(WebKit::WebProcessPool::platformInitializeWebProcess): only make a call when using EGL, this matches
98 +guards in WaylandCompositor.h. The condition was changed in r245807.
99 +
100 +git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250077 268f45cc-cd09-0410-ab3c-d52691b4dbfc
101 +---
102 + Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp | 2 +-
103 + 1 file changed, 1 insertion(+), 1 deletion(-)
104 +
105 +diff --git a/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp b/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
106 +index 37ece2f4576..a380a25fa4b 100644
107 +--- a/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
108 ++++ b/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
109 +@@ -119,7 +119,7 @@ void WebProcessPool::platformInitializeWebProcess(const WebProcessProxy& process
110 + parameters.hostClientFileDescriptor = wpe_renderer_host_create_client();
111 + parameters.implementationLibraryName = FileSystem::fileSystemRepresentation(wpe_loader_get_loaded_implementation_library_name());
112 + }
113 +-#else
114 ++#elif USE(EGL)
115 + parameters.waylandCompositorDisplayName = WaylandCompositor::singleton().displayName();
116 + #endif
117 + }
118 +--
119 +2.20.1
120 +
121
122 diff --git a/net-libs/webkit-gtk/webkit-gtk-2.26.3.ebuild b/net-libs/webkit-gtk/webkit-gtk-2.26.3.ebuild
123 new file mode 100644
124 index 00000000000..0a63fc77b7a
125 --- /dev/null
126 +++ b/net-libs/webkit-gtk/webkit-gtk-2.26.3.ebuild
127 @@ -0,0 +1,287 @@
128 +# Copyright 1999-2020 Gentoo Authors
129 +# Distributed under the terms of the GNU General Public License v2
130 +
131 +EAPI=6
132 +CMAKE_MAKEFILE_GENERATOR="ninja"
133 +PYTHON_COMPAT=( python{2_7,3_6,3_7} )
134 +USE_RUBY="ruby24 ruby25 ruby26 ruby27"
135 +CMAKE_MIN_VERSION=3.10
136 +
137 +inherit check-reqs cmake-utils flag-o-matic gnome2 pax-utils python-any-r1 ruby-single toolchain-funcs virtualx
138 +
139 +MY_P="webkitgtk-${PV}"
140 +DESCRIPTION="Open source web browser engine"
141 +HOMEPAGE="https://www.webkitgtk.org"
142 +SRC_URI="https://www.webkitgtk.org/releases/${MY_P}.tar.xz"
143 +
144 +LICENSE="LGPL-2+ BSD"
145 +SLOT="4/37" # soname version of libwebkit2gtk-4.0
146 +KEYWORDS="~amd64 ~ia64 ~ppc64 ~sparc ~x86"
147 +
148 +IUSE="aqua coverage +egl +geolocation gles2-only gnome-keyring +gstreamer gtk-doc +introspection +jpeg2k +jumbo-build libnotify +opengl seccomp spell wayland +X"
149 +
150 +# gstreamer with opengl/gles2 needs egl
151 +REQUIRED_USE="
152 + gles2-only? ( egl !opengl )
153 + gstreamer? ( opengl? ( egl ) )
154 + wayland? ( egl )
155 + || ( aqua wayland X )
156 +"
157 +
158 +# Tests fail to link for inexplicable reasons
159 +# https://bugs.webkit.org/show_bug.cgi?id=148210
160 +RESTRICT="test"
161 +
162 +# Aqua support in gtk3 is untested
163 +# Dependencies found at Source/cmake/OptionsGTK.cmake
164 +# Various compile-time optionals for gtk+-3.22.0 - ensure it
165 +# Missing WebRTC support, but ENABLE_MEDIA_STREAM/ENABLE_WEB_RTC is experimental upstream (PRIVATE OFF) and shouldn't be used yet in 2.26
166 +# >=gst-plugins-opus-1.14.4-r1 for opusparse (required by MSE)
167 +wpe_depend="
168 + >=gui-libs/libwpe-1.3.0:1.0
169 + >=gui-libs/wpebackend-fdo-1.3.1:1.0
170 +"
171 +RDEPEND="
172 + >=x11-libs/cairo-1.16.0:=[X?]
173 + >=media-libs/fontconfig-2.13.0:1.0
174 + >=media-libs/freetype-2.9.0:2
175 + >=dev-libs/libgcrypt-1.7.0:0=
176 + >=x11-libs/gtk+-3.22.0:3[aqua?,introspection?,wayland?,X?]
177 + >=media-libs/harfbuzz-1.4.2:=[icu(+)]
178 + >=dev-libs/icu-3.8.1-r1:=
179 + virtual/jpeg:0=
180 + >=net-libs/libsoup-2.54:2.4[introspection?]
181 + >=dev-libs/libxml2-2.8.0:2
182 + >=media-libs/libpng-1.4:0=
183 + dev-db/sqlite:3=
184 + sys-libs/zlib:0
185 + >=dev-libs/atk-2.16.0
186 + media-libs/libwebp:=
187 +
188 + >=dev-libs/glib-2.44.0:2
189 + >=dev-libs/libxslt-1.1.7
190 + media-libs/woff2
191 + gnome-keyring? ( app-crypt/libsecret )
192 + introspection? ( >=dev-libs/gobject-introspection-1.32.0:= )
193 + dev-libs/libtasn1:=
194 + spell? ( >=app-text/enchant-0.22:= )
195 + gstreamer? (
196 + >=media-libs/gstreamer-1.14:1.0
197 + >=media-libs/gst-plugins-base-1.14:1.0[egl?,opengl?]
198 + gles2-only? ( media-libs/gst-plugins-base:1.0[gles2] )
199 + >=media-plugins/gst-plugins-opus-1.14.4-r1:1.0
200 + >=media-libs/gst-plugins-bad-1.14:1.0 )
201 +
202 + X? (
203 + x11-libs/libX11
204 + x11-libs/libXcomposite
205 + x11-libs/libXdamage
206 + x11-libs/libXrender
207 + x11-libs/libXt )
208 +
209 + libnotify? ( x11-libs/libnotify )
210 + dev-libs/hyphen
211 + jpeg2k? ( >=media-libs/openjpeg-2.2.0:2= )
212 +
213 + egl? ( media-libs/mesa[egl] )
214 + gles2-only? ( media-libs/mesa[gles2] )
215 + opengl? ( virtual/opengl )
216 + wayland? (
217 + opengl? ( ${wpe_depend} )
218 + gles2-only? ( ${wpe_depend} )
219 + )
220 +
221 + seccomp? (
222 + >=sys-apps/bubblewrap-0.3.1
223 + sys-libs/libseccomp
224 + sys-apps/xdg-dbus-proxy
225 + )
226 +"
227 +unset wpe_depend
228 +# paxctl needed for bug #407085
229 +# Need real bison, not yacc
230 +DEPEND="${RDEPEND}
231 + ${PYTHON_DEPS}
232 + ${RUBY_DEPS}
233 + >=app-accessibility/at-spi2-core-2.5.3
234 + dev-util/glib-utils
235 + >=dev-util/gperf-3.0.1
236 + >=sys-devel/bison-2.4.3
237 + || ( >=sys-devel/gcc-7.3 >=sys-devel/clang-5 )
238 + sys-devel/gettext
239 + virtual/pkgconfig
240 +
241 + >=dev-lang/perl-5.10
242 + virtual/perl-Data-Dumper
243 + virtual/perl-Carp
244 + virtual/perl-JSON-PP
245 +
246 + gtk-doc? ( >=dev-util/gtk-doc-1.10 )
247 + geolocation? ( dev-util/gdbus-codegen )
248 +"
249 +# test? (
250 +# dev-python/pygobject:3[python_targets_python2_7]
251 +# x11-themes/hicolor-icon-theme
252 +# jit? ( sys-apps/paxctl ) )
253 +RDEPEND="${RDEPEND}
254 + geolocation? ( >=app-misc/geoclue-2.1.5:2.0 )
255 +"
256 +
257 +S="${WORKDIR}/${MY_P}"
258 +
259 +CHECKREQS_DISK_BUILD="18G" # and even this might not be enough, bug #417307
260 +
261 +pkg_pretend() {
262 + if [[ ${MERGE_TYPE} != "binary" ]] ; then
263 + if is-flagq "-g*" && ! is-flagq "-g*0" ; then
264 + einfo "Checking for sufficient disk space to build ${PN} with debugging CFLAGS"
265 + check-reqs_pkg_pretend
266 + fi
267 +
268 + if ! test-flag-CXX -std=c++17 ; then
269 + die "You need at least GCC 7.3.x or Clang >= 5 for C++17-specific compiler flags"
270 + fi
271 + fi
272 +
273 + if ! use opengl && ! use gles2-only; then
274 + ewarn
275 + ewarn "You are disabling OpenGL usage (USE=opengl or USE=gles-only) completely."
276 + ewarn "This is an unsupported configuration meant for very specific embedded"
277 + ewarn "use cases, where there truly is no GL possible (and even that use case"
278 + ewarn "is very unlikely to come by). If you have GL (even software-only), you"
279 + ewarn "really really should be enabling OpenGL!"
280 + ewarn
281 + fi
282 +}
283 +
284 +pkg_setup() {
285 + if [[ ${MERGE_TYPE} != "binary" ]] && is-flagq "-g*" && ! is-flagq "-g*0" ; then
286 + check-reqs_pkg_setup
287 + fi
288 +
289 + python-any-r1_pkg_setup
290 +}
291 +
292 +src_prepare() {
293 + eapply "${FILESDIR}/${PN}-2.24.4-eglmesaext-include.patch" # bug 699054 # https://bugs.webkit.org/show_bug.cgi?id=204108
294 + eapply "${FILESDIR}"/2.26.2-fix-arm-non-unified-build.patch # bug 704194
295 + eapply "${FILESDIR}"/${PV}-fix-gtk-doc.patch # bug 704550 - retest without it once we can depend on >=gtk-doc-1.32
296 + eapply "${FILESDIR}"/${PV}-fix-noGL-wayland-build.patch
297 + cmake-utils_src_prepare
298 + gnome2_src_prepare
299 +}
300 +
301 +src_configure() {
302 + # Respect CC, otherwise fails on prefix #395875
303 + tc-export CC
304 +
305 + # It does not compile on alpha without this in LDFLAGS
306 + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648761
307 + use alpha && append-ldflags "-Wl,--no-relax"
308 +
309 + # ld segfaults on ia64 with LDFLAGS --as-needed, bug #555504
310 + use ia64 && append-ldflags "-Wl,--no-as-needed"
311 +
312 + # Sigbuses on SPARC with mcpu and co., bug #???
313 + use sparc && filter-flags "-mvis"
314 +
315 + # https://bugs.webkit.org/show_bug.cgi?id=42070 , #301634
316 + use ppc64 && append-flags "-mminimal-toc"
317 +
318 + # Try to use less memory, bug #469942 (see Fedora .spec for reference)
319 + # --no-keep-memory doesn't work on ia64, bug #502492
320 + if ! use ia64; then
321 + append-ldflags "-Wl,--no-keep-memory"
322 + fi
323 +
324 + # We try to use gold when possible for this package
325 +# if ! tc-ld-is-gold ; then
326 +# append-ldflags "-Wl,--reduce-memory-overheads"
327 +# fi
328 +
329 + # Ruby situation is a bit complicated. See bug 513888
330 + local rubyimpl
331 + local ruby_interpreter=""
332 + for rubyimpl in ${USE_RUBY}; do
333 + if has_version --host-root "virtual/rubygems[ruby_targets_${rubyimpl}]"; then
334 + ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ${rubyimpl})"
335 + fi
336 + done
337 + # This will rarely occur. Only a couple of corner cases could lead us to
338 + # that failure. See bug 513888
339 + [[ -z $ruby_interpreter ]] && die "No suitable ruby interpreter found"
340 +
341 + # TODO: Check Web Audio support
342 + # should somehow let user select between them?
343 + #
344 + # opengl needs to be explicetly handled, bug #576634
345 +
346 + local use_wpe_renderer=OFF
347 + local opengl_enabled
348 + if use opengl || use gles2-only; then
349 + opengl_enabled=ON
350 + use wayland && use_wpe_renderer=ON
351 + else
352 + opengl_enabled=OFF
353 + fi
354 +
355 + local mycmakeargs=(
356 + -DENABLE_UNIFIED_BUILDS=$(usex jumbo-build)
357 + -DENABLE_QUARTZ_TARGET=$(usex aqua)
358 + -DENABLE_API_TESTS=$(usex test)
359 + -DENABLE_GTKDOC=$(usex gtk-doc)
360 + -DENABLE_GEOLOCATION=$(usex geolocation) # Runtime optional (talks over dbus service)
361 + $(cmake-utils_use_find_package gles2-only OpenGLES2)
362 + -DENABLE_GLES2=$(usex gles2-only)
363 + -DENABLE_VIDEO=$(usex gstreamer)
364 + -DENABLE_WEB_AUDIO=$(usex gstreamer)
365 + -DENABLE_INTROSPECTION=$(usex introspection)
366 + -DUSE_LIBNOTIFY=$(usex libnotify)
367 + -DUSE_LIBSECRET=$(usex gnome-keyring)
368 + -DUSE_OPENJPEG=$(usex jpeg2k)
369 + -DUSE_WOFF2=ON
370 + -DENABLE_SPELLCHECK=$(usex spell)
371 + -DENABLE_WAYLAND_TARGET=$(usex wayland)
372 + -DUSE_WPE_RENDERER=${use_wpe_renderer} # WPE renderer is used to implement accelerated compositing under wayland
373 + $(cmake-utils_use_find_package egl EGL)
374 + $(cmake-utils_use_find_package opengl OpenGL)
375 + -DENABLE_X11_TARGET=$(usex X)
376 + -DENABLE_OPENGL=${opengl_enabled}
377 + -DENABLE_WEBGL=${opengl_enabled}
378 + -DENABLE_BUBBLEWRAP_SANDBOX=$(usex seccomp)
379 + -DBWRAP_EXECUTABLE="${EPREFIX}"/usr/bin/bwrap # If bubblewrap[suid] then portage makes it go-r and cmake find_program fails with that
380 + -DCMAKE_BUILD_TYPE=Release
381 + -DPORT=GTK
382 + ${ruby_interpreter}
383 + )
384 +
385 + # Allow it to use GOLD when possible as it has all the magic to
386 + # detect when to use it and using gold for this concrete package has
387 + # multiple advantages and is also the upstream default, bug #585788
388 +# if tc-ld-is-gold ; then
389 +# mycmakeargs+=( -DUSE_LD_GOLD=ON )
390 +# else
391 +# mycmakeargs+=( -DUSE_LD_GOLD=OFF )
392 +# fi
393 +
394 + cmake-utils_src_configure
395 +}
396 +
397 +src_compile() {
398 + cmake-utils_src_compile
399 +}
400 +
401 +src_test() {
402 + # Prevents test failures on PaX systems
403 + pax-mark m $(list-paxables Programs/*[Tt]ests/*) # Programs/unittests/.libs/test*
404 +
405 + cmake-utils_src_test
406 +}
407 +
408 +src_install() {
409 + cmake-utils_src_install
410 +
411 + # Prevents crashes on PaX systems, bug #522808
412 + pax-mark m "${ED}usr/libexec/webkit2gtk-4.0/jsc" "${ED}usr/libexec/webkit2gtk-4.0/WebKitWebProcess"
413 + pax-mark m "${ED}usr/libexec/webkit2gtk-4.0/WebKitPluginProcess"
414 +}