/[gentoo-x86]/net-libs/webkit-gtk/webkit-gtk-2.2.6.ebuild
Gentoo

Contents of /net-libs/webkit-gtk/webkit-gtk-2.2.6.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Mon Apr 21 10:30:20 2014 UTC (3 months, 4 weeks ago) by ago
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +2 -2 lines
Stable for arm, wrt bug #507568

(Portage version: 2.2.8-r1/cvs/Linux x86_64, RepoMan options: --force, signed Manifest commit with key 7194459F)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-libs/webkit-gtk/webkit-gtk-2.2.6.ebuild,v 1.8 2014/04/20 08:49:46 ago Exp $
4
5 EAPI="5"
6 PYTHON_COMPAT=( python{2_6,2_7} )
7 GCONF_DEBUG="no"
8
9 inherit autotools check-reqs eutils flag-o-matic gnome2 pax-utils python-any-r1 toolchain-funcs versionator virtualx
10
11 MY_P="webkitgtk-${PV}"
12 DESCRIPTION="Open source web browser engine"
13 HOMEPAGE="http://www.webkitgtk.org/"
14 SRC_URI="http://www.webkitgtk.org/releases/${MY_P}.tar.xz"
15
16 LICENSE="LGPL-2+ BSD"
17 SLOT="3/29" # soname version
18 KEYWORDS="alpha amd64 arm ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~x86-macos"
19 IUSE="aqua coverage debug +egl +geoloc gles2 +gstreamer +introspection +jit libsecret +opengl spell +webgl"
20 # bugs 372493, 416331
21 REQUIRED_USE="
22 geoloc? ( introspection )
23 introspection? ( gstreamer )
24 gles2? ( egl )
25 webgl? ( ^^ ( gles2 opengl ) )
26 !webgl? ( ?? ( gles2 opengl ) )
27 "
28
29 # use sqlite, svg by default
30 # Aqua support in gtk3 is untested
31 # gtk2 is needed for plugin process support
32 # gtk3-3.10 required for wayland
33 RDEPEND="
34 dev-libs/libxml2:2
35 dev-libs/libxslt
36 media-libs/harfbuzz:=[icu(+)]
37 media-libs/libwebp:=
38 virtual/jpeg:0=
39 >=media-libs/libpng-1.4:0=
40 >=x11-libs/cairo-1.10:=[X]
41 >=dev-libs/glib-2.36.0:2
42 >=x11-libs/gtk+-3.6.0:3[aqua=,introspection?]
43 >=dev-libs/icu-3.8.1-r1:=
44 >=net-libs/libsoup-2.42.0:2.4[introspection?]
45 dev-db/sqlite:3=
46 >=x11-libs/pango-1.30.0.0
47 x11-libs/libXrender
48 x11-libs/libXt
49 >=x11-libs/gtk+-2.24.10:2
50
51 egl? ( media-libs/mesa[egl] )
52 geoloc? ( app-misc/geoclue:0 )
53 gles2? ( media-libs/mesa[gles2] )
54 gstreamer? (
55 >=media-libs/gstreamer-1.2:1.0
56 >=media-libs/gst-plugins-base-1.2:1.0 )
57 introspection? ( >=dev-libs/gobject-introspection-1.32.0 )
58 libsecret? ( app-crypt/libsecret )
59 opengl? ( virtual/opengl )
60 spell? ( >=app-text/enchant-0.22:= )
61 webgl? (
62 x11-libs/cairo[opengl]
63 x11-libs/libXcomposite
64 x11-libs/libXdamage )
65 "
66
67 # paxctl needed for bug #407085
68 # Need real bison, not yacc
69 DEPEND="${RDEPEND}
70 ${PYTHON_DEPS}
71 dev-lang/perl
72 || (
73 virtual/rubygems[ruby_targets_ruby20]
74 virtual/rubygems[ruby_targets_ruby21]
75 virtual/rubygems[ruby_targets_ruby19]
76 )
77 >=app-accessibility/at-spi2-core-2.5.3
78 >=dev-libs/atk-2.8.0
79 >=dev-util/gtk-doc-am-1.10
80 dev-util/gperf
81 >=sys-devel/bison-2.4.3
82 >=sys-devel/flex-2.5.33
83 || ( >=sys-devel/gcc-4.7 >=sys-devel/clang-3.0 )
84 sys-devel/gettext
85 >=sys-devel/make-3.82-r4
86 virtual/pkgconfig
87
88 introspection? ( jit? ( sys-apps/paxctl ) )
89 test? (
90 dev-lang/python:2.7
91 dev-python/pygobject:3[python_targets_python2_7]
92 x11-themes/hicolor-icon-theme
93 jit? ( sys-apps/paxctl ) )
94 "
95
96 S="${WORKDIR}/${MY_P}"
97
98 CHECKREQS_DISK_BUILD="18G" # and even this might not be enough, bug #417307
99
100 pkg_pretend() {
101 if [[ ${MERGE_TYPE} != "binary" ]] && is-flagq "-g*" && ! is-flagq "-g*0" ; then
102 einfo "Checking for sufficient disk space to build ${PN} with debugging CFLAGS"
103 check-reqs_pkg_pretend
104 fi
105
106 if ! test-flag-CXX -std=c++11; then
107 die "You need at least GCC 4.7.x or Clang >= 3.0 for C++11-specific compiler flags"
108 fi
109 }
110
111 pkg_setup() {
112 # Check whether any of the debugging flags is enabled
113 if [[ ${MERGE_TYPE} != "binary" ]] && is-flagq "-g*" && ! is-flagq "-g*0" ; then
114 if is-flagq "-ggdb" && [[ ${WEBKIT_GTK_GGDB} != "yes" ]]; then
115 replace-flags -ggdb -g
116 ewarn "Replacing \"-ggdb\" with \"-g\" in your CFLAGS."
117 ewarn "Building ${PN} with \"-ggdb\" produces binaries which are too"
118 ewarn "large for current binutils releases (bug #432784) and has very"
119 ewarn "high temporary build space and memory requirements."
120 ewarn "If you really want to build ${PN} with \"-ggdb\", add"
121 ewarn "WEBKIT_GTK_GGDB=yes"
122 ewarn "to your make.conf file."
123 fi
124 einfo "You need to have at least 18GB of temporary build space available"
125 einfo "to build ${PN} with debugging CFLAGS. Note that it might still"
126 einfo "not be enough, as the total space requirements depend on the flags"
127 einfo "(-ggdb vs -g1) and enabled features."
128 check-reqs_pkg_setup
129 fi
130
131 [[ ${MERGE_TYPE} = "binary" ]] || python-any-r1_pkg_setup
132 }
133
134 src_prepare() {
135 DOCS="ChangeLog NEWS" # other ChangeLog files handled by src_install
136
137 # intermediate MacPorts hack while upstream bug is not fixed properly
138 # https://bugs.webkit.org/show_bug.cgi?id=28727
139 use aqua && epatch "${FILESDIR}"/${PN}-1.6.1-darwin-quartz.patch
140
141 # Don't force -O2
142 sed -i 's/-O2//g' "${S}"/Source/autotools/SetupCompilerFlags.m4 || die
143
144 # Failing tests
145 # * webinspector -> https://bugs.webkit.org/show_bug.cgi?id=50744
146 # * keyevents is interactive
147 # * mimehandling test sometimes fails under Xvfb (works fine manually), bug #???
148 # * webdatasource test needs a network connection and intermittently fails with icedtea-web
149 # * webplugindatabase intermittently fails with icedtea-web, bug #????
150 sed -e '/Programs\/TestWebKitAPI\/WebKitGtk\/testwebinspector/ d' \
151 -e '/Programs\/TestWebKitAPI\/WebKitGtk\/testkeyevents/ d' \
152 -e '/Programs\/TestWebKitAPI\/WebKitGtk\/testmimehandling/ d' \
153 -e '/Programs\/TestWebKitAPI\/WebKitGtk\/testwebdatasource/ d' \
154 -e '/Programs\/TestWebKitAPI\/WebKitGtk\/testwebplugindatabase/ d' \
155 -i Source/WebKit/gtk/GNUmakefile.am || die
156
157 # Respect CC, otherwise fails on prefix #395875
158 tc-export CC
159
160 # bug #459978, upstream bug #113397
161 epatch "${FILESDIR}/${PN}-1.11.90-gtk-docize-fix.patch"
162
163 # Do not build unittests unless requested, upstream bug #128163
164 epatch "${FILESDIR}"/${PN}-2.2.4-unittests-build.patch
165
166 # Deadlock causing infinite compilations with nvidia-drivers:
167 # https://bugs.gentoo.org/show_bug.cgi?id=463960
168 # http://osdyson.org/issues/161
169 # https://bugs.webkit.org/show_bug.cgi?id=125651
170 epatch "${FILESDIR}"/${PN}-2.2.5-gir-nvidia-hangs.patch
171
172 # Debian patches to fix support for some arches
173 # https://bugs.webkit.org/show_bug.cgi?id=129540
174 epatch "${FILESDIR}"/${PN}-2.2.5-{hppa,ia64}-platform.patch
175 # https://bugs.webkit.org/show_bug.cgi?id=129542
176 epatch "${FILESDIR}"/${PN}-2.2.5-ia64-malloc.patch
177
178 # OpenBSD patches to fix support for some arches
179 # https://bugs.webkit.org/show_bug.cgi?id=86835
180 epatch "${FILESDIR}"/${PN}-2.2.5-sparc64-build.patch
181
182 AT_M4DIR=Source/autotools eautoreconf
183
184 gnome2_src_prepare
185 }
186
187 src_configure() {
188 # Arches without JIT support also need this to really disable it in all places
189 use jit || append-cppflags -DENABLE_JIT=0 -DENABLE_YARR_JIT=0 -DENABLE_ASSEMBLER=0
190
191 # It doesn't compile on alpha without this in LDFLAGS, bug #???
192 use alpha && append-ldflags "-Wl,--no-relax"
193
194 # Sigbuses on SPARC with mcpu and co., bug #???
195 use sparc && filter-flags "-mvis"
196
197 # https://bugs.webkit.org/show_bug.cgi?id=42070 , #301634
198 use ppc64 && append-flags "-mminimal-toc"
199
200 # Try to use less memory, bug #469942 (see Fedora .spec for reference)
201 # --no-keep-memory doesn't work on ia64, bug #502492
202 if ! use ia64; then
203 append-ldflags "-Wl,--no-keep-memory"
204 fi
205 if ! $(tc-getLD) --version | grep -q "GNU gold"; then
206 append-ldflags "-Wl,--reduce-memory-overheads"
207 fi
208
209 local myconf=""
210
211 if has_version "virtual/rubygems[ruby_targets_ruby21]"; then
212 myconf="${myconf} RUBY=$(type -P ruby21)"
213 elif has_version "virtual/rubygems[ruby_targets_ruby20]"; then
214 myconf="${myconf} RUBY=$(type -P ruby20)"
215 else
216 myconf="${myconf} RUBY=$(type -P ruby19)"
217 fi
218
219 # TODO: Check Web Audio support
220 # should somehow let user select between them?
221 #
222 # * Aqua support in gtk3 is untested
223 # * dependency-tracking is required so parallel builds won't fail
224 gnome2_src_configure \
225 $(use_enable coverage) \
226 $(use_enable debug) \
227 $(use_enable egl) \
228 $(use_enable geoloc geolocation) \
229 $(use_enable gles2) \
230 $(use_enable gstreamer video) \
231 $(use_enable gstreamer web-audio) \
232 $(use_enable introspection) \
233 $(use_enable jit) \
234 $(use_enable libsecret credential_storage) \
235 $(use_enable opengl glx) \
236 $(use_enable spell spellcheck) \
237 $(use_enable webgl) \
238 $(use_enable webgl accelerated-compositing) \
239 --with-gtk=3.0 \
240 --enable-dependency-tracking \
241 --disable-gtk-doc \
242 $(usex aqua "--with-font-backend=pango --with-target=quartz" "")
243 ${myconf}
244 }
245
246 src_test() {
247 # Tests expect an out-of-source build in WebKitBuild
248 ln -s . WebKitBuild || die "ln failed"
249
250 # Prevents test failures on PaX systems
251 use jit && pax-mark m $(list-paxables Programs/*[Tt]ests/*) # Programs/unittests/.libs/test*
252
253 unset DISPLAY
254 # Tests need virtualx, bug #294691, bug #310695
255 # Parallel tests sometimes fail
256 Xemake -j1 check
257 }
258
259 src_install() {
260 # https://bugs.webkit.org/show_bug.cgi?id=129242
261 MAKEOPTS="${MAKEOPTS} -j1" gnome2_src_install
262
263 newdoc Source/WebKit/gtk/ChangeLog ChangeLog.gtk
264 newdoc Source/JavaScriptCore/ChangeLog ChangeLog.JavaScriptCore
265 newdoc Source/WebCore/ChangeLog ChangeLog.WebCore
266
267 # Prevents crashes on PaX systems
268 use jit && pax-mark m "${ED}usr/bin/jsc-3"
269 }

  ViewVC Help
Powered by ViewVC 1.1.20