Gentoo Archives: gentoo-commits

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