Gentoo Archives: gentoo-commits

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