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