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