Gentoo Archives: gentoo-commits

From: "Gilles Dartiguelongue (eva)" <eva@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-libs/webkit-gtk: webkit-gtk-2.4.1.ebuild ChangeLog webkit-gtk-2.4.1-r200.ebuild
Date: Sun, 27 Apr 2014 18:26:56
Message-Id: 20140427182653.989382004C@flycatcher.gentoo.org
1 eva 14/04/27 18:26:53
2
3 Modified: ChangeLog
4 Added: webkit-gtk-2.4.1.ebuild
5 webkit-gtk-2.4.1-r200.ebuild
6 Log:
7 Version bump for Gnome 3.12. Move some things from src_prepare to a more relevant phase. Upstream changed the way gdk-backends are enabled to match gtk+ and clutter which allows us to support multiple backends at the same time. Make sure we at least get one. Prevent alteration of user CFLAGS.
8
9 (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key C6085806)
10
11 Revision Changes Path
12 1.265 net-libs/webkit-gtk/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/webkit-gtk/ChangeLog?rev=1.265&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/webkit-gtk/ChangeLog?rev=1.265&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/webkit-gtk/ChangeLog?r1=1.264&r2=1.265
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/net-libs/webkit-gtk/ChangeLog,v
21 retrieving revision 1.264
22 retrieving revision 1.265
23 diff -u -r1.264 -r1.265
24 --- ChangeLog 27 Apr 2014 08:45:59 -0000 1.264
25 +++ ChangeLog 27 Apr 2014 18:26:53 -0000 1.265
26 @@ -1,6 +1,16 @@
27 # ChangeLog for net-libs/webkit-gtk
28 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/net-libs/webkit-gtk/ChangeLog,v 1.264 2014/04/27 08:45:59 pacho Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/net-libs/webkit-gtk/ChangeLog,v 1.265 2014/04/27 18:26:53 eva Exp $
31 +
32 +*webkit-gtk-2.4.1-r200 (27 Apr 2014)
33 +*webkit-gtk-2.4.1 (27 Apr 2014)
34 +
35 + 27 Apr 2014; Gilles Dartiguelongue <eva@g.o> +webkit-gtk-2.4.1.ebuild,
36 + +webkit-gtk-2.4.1-r200.ebuild, +files/webkit-gtk-2.4.1-ia64-malloc.patch:
37 + Version bump for Gnome 3.12. Move some things from src_prepare to a more
38 + relevant phase. Upstream changed the way gdk-backends are enabled to match
39 + gtk+ and clutter which allows us to support multiple backends at the same
40 + time. Make sure we at least get one. Prevent alteration of user CFLAGS.
41
42 27 Apr 2014; Pacho Ramos <pacho@g.o>
43 -files/webkit-gtk-1.10.1-disable-backtrace-uclibc.patch,
44
45
46
47 1.1 net-libs/webkit-gtk/webkit-gtk-2.4.1.ebuild
48
49 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/webkit-gtk/webkit-gtk-2.4.1.ebuild?rev=1.1&view=markup
50 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/webkit-gtk/webkit-gtk-2.4.1.ebuild?rev=1.1&content-type=text/plain
51
52 Index: webkit-gtk-2.4.1.ebuild
53 ===================================================================
54 # Copyright 1999-2014 Gentoo Foundation
55 # Distributed under the terms of the GNU General Public License v2
56 # $Header: /var/cvsroot/gentoo-x86/net-libs/webkit-gtk/webkit-gtk-2.4.1.ebuild,v 1.1 2014/04/27 18:26:53 eva Exp $
57
58 EAPI="5"
59 GCONF_DEBUG="no"
60 PYTHON_COMPAT=( python{2_6,2_7} )
61
62 inherit autotools check-reqs eutils flag-o-matic gnome2 pax-utils python-any-r1 toolchain-funcs versionator virtualx
63
64 MY_P="webkitgtk-${PV}"
65 DESCRIPTION="Open source web browser engine"
66 HOMEPAGE="http://www.webkitgtk.org/"
67 SRC_URI="http://www.webkitgtk.org/releases/${MY_P}.tar.xz"
68
69 LICENSE="LGPL-2+ BSD"
70 SLOT="3/25" # soname version of libwebkit2gtk-3.0
71 KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~x86-macos"
72 IUSE="aqua coverage debug +egl +geoloc gles2 +gstreamer +introspection +jit libsecret +opengl spell wayland +webgl +X"
73 # bugs 372493, 416331
74 REQUIRED_USE="
75 geoloc? ( introspection )
76 introspection? ( gstreamer )
77 gles2? ( egl )
78 webgl? ( ^^ ( gles2 opengl ) )
79 !webgl? ( ?? ( gles2 opengl ) )
80 || ( aqua wayland X )
81 "
82
83 # use sqlite, svg by default
84 # Aqua support in gtk3 is untested
85 # gtk2 is needed for plugin process support
86 # gtk3-3.10 required for wayland
87 RDEPEND="
88 dev-libs/libxml2:2
89 dev-libs/libxslt
90 media-libs/harfbuzz:=[icu(+)]
91 media-libs/libwebp:=
92 virtual/jpeg:0=
93 >=media-libs/libpng-1.4:0=
94 >=x11-libs/cairo-1.10:=[X]
95 >=dev-libs/glib-2.36.0:2
96 >=x11-libs/gtk+-3.6.0:3[aqua=,introspection?]
97 >=dev-libs/icu-3.8.1-r1:=
98 >=net-libs/libsoup-2.42.0:2.4[introspection?]
99 dev-db/sqlite:3=
100 >=x11-libs/pango-1.30.0.0
101 x11-libs/libXrender
102 x11-libs/libXt
103 >=x11-libs/gtk+-2.24.10:2
104
105 egl? ( media-libs/mesa[egl] )
106 geoloc? ( >=app-misc/geoclue-2.1.5:2.0 )
107 gles2? ( media-libs/mesa[gles2] )
108 gstreamer? (
109 >=media-libs/gstreamer-1.2:1.0
110 >=media-libs/gst-plugins-base-1.2:1.0 )
111 introspection? ( >=dev-libs/gobject-introspection-1.32.0 )
112 libsecret? ( app-crypt/libsecret )
113 opengl? ( virtual/opengl )
114 spell? ( >=app-text/enchant-0.22:= )
115 wayland? ( >=x11-libs/gtk+-3.10:3[wayland] )
116 webgl? (
117 x11-libs/cairo[opengl]
118 x11-libs/libXcomposite
119 x11-libs/libXdamage )
120 "
121
122 # paxctl needed for bug #407085
123 # Need real bison, not yacc
124 DEPEND="${RDEPEND}
125 ${PYTHON_DEPS}
126 dev-lang/perl
127 || (
128 virtual/rubygems[ruby_targets_ruby20]
129 virtual/rubygems[ruby_targets_ruby21]
130 virtual/rubygems[ruby_targets_ruby19]
131 )
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
136 >=sys-devel/bison-2.4.3
137 >=sys-devel/flex-2.5.33
138 || ( >=sys-devel/gcc-4.7 >=sys-devel/clang-3.3 )
139 sys-devel/gettext
140 >=sys-devel/make-3.82-r4
141 virtual/pkgconfig
142
143 introspection? ( jit? ( sys-apps/paxctl ) )
144 test? (
145 dev-lang/python:2.7
146 dev-python/pygobject:3[python_targets_python2_7]
147 x11-themes/hicolor-icon-theme
148 jit? ( sys-apps/paxctl ) )
149 "
150
151 S="${WORKDIR}/${MY_P}"
152
153 CHECKREQS_DISK_BUILD="18G" # and even this might not be enough, bug #417307
154
155 pkg_pretend() {
156 if [[ ${MERGE_TYPE} != "binary" ]] && is-flagq "-g*" && ! is-flagq "-g*0" ; then
157 einfo "Checking for sufficient disk space to build ${PN} with debugging CFLAGS"
158 check-reqs_pkg_pretend
159 fi
160
161 if ! test-flag-CXX -std=c++11; then
162 die "You need at least GCC 4.7.x or Clang >= 3.3 for C++11-specific compiler flags"
163 fi
164 }
165
166 pkg_setup() {
167 # Check whether any of the debugging flags is enabled
168 if [[ ${MERGE_TYPE} != "binary" ]] && is-flagq "-g*" && ! is-flagq "-g*0" ; then
169 if is-flagq "-ggdb" && [[ ${WEBKIT_GTK_GGDB} != "yes" ]]; then
170 replace-flags -ggdb -g
171 ewarn "Replacing \"-ggdb\" with \"-g\" in your CFLAGS."
172 ewarn "Building ${PN} with \"-ggdb\" produces binaries which are too"
173 ewarn "large for current binutils releases (bug #432784) and has very"
174 ewarn "high temporary build space and memory requirements."
175 ewarn "If you really want to build ${PN} with \"-ggdb\", add"
176 ewarn "WEBKIT_GTK_GGDB=yes"
177 ewarn "to your make.conf file."
178 fi
179 einfo "You need to have at least 18GB of temporary build space available"
180 einfo "to build ${PN} with debugging CFLAGS. Note that it might still"
181 einfo "not be enough, as the total space requirements depend on the flags"
182 einfo "(-ggdb vs -g1) and enabled features."
183 check-reqs_pkg_setup
184 fi
185
186 [[ ${MERGE_TYPE} = "binary" ]] || python-any-r1_pkg_setup
187 }
188
189 src_prepare() {
190 # intermediate MacPorts hack while upstream bug is not fixed properly
191 # https://bugs.webkit.org/show_bug.cgi?id=28727
192 use aqua && epatch "${FILESDIR}"/${PN}-1.6.1-darwin-quartz.patch
193
194 # Leave optimization level to user CFLAGS
195 # FORTIFY_SOURCE is enabled by default in Gentoo
196 sed -e 's/-O[012]//g' \
197 -e 's/-D_FORTIFY_SOURCE=2//g' \
198 -i Source/autotools/SetupCompilerFlags.m4 || die
199
200 # Failing tests
201 # * webinspector -> https://bugs.webkit.org/show_bug.cgi?id=50744
202 # * keyevents is interactive
203 # * mimehandling test sometimes fails under Xvfb (works fine manually), bug #???
204 # * webdatasource test needs a network connection and intermittently fails with icedtea-web
205 # * webplugindatabase intermittently fails with icedtea-web, bug #????
206 sed -e '/Programs\/TestWebKitAPI\/WebKitGtk\/testwebinspector/ d' \
207 -e '/Programs\/TestWebKitAPI\/WebKitGtk\/testkeyevents/ d' \
208 -e '/Programs\/TestWebKitAPI\/WebKitGtk\/testmimehandling/ d' \
209 -e '/Programs\/TestWebKitAPI\/WebKitGtk\/testwebdatasource/ d' \
210 -e '/Programs\/TestWebKitAPI\/WebKitGtk\/testwebplugindatabase/ d' \
211 -i Tools/TestWebKitAPI/GNUmakefile.am || die
212
213 # bug #459978, upstream bug #113397
214 epatch "${FILESDIR}/${PN}-1.11.90-gtk-docize-fix.patch"
215
216 # Do not build unittests unless requested, upstream bug #128163
217 epatch "${FILESDIR}"/${PN}-2.2.4-unittests-build.patch
218
219 # Deadlock causing infinite compilations with nvidia-drivers:
220 # https://bugs.gentoo.org/show_bug.cgi?id=463960
221 # http://osdyson.org/issues/161
222 # https://bugs.webkit.org/show_bug.cgi?id=125651
223 epatch "${FILESDIR}"/${PN}-2.2.5-gir-nvidia-hangs.patch
224
225 # Debian patches to fix support for some arches
226 # https://bugs.webkit.org/show_bug.cgi?id=129540
227 epatch "${FILESDIR}"/${PN}-2.2.5-{hppa,ia64}-platform.patch
228 # https://bugs.webkit.org/show_bug.cgi?id=129542
229 epatch "${FILESDIR}"/${PN}-2.4.1-ia64-malloc.patch
230
231 AT_M4DIR=Source/autotools eautoreconf
232
233 gnome2_src_prepare
234 }
235
236 src_configure() {
237 # Respect CC, otherwise fails on prefix #395875
238 tc-export CC
239
240 # Arches without JIT support also need this to really disable it in all places
241 use jit || append-cppflags -DENABLE_JIT=0 -DENABLE_YARR_JIT=0 -DENABLE_ASSEMBLER=0
242
243 # It doesn't compile on alpha without this in LDFLAGS, bug #???
244 use alpha && append-ldflags "-Wl,--no-relax"
245
246 # Sigbuses on SPARC with mcpu and co., bug #???
247 use sparc && filter-flags "-mvis"
248
249 # https://bugs.webkit.org/show_bug.cgi?id=42070 , #301634
250 use ppc64 && append-flags "-mminimal-toc"
251
252 # Try to use less memory, bug #469942 (see Fedora .spec for reference)
253 # --no-keep-memory doesn't work on ia64, bug #502492
254 if ! use ia64; then
255 append-ldflags "-Wl,--no-keep-memory"
256 fi
257 if ! $(tc-getLD) --version | grep -q "GNU gold"; then
258 append-ldflags "-Wl,--reduce-memory-overheads"
259 fi
260
261 local myconf=""
262
263 if has_version "virtual/rubygems[ruby_targets_ruby21]"; then
264 myconf="${myconf} RUBY=$(type -P ruby21)"
265 elif has_version "virtual/rubygems[ruby_targets_ruby20]"; then
266 myconf="${myconf} RUBY=$(type -P ruby20)"
267 else
268 myconf="${myconf} RUBY=$(type -P ruby19)"
269 fi
270
271 # TODO: Check Web Audio support
272 # should somehow let user select between them?
273 #
274 # * Aqua support in gtk3 is untested
275 # * dependency-tracking is required so parallel builds won't fail
276 gnome2_src_configure \
277 $(use_enable aqua quartz-target) \
278 $(use_enable coverage) \
279 $(use_enable debug) \
280 $(use_enable egl) \
281 $(use_enable geoloc geolocation) \
282 $(use_enable gles2) \
283 $(use_enable gstreamer video) \
284 $(use_enable gstreamer web-audio) \
285 $(use_enable introspection) \
286 $(use_enable jit) \
287 $(use_enable libsecret credential_storage) \
288 $(use_enable opengl glx) \
289 $(use_enable spell spellcheck) \
290 $(use_enable webgl) \
291 $(use_enable webgl accelerated-compositing) \
292 $(use_enable wayland wayland-target) \
293 $(use_enable X x11-target) \
294 --with-gtk=3.0 \
295 --enable-dependency-tracking \
296 --disable-gtk-doc \
297 ${myconf}
298 }
299
300 src_test() {
301 # Tests expect an out-of-source build in WebKitBuild
302 ln -s . WebKitBuild || die "ln failed"
303
304 # Prevents test failures on PaX systems
305 use jit && pax-mark m $(list-paxables Programs/*[Tt]ests/*) # Programs/unittests/.libs/test*
306
307 unset DISPLAY
308 # Tests need virtualx, bug #294691, bug #310695
309 # Parallel tests sometimes fail
310 Xemake -j1 check
311 }
312
313 src_install() {
314 DOCS="ChangeLog NEWS" # other ChangeLog files handled by src_install
315
316 # https://bugs.webkit.org/show_bug.cgi?id=129242
317 MAKEOPTS="${MAKEOPTS} -j1" gnome2_src_install
318
319 newdoc Source/WebKit/gtk/ChangeLog ChangeLog.gtk
320 newdoc Source/JavaScriptCore/ChangeLog ChangeLog.JavaScriptCore
321 newdoc Source/WebCore/ChangeLog ChangeLog.WebCore
322
323 # Prevents crashes on PaX systems
324 use jit && pax-mark m "${ED}usr/bin/jsc-3"
325 }
326
327
328
329 1.1 net-libs/webkit-gtk/webkit-gtk-2.4.1-r200.ebuild
330
331 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/webkit-gtk/webkit-gtk-2.4.1-r200.ebuild?rev=1.1&view=markup
332 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/webkit-gtk/webkit-gtk-2.4.1-r200.ebuild?rev=1.1&content-type=text/plain
333
334 Index: webkit-gtk-2.4.1-r200.ebuild
335 ===================================================================
336 # Copyright 1999-2014 Gentoo Foundation
337 # Distributed under the terms of the GNU General Public License v2
338 # $Header: /var/cvsroot/gentoo-x86/net-libs/webkit-gtk/webkit-gtk-2.4.1-r200.ebuild,v 1.1 2014/04/27 18:26:53 eva Exp $
339
340 EAPI="5"
341 GCONF_DEBUG="no"
342 PYTHON_COMPAT=( python{2_6,2_7} )
343
344 inherit autotools check-reqs eutils flag-o-matic gnome2 pax-utils python-any-r1 toolchain-funcs versionator virtualx
345
346 MY_P="webkitgtk-${PV}"
347 DESCRIPTION="Open source web browser engine"
348 HOMEPAGE="http://www.webkitgtk.org/"
349 SRC_URI="http://www.webkitgtk.org/releases/${MY_P}.tar.xz"
350
351 LICENSE="LGPL-2+ BSD"
352 SLOT="2" # no usable subslot
353 KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~x86-macos"
354 IUSE="aqua coverage debug +egl +geoloc gles2 +gstreamer +introspection +jit libsecret +opengl spell +webgl +X"
355 # bugs 372493, 416331
356 REQUIRED_USE="
357 geoloc? ( introspection )
358 introspection? ( gstreamer )
359 gles2? ( egl )
360 webgl? ( ^^ ( gles2 opengl ) )
361 !webgl? ( ?? ( gles2 opengl ) )
362 || ( aqua X )
363 "
364
365 # use sqlite, svg by default
366 RDEPEND="
367 dev-libs/libxml2:2
368 dev-libs/libxslt
369 media-libs/harfbuzz:=[icu(+)]
370 media-libs/libwebp:=
371 virtual/jpeg:0=
372 >=media-libs/libpng-1.4:0=
373 >=x11-libs/cairo-1.10:=[X]
374 >=dev-libs/glib-2.36.0:2
375 >=dev-libs/icu-3.8.1-r1:=
376 >=net-libs/libsoup-2.42.0:2.4[introspection?]
377 dev-db/sqlite:3=
378 >=x11-libs/pango-1.30.0.0
379 x11-libs/libXrender
380 x11-libs/libXt
381 >=x11-libs/gtk+-2.24.10:2
382
383 egl? ( media-libs/mesa[egl] )
384 geoloc? ( >=app-misc/geoclue-2.1.5:2.0 )
385 gles2? ( media-libs/mesa[gles2] )
386 gstreamer? (
387 >=media-libs/gstreamer-1.2:1.0
388 >=media-libs/gst-plugins-base-1.2:1.0 )
389 introspection? ( >=dev-libs/gobject-introspection-1.32.0 )
390 libsecret? ( app-crypt/libsecret )
391 opengl? ( virtual/opengl )
392 spell? ( >=app-text/enchant-0.22:= )
393 webgl? (
394 x11-libs/cairo[opengl]
395 x11-libs/libXcomposite
396 x11-libs/libXdamage )
397 "
398
399 # paxctl needed for bug #407085
400 # Need real bison, not yacc
401 DEPEND="${RDEPEND}
402 ${PYTHON_DEPS}
403 dev-lang/perl
404 || (
405 virtual/rubygems[ruby_targets_ruby20]
406 virtual/rubygems[ruby_targets_ruby21]
407 virtual/rubygems[ruby_targets_ruby19]
408 )
409 >=dev-libs/atk-2.8.0
410 >=dev-util/gtk-doc-am-1.10
411 dev-util/gperf
412 >=sys-devel/bison-2.4.3
413 >=sys-devel/flex-2.5.33
414 || ( >=sys-devel/gcc-4.7 >=sys-devel/clang-3.3 )
415 sys-devel/gettext
416 >=sys-devel/make-3.82-r4
417 virtual/pkgconfig
418
419 introspection? ( jit? ( sys-apps/paxctl ) )
420 test? (
421 dev-lang/python:2.7
422 dev-python/pygobject:3[python_targets_python2_7]
423 x11-themes/hicolor-icon-theme
424 jit? ( sys-apps/paxctl ) )
425 "
426
427 S="${WORKDIR}/${MY_P}"
428
429 CHECKREQS_DISK_BUILD="18G" # and even this might not be enough, bug #417307
430
431 pkg_pretend() {
432 if [[ ${MERGE_TYPE} != "binary" ]] && is-flagq "-g*" && ! is-flagq "-g*0" ; then
433 einfo "Checking for sufficient disk space to build ${PN} with debugging CFLAGS"
434 check-reqs_pkg_pretend
435 fi
436
437 if ! test-flag-CXX -std=c++11; then
438 die "You need at least GCC 4.7.x or Clang >= 3.3 for C++11-specific compiler flags"
439 fi
440 }
441
442 pkg_setup() {
443 # Check whether any of the debugging flags is enabled
444 if [[ ${MERGE_TYPE} != "binary" ]] && is-flagq "-g*" && ! is-flagq "-g*0" ; then
445 if is-flagq "-ggdb" && [[ ${WEBKIT_GTK_GGDB} != "yes" ]]; then
446 replace-flags -ggdb -g
447 ewarn "Replacing \"-ggdb\" with \"-g\" in your CFLAGS."
448 ewarn "Building ${PN} with \"-ggdb\" produces binaries which are too"
449 ewarn "large for current binutils releases (bug #432784) and has very"
450 ewarn "high temporary build space and memory requirements."
451 ewarn "If you really want to build ${PN} with \"-ggdb\", add"
452 ewarn "WEBKIT_GTK_GGDB=yes"
453 ewarn "to your make.conf file."
454 fi
455 einfo "You need to have at least 18GB of temporary build space available"
456 einfo "to build ${PN} with debugging CFLAGS. Note that it might still"
457 einfo "not be enough, as the total space requirements depend on the flags"
458 einfo "(-ggdb vs -g1) and enabled features."
459 check-reqs_pkg_setup
460 fi
461
462 [[ ${MERGE_TYPE} = "binary" ]] || python-any-r1_pkg_setup
463 }
464
465 src_prepare() {
466 # intermediate MacPorts hack while upstream bug is not fixed properly
467 # https://bugs.webkit.org/show_bug.cgi?id=28727
468 use aqua && epatch "${FILESDIR}"/${PN}-1.6.1-darwin-quartz.patch
469
470 # Leave optimization level to user CFLAGS
471 # FORTIFY_SOURCE is enabled by default in Gentoo
472 sed -e 's/-O[012]//g' \
473 -e 's/-D_FORTIFY_SOURCE=2//g' \
474 -i Source/autotools/SetupCompilerFlags.m4 || die
475
476 # Failing tests
477 # * webinspector -> https://bugs.webkit.org/show_bug.cgi?id=50744
478 # * keyevents is interactive
479 # * mimehandling test sometimes fails under Xvfb (works fine manually), bug #???
480 # * webdatasource test needs a network connection and intermittently fails with icedtea-web
481 # * webplugindatabase intermittently fails with icedtea-web, bug #????
482 sed -e '/Programs\/TestWebKitAPI\/WebKitGtk\/testwebinspector/ d' \
483 -e '/Programs\/TestWebKitAPI\/WebKitGtk\/testkeyevents/ d' \
484 -e '/Programs\/TestWebKitAPI\/WebKitGtk\/testmimehandling/ d' \
485 -e '/Programs\/TestWebKitAPI\/WebKitGtk\/testwebdatasource/ d' \
486 -e '/Programs\/TestWebKitAPI\/WebKitGtk\/testwebplugindatabase/ d' \
487 -i Tools/TestWebKitAPI/GNUmakefile.am || die
488
489 # bug #459978, upstream bug #113397
490 epatch "${FILESDIR}/${PN}-1.11.90-gtk-docize-fix.patch"
491
492 # Do not build unittests unless requested, upstream bug #128163
493 epatch "${FILESDIR}"/${PN}-2.2.4-unittests-build.patch
494
495 # Deadlock causing infinite compilations with nvidia-drivers:
496 # https://bugs.gentoo.org/show_bug.cgi?id=463960
497 # http://osdyson.org/issues/161
498 # https://bugs.webkit.org/show_bug.cgi?id=125651
499 epatch "${FILESDIR}"/${PN}-2.2.5-gir-nvidia-hangs.patch
500
501 # Debian patches to fix support for some arches
502 # https://bugs.webkit.org/show_bug.cgi?id=129540
503 epatch "${FILESDIR}"/${PN}-2.2.5-{hppa,ia64}-platform.patch
504 # https://bugs.webkit.org/show_bug.cgi?id=129542
505 epatch "${FILESDIR}"/${PN}-2.4.1-ia64-malloc.patch
506
507 AT_M4DIR=Source/autotools eautoreconf
508
509 gnome2_src_prepare
510 }
511
512 src_configure() {
513 # Respect CC, otherwise fails on prefix #395875
514 tc-export CC
515
516 # Arches without JIT support also need this to really disable it in all places
517 use jit || append-cppflags -DENABLE_JIT=0 -DENABLE_YARR_JIT=0 -DENABLE_ASSEMBLER=0
518
519 # It doesn't compile on alpha without this in LDFLAGS, bug #???
520 use alpha && append-ldflags "-Wl,--no-relax"
521
522 # Sigbuses on SPARC with mcpu and co., bug #???
523 use sparc && filter-flags "-mvis"
524
525 # https://bugs.webkit.org/show_bug.cgi?id=42070 , #301634
526 use ppc64 && append-flags "-mminimal-toc"
527
528 # Try to use less memory, bug #469942 (see Fedora .spec for reference)
529 # --no-keep-memory doesn't work on ia64, bug #502492
530 if ! use ia64; then
531 append-ldflags "-Wl,--no-keep-memory"
532 fi
533 if ! $(tc-getLD) --version | grep -q "GNU gold"; then
534 append-ldflags "-Wl,--reduce-memory-overheads"
535 fi
536
537 local myconf=""
538
539 if has_version "virtual/rubygems[ruby_targets_ruby21]"; then
540 myconf="${myconf} RUBY=$(type -P ruby21)"
541 elif has_version "virtual/rubygems[ruby_targets_ruby20]"; then
542 myconf="${myconf} RUBY=$(type -P ruby20)"
543 else
544 myconf="${myconf} RUBY=$(type -P ruby19)"
545 fi
546
547 # TODO: Check Web Audio support
548 # should somehow let user select between them?
549 #
550 # * dependency-tracking is required so parallel builds won't fail
551 gnome2_src_configure \
552 $(use_enable aqua quartz-target) \
553 $(use_enable coverage) \
554 $(use_enable debug) \
555 $(use_enable egl) \
556 $(use_enable geoloc geolocation) \
557 $(use_enable gles2) \
558 $(use_enable gstreamer video) \
559 $(use_enable gstreamer web-audio) \
560 $(use_enable introspection) \
561 $(use_enable jit) \
562 $(use_enable libsecret credential_storage) \
563 $(use_enable opengl glx) \
564 $(use_enable spell spellcheck) \
565 $(use_enable webgl) \
566 $(use_enable webgl accelerated-compositing) \
567 $(use_enable X x11-target) \
568 --with-gtk=2.0 \
569 --disable-webkit2 \
570 --enable-dependency-tracking \
571 --disable-gtk-doc \
572 ${myconf}
573 }
574
575 src_test() {
576 # Tests expect an out-of-source build in WebKitBuild
577 ln -s . WebKitBuild || die "ln failed"
578
579 # Prevents test failures on PaX systems
580 use jit && pax-mark m $(list-paxables Programs/*[Tt]ests/*) # Programs/unittests/.libs/test*
581
582 unset DISPLAY
583 # Tests need virtualx, bug #294691, bug #310695
584 # Parallel tests sometimes fail
585 Xemake -j1 check
586 }
587
588 src_install() {
589 DOCS="ChangeLog NEWS" # other ChangeLog files handled by src_install
590
591 # https://bugs.webkit.org/show_bug.cgi?id=129242
592 MAKEOPTS="${MAKEOPTS} -j1" gnome2_src_install
593
594 newdoc Source/WebKit/gtk/ChangeLog ChangeLog.gtk
595 newdoc Source/JavaScriptCore/ChangeLog ChangeLog.JavaScriptCore
596 newdoc Source/WebCore/ChangeLog ChangeLog.WebCore
597
598 # Prevents crashes on PaX systems
599 use jit && pax-mark m "${ED}usr/bin/jsc-1"
600
601 # File collisions with slot 3
602 # bug #402699, https://bugs.webkit.org/show_bug.cgi?id=78134
603 rm -rf "${ED}usr/share/gtk-doc" || die
604 }