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: Sun, 22 Oct 2017 23:31:34
Message-Id: 1508710926.3f02025658b5764b88a248af0a0cb408d6e72b57.leio@gentoo
1 commit: 3f02025658b5764b88a248af0a0cb408d6e72b57
2 Author: Mart Raudsepp <leio <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 22 21:59:55 2017 +0000
4 Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 22 22:22:06 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f020256
7
8 net-libs/webkit-gtk: bump to 2.18.1 for security; other package touchups
9
10 - reorder deps to cmake checks order
11 - add missing zlib dep
12 - move gtk platform USE checks to the main depstring, as that's requiring newer version anyway
13 - remove unnecessary pango dep (not checked in cmake, minimal usage comes via gtk+ deps)
14 - add WebCrypto deps, without giving optionality (it's a private option)
15 - add missing cmake-utils_src_prepare call
16 - remove ancient <glibc-2.18 code
17 - fix jsc pax-mark
18 - remove ruby21 support (gone from tree and repoman warning about the slot)
19 - GL deps and conditions remain a mystery to me for now
20
21 Closes: https://bugs.gentoo.org/626736
22 Package-Manager: Portage-2.3.8, Repoman-2.3.2
23
24 net-libs/webkit-gtk/Manifest | 1 +
25 net-libs/webkit-gtk/metadata.xml | 1 +
26 net-libs/webkit-gtk/webkit-gtk-2.18.1.ebuild | 284 +++++++++++++++++++++++++++
27 3 files changed, 286 insertions(+)
28
29 diff --git a/net-libs/webkit-gtk/Manifest b/net-libs/webkit-gtk/Manifest
30 index 85828c2eb8e..0792964cb44 100644
31 --- a/net-libs/webkit-gtk/Manifest
32 +++ b/net-libs/webkit-gtk/Manifest
33 @@ -1,2 +1,3 @@
34 DIST webkitgtk-2.16.6.tar.xz 14658120 SHA256 fc23650df953123c59b9c0edf3855e7bd55bd107820997fc72375811e1ea4b21 SHA512 bb488d7a60e4d6f9683ac343852a75854ef73e6b5aa093361ffe2d08e71e2f11c19da4447f9937221e518cda784bdacfcfd151f9395605a1957380fbc5b1533b WHIRLPOOL b3053979c1837d97ba525e078d4a14c64a66c61cb0117041af02c8fd250b2062fda66e782134d6bf44f3f80a04917a9b2ac61aa4e800f0011e5243d7eb8583f4
35 +DIST webkitgtk-2.18.1.tar.xz 14823708 SHA256 9cdb7b302fbc8a2a7e1e783b80391e64f8b12d70d6ebad4eb756dd59bf3ed795 SHA512 671392f46a34def51df34e5ce384acdcf7526b286e64f1220921f6c654a28148553e815f6f0fd02252b642dcabef9c646f5386b9ec3d2cb01520782833bb650b WHIRLPOOL e16e1e295d99d6589787fb51e2e3c5867877206428294b824307a5e7af43bdebeda3050a397fffee154c1a624fd21d59e25387fba58c91ce5ab30613773db056
36 DIST webkitgtk-2.4.11.tar.xz 9869100 SHA256 588aea051bfbacced27fdfe0335a957dca839ebe36aa548df39c7bbafdb65bf7 SHA512 2e2cf01a52b8593765a0a3c2d7f0ad306121660019eb402226bd2826c7d4666dab4e91ca6ccbd29abe0ad3993549f256ed1ab88de22e9c8516d5f40a4edd6bfb WHIRLPOOL de86c4abfb22aacbf62163d0398158931c9cf6ab628547d3b30e613f0505d67c85c3200f7db96500e7c2b35f640cdaa7f501346fc13f492c9439dff4056849a3
37
38 diff --git a/net-libs/webkit-gtk/metadata.xml b/net-libs/webkit-gtk/metadata.xml
39 index 2aec05767e2..9a96619fdf3 100644
40 --- a/net-libs/webkit-gtk/metadata.xml
41 +++ b/net-libs/webkit-gtk/metadata.xml
42 @@ -11,6 +11,7 @@
43 <flag name="geoloc">Enable geolocation support through <pkg>app-misc/geoclue</pkg></flag>
44 <flag name="geolocation">Enable geolocation support through <pkg>app-misc/geoclue</pkg></flag>
45 <flag name="gles2">Enable GLESv2 support</flag>
46 + <flag name="nsplugin">Enable full nsplugin support (GTK2 plugins)</flag>
47 <flag name="webgl">Build support for the WebGL HTML API using <pkg>virtual/opengl</pkg></flag>
48 </use>
49 </pkgmetadata>
50
51 diff --git a/net-libs/webkit-gtk/webkit-gtk-2.18.1.ebuild b/net-libs/webkit-gtk/webkit-gtk-2.18.1.ebuild
52 new file mode 100644
53 index 00000000000..678d8b2d051
54 --- /dev/null
55 +++ b/net-libs/webkit-gtk/webkit-gtk-2.18.1.ebuild
56 @@ -0,0 +1,284 @@
57 +# Copyright 1999-2017 Gentoo Foundation
58 +# Distributed under the terms of the GNU General Public License v2
59 +
60 +EAPI=6
61 +CMAKE_MAKEFILE_GENERATOR="ninja"
62 +PYTHON_COMPAT=( python2_7 )
63 +USE_RUBY="ruby22 ruby23 ruby24"
64 +
65 +inherit check-reqs cmake-utils eutils flag-o-matic gnome2 pax-utils python-any-r1 ruby-single toolchain-funcs versionator virtualx
66 +
67 +MY_P="webkitgtk-${PV}"
68 +DESCRIPTION="Open source web browser engine"
69 +HOMEPAGE="http://www.webkitgtk.org/"
70 +SRC_URI="http://www.webkitgtk.org/releases/${MY_P}.tar.xz"
71 +
72 +LICENSE="LGPL-2+ BSD"
73 +SLOT="4/37" # soname version of libwebkit2gtk-4.0
74 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
75 +
76 +IUSE="aqua coverage doc +egl +geolocation gles2 gnome-keyring +gstreamer +introspection +jit libnotify nsplugin +opengl spell wayland +webgl X"
77 +
78 +# webgl needs gstreamer, bug #560612
79 +REQUIRED_USE="
80 + geolocation? ( introspection )
81 + gles2? ( egl )
82 + introspection? ( gstreamer )
83 + nsplugin? ( X )
84 + webgl? ( ^^ ( gles2 opengl ) )
85 + !webgl? ( ?? ( gles2 opengl ) )
86 + webgl? ( gstreamer )
87 + wayland? ( egl )
88 + || ( aqua wayland X )
89 +"
90 +
91 +# Tests fail to link for inexplicable reasons
92 +# https://bugs.webkit.org/show_bug.cgi?id=148210
93 +RESTRICT="test"
94 +
95 +# Aqua support in gtk3 is untested
96 +# Dependencies found at Source/cmake/OptionsGTK.cmake
97 +# Various compile-time optionals for gtk+-3.22.0 - ensure it
98 +# Missing OpenWebRTC checks and conditionals, but ENABLE_MEDIA_STREAM/ENABLE_WEB_RTC is experimental upstream (PRIVATE OFF)
99 +RDEPEND="
100 + >=x11-libs/cairo-1.10.2:=
101 + >=media-libs/fontconfig-2.8.0:1.0
102 + >=media-libs/freetype-2.4.2:2
103 + >=dev-libs/libgcrypt-1.6.0:0=
104 + >=x11-libs/gtk+-3.22:3[aqua?,introspection?,wayland?,X?]
105 + >=media-libs/harfbuzz-1.3.3:=[icu(+)]
106 + >=dev-libs/icu-3.8.1-r1:=
107 + virtual/jpeg:0=
108 + >=net-libs/libsoup-2.48:2.4[introspection?]
109 + >=dev-libs/libxml2-2.8.0:2
110 + >=media-libs/libpng-1.4:0=
111 + dev-db/sqlite:3=
112 + sys-libs/zlib:0
113 + >=dev-libs/atk-2.8.0
114 + media-libs/libwebp:=
115 +
116 + >=dev-libs/glib-2.40:2
117 + >=dev-libs/libxslt-1.1.7
118 + gnome-keyring? ( app-crypt/libsecret )
119 + geolocation? ( >=app-misc/geoclue-2.1.5:2.0 )
120 + introspection? ( >=dev-libs/gobject-introspection-1.32.0:= )
121 + dev-libs/libtasn1:=
122 + >=dev-libs/libgcrypt-1.7.0:0=
123 + nsplugin? ( >=x11-libs/gtk+-2.24.10:2 )
124 + spell? ( >=app-text/enchant-0.22:= )
125 + gstreamer? (
126 + >=media-libs/gstreamer-1.2.3:1.0
127 + >=media-libs/gst-plugins-base-1.2.3:1.0
128 + >=media-libs/gst-plugins-bad-1.10:1.0[opengl?] )
129 +
130 + X? (
131 + x11-libs/cairo[X]
132 + x11-libs/libX11
133 + x11-libs/libXcomposite
134 + x11-libs/libXdamage
135 + x11-libs/libXrender
136 + x11-libs/libXt )
137 +
138 + libnotify? ( x11-libs/libnotify )
139 + dev-libs/hyphen
140 +
141 + egl? ( media-libs/mesa[egl] )
142 + gles2? ( media-libs/mesa[gles2] )
143 + opengl? ( virtual/opengl
144 + x11-libs/cairo[opengl] )
145 + webgl? (
146 + x11-libs/cairo[opengl]
147 + x11-libs/libXcomposite
148 + x11-libs/libXdamage )
149 +"
150 +
151 +# paxctl needed for bug #407085
152 +# Need real bison, not yacc
153 +DEPEND="${RDEPEND}
154 + ${PYTHON_DEPS}
155 + ${RUBY_DEPS}
156 + >=app-accessibility/at-spi2-core-2.5.3
157 + >=dev-lang/perl-5.10
158 + >=dev-util/gtk-doc-am-1.10
159 + >=dev-util/gperf-3.0.1
160 + >=sys-devel/bison-2.4.3
161 + || ( >=sys-devel/gcc-4.9 >=sys-devel/clang-3.3 )
162 + sys-devel/gettext
163 + virtual/pkgconfig
164 +
165 + dev-lang/perl
166 + virtual/perl-Data-Dumper
167 + virtual/perl-Carp
168 +
169 + doc? ( >=dev-util/gtk-doc-1.10 )
170 + geolocation? ( dev-util/gdbus-codegen )
171 + introspection? ( jit? ( sys-apps/paxctl ) )
172 + test? (
173 + dev-lang/python:2.7
174 + dev-python/pygobject:3[python_targets_python2_7]
175 + x11-themes/hicolor-icon-theme
176 + jit? ( sys-apps/paxctl ) )
177 +"
178 +
179 +S="${WORKDIR}/${MY_P}"
180 +
181 +CHECKREQS_DISK_BUILD="18G" # and even this might not be enough, bug #417307
182 +
183 +pkg_pretend() {
184 + if [[ ${MERGE_TYPE} != "binary" ]] ; then
185 + if is-flagq "-g*" && ! is-flagq "-g*0" ; then
186 + einfo "Checking for sufficient disk space to build ${PN} with debugging CFLAGS"
187 + check-reqs_pkg_pretend
188 + fi
189 +
190 + if ! test-flag-CXX -std=c++11 ; then
191 + die "You need at least GCC 4.9.x or Clang >= 3.3 for C++11-specific compiler flags"
192 + fi
193 +
194 + if tc-is-gcc && [[ $(gcc-version) < 4.9 ]] ; then
195 + die 'The active compiler needs to be gcc 4.9 (or newer)'
196 + fi
197 + fi
198 +}
199 +
200 +pkg_setup() {
201 + if [[ ${MERGE_TYPE} != "binary" ]] && is-flagq "-g*" && ! is-flagq "-g*0" ; then
202 + check-reqs_pkg_setup
203 + fi
204 +
205 + python-any-r1_pkg_setup
206 +}
207 +
208 +src_prepare() {
209 + # https://bugs.gentoo.org/show_bug.cgi?id=555504
210 + eapply "${FILESDIR}"/${PN}-2.8.5-fix-ia64-build.patch
211 + cmake-utils_src_prepare
212 + gnome2_src_prepare
213 +}
214 +
215 +src_configure() {
216 + # Respect CC, otherwise fails on prefix #395875
217 + tc-export CC
218 +
219 + # Arches without JIT support also need this to really disable it in all places
220 + use jit || append-cppflags -DENABLE_JIT=0 -DENABLE_YARR_JIT=0 -DENABLE_ASSEMBLER=0
221 +
222 + # It does not compile on alpha without this in LDFLAGS
223 + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648761
224 + use alpha && append-ldflags "-Wl,--no-relax"
225 +
226 + # ld segfaults on ia64 with LDFLAGS --as-needed, bug #555504
227 + use ia64 && append-ldflags "-Wl,--no-as-needed"
228 +
229 + # Sigbuses on SPARC with mcpu and co., bug #???
230 + use sparc && filter-flags "-mvis"
231 +
232 + # https://bugs.webkit.org/show_bug.cgi?id=42070 , #301634
233 + use ppc64 && append-flags "-mminimal-toc"
234 +
235 + # Try to use less memory, bug #469942 (see Fedora .spec for reference)
236 + # --no-keep-memory doesn't work on ia64, bug #502492
237 + if ! use ia64; then
238 + append-ldflags "-Wl,--no-keep-memory"
239 + fi
240 +
241 + # We try to use gold when possible for this package
242 +# if ! tc-ld-is-gold ; then
243 +# append-ldflags "-Wl,--reduce-memory-overheads"
244 +# fi
245 +
246 + # Multiple rendering bugs on youtube, github, etc without this, bug #547224
247 + append-flags $(test-flags -fno-strict-aliasing)
248 +
249 + local ruby_interpreter=""
250 +
251 + if has_version "virtual/rubygems[ruby_targets_ruby24]"; then
252 + ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ruby24)"
253 + elif has_version "virtual/rubygems[ruby_targets_ruby23]"; then
254 + ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ruby23)"
255 + elif has_version "virtual/rubygems[ruby_targets_ruby22]"; then
256 + ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ruby22)"
257 + else
258 + ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ruby21)"
259 + fi
260 +
261 + # TODO: Check Web Audio support
262 + # should somehow let user select between them?
263 + #
264 + # FTL_JIT requires llvm
265 + #
266 + # opengl needs to be explicetly handled, bug #576634
267 +
268 + local opengl_enabled
269 + if use opengl || use gles2; then
270 + opengl_enabled=ON
271 + else
272 + opengl_enabled=OFF
273 + fi
274 +
275 + # support for webgl (aka 2d-canvas accelerating)
276 + local canvas_enabled
277 + if use webgl && ! use gles2 ; then
278 + canvas_enabled=ON
279 + else
280 + canvas_enabled=OFF
281 + fi
282 +
283 + local mycmakeargs=(
284 + -DENABLE_QUARTZ_TARGET=$(usex aqua)
285 + -DENABLE_API_TESTS=$(usex test)
286 + -DENABLE_GTKDOC=$(usex doc)
287 + -DENABLE_GEOLOCATION=$(usex geolocation)
288 + $(cmake-utils_use_find_package gles2 OpenGLES2)
289 + -DENABLE_GLES2=$(usex gles2)
290 + -DENABLE_VIDEO=$(usex gstreamer)
291 + -DENABLE_WEB_AUDIO=$(usex gstreamer)
292 + -DENABLE_INTROSPECTION=$(usex introspection)
293 + -DENABLE_JIT=$(usex jit)
294 + -DUSE_LIBNOTIFY=$(usex libnotify)
295 + -DUSE_LIBSECRET=$(usex gnome-keyring)
296 + -DENABLE_PLUGIN_PROCESS_GTK2=$(usex nsplugin)
297 + -DENABLE_SPELLCHECK=$(usex spell)
298 + -DENABLE_WAYLAND_TARGET=$(usex wayland)
299 + -DENABLE_WEBGL=$(usex webgl)
300 + $(cmake-utils_use_find_package egl EGL)
301 + $(cmake-utils_use_find_package opengl OpenGL)
302 + -DENABLE_X11_TARGET=$(usex X)
303 + -DENABLE_OPENGL=${opengl_enabled}
304 + -DENABLE_ACCELERATED_2D_CANVAS=${canvas_enabled}
305 + -DCMAKE_BUILD_TYPE=Release
306 + -DPORT=GTK
307 + ${ruby_interpreter}
308 + )
309 +
310 + # Allow it to use GOLD when possible as it has all the magic to
311 + # detect when to use it and using gold for this concrete package has
312 + # multiple advantages and is also the upstream default, bug #585788
313 +# if tc-ld-is-gold ; then
314 +# mycmakeargs+=( -DUSE_LD_GOLD=ON )
315 +# else
316 +# mycmakeargs+=( -DUSE_LD_GOLD=OFF )
317 +# fi
318 +
319 + cmake-utils_src_configure
320 +}
321 +
322 +src_compile() {
323 + cmake-utils_src_compile
324 +}
325 +
326 +src_test() {
327 + # Prevents test failures on PaX systems
328 + use jit && pax-mark m $(list-paxables Programs/*[Tt]ests/*) # Programs/unittests/.libs/test*
329 +
330 + cmake-utils_src_test
331 +}
332 +
333 +src_install() {
334 + cmake-utils_src_install
335 +
336 + # Prevents crashes on PaX systems, bug #522808
337 + use jit && pax-mark m "${ED}usr/libexec/webkit2gtk-4.0/jsc" "${ED}usr/libexec/webkit2gtk-4.0/WebKitWebProcess"
338 + pax-mark m "${ED}usr/libexec/webkit2gtk-4.0/WebKitPluginProcess"
339 + use nsplugin && pax-mark m "${ED}usr/libexec/webkit2gtk-4.0/WebKitPluginProcess"2
340 +}