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: Tue, 25 Jul 2017 18:04:56
Message-Id: 1501005784.12cc94e10688796949b18c8d1f0abf682dca8d1e.leio@gentoo
1 commit: 12cc94e10688796949b18c8d1f0abf682dca8d1e
2 Author: Mart Raudsepp <leio <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jul 25 18:02:18 2017 +0000
4 Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
5 CommitDate: Tue Jul 25 18:03:04 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12cc94e1
7
8 net-libs/webkit-gtk: bump to 2.16.6 for security fixes
9
10 Fixes CVE-2017-7018, CVE-2017-7030, CVE-2017-7034, CVE-2017-7037,
11 CVE-2017-7039, CVE-2017-7046, CVE-2017-7048, CVE-2017-7055,
12 CVE-2017-7056, CVE-2017-7061 and CVE-2017-7064.
13
14 Gentoo-bug: 626142
15 Package-Manager: Portage-2.3.6, Repoman-2.3.2
16
17 net-libs/webkit-gtk/Manifest | 1 +
18 net-libs/webkit-gtk/webkit-gtk-2.16.6.ebuild | 288 +++++++++++++++++++++++++++
19 2 files changed, 289 insertions(+)
20
21 diff --git a/net-libs/webkit-gtk/Manifest b/net-libs/webkit-gtk/Manifest
22 index 4abc7af28cc..8ee679e6755 100644
23 --- a/net-libs/webkit-gtk/Manifest
24 +++ b/net-libs/webkit-gtk/Manifest
25 @@ -1,2 +1,3 @@
26 DIST webkitgtk-2.16.5.tar.xz 14655656 SHA256 8e0396f3428e757898c5856e642eed4fcd5a20ae03d96d3eaa03b76634be7dd4 SHA512 9d7573da44267edcd83b4918e5f1e0516eb8d84c58ac6b239a2328448f96b39067b62bcd18e7d730ec0ef44b9f4b0a03712d17f9f465f00346a1f45a0a4ebb10 WHIRLPOOL 76fc7cc7dfb326d3600396bc1e486acd26cca1eda779d9a06ad123c60f8cba9eee162b626abe95a09c9e8ed0b308f341a818ebf833f6b902812c644e5925aacd
27 +DIST webkitgtk-2.16.6.tar.xz 14658120 SHA256 fc23650df953123c59b9c0edf3855e7bd55bd107820997fc72375811e1ea4b21 SHA512 bb488d7a60e4d6f9683ac343852a75854ef73e6b5aa093361ffe2d08e71e2f11c19da4447f9937221e518cda784bdacfcfd151f9395605a1957380fbc5b1533b WHIRLPOOL b3053979c1837d97ba525e078d4a14c64a66c61cb0117041af02c8fd250b2062fda66e782134d6bf44f3f80a04917a9b2ac61aa4e800f0011e5243d7eb8583f4
28 DIST webkitgtk-2.4.11.tar.xz 9869100 SHA256 588aea051bfbacced27fdfe0335a957dca839ebe36aa548df39c7bbafdb65bf7 SHA512 2e2cf01a52b8593765a0a3c2d7f0ad306121660019eb402226bd2826c7d4666dab4e91ca6ccbd29abe0ad3993549f256ed1ab88de22e9c8516d5f40a4edd6bfb WHIRLPOOL de86c4abfb22aacbf62163d0398158931c9cf6ab628547d3b30e613f0505d67c85c3200f7db96500e7c2b35f640cdaa7f501346fc13f492c9439dff4056849a3
29
30 diff --git a/net-libs/webkit-gtk/webkit-gtk-2.16.6.ebuild b/net-libs/webkit-gtk/webkit-gtk-2.16.6.ebuild
31 new file mode 100644
32 index 00000000000..2db2e98ea42
33 --- /dev/null
34 +++ b/net-libs/webkit-gtk/webkit-gtk-2.16.6.ebuild
35 @@ -0,0 +1,288 @@
36 +# Copyright 1999-2017 Gentoo Foundation
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=6
40 +CMAKE_MAKEFILE_GENERATOR="ninja"
41 +PYTHON_COMPAT=( python2_7 )
42 +USE_RUBY="ruby21 ruby22 ruby23 ruby24"
43 +
44 +inherit check-reqs cmake-utils eutils flag-o-matic gnome2 pax-utils python-any-r1 ruby-single toolchain-funcs versionator virtualx
45 +
46 +MY_P="webkitgtk-${PV}"
47 +DESCRIPTION="Open source web browser engine"
48 +HOMEPAGE="http://www.webkitgtk.org/"
49 +SRC_URI="http://www.webkitgtk.org/releases/${MY_P}.tar.xz"
50 +
51 +LICENSE="LGPL-2+ BSD"
52 +SLOT="4/37" # soname version of libwebkit2gtk-4.0
53 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
54 +
55 +IUSE="aqua coverage doc +egl +geolocation gles2 gnome-keyring +gstreamer +introspection +jit libnotify nsplugin +opengl spell wayland +webgl X"
56 +
57 +# webgl needs gstreamer, bug #560612
58 +REQUIRED_USE="
59 + geolocation? ( introspection )
60 + gles2? ( egl )
61 + introspection? ( gstreamer )
62 + nsplugin? ( X )
63 + webgl? ( ^^ ( gles2 opengl ) )
64 + !webgl? ( ?? ( gles2 opengl ) )
65 + webgl? ( gstreamer )
66 + wayland? ( egl )
67 + || ( aqua wayland X )
68 +"
69 +
70 +# Tests fail to link for inexplicable reasons
71 +# https://bugs.webkit.org/show_bug.cgi?id=148210
72 +RESTRICT="test"
73 +
74 +# use sqlite, svg by default
75 +# Aqua support in gtk3 is untested
76 +# Dependencies found at Source/cmake/OptionsGTK.cmake
77 +# Various compile-time optionals for gtk+-3.22.0 - ensure it
78 +RDEPEND="
79 + dev-db/sqlite:3=
80 + >=dev-libs/glib-2.36:2
81 + dev-libs/hyphen
82 + >=dev-libs/icu-3.8.1-r1:=
83 + >=dev-libs/libxml2-2.8:2
84 + >=dev-libs/libxslt-1.1.7
85 + >=media-libs/fontconfig-2.8:1.0
86 + >=media-libs/freetype-2.4.2:2
87 + >=media-libs/harfbuzz-1.3.3:=[icu(+)]
88 + >=media-libs/libpng-1.4:0=
89 + media-libs/libwebp:=
90 + dev-libs/libgcrypt:0=
91 + >=net-libs/libsoup-2.42:2.4[introspection?]
92 + >=x11-libs/cairo-1.10.2:=
93 + >=x11-libs/gtk+-3.22:3[introspection?]
94 + >=x11-libs/pango-1.30.0
95 + virtual/jpeg:0=
96 +
97 + aqua? ( >=x11-libs/gtk+-3.14:3[aqua] )
98 + egl? ( media-libs/mesa[egl] )
99 + geolocation? ( >=app-misc/geoclue-2.1.5:2.0 )
100 + gles2? ( media-libs/mesa[gles2] )
101 + gnome-keyring? ( app-crypt/libsecret )
102 + gstreamer? (
103 + >=media-libs/gstreamer-1.2.3:1.0
104 + >=media-libs/gst-plugins-base-1.2.3:1.0
105 + >=media-libs/gst-plugins-bad-1.8:1.0[opengl?] )
106 + introspection? ( >=dev-libs/gobject-introspection-1.32.0:= )
107 + libnotify? ( x11-libs/libnotify )
108 + nsplugin? ( >=x11-libs/gtk+-2.24.10:2 )
109 + opengl? ( virtual/opengl
110 + x11-libs/cairo[opengl] )
111 + spell? ( >=app-text/enchant-0.22:= )
112 + wayland? ( >=x11-libs/gtk+-3.14:3[wayland] )
113 + webgl? (
114 + x11-libs/cairo[opengl]
115 + x11-libs/libXcomposite
116 + x11-libs/libXdamage )
117 + X? (
118 + x11-libs/cairo[X]
119 + >=x11-libs/gtk+-3.14:3[X]
120 + x11-libs/libX11
121 + x11-libs/libXcomposite
122 + x11-libs/libXrender
123 + x11-libs/libXt )
124 +"
125 +
126 +# paxctl needed for bug #407085
127 +# Need real bison, not yacc
128 +DEPEND="${RDEPEND}
129 + ${PYTHON_DEPS}
130 + ${RUBY_DEPS}
131 + >=dev-lang/perl-5.10
132 + >=app-accessibility/at-spi2-core-2.5.3
133 + >=dev-libs/atk-2.8.0
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 +PATCHES=(
160 + # https://bugs.gentoo.org/show_bug.cgi?id=555504
161 + "${FILESDIR}"/${PN}-2.8.5-fix-ia64-build.patch
162 +
163 + # https://bugs.gentoo.org/show_bug.cgi?id=564352
164 + # https://bugs.webkit.org/show_bug.cgi?id=167283
165 + "${FILESDIR}"/${PN}-2.8.5-fix-alpha-build.patch
166 +)
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++11 ; then
176 + die "You need at least GCC 4.9.x or Clang >= 3.3 for C++11-specific compiler flags"
177 + fi
178 +
179 + if tc-is-gcc && [[ $(gcc-version) < 4.9 ]] ; then
180 + die 'The active compiler needs to be gcc 4.9 (or newer)'
181 + fi
182 + fi
183 +}
184 +
185 +pkg_setup() {
186 + if [[ ${MERGE_TYPE} != "binary" ]] && is-flagq "-g*" && ! is-flagq "-g*0" ; then
187 + check-reqs_pkg_setup
188 + fi
189 +
190 + python-any-r1_pkg_setup
191 +}
192 +
193 +src_configure() {
194 + # Respect CC, otherwise fails on prefix #395875
195 + tc-export CC
196 +
197 + # Arches without JIT support also need this to really disable it in all places
198 + use jit || append-cppflags -DENABLE_JIT=0 -DENABLE_YARR_JIT=0 -DENABLE_ASSEMBLER=0
199 +
200 + # It does not compile on alpha without this in LDFLAGS
201 + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648761
202 + use alpha && append-ldflags "-Wl,--no-relax"
203 +
204 + # ld segfaults on ia64 with LDFLAGS --as-needed, bug #555504
205 + use ia64 && append-ldflags "-Wl,--no-as-needed"
206 +
207 + # Sigbuses on SPARC with mcpu and co., bug #???
208 + use sparc && filter-flags "-mvis"
209 +
210 + # https://bugs.webkit.org/show_bug.cgi?id=42070 , #301634
211 + use ppc64 && append-flags "-mminimal-toc"
212 +
213 + # Try to use less memory, bug #469942 (see Fedora .spec for reference)
214 + # --no-keep-memory doesn't work on ia64, bug #502492
215 + if ! use ia64; then
216 + append-ldflags "-Wl,--no-keep-memory"
217 + fi
218 +
219 + # We try to use gold when possible for this package
220 +# if ! tc-ld-is-gold ; then
221 +# append-ldflags "-Wl,--reduce-memory-overheads"
222 +# fi
223 +
224 + # older glibc needs this for INTPTR_MAX, bug #533976
225 + if has_version "<sys-libs/glibc-2.18" ; then
226 + append-cppflags "-D__STDC_LIMIT_MACROS"
227 + fi
228 +
229 + # Multiple rendering bugs on youtube, github, etc without this, bug #547224
230 + append-flags $(test-flags -fno-strict-aliasing)
231 +
232 + local ruby_interpreter=""
233 +
234 + if has_version "virtual/rubygems[ruby_targets_ruby24]"; then
235 + ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ruby24)"
236 + elif has_version "virtual/rubygems[ruby_targets_ruby23]"; then
237 + ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ruby23)"
238 + elif has_version "virtual/rubygems[ruby_targets_ruby22]"; then
239 + ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ruby22)"
240 + else
241 + ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ruby21)"
242 + fi
243 +
244 + # TODO: Check Web Audio support
245 + # should somehow let user select between them?
246 + #
247 + # FTL_JIT requires llvm
248 + #
249 + # opengl needs to be explicetly handled, bug #576634
250 +
251 + local opengl_enabled
252 + if use opengl || use gles2; then
253 + opengl_enabled=ON
254 + else
255 + opengl_enabled=OFF
256 + fi
257 +
258 + # support for webgl (aka 2d-canvas accelerating)
259 + local canvas_enabled
260 + if use webgl && ! use gles2 ; then
261 + canvas_enabled=ON
262 + else
263 + canvas_enabled=OFF
264 + fi
265 +
266 + local mycmakeargs=(
267 + -DENABLE_QUARTZ_TARGET=$(usex aqua)
268 + -DENABLE_API_TESTS=$(usex test)
269 + -DENABLE_GTKDOC=$(usex doc)
270 + -DENABLE_GEOLOCATION=$(usex geolocation)
271 + $(cmake-utils_use_find_package gles2 OpenGLES2)
272 + -DENABLE_GLES2=$(usex gles2)
273 + -DENABLE_VIDEO=$(usex gstreamer)
274 + -DENABLE_WEB_AUDIO=$(usex gstreamer)
275 + -DENABLE_INTROSPECTION=$(usex introspection)
276 + -DENABLE_JIT=$(usex jit)
277 + -DUSE_LIBNOTIFY=$(usex libnotify)
278 + -DUSE_LIBSECRET=$(usex gnome-keyring)
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 + -DENABLE_ACCELERATED_2D_CANVAS=${canvas_enabled}
288 + -DCMAKE_BUILD_TYPE=Release
289 + -DPORT=GTK
290 + ${ruby_interpreter}
291 + )
292 +
293 + # Allow it to use GOLD when possible as it has all the magic to
294 + # detect when to use it and using gold for this concrete package has
295 + # multiple advantages and is also the upstream default, bug #585788
296 +# if tc-ld-is-gold ; then
297 +# mycmakeargs+=( -DUSE_LD_GOLD=ON )
298 +# else
299 +# mycmakeargs+=( -DUSE_LD_GOLD=OFF )
300 +# fi
301 +
302 + cmake-utils_src_configure
303 +}
304 +
305 +src_compile() {
306 + cmake-utils_src_compile
307 +}
308 +
309 +src_test() {
310 + # Prevents test failures on PaX systems
311 + use jit && pax-mark m $(list-paxables Programs/*[Tt]ests/*) # Programs/unittests/.libs/test*
312 +
313 + cmake-utils_src_test
314 +}
315 +
316 +src_install() {
317 + cmake-utils_src_install
318 +
319 + # Prevents crashes on PaX systems, bug #522808
320 + use jit && pax-mark m "${ED}usr/bin/jsc" "${ED}usr/libexec/webkit2gtk-4.0/WebKitWebProcess"
321 + pax-mark m "${ED}usr/libexec/webkit2gtk-4.0/WebKitPluginProcess"
322 + use nsplugin && pax-mark m "${ED}usr/libexec/webkit2gtk-4.0/WebKitPluginProcess"2
323 +}