Gentoo Archives: gentoo-commits

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