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