Gentoo Archives: gentoo-commits

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