Gentoo Archives: gentoo-commits

From: Matt Turner <mattst88@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: profiles/, net-libs/webkit-gtk/
Date: Sun, 19 Mar 2023 23:38:30
Message-Id: 1679269098.178b21ba0df784d9aa045a2c1e113974928a2e5a.mattst88@gentoo
1 commit: 178b21ba0df784d9aa045a2c1e113974928a2e5a
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Sun Mar 19 22:55:35 2023 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Sun Mar 19 23:38:18 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=178b21ba
7
8 net-libs/webkit-gtk: Version bump to 2.40.0
9
10 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
11
12 net-libs/webkit-gtk/Manifest | 1 +
13 net-libs/webkit-gtk/webkit-gtk-2.40.0-r410.ebuild | 250 ++++++++++++++++++++++
14 net-libs/webkit-gtk/webkit-gtk-2.40.0-r600.ebuild | 243 +++++++++++++++++++++
15 net-libs/webkit-gtk/webkit-gtk-2.40.0.ebuild | 240 +++++++++++++++++++++
16 profiles/package.mask | 1 +
17 5 files changed, 735 insertions(+)
18
19 diff --git a/net-libs/webkit-gtk/Manifest b/net-libs/webkit-gtk/Manifest
20 index 7ecd2dd83aa1..e31e3149fc77 100644
21 --- a/net-libs/webkit-gtk/Manifest
22 +++ b/net-libs/webkit-gtk/Manifest
23 @@ -1,2 +1,3 @@
24 DIST webkitgtk-2.38.3.tar.xz 33003928 BLAKE2B ae2ab019a765e91110e12277954bea9ae16fd898f854f58e665d273bcbd9ca43ee3219eea7ba0fb5716b17b8efdfeeb395c5976b38848562be95ea372b9b70bc SHA512 1e5f0d73d6b1d64faf20ab909f1765439fab230dd360dd1906962f03a24725cf9f50a375b1987b615c64fb161ab32d29d6b1d49ea75c7b2b32f495e4ad0f38ce
25 DIST webkitgtk-2.38.5.tar.xz 33011600 BLAKE2B 0dba732c18b7f21602b9f834866d137b6be582adc36f91775e838f99a6ee89216773ab641be62a0fd0834bac8adb45d315a2be9caf19551484a8b95c22797d46 SHA512 9038892910e95d3b7819396c9071b59ee51eadd6cad62130fdd4e02d3f5187b7a2986c5939a378190e14059149f2db0a0b57feb23ac44f5ea764c160e6181eef
26 +DIST webkitgtk-2.40.0.tar.xz 40042140 BLAKE2B 4f26d893da99c7aed18594a844b1f91e32178a1bdd236e0cdd21683ed095ab2196f37c13f749e69b22b72146b98fca2a27778948aabde336d17c4d40dcf0cdc1 SHA512 550dafb31d71edf984d6b7636366f839d31f6b244b87f83c6efe7af17efe3f2f63268d2c39a6a3c474afadf2b30df868efaefcf38197b30cc6b11c63de7d2ddc
27
28 diff --git a/net-libs/webkit-gtk/webkit-gtk-2.40.0-r410.ebuild b/net-libs/webkit-gtk/webkit-gtk-2.40.0-r410.ebuild
29 new file mode 100644
30 index 000000000000..aadc66693cf3
31 --- /dev/null
32 +++ b/net-libs/webkit-gtk/webkit-gtk-2.40.0-r410.ebuild
33 @@ -0,0 +1,250 @@
34 +# Copyright 1999-2023 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=8
38 +PYTHON_REQ_USE="xml(+)"
39 +PYTHON_COMPAT=( python3_{9..11} )
40 +USE_RUBY="ruby30 ruby31"
41 +
42 +inherit check-reqs flag-o-matic gnome2 optfeature python-any-r1 ruby-single toolchain-funcs cmake
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.1/0" # soname version of libwebkit2gtk-4.1
51 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
52 +
53 +IUSE="aqua avif examples gamepad gles2-only gnome-keyring +gstreamer +introspection pdf +jpeg2k +jumbo-build lcms seccomp spell systemd wayland X"
54 +REQUIRED_USE="|| ( aqua wayland X )"
55 +
56 +# Tests do not run when built from tarballs
57 +# https://bugs.webkit.org/show_bug.cgi?id=215986
58 +RESTRICT="test"
59 +
60 +# Dependencies found at Source/cmake/OptionsGTK.cmake
61 +# Missing WebRTC support, but ENABLE_MEDIA_STREAM/ENABLE_WEB_RTC is experimental upstream (PRIVATE OFF) and shouldn't be used yet in 2.30
62 +# >=gst-plugins-opus-1.14.4-r1 for opusparse (required by MSE)
63 +# 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
64 +# Softblocking webkit-gtk-2.38:4 as we going to use webkit-2.38:4.1's WebKitDriver binary
65 +RDEPEND="
66 + >=x11-libs/cairo-1.16.0[X?]
67 + >=media-libs/fontconfig-2.13.0:1.0
68 + >=media-libs/freetype-2.9.0:2
69 + >=dev-libs/libgcrypt-1.7.0:0=
70 + >=x11-libs/gtk+-3.22.0:3[aqua?,introspection?,wayland?,X?]
71 + >=media-libs/harfbuzz-1.4.2:=[icu(+)]
72 + >=dev-libs/icu-61.2:=
73 + media-libs/libjpeg-turbo:0=
74 + >=media-libs/libepoxy-1.4.0
75 + >=net-libs/libsoup-3.0.8:3.0[introspection?]
76 + >=dev-libs/libxml2-2.8.0:2
77 + >=media-libs/libpng-1.4:0=
78 + dev-db/sqlite:3
79 + sys-libs/zlib:0
80 + >=app-accessibility/at-spi2-core-2.46.0:2
81 + media-libs/libwebp:=
82 +
83 + >=dev-libs/glib-2.70.0:2
84 + >=dev-libs/libxslt-1.1.7
85 + media-libs/woff2
86 + gnome-keyring? ( app-crypt/libsecret )
87 + introspection? ( >=dev-libs/gobject-introspection-1.59.1:= )
88 + dev-libs/libtasn1:=
89 + spell? ( >=app-text/enchant-0.22:2 )
90 + gstreamer? (
91 + >=media-libs/gstreamer-1.20:1.0
92 + >=media-libs/gst-plugins-base-1.20:1.0[egl,X?]
93 + gles2-only? ( media-libs/gst-plugins-base:1.0[gles2] )
94 + !gles2-only? ( media-libs/gst-plugins-base:1.0[opengl] )
95 + >=media-plugins/gst-plugins-opus-1.20:1.0
96 + >=media-libs/gst-plugins-bad-1.20:1.0
97 + )
98 +
99 + X? (
100 + x11-libs/libX11
101 + x11-libs/libXcomposite
102 + x11-libs/libXdamage
103 + x11-libs/libXrender
104 + x11-libs/libXt
105 + )
106 +
107 + dev-libs/hyphen
108 + jpeg2k? ( >=media-libs/openjpeg-2.2.0:2= )
109 + avif? ( >=media-libs/libavif-0.9.0:= )
110 + lcms? ( media-libs/lcms:2 )
111 +
112 + media-libs/mesa
113 + media-libs/libglvnd
114 + wayland? (
115 + dev-libs/wayland
116 + >=dev-libs/wayland-protocols-1.12
117 + >=gui-libs/libwpe-1.5.0:1.0
118 + >=gui-libs/wpebackend-fdo-1.7.0:1.0
119 + )
120 +
121 + seccomp? (
122 + >=sys-apps/bubblewrap-0.3.1
123 + sys-libs/libseccomp
124 + sys-apps/xdg-dbus-proxy
125 + )
126 +
127 + systemd? ( sys-apps/systemd:= )
128 + gamepad? ( >=dev-libs/libmanette-0.2.4 )
129 + !<net-libs/webkit-gtk-2.38:4
130 +"
131 +DEPEND="${RDEPEND}"
132 +# Need real bison, not yacc
133 +BDEPEND="
134 + ${PYTHON_DEPS}
135 + ${RUBY_DEPS}
136 + >=app-accessibility/at-spi2-core-2.5.3
137 + dev-util/gdbus-codegen
138 + dev-util/glib-utils
139 + >=dev-util/gperf-3.0.1
140 + dev-util/unifdef
141 + >=sys-devel/bison-2.4.3
142 + || ( >=sys-devel/gcc-7.3 >=sys-devel/clang-5 )
143 + sys-devel/gettext
144 + virtual/pkgconfig
145 +
146 + >=dev-lang/perl-5.10
147 + virtual/perl-Data-Dumper
148 + virtual/perl-Carp
149 + virtual/perl-JSON-PP
150 +"
151 +
152 +S="${WORKDIR}/${MY_P}"
153 +
154 +CHECKREQS_DISK_BUILD="18G" # and even this might not be enough, bug #417307
155 +
156 +pkg_pretend() {
157 + if [[ ${MERGE_TYPE} != "binary" ]] ; then
158 + if is-flagq "-g*" && ! is-flagq "-g*0" ; then
159 + einfo "Checking for sufficient disk space to build ${PN} with debugging CFLAGS"
160 + check-reqs_pkg_pretend
161 + fi
162 +
163 + if ! test-flag-CXX -std=c++17 ; then
164 + die "You need at least GCC 7.3.x or Clang >= 5 for C++17-specific compiler flags"
165 + fi
166 + fi
167 +}
168 +
169 +pkg_setup() {
170 + if [[ ${MERGE_TYPE} != "binary" ]] && is-flagq "-g*" && ! is-flagq "-g*0" ; then
171 + check-reqs_pkg_setup
172 + fi
173 +
174 + python-any-r1_pkg_setup
175 +}
176 +
177 +src_prepare() {
178 + cmake_src_prepare
179 + gnome2_src_prepare
180 +}
181 +
182 +src_configure() {
183 + # Respect CC, otherwise fails on prefix #395875
184 + tc-export CC
185 +
186 + # It does not compile on alpha without this in LDFLAGS
187 + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648761
188 + use alpha && append-ldflags "-Wl,--no-relax"
189 +
190 + # ld segfaults on ia64 with LDFLAGS --as-needed, bug #555504
191 + use ia64 && append-ldflags "-Wl,--no-as-needed"
192 +
193 + # Sigbuses on SPARC with mcpu and co., bug #???
194 + use sparc && filter-flags "-mvis"
195 +
196 + # https://bugs.webkit.org/show_bug.cgi?id=42070 , #301634
197 + use ppc64 && append-flags "-mminimal-toc"
198 +
199 + # Try to use less memory, bug #469942 (see Fedora .spec for reference)
200 + # --no-keep-memory doesn't work on ia64, bug #502492
201 + if ! use ia64; then
202 + append-ldflags $(test-flags-CCLD "-Wl,--no-keep-memory")
203 + fi
204 +
205 + # Ruby situation is a bit complicated. See bug 513888
206 + local rubyimpl
207 + local ruby_interpreter=""
208 + for rubyimpl in ${USE_RUBY}; do
209 + if has_version -b "virtual/rubygems[ruby_targets_${rubyimpl}]"; then
210 + ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ${rubyimpl})"
211 + fi
212 + done
213 + # This will rarely occur. Only a couple of corner cases could lead us to
214 + # that failure. See bug 513888
215 + [[ -z $ruby_interpreter ]] && die "No suitable ruby interpreter found"
216 +
217 + # TODO: Check Web Audio support
218 + # should somehow let user select between them?
219 +
220 + local mycmakeargs=(
221 + -DPython_EXECUTABLE="${PYTHON}"
222 + ${ruby_interpreter}
223 + $(cmake_use_find_package gles2-only OpenGLES2)
224 + $(cmake_use_find_package !gles2-only OpenGL)
225 + -DBWRAP_EXECUTABLE:FILEPATH="${EPREFIX}"/usr/bin/bwrap # If bubblewrap[suid] then portage makes it go-r and cmake find_program fails with that
226 + -DDBUS_PROXY_EXECUTABLE:FILEPATH="${EPREFIX}"/usr/bin/xdg-dbus-proxy
227 + -DPORT=GTK
228 + # Source/cmake/WebKitFeatures.cmake
229 + -DENABLE_API_TESTS=OFF
230 + -DENABLE_BUBBLEWRAP_SANDBOX=$(usex seccomp)
231 + -DENABLE_GAMEPAD=$(usex gamepad)
232 + -DENABLE_MINIBROWSER=$(usex examples)
233 + -DENABLE_PDFJS=$(usex pdf)
234 + -DENABLE_GEOLOCATION=ON # Runtime optional (talks over dbus service)
235 + -DENABLE_SPELLCHECK=$(usex spell)
236 + -DENABLE_UNIFIED_BUILDS=$(usex jumbo-build)
237 + -DENABLE_VIDEO=$(usex gstreamer)
238 + -DUSE_GSTREAMER_WEBRTC=$(usex gstreamer)
239 + -DUSE_GSTREAMER_TRANSCODER=$(usex gstreamer)
240 + -DENABLE_WEBDRIVER=ON
241 + -DENABLE_WEBGL=ON
242 + -DENABLE_WEB_AUDIO=$(usex gstreamer)
243 + -DUSE_AVIF=$(usex avif)
244 + # Source/cmake/OptionsGTK.cmake
245 + -DENABLE_GLES2=$(usex gles2-only)
246 + -DENABLE_DOCUMENTATION=OFF
247 + -DENABLE_INTROSPECTION=$(usex introspection)
248 + -DENABLE_JOURNALD_LOG=$(usex systemd)
249 + -DENABLE_QUARTZ_TARGET=$(usex aqua)
250 + -DENABLE_WAYLAND_TARGET=$(usex wayland)
251 + -DENABLE_X11_TARGET=$(usex X)
252 + -DUSE_GBM=ON
253 + -DUSE_GTK4=OFF
254 + -DUSE_JPEGXL=OFF
255 + -DUSE_LCMS=$(usex lcms)
256 + -DUSE_LIBHYPHEN=ON
257 + -DUSE_LIBSECRET=$(usex gnome-keyring)
258 + -DUSE_OPENGL_OR_ES=ON
259 + -DUSE_OPENJPEG=$(usex jpeg2k)
260 + -DUSE_SOUP2=OFF
261 + -DUSE_WOFF2=ON
262 + )
263 +
264 + # https://bugs.gentoo.org/761238
265 + append-cppflags -DNDEBUG
266 +
267 + WK_USE_CCACHE=NO cmake_src_configure
268 +}
269 +
270 +src_install() {
271 + cmake_src_install
272 +
273 + insinto /usr/share/gtk-doc/html
274 + # This will install API docs specific to webkit2gtk-4.1
275 + doins -r "${S}"/Documentation/{jsc-glib,webkit2gtk,webkit2gtk-web-extension}-${SLOT%/*}
276 +}
277 +
278 +pkg_postinst() {
279 + optfeature "geolocation service (used at runtime if available)" "app-misc/geoclue"
280 + optfeature "Common Multimedia codecs" "media-plugins/gst-plugins-meta"
281 + optfeature "(MPEG-)DASH support" "media-plugins/gst-plugins-dash"
282 + optfeature "HTTP-Live-Streaming support" "media-plugins/gst-plugins-hls"
283 +}
284
285 diff --git a/net-libs/webkit-gtk/webkit-gtk-2.40.0-r600.ebuild b/net-libs/webkit-gtk/webkit-gtk-2.40.0-r600.ebuild
286 new file mode 100644
287 index 000000000000..d1f9aaeb242f
288 --- /dev/null
289 +++ b/net-libs/webkit-gtk/webkit-gtk-2.40.0-r600.ebuild
290 @@ -0,0 +1,243 @@
291 +# Copyright 1999-2023 Gentoo Authors
292 +# Distributed under the terms of the GNU General Public License v2
293 +
294 +EAPI=8
295 +PYTHON_REQ_USE="xml(+)"
296 +PYTHON_COMPAT=( python3_{9..11} )
297 +USE_RUBY="ruby30 ruby31"
298 +
299 +inherit check-reqs flag-o-matic gnome2 optfeature python-any-r1 ruby-single toolchain-funcs cmake
300 +
301 +MY_P="webkitgtk-${PV}"
302 +DESCRIPTION="Open source web browser engine"
303 +HOMEPAGE="https://www.webkitgtk.org"
304 +SRC_URI="https://www.webkitgtk.org/releases/${MY_P}.tar.xz"
305 +
306 +LICENSE="LGPL-2+ BSD"
307 +SLOT="6/0" # soname version of libwebkit2gtk-6.0
308 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
309 +
310 +IUSE="aqua avif examples gamepad gles2-only gnome-keyring +gstreamer +introspection pdf +jpeg2k +jumbo-build lcms seccomp spell systemd wayland X"
311 +REQUIRED_USE="|| ( aqua wayland X )"
312 +
313 +# Tests do not run when built from tarballs
314 +# https://bugs.webkit.org/show_bug.cgi?id=215986
315 +RESTRICT="test"
316 +
317 +# Dependencies found at Source/cmake/OptionsGTK.cmake
318 +# Missing WebRTC support, but ENABLE_MEDIA_STREAM/ENABLE_WEB_RTC is experimental upstream (PRIVATE OFF) and shouldn't be used yet in 2.30
319 +# >=gst-plugins-opus-1.14.4-r1 for opusparse (required by MSE)
320 +# 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
321 +# Softblocking webkit-gtk-2.38:4 as we going to use webkit-2.38:4.1's WebKitDriver binary
322 +RDEPEND="
323 + >=x11-libs/cairo-1.16.0[X?]
324 + >=media-libs/fontconfig-2.13.0:1.0
325 + >=media-libs/freetype-2.9.0:2
326 + >=dev-libs/libgcrypt-1.7.0:0=
327 + >=x11-libs/gtk+-3.22.0:3[aqua?,introspection?,wayland?,X?]
328 + gui-libs/gtk:4
329 + >=media-libs/harfbuzz-1.4.2:=[icu(+)]
330 + >=dev-libs/icu-61.2:=
331 + media-libs/libjpeg-turbo:0=
332 + >=media-libs/libepoxy-1.4.0
333 + >=net-libs/libsoup-3.0.8:3.0[introspection?]
334 + >=dev-libs/libxml2-2.8.0:2
335 + >=media-libs/libpng-1.4:0=
336 + dev-db/sqlite:3
337 + sys-libs/zlib:0
338 + >=app-accessibility/at-spi2-core-2.46.0:2
339 + media-libs/libwebp:=
340 +
341 + >=dev-libs/glib-2.70.0:2
342 + >=dev-libs/libxslt-1.1.7
343 + media-libs/woff2
344 + gnome-keyring? ( app-crypt/libsecret )
345 + introspection? ( >=dev-libs/gobject-introspection-1.59.1:= )
346 + dev-libs/libtasn1:=
347 + spell? ( >=app-text/enchant-0.22:2 )
348 + gstreamer? (
349 + >=media-libs/gstreamer-1.20:1.0
350 + >=media-libs/gst-plugins-base-1.20:1.0[egl,X?]
351 + gles2-only? ( media-libs/gst-plugins-base:1.0[gles2] )
352 + !gles2-only? ( media-libs/gst-plugins-base:1.0[opengl] )
353 + >=media-plugins/gst-plugins-opus-1.20:1.0
354 + >=media-libs/gst-plugins-bad-1.20:1.0
355 + )
356 +
357 + X? (
358 + x11-libs/libX11
359 + x11-libs/libXcomposite
360 + x11-libs/libXdamage
361 + x11-libs/libXrender
362 + x11-libs/libXt
363 + )
364 +
365 + dev-libs/hyphen
366 + jpeg2k? ( >=media-libs/openjpeg-2.2.0:2= )
367 + avif? ( >=media-libs/libavif-0.9.0:= )
368 + lcms? ( media-libs/lcms:2 )
369 +
370 + media-libs/mesa
371 + media-libs/libglvnd
372 + wayland? (
373 + dev-libs/wayland
374 + >=dev-libs/wayland-protocols-1.12
375 + >=gui-libs/libwpe-1.5.0:1.0
376 + >=gui-libs/wpebackend-fdo-1.7.0:1.0
377 + )
378 +
379 + seccomp? (
380 + >=sys-apps/bubblewrap-0.3.1
381 + sys-libs/libseccomp
382 + sys-apps/xdg-dbus-proxy
383 + )
384 +
385 + systemd? ( sys-apps/systemd:= )
386 + gamepad? ( >=dev-libs/libmanette-0.2.4 )
387 + !<net-libs/webkit-gtk-2.38:4
388 +"
389 +DEPEND="${RDEPEND}"
390 +# Need real bison, not yacc
391 +BDEPEND="
392 + ${PYTHON_DEPS}
393 + ${RUBY_DEPS}
394 + >=app-accessibility/at-spi2-core-2.5.3
395 + dev-util/gdbus-codegen
396 + dev-util/glib-utils
397 + >=dev-util/gperf-3.0.1
398 + dev-util/unifdef
399 + >=sys-devel/bison-2.4.3
400 + || ( >=sys-devel/gcc-7.3 >=sys-devel/clang-5 )
401 + sys-devel/gettext
402 + virtual/pkgconfig
403 +
404 + >=dev-lang/perl-5.10
405 + virtual/perl-Data-Dumper
406 + virtual/perl-Carp
407 + virtual/perl-JSON-PP
408 +"
409 +
410 +S="${WORKDIR}/${MY_P}"
411 +
412 +CHECKREQS_DISK_BUILD="18G" # and even this might not be enough, bug #417307
413 +
414 +pkg_pretend() {
415 + if [[ ${MERGE_TYPE} != "binary" ]] ; then
416 + if is-flagq "-g*" && ! is-flagq "-g*0" ; then
417 + einfo "Checking for sufficient disk space to build ${PN} with debugging CFLAGS"
418 + check-reqs_pkg_pretend
419 + fi
420 +
421 + if ! test-flag-CXX -std=c++17 ; then
422 + die "You need at least GCC 7.3.x or Clang >= 5 for C++17-specific compiler flags"
423 + fi
424 + fi
425 +}
426 +
427 +pkg_setup() {
428 + if [[ ${MERGE_TYPE} != "binary" ]] && is-flagq "-g*" && ! is-flagq "-g*0" ; then
429 + check-reqs_pkg_setup
430 + fi
431 +
432 + python-any-r1_pkg_setup
433 +}
434 +
435 +src_prepare() {
436 + cmake_src_prepare
437 + gnome2_src_prepare
438 +}
439 +
440 +src_configure() {
441 + # Respect CC, otherwise fails on prefix #395875
442 + tc-export CC
443 +
444 + # It does not compile on alpha without this in LDFLAGS
445 + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648761
446 + use alpha && append-ldflags "-Wl,--no-relax"
447 +
448 + # ld segfaults on ia64 with LDFLAGS --as-needed, bug #555504
449 + use ia64 && append-ldflags "-Wl,--no-as-needed"
450 +
451 + # Sigbuses on SPARC with mcpu and co., bug #???
452 + use sparc && filter-flags "-mvis"
453 +
454 + # https://bugs.webkit.org/show_bug.cgi?id=42070 , #301634
455 + use ppc64 && append-flags "-mminimal-toc"
456 +
457 + # Try to use less memory, bug #469942 (see Fedora .spec for reference)
458 + # --no-keep-memory doesn't work on ia64, bug #502492
459 + if ! use ia64; then
460 + append-ldflags $(test-flags-CCLD "-Wl,--no-keep-memory")
461 + fi
462 +
463 + # Ruby situation is a bit complicated. See bug 513888
464 + local rubyimpl
465 + local ruby_interpreter=""
466 + for rubyimpl in ${USE_RUBY}; do
467 + if has_version -b "virtual/rubygems[ruby_targets_${rubyimpl}]"; then
468 + ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ${rubyimpl})"
469 + fi
470 + done
471 + # This will rarely occur. Only a couple of corner cases could lead us to
472 + # that failure. See bug 513888
473 + [[ -z $ruby_interpreter ]] && die "No suitable ruby interpreter found"
474 +
475 + # TODO: Check Web Audio support
476 + # should somehow let user select between them?
477 +
478 + local mycmakeargs=(
479 + -DPython_EXECUTABLE="${PYTHON}"
480 + ${ruby_interpreter}
481 + $(cmake_use_find_package gles2-only OpenGLES2)
482 + $(cmake_use_find_package !gles2-only OpenGL)
483 + -DBWRAP_EXECUTABLE:FILEPATH="${EPREFIX}"/usr/bin/bwrap # If bubblewrap[suid] then portage makes it go-r and cmake find_program fails with that
484 + -DDBUS_PROXY_EXECUTABLE:FILEPATH="${EPREFIX}"/usr/bin/xdg-dbus-proxy
485 + -DPORT=GTK
486 + # Source/cmake/WebKitFeatures.cmake
487 + -DENABLE_API_TESTS=OFF
488 + -DENABLE_BUBBLEWRAP_SANDBOX=$(usex seccomp)
489 + -DENABLE_GAMEPAD=$(usex gamepad)
490 + -DENABLE_MINIBROWSER=$(usex examples)
491 + -DENABLE_PDFJS=$(usex pdf)
492 + -DENABLE_GEOLOCATION=ON # Runtime optional (talks over dbus service)
493 + -DENABLE_SPELLCHECK=$(usex spell)
494 + -DENABLE_UNIFIED_BUILDS=$(usex jumbo-build)
495 + -DENABLE_VIDEO=$(usex gstreamer)
496 + -DUSE_GSTREAMER_WEBRTC=$(usex gstreamer)
497 + -DUSE_GSTREAMER_TRANSCODER=$(usex gstreamer)
498 + -DENABLE_WEBDRIVER=OFF # Disable WebDriver for webkit2gtk-5.0 and use the webkit2gtk-4.1
499 + -DENABLE_WEBGL=ON
500 + -DENABLE_WEB_AUDIO=$(usex gstreamer)
501 + -DUSE_AVIF=$(usex avif)
502 + # Source/cmake/OptionsGTK.cmake
503 + -DENABLE_GLES2=$(usex gles2-only)
504 + -DENABLE_DOCUMENTATION=OFF
505 + -DENABLE_INTROSPECTION=$(usex introspection)
506 + -DENABLE_JOURNALD_LOG=$(usex systemd)
507 + -DENABLE_QUARTZ_TARGET=$(usex aqua)
508 + -DENABLE_WAYLAND_TARGET=$(usex wayland)
509 + -DENABLE_X11_TARGET=$(usex X)
510 + -DUSE_GBM=ON
511 + -DUSE_GTK4=ON # webkit2gtk-6.0
512 + -DUSE_JPEGXL=OFF
513 + -DUSE_LCMS=$(usex lcms)
514 + -DUSE_LIBHYPHEN=ON
515 + -DUSE_LIBSECRET=$(usex gnome-keyring)
516 + -DUSE_OPENGL_OR_ES=ON
517 + -DUSE_OPENJPEG=$(usex jpeg2k)
518 + -DUSE_SOUP2=OFF
519 + -DUSE_WOFF2=ON
520 + )
521 +
522 + # https://bugs.gentoo.org/761238
523 + append-cppflags -DNDEBUG
524 +
525 + WK_USE_CCACHE=NO cmake_src_configure
526 +}
527 +
528 +pkg_postinst() {
529 + optfeature "geolocation service (used at runtime if available)" "app-misc/geoclue"
530 + optfeature "Common Multimedia codecs" "media-plugins/gst-plugins-meta"
531 + optfeature "(MPEG-)DASH support" "media-plugins/gst-plugins-dash"
532 + optfeature "HTTP-Live-Streaming support" "media-plugins/gst-plugins-hls"
533 +}
534
535 diff --git a/net-libs/webkit-gtk/webkit-gtk-2.40.0.ebuild b/net-libs/webkit-gtk/webkit-gtk-2.40.0.ebuild
536 new file mode 100644
537 index 000000000000..7e0ca1b9e2d9
538 --- /dev/null
539 +++ b/net-libs/webkit-gtk/webkit-gtk-2.40.0.ebuild
540 @@ -0,0 +1,240 @@
541 +# Copyright 1999-2023 Gentoo Authors
542 +# Distributed under the terms of the GNU General Public License v2
543 +
544 +EAPI=8
545 +PYTHON_REQ_USE="xml(+)"
546 +PYTHON_COMPAT=( python3_{9..11} )
547 +USE_RUBY="ruby30 ruby31"
548 +
549 +inherit check-reqs flag-o-matic gnome2 optfeature python-any-r1 ruby-single toolchain-funcs cmake
550 +
551 +MY_P="webkitgtk-${PV}"
552 +DESCRIPTION="Open source web browser engine"
553 +HOMEPAGE="https://www.webkitgtk.org"
554 +SRC_URI="https://www.webkitgtk.org/releases/${MY_P}.tar.xz"
555 +
556 +LICENSE="LGPL-2+ BSD"
557 +SLOT="4/37" # soname version of libwebkit2gtk-4.0
558 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
559 +
560 +IUSE="aqua avif examples gamepad gles2-only gnome-keyring +gstreamer +introspection pdf +jpeg2k +jumbo-build lcms seccomp spell systemd wayland X"
561 +REQUIRED_USE="|| ( aqua wayland X )"
562 +
563 +# Tests do not run when built from tarballs
564 +# https://bugs.webkit.org/show_bug.cgi?id=215986
565 +RESTRICT="test"
566 +
567 +# Dependencies found at Source/cmake/OptionsGTK.cmake
568 +# Missing WebRTC support, but ENABLE_MEDIA_STREAM/ENABLE_WEB_RTC is experimental upstream (PRIVATE OFF) and shouldn't be used yet in 2.30
569 +# >=gst-plugins-opus-1.14.4-r1 for opusparse (required by MSE)
570 +# 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
571 +RDEPEND="
572 + >=x11-libs/cairo-1.16.0[X?]
573 + >=media-libs/fontconfig-2.13.0:1.0
574 + >=media-libs/freetype-2.9.0:2
575 + >=dev-libs/libgcrypt-1.7.0:0=
576 + >=x11-libs/gtk+-3.22.0:3[aqua?,introspection?,wayland?,X?]
577 + >=media-libs/harfbuzz-1.4.2:=[icu(+)]
578 + >=dev-libs/icu-61.2:=
579 + media-libs/libjpeg-turbo:0=
580 + >=media-libs/libepoxy-1.4.0
581 + >=net-libs/libsoup-2.54:2.4[introspection?]
582 + >=dev-libs/libxml2-2.8.0:2
583 + >=media-libs/libpng-1.4:0=
584 + dev-db/sqlite:3
585 + sys-libs/zlib:0
586 + >=app-accessibility/at-spi2-core-2.46.0:2
587 + media-libs/libwebp:=
588 +
589 + >=dev-libs/glib-2.70.0:2
590 + >=dev-libs/libxslt-1.1.7
591 + media-libs/woff2
592 + gnome-keyring? ( app-crypt/libsecret )
593 + introspection? ( >=dev-libs/gobject-introspection-1.59.1:= )
594 + dev-libs/libtasn1:=
595 + spell? ( >=app-text/enchant-0.22:2 )
596 + gstreamer? (
597 + >=media-libs/gstreamer-1.20:1.0
598 + >=media-libs/gst-plugins-base-1.20:1.0[egl,X?]
599 + gles2-only? ( media-libs/gst-plugins-base:1.0[gles2] )
600 + !gles2-only? ( media-libs/gst-plugins-base:1.0[opengl] )
601 + >=media-plugins/gst-plugins-opus-1.20:1.0
602 + >=media-libs/gst-plugins-bad-1.20:1.0
603 + )
604 +
605 + X? (
606 + x11-libs/libX11
607 + x11-libs/libXcomposite
608 + x11-libs/libXdamage
609 + x11-libs/libXrender
610 + x11-libs/libXt
611 + )
612 +
613 + dev-libs/hyphen
614 + jpeg2k? ( >=media-libs/openjpeg-2.2.0:2= )
615 + avif? ( >=media-libs/libavif-0.9.0:= )
616 + lcms? ( media-libs/lcms:2 )
617 +
618 + media-libs/mesa
619 + media-libs/libglvnd
620 + wayland? (
621 + dev-libs/wayland
622 + >=dev-libs/wayland-protocols-1.12
623 + >=gui-libs/libwpe-1.5.0:1.0
624 + >=gui-libs/wpebackend-fdo-1.7.0:1.0
625 + )
626 +
627 + seccomp? (
628 + >=sys-apps/bubblewrap-0.3.1
629 + sys-libs/libseccomp
630 + sys-apps/xdg-dbus-proxy
631 + )
632 +
633 + systemd? ( sys-apps/systemd:= )
634 + gamepad? ( >=dev-libs/libmanette-0.2.4 )
635 +"
636 +DEPEND="${RDEPEND}"
637 +# Need real bison, not yacc
638 +BDEPEND="
639 + ${PYTHON_DEPS}
640 + ${RUBY_DEPS}
641 + >=app-accessibility/at-spi2-core-2.5.3
642 + dev-util/gdbus-codegen
643 + dev-util/glib-utils
644 + >=dev-util/gperf-3.0.1
645 + dev-util/unifdef
646 + >=sys-devel/bison-2.4.3
647 + || ( >=sys-devel/gcc-7.3 >=sys-devel/clang-5 )
648 + sys-devel/gettext
649 + virtual/pkgconfig
650 +
651 + >=dev-lang/perl-5.10
652 + virtual/perl-Data-Dumper
653 + virtual/perl-Carp
654 + virtual/perl-JSON-PP
655 +"
656 +
657 +S="${WORKDIR}/${MY_P}"
658 +
659 +CHECKREQS_DISK_BUILD="18G" # and even this might not be enough, bug #417307
660 +
661 +pkg_pretend() {
662 + if [[ ${MERGE_TYPE} != "binary" ]] ; then
663 + if is-flagq "-g*" && ! is-flagq "-g*0" ; then
664 + einfo "Checking for sufficient disk space to build ${PN} with debugging CFLAGS"
665 + check-reqs_pkg_pretend
666 + fi
667 +
668 + if ! test-flag-CXX -std=c++17 ; then
669 + die "You need at least GCC 7.3.x or Clang >= 5 for C++17-specific compiler flags"
670 + fi
671 + fi
672 +}
673 +
674 +pkg_setup() {
675 + if [[ ${MERGE_TYPE} != "binary" ]] && is-flagq "-g*" && ! is-flagq "-g*0" ; then
676 + check-reqs_pkg_setup
677 + fi
678 +
679 + python-any-r1_pkg_setup
680 +}
681 +
682 +src_prepare() {
683 + cmake_src_prepare
684 + gnome2_src_prepare
685 +}
686 +
687 +src_configure() {
688 + # Respect CC, otherwise fails on prefix #395875
689 + tc-export CC
690 +
691 + # It does not compile on alpha without this in LDFLAGS
692 + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648761
693 + use alpha && append-ldflags "-Wl,--no-relax"
694 +
695 + # ld segfaults on ia64 with LDFLAGS --as-needed, bug #555504
696 + use ia64 && append-ldflags "-Wl,--no-as-needed"
697 +
698 + # Sigbuses on SPARC with mcpu and co., bug #???
699 + use sparc && filter-flags "-mvis"
700 +
701 + # https://bugs.webkit.org/show_bug.cgi?id=42070 , #301634
702 + use ppc64 && append-flags "-mminimal-toc"
703 +
704 + # Try to use less memory, bug #469942 (see Fedora .spec for reference)
705 + # --no-keep-memory doesn't work on ia64, bug #502492
706 + if ! use ia64; then
707 + append-ldflags $(test-flags-CCLD "-Wl,--no-keep-memory")
708 + fi
709 +
710 + # Ruby situation is a bit complicated. See bug 513888
711 + local rubyimpl
712 + local ruby_interpreter=""
713 + for rubyimpl in ${USE_RUBY}; do
714 + if has_version -b "virtual/rubygems[ruby_targets_${rubyimpl}]"; then
715 + ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ${rubyimpl})"
716 + fi
717 + done
718 + # This will rarely occur. Only a couple of corner cases could lead us to
719 + # that failure. See bug 513888
720 + [[ -z $ruby_interpreter ]] && die "No suitable ruby interpreter found"
721 +
722 + # TODO: Check Web Audio support
723 + # should somehow let user select between them?
724 +
725 + local mycmakeargs=(
726 + -DPython_EXECUTABLE="${PYTHON}"
727 + ${ruby_interpreter}
728 + $(cmake_use_find_package gles2-only OpenGLES2)
729 + $(cmake_use_find_package !gles2-only OpenGL)
730 + -DBWRAP_EXECUTABLE:FILEPATH="${EPREFIX}"/usr/bin/bwrap # If bubblewrap[suid] then portage makes it go-r and cmake find_program fails with that
731 + -DDBUS_PROXY_EXECUTABLE:FILEPATH="${EPREFIX}"/usr/bin/xdg-dbus-proxy
732 + -DPORT=GTK
733 + # Source/cmake/WebKitFeatures.cmake
734 + -DENABLE_API_TESTS=OFF
735 + -DENABLE_BUBBLEWRAP_SANDBOX=$(usex seccomp)
736 + -DENABLE_GAMEPAD=$(usex gamepad)
737 + -DENABLE_MINIBROWSER=$(usex examples)
738 + -DENABLE_PDFJS=$(usex pdf)
739 + -DENABLE_GEOLOCATION=ON # Runtime optional (talks over dbus service)
740 + -DENABLE_SPELLCHECK=$(usex spell)
741 + -DENABLE_UNIFIED_BUILDS=$(usex jumbo-build)
742 + -DENABLE_VIDEO=$(usex gstreamer)
743 + -DUSE_GSTREAMER_WEBRTC=$(usex gstreamer)
744 + -DUSE_GSTREAMER_TRANSCODER=$(usex gstreamer)
745 + -DENABLE_WEBDRIVER=OFF # Disable WebDriver for webkit2gtk-4.0 and use the webkit2gtk-4.1
746 + -DENABLE_WEBGL=ON
747 + -DENABLE_WEB_AUDIO=$(usex gstreamer)
748 + -DUSE_AVIF=$(usex avif)
749 + # Source/cmake/OptionsGTK.cmake
750 + -DENABLE_GLES2=$(usex gles2-only)
751 + -DENABLE_DOCUMENTATION=OFF
752 + -DENABLE_INTROSPECTION=$(usex introspection)
753 + -DENABLE_JOURNALD_LOG=$(usex systemd)
754 + -DENABLE_QUARTZ_TARGET=$(usex aqua)
755 + -DENABLE_WAYLAND_TARGET=$(usex wayland)
756 + -DENABLE_X11_TARGET=$(usex X)
757 + -DUSE_GBM=ON
758 + -DUSE_GTK4=OFF
759 + -DUSE_JPEGXL=OFF
760 + -DUSE_LCMS=$(usex lcms)
761 + -DUSE_LIBHYPHEN=ON
762 + -DUSE_LIBSECRET=$(usex gnome-keyring)
763 + -DUSE_OPENGL_OR_ES=ON
764 + -DUSE_OPENJPEG=$(usex jpeg2k)
765 + -DUSE_SOUP2=ON
766 + -DUSE_WOFF2=ON
767 + )
768 +
769 + # https://bugs.gentoo.org/761238
770 + append-cppflags -DNDEBUG
771 +
772 + WK_USE_CCACHE=NO cmake_src_configure
773 +}
774 +
775 +pkg_postinst() {
776 + optfeature "geolocation service (used at runtime if available)" "app-misc/geoclue"
777 + optfeature "Common Multimedia codecs" "media-plugins/gst-plugins-meta"
778 + optfeature "(MPEG-)DASH support" "media-plugins/gst-plugins-dash"
779 + optfeature "HTTP-Live-Streaming support" "media-plugins/gst-plugins-hls"
780 +}
781
782 diff --git a/profiles/package.mask b/profiles/package.mask
783 index 958e0258caad..f4bf4218cef5 100644
784 --- a/profiles/package.mask
785 +++ b/profiles/package.mask
786 @@ -181,6 +181,7 @@ dev-ruby/net-http-persistent:3
787 >=media-gfx/eog-44_beta
788 >=media-gfx/gnome-font-viewer-44_rc
789 >=net-libs/glib-networking-2.76_beta
790 +>=net-libs/webkit-gtk-2.40.0
791 >=net-misc/gnome-connections-44_rc
792 >=net-misc/gnome-remote-desktop-44_rc
793 >=sci-geosciences/gnome-maps-44_rc