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, 13 Apr 2019 19:06:04
Message-Id: 1555181947.08e02e08cb8befcf19ded8e1cee3dd32025bf4bd.leio@gentoo
1 commit: 08e02e08cb8befcf19ded8e1cee3dd32025bf4bd
2 Author: Mart Raudsepp <leio <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 13 18:58:50 2019 +0000
4 Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 13 18:59:07 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08e02e08
7
8 net-libs/webkit-gtk: security bump to 2.24.1, drop JIT control
9
10 JIT manual control is getting complicated for limited benefits, which
11 mostly involve oneself shooting in the foot. Let upstream build system
12 figure out whether it should do JIT or not and don't get in the way.
13 May be revisited based on any fallout and relevant bug reports after
14 discussions on such reports convince it's needed.
15
16 Bug: https://bugs.gentoo.org/683234
17 Bug: https://bugs.gentoo.org/680580
18 Bug: https://bugs.gentoo.org/680464
19 Package-Manager: Portage-2.3.52, Repoman-2.3.12
20 Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>
21
22 net-libs/webkit-gtk/Manifest | 1 +
23 net-libs/webkit-gtk/webkit-gtk-2.24.1.ebuild | 281 +++++++++++++++++++++++++++
24 2 files changed, 282 insertions(+)
25
26 diff --git a/net-libs/webkit-gtk/Manifest b/net-libs/webkit-gtk/Manifest
27 index 6b8e6450a8c..8d6471e0bc8 100644
28 --- a/net-libs/webkit-gtk/Manifest
29 +++ b/net-libs/webkit-gtk/Manifest
30 @@ -1,3 +1,4 @@
31 DIST webkitgtk-2.22.6.tar.xz 16773696 BLAKE2B 06ef81168f2c5c6a10362d7ebe0270c863e7eccc02a6b1f1486a01c3e583295d12f7ba5aa0ccc1ffa36f7e1c884b144ccc4203cf00f3096afa74957bc6875d71 SHA512 18f4a4c145b524bebf1eaae58057e1e6cb74ba5a162c5195f072ba25c4399e7749c74fe6f8e9351bb9f2630a2c43f59935943e5bb318a5c4977f727a68602709
32 DIST webkitgtk-2.22.7.tar.xz 16777676 BLAKE2B 3be5559fce7a07828a7c2a4742218efa5a8434b6e019301b70b969718a3679336b6cb6cf4270bbead814e29c7c19a7c4bf8223df2aa86e1a799364fd9bba393e SHA512 c11f60b14f279752bb75efce4b69cbfd75e854bfb16772edc3b24d28eff2fb65090e03f24c1cfaf1f27668e017d877e04d5210560da70568029c5af33a916126
33 DIST webkitgtk-2.24.0.tar.xz 17894000 BLAKE2B 55b43ce104c976f73f9fb71a9c395f0636de5547f62f829c098a709b28668b78dab06f90110e387c5c6f33e2c5033cdfafd6adcafb83d03f77b361d315881397 SHA512 7a1444b22fb59ecdd638344acf3525f1ef9204215a568e185f2ac7f4e43cf89c7be307be31d51ec46231bbf5e9470e48d56395873d7368aca8022ff5c4100dab
34 +DIST webkitgtk-2.24.1.tar.xz 17897488 BLAKE2B 62cd6d896d4b4847430f0d41de92595e955db283626dad2aa560071da12ccd0c24093163e15cc50c30ceb96f9767797f9051657ec68f822e7e371c8566872ad5 SHA512 65424f03b6baca53d64f0d633f53e2f7788c7fb65aa8b50b696418c140707c40351ec3cc0a8652806d75b9da98a04a8bb4203dd6ee4c51a3f93878964354c1ca
35
36 diff --git a/net-libs/webkit-gtk/webkit-gtk-2.24.1.ebuild b/net-libs/webkit-gtk/webkit-gtk-2.24.1.ebuild
37 new file mode 100644
38 index 00000000000..5c4c67891ba
39 --- /dev/null
40 +++ b/net-libs/webkit-gtk/webkit-gtk-2.24.1.ebuild
41 @@ -0,0 +1,281 @@
42 +# Copyright 1999-2019 Gentoo Authors
43 +# Distributed under the terms of the GNU General Public License v2
44 +
45 +EAPI=6
46 +CMAKE_MAKEFILE_GENERATOR="ninja"
47 +PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} )
48 +USE_RUBY="ruby24 ruby25 ruby26"
49 +
50 +inherit check-reqs cmake-utils flag-o-matic gnome2 pax-utils python-any-r1 ruby-single toolchain-funcs virtualx
51 +
52 +MY_P="webkitgtk-${PV}"
53 +DESCRIPTION="Open source web browser engine"
54 +HOMEPAGE="https://www.webkitgtk.org"
55 +SRC_URI="https://www.webkitgtk.org/releases/${MY_P}.tar.xz"
56 +
57 +LICENSE="LGPL-2+ BSD"
58 +SLOT="4/37" # soname version of libwebkit2gtk-4.0
59 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~x86-macos"
60 +
61 +IUSE="aqua coverage doc +egl +geolocation gles2 gnome-keyring +gstreamer +introspection jpeg2k libnotify nsplugin +opengl spell wayland +webgl +X"
62 +
63 +# webgl needs gstreamer, bug #560612
64 +# gstreamer with opengl/gles2 needs egl
65 +REQUIRED_USE="
66 + geolocation? ( introspection )
67 + gles2? ( egl !opengl )
68 + gstreamer? ( opengl? ( egl ) )
69 + nsplugin? ( X )
70 + webgl? ( gstreamer
71 + || ( gles2 opengl ) )
72 + wayland? ( egl )
73 + || ( aqua wayland X )
74 +"
75 +
76 +# Tests fail to link for inexplicable reasons
77 +# https://bugs.webkit.org/show_bug.cgi?id=148210
78 +RESTRICT="test"
79 +
80 +# Aqua support in gtk3 is untested
81 +# Dependencies found at Source/cmake/OptionsGTK.cmake
82 +# Various compile-time optionals for gtk+-3.22.0 - ensure it
83 +# Missing OpenWebRTC checks and conditionals, but ENABLE_MEDIA_STREAM/ENABLE_WEB_RTC is experimental upstream (PRIVATE OFF)
84 +# >=gst-plugins-opus-1.14.4-r1 for opusparse (required by MSE)
85 +RDEPEND="
86 + >=x11-libs/cairo-1.16.0:=[X?]
87 + >=media-libs/fontconfig-2.13.0:1.0
88 + >=media-libs/freetype-2.9.0:2
89 + >=dev-libs/libgcrypt-1.7.0:0=
90 + >=x11-libs/gtk+-3.22:3[aqua?,introspection?,wayland?,X?]
91 + >=media-libs/harfbuzz-1.4.2:=[icu(+)]
92 + >=dev-libs/icu-3.8.1-r1:=
93 + virtual/jpeg:0=
94 + >=net-libs/libsoup-2.48:2.4[introspection?]
95 + >=dev-libs/libxml2-2.8.0:2
96 + >=media-libs/libpng-1.4:0=
97 + dev-db/sqlite:3=
98 + sys-libs/zlib:0
99 + >=dev-libs/atk-2.8.0
100 + media-libs/libwebp:=
101 +
102 + >=dev-libs/glib-2.40:2
103 + >=dev-libs/libxslt-1.1.7
104 + media-libs/woff2
105 + gnome-keyring? ( app-crypt/libsecret )
106 + geolocation? ( >=app-misc/geoclue-2.1.5:2.0 )
107 + introspection? ( >=dev-libs/gobject-introspection-1.32.0:= )
108 + dev-libs/libtasn1:=
109 + nsplugin? ( >=x11-libs/gtk+-2.24.10:2 )
110 + spell? ( >=app-text/enchant-0.22:= )
111 + gstreamer? (
112 + >=media-libs/gstreamer-1.14:1.0
113 + >=media-libs/gst-plugins-base-1.14:1.0[egl?,gles2?,opengl?]
114 + >=media-plugins/gst-plugins-opus-1.14.4-r1:1.0
115 + >=media-libs/gst-plugins-bad-1.14:1.0 )
116 +
117 + X? (
118 + x11-libs/libX11
119 + x11-libs/libXcomposite
120 + x11-libs/libXdamage
121 + x11-libs/libXrender
122 + x11-libs/libXt )
123 +
124 + libnotify? ( x11-libs/libnotify )
125 + dev-libs/hyphen
126 + jpeg2k? ( >=media-libs/openjpeg-2.2.0:2= )
127 +
128 + egl? ( media-libs/mesa[egl] )
129 + gles2? ( media-libs/mesa[gles2] )
130 + opengl? ( virtual/opengl )
131 + webgl? (
132 + x11-libs/libXcomposite
133 + x11-libs/libXdamage )
134 +"
135 +
136 +# paxctl needed for bug #407085
137 +# Need real bison, not yacc
138 +DEPEND="${RDEPEND}
139 + ${PYTHON_DEPS}
140 + ${RUBY_DEPS}
141 + >=app-accessibility/at-spi2-core-2.5.3
142 + dev-util/glib-utils
143 + >=dev-util/gtk-doc-am-1.10
144 + >=dev-util/gperf-3.0.1
145 + >=sys-devel/bison-2.4.3
146 + || ( >=sys-devel/gcc-6.0 >=sys-devel/clang-3.3 )
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 + doc? ( >=dev-util/gtk-doc-1.10 )
156 + geolocation? ( dev-util/gdbus-codegen )
157 +"
158 +# test? (
159 +# dev-python/pygobject:3[python_targets_python2_7]
160 +# x11-themes/hicolor-icon-theme
161 +# jit? ( sys-apps/paxctl ) )
162 +
163 +S="${WORKDIR}/${MY_P}"
164 +
165 +CHECKREQS_DISK_BUILD="18G" # and even this might not be enough, bug #417307
166 +
167 +pkg_pretend() {
168 + if [[ ${MERGE_TYPE} != "binary" ]] ; then
169 + if is-flagq "-g*" && ! is-flagq "-g*0" ; then
170 + einfo "Checking for sufficient disk space to build ${PN} with debugging CFLAGS"
171 + check-reqs_pkg_pretend
172 + fi
173 +
174 + if ! test-flag-CXX -std=c++11 ; then
175 + die "You need at least GCC 4.9.x or Clang >= 3.3 for C++11-specific compiler flags"
176 + fi
177 +
178 + if tc-is-gcc && [[ $(gcc-version) < 4.9 ]] ; then
179 + die 'The active compiler needs to be gcc 4.9 (or newer)'
180 + fi
181 + fi
182 +
183 + if ! use opengl && ! use gles2; then
184 + ewarn
185 + ewarn "You are disabling OpenGL usage (USE=opengl or USE=gles) 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 + cmake-utils_src_prepare
204 + gnome2_src_prepare
205 +}
206 +
207 +src_configure() {
208 + # Respect CC, otherwise fails on prefix #395875
209 + tc-export CC
210 +
211 + # It does not compile on alpha without this in LDFLAGS
212 + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648761
213 + use alpha && append-ldflags "-Wl,--no-relax"
214 +
215 + # ld segfaults on ia64 with LDFLAGS --as-needed, bug #555504
216 + use ia64 && append-ldflags "-Wl,--no-as-needed"
217 +
218 + # Sigbuses on SPARC with mcpu and co., bug #???
219 + use sparc && filter-flags "-mvis"
220 +
221 + # https://bugs.webkit.org/show_bug.cgi?id=42070 , #301634
222 + use ppc64 && append-flags "-mminimal-toc"
223 +
224 + # Try to use less memory, bug #469942 (see Fedora .spec for reference)
225 + # --no-keep-memory doesn't work on ia64, bug #502492
226 + if ! use ia64; then
227 + append-ldflags "-Wl,--no-keep-memory"
228 + fi
229 +
230 + # We try to use gold when possible for this package
231 +# if ! tc-ld-is-gold ; then
232 +# append-ldflags "-Wl,--reduce-memory-overheads"
233 +# fi
234 +
235 + # Multiple rendering bugs on youtube, github, etc without this, bug #547224
236 + append-flags $(test-flags -fno-strict-aliasing)
237 +
238 + # Ruby situation is a bit complicated. See bug 513888
239 + local rubyimpl
240 + local ruby_interpreter=""
241 + for rubyimpl in ${USE_RUBY}; do
242 + if has_version "virtual/rubygems[ruby_targets_${rubyimpl}]"; then
243 + ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ${rubyimpl})"
244 + fi
245 + done
246 + # This will rarely occur. Only a couple of corner cases could lead us to
247 + # that failure. See bug 513888
248 + [[ -z $ruby_interpreter ]] && die "No suitable ruby interpreter found"
249 +
250 + # TODO: Check Web Audio support
251 + # should somehow let user select between them?
252 + #
253 + # FTL_JIT requires llvm
254 + #
255 + # opengl needs to be explicetly handled, bug #576634
256 +
257 + local opengl_enabled
258 + if use opengl || use gles2; then
259 + opengl_enabled=ON
260 + else
261 + opengl_enabled=OFF
262 + fi
263 +
264 + local mycmakeargs=(
265 + #-DENABLE_UNIFIED_BUILDS=$(usex jumbo-build) # broken in 2.24.1
266 + -DENABLE_QUARTZ_TARGET=$(usex aqua)
267 + -DENABLE_API_TESTS=$(usex test)
268 + -DENABLE_GTKDOC=$(usex doc)
269 + -DENABLE_GEOLOCATION=$(usex geolocation)
270 + $(cmake-utils_use_find_package gles2 OpenGLES2)
271 + -DENABLE_GLES2=$(usex gles2)
272 + -DENABLE_VIDEO=$(usex gstreamer)
273 + -DENABLE_WEB_AUDIO=$(usex gstreamer)
274 + -DENABLE_INTROSPECTION=$(usex introspection)
275 + -DUSE_LIBNOTIFY=$(usex libnotify)
276 + -DUSE_LIBSECRET=$(usex gnome-keyring)
277 + -DUSE_OPENJPEG=$(usex jpeg2k)
278 + -DUSE_WOFF2=ON
279 + -DENABLE_PLUGIN_PROCESS_GTK2=$(usex nsplugin)
280 + -DENABLE_SPELLCHECK=$(usex spell)
281 + -DENABLE_WAYLAND_TARGET=$(usex wayland)
282 + -DENABLE_WEBGL=$(usex webgl)
283 + $(cmake-utils_use_find_package egl EGL)
284 + $(cmake-utils_use_find_package opengl OpenGL)
285 + -DENABLE_X11_TARGET=$(usex X)
286 + -DENABLE_OPENGL=${opengl_enabled}
287 + -DCMAKE_BUILD_TYPE=Release
288 + -DPORT=GTK
289 + ${ruby_interpreter}
290 + )
291 +
292 + # Allow it to use GOLD when possible as it has all the magic to
293 + # detect when to use it and using gold for this concrete package has
294 + # multiple advantages and is also the upstream default, bug #585788
295 +# if tc-ld-is-gold ; then
296 +# mycmakeargs+=( -DUSE_LD_GOLD=ON )
297 +# else
298 +# mycmakeargs+=( -DUSE_LD_GOLD=OFF )
299 +# fi
300 +
301 + cmake-utils_src_configure
302 +}
303 +
304 +src_compile() {
305 + cmake-utils_src_compile
306 +}
307 +
308 +src_test() {
309 + # Prevents test failures on PaX systems
310 + pax-mark m $(list-paxables Programs/*[Tt]ests/*) # Programs/unittests/.libs/test*
311 +
312 + cmake-utils_src_test
313 +}
314 +
315 +src_install() {
316 + cmake-utils_src_install
317 +
318 + # Prevents crashes on PaX systems, bug #522808
319 + pax-mark m "${ED}usr/libexec/webkit2gtk-4.0/jsc" "${ED}usr/libexec/webkit2gtk-4.0/WebKitWebProcess"
320 + pax-mark m "${ED}usr/libexec/webkit2gtk-4.0/WebKitPluginProcess"
321 + use nsplugin && pax-mark m "${ED}usr/libexec/webkit2gtk-4.0/WebKitPluginProcess"2
322 +}