Gentoo Archives: gentoo-commits

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