1 |
commit: efd2dd5d58473438cbed3656d9ad56a1bc57bae8 |
2 |
Author: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Nov 26 09:53:33 2015 +0000 |
4 |
Commit: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Nov 26 10:50:45 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=efd2dd5d |
7 |
|
8 |
net-libs/webkit-gtk: enhance ebuild |
9 |
|
10 |
Raise dependency on gcc per build system information. |
11 |
Make use of toolchain-func to detect gold linker. |
12 |
Make gtk+:2 optional as it is only needed for netspace plugin API. |
13 |
Add missing dependency for properly switching on MPEG-TS support with gstreamer. |
14 |
Add support for quartz backend that has been added in 2.10 series (untested though). |
15 |
|
16 |
Package-Manager: portage-2.2.25 |
17 |
|
18 |
net-libs/webkit-gtk/webkit-gtk-2.10.4-r1.ebuild | 263 ++++++++++++++++++++++++ |
19 |
1 file changed, 263 insertions(+) |
20 |
|
21 |
diff --git a/net-libs/webkit-gtk/webkit-gtk-2.10.4-r1.ebuild b/net-libs/webkit-gtk/webkit-gtk-2.10.4-r1.ebuild |
22 |
new file mode 100644 |
23 |
index 0000000..4cb2101 |
24 |
--- /dev/null |
25 |
+++ b/net-libs/webkit-gtk/webkit-gtk-2.10.4-r1.ebuild |
26 |
@@ -0,0 +1,263 @@ |
27 |
+# Copyright 1999-2015 Gentoo Foundation |
28 |
+# Distributed under the terms of the GNU General Public License v2 |
29 |
+# $Id$ |
30 |
+ |
31 |
+EAPI="5" |
32 |
+CMAKE_MAKEFILE_GENERATOR="ninja" |
33 |
+GCONF_DEBUG="no" |
34 |
+PYTHON_COMPAT=( python2_7 ) |
35 |
+USE_RUBY="ruby19 ruby20 ruby21 ruby22" |
36 |
+ |
37 |
+inherit check-reqs cmake-utils eutils flag-o-matic gnome2 pax-utils python-any-r1 ruby-single toolchain-funcs versionator virtualx |
38 |
+ |
39 |
+MY_P="webkitgtk-${PV}" |
40 |
+DESCRIPTION="Open source web browser engine" |
41 |
+HOMEPAGE="http://www.webkitgtk.org/" |
42 |
+SRC_URI="http://www.webkitgtk.org/releases/${MY_P}.tar.xz" |
43 |
+ |
44 |
+LICENSE="LGPL-2+ BSD" |
45 |
+SLOT="4/37" # soname version of libwebkit2gtk-4.0 |
46 |
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~x86-macos" |
47 |
+ |
48 |
+IUSE="aqua coverage doc +egl +geoloc gles2 gnome-keyring +gstreamer +introspection +jit nsplugin +opengl spell wayland +webgl X" |
49 |
+# seccomp |
50 |
+ |
51 |
+REQUIRED_USE=" |
52 |
+ geoloc? ( introspection ) |
53 |
+ gles2? ( egl ) |
54 |
+ introspection? ( gstreamer ) |
55 |
+ nsplugin? ( X ) |
56 |
+ webgl? ( ^^ ( gles2 opengl ) ) |
57 |
+ !webgl? ( ?? ( gles2 opengl ) ) |
58 |
+ || ( aqua wayland X ) |
59 |
+" |
60 |
+ |
61 |
+# Tests fail to link for inexplicable reasons |
62 |
+# https://bugs.webkit.org/show_bug.cgi?id=148210 |
63 |
+RESTRICT="test" |
64 |
+ |
65 |
+# use sqlite, svg by default |
66 |
+# Aqua support in gtk3 is untested |
67 |
+# gtk2 is needed for plugin process support, should we add a USE flag to configure this? |
68 |
+RDEPEND=" |
69 |
+ dev-db/sqlite:3= |
70 |
+ >=dev-libs/glib-2.36:2 |
71 |
+ >=dev-libs/icu-3.8.1-r1:= |
72 |
+ >=dev-libs/libxml2-2.8:2 |
73 |
+ >=dev-libs/libxslt-1.1.7 |
74 |
+ >=media-libs/fontconfig-2.8:1.0 |
75 |
+ >=media-libs/freetype-2.4.2:2 |
76 |
+ >=media-libs/harfbuzz-0.9.18:=[icu(+)] |
77 |
+ >=media-libs/libpng-1.4:0= |
78 |
+ media-libs/libwebp:= |
79 |
+ >=net-libs/gnutls-3 |
80 |
+ >=net-libs/libsoup-2.42:2.4[introspection?] |
81 |
+ virtual/jpeg:0= |
82 |
+ >=x11-libs/cairo-1.10.2:= |
83 |
+ >=x11-libs/gtk+-3.14:3[introspection?] |
84 |
+ x11-libs/libnotify |
85 |
+ >=x11-libs/pango-1.30.0 |
86 |
+ |
87 |
+ aqua? ( >=x11-libs/gtk+-3.14:3[aqua] ) |
88 |
+ egl? ( media-libs/mesa[egl] ) |
89 |
+ geoloc? ( >=app-misc/geoclue-2.1.5:2.0 ) |
90 |
+ gles2? ( media-libs/mesa[gles2] ) |
91 |
+ gnome-keyring? ( app-crypt/libsecret ) |
92 |
+ gstreamer? ( |
93 |
+ >=media-libs/gstreamer-1.2:1.0 |
94 |
+ >=media-libs/gst-plugins-base-1.2:1.0 |
95 |
+ >=media-libs/gst-plugins-bad-1.5.0:1.0[opengl?] ) |
96 |
+ introspection? ( >=dev-libs/gobject-introspection-1.32.0:= ) |
97 |
+ nsplugin? ( >=x11-libs/gtk+-2.24.10:2 ) |
98 |
+ opengl? ( virtual/opengl |
99 |
+ x11-libs/cairo[opengl] ) |
100 |
+ spell? ( >=app-text/enchant-0.22:= ) |
101 |
+ wayland? ( >=x11-libs/gtk+-3.14:3[wayland] ) |
102 |
+ webgl? ( |
103 |
+ x11-libs/cairo[opengl] |
104 |
+ x11-libs/libXcomposite |
105 |
+ x11-libs/libXdamage ) |
106 |
+ X? ( |
107 |
+ x11-libs/cairo[X] |
108 |
+ >=x11-libs/gtk+-3.14:3[X] |
109 |
+ x11-libs/libX11 |
110 |
+ x11-libs/libXcomposite |
111 |
+ x11-libs/libXrender |
112 |
+ x11-libs/libXt ) |
113 |
+" |
114 |
+# Control knob is private and set to off |
115 |
+# seccomp? ( sys-libs/libseccomp ) |
116 |
+ |
117 |
+# paxctl needed for bug #407085 |
118 |
+# Need real bison, not yacc |
119 |
+DEPEND="${RDEPEND} |
120 |
+ ${PYTHON_DEPS} |
121 |
+ ${RUBY_DEPS} |
122 |
+ >=dev-lang/perl-5.10 |
123 |
+ >=app-accessibility/at-spi2-core-2.5.3 |
124 |
+ >=dev-libs/atk-2.8.0 |
125 |
+ dev-libs/hyphen |
126 |
+ >=dev-util/gtk-doc-am-1.10 |
127 |
+ >=dev-util/gperf-3.0.1 |
128 |
+ >=sys-devel/bison-2.4.3 |
129 |
+ >=sys-devel/flex-2.5.34 |
130 |
+ || ( >=sys-devel/gcc-4.9 >=sys-devel/clang-3.3 ) |
131 |
+ sys-devel/gettext |
132 |
+ virtual/pkgconfig |
133 |
+ |
134 |
+ doc? ( >=dev-util/gtk-doc-1.10 ) |
135 |
+ geoloc? ( dev-util/gdbus-codegen ) |
136 |
+ introspection? ( jit? ( sys-apps/paxctl ) ) |
137 |
+ test? ( |
138 |
+ dev-lang/python:2.7 |
139 |
+ dev-python/pygobject:3[python_targets_python2_7] |
140 |
+ x11-themes/hicolor-icon-theme |
141 |
+ jit? ( sys-apps/paxctl ) ) |
142 |
+" |
143 |
+ |
144 |
+S="${WORKDIR}/${MY_P}" |
145 |
+ |
146 |
+CHECKREQS_DISK_BUILD="18G" # and even this might not be enough, bug #417307 |
147 |
+ |
148 |
+pkg_pretend() { |
149 |
+ if [[ ${MERGE_TYPE} != "binary" ]] ; then |
150 |
+ if is-flagq "-g*" && ! is-flagq "-g*0" ; then |
151 |
+ einfo "Checking for sufficient disk space to build ${PN} with debugging CFLAGS" |
152 |
+ check-reqs_pkg_pretend |
153 |
+ fi |
154 |
+ |
155 |
+ if ! test-flag-CXX -std=c++11 ; then |
156 |
+ die "You need at least GCC 4.9.x or Clang >= 3.3 for C++11-specific compiler flags" |
157 |
+ fi |
158 |
+ |
159 |
+ if [[ $(tc-getCXX) == *g++* && $(gcc-version) < 4.9 ]] ; then |
160 |
+ die 'The active compiler needs to be gcc 4.9 (or newer)' |
161 |
+ fi |
162 |
+ fi |
163 |
+} |
164 |
+ |
165 |
+pkg_setup() { |
166 |
+ if [[ ${MERGE_TYPE} != "binary" ]] && is-flagq "-g*" && ! is-flagq "-g*0" ; then |
167 |
+ check-reqs_pkg_setup |
168 |
+ fi |
169 |
+ |
170 |
+ [[ ${MERGE_TYPE} = "binary" ]] || python-any-r1_pkg_setup |
171 |
+} |
172 |
+ |
173 |
+src_prepare() { |
174 |
+ # https://bugs.gentoo.org/show_bug.cgi?id=555504 |
175 |
+ epatch "${FILESDIR}"/${PN}-2.8.5-fix-ia64-build.patch |
176 |
+ |
177 |
+ # https://bugs.gentoo.org/show_bug.cgi?id=564352 |
178 |
+ epatch "${FILESDIR}"/${PN}-2.8.5-fix-alpha-build.patch |
179 |
+ |
180 |
+ # https://bugs.webkit.org/show_bug.cgi?id=148379 |
181 |
+ epatch "${FILESDIR}"/${PN}-2.8.5-webkit2gtkinjectedbundle-j1.patch |
182 |
+ |
183 |
+ gnome2_src_prepare |
184 |
+} |
185 |
+ |
186 |
+src_configure() { |
187 |
+ # Respect CC, otherwise fails on prefix #395875 |
188 |
+ tc-export CC |
189 |
+ |
190 |
+ # Arches without JIT support also need this to really disable it in all places |
191 |
+ use jit || append-cppflags -DENABLE_JIT=0 -DENABLE_YARR_JIT=0 -DENABLE_ASSEMBLER=0 |
192 |
+ |
193 |
+ # It does not compile on alpha without this in LDFLAGS |
194 |
+ # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648761 |
195 |
+ use alpha && append-ldflags "-Wl,--no-relax" |
196 |
+ |
197 |
+ # ld segfaults on ia64 with LDFLAGS --as-needed, bug #555504 |
198 |
+ use ia64 && append-ldflags "-Wl,--no-as-needed" |
199 |
+ |
200 |
+ # Sigbuses on SPARC with mcpu and co., bug #??? |
201 |
+ use sparc && filter-flags "-mvis" |
202 |
+ |
203 |
+ # https://bugs.webkit.org/show_bug.cgi?id=42070 , #301634 |
204 |
+ use ppc64 && append-flags "-mminimal-toc" |
205 |
+ |
206 |
+ # Try to use less memory, bug #469942 (see Fedora .spec for reference) |
207 |
+ # --no-keep-memory doesn't work on ia64, bug #502492 |
208 |
+ if ! use ia64; then |
209 |
+ append-ldflags "-Wl,--no-keep-memory" |
210 |
+ fi |
211 |
+ if ! tc-ld-is-gold ; then |
212 |
+ append-ldflags "-Wl,--reduce-memory-overheads" |
213 |
+ fi |
214 |
+ |
215 |
+ # older glibc needs this for INTPTR_MAX, bug #533976 |
216 |
+ if has_version "<sys-libs/glibc-2.18" ; then |
217 |
+ append-cppflags "-D__STDC_LIMIT_MACROS" |
218 |
+ fi |
219 |
+ |
220 |
+ # Multiple rendering bugs on youtube, github, etc without this, bug #547224 |
221 |
+ append-flags $(test-flags -fno-strict-aliasing) |
222 |
+ |
223 |
+ local ruby_interpreter="" |
224 |
+ |
225 |
+ if has_version "virtual/rubygems[ruby_targets_ruby22]"; then |
226 |
+ ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ruby22)" |
227 |
+ elif has_version "virtual/rubygems[ruby_targets_ruby21]"; then |
228 |
+ ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ruby21)" |
229 |
+ elif has_version "virtual/rubygems[ruby_targets_ruby20]"; then |
230 |
+ ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ruby20)" |
231 |
+ else |
232 |
+ ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ruby19)" |
233 |
+ fi |
234 |
+ |
235 |
+ # TODO: Check Web Audio support |
236 |
+ # should somehow let user select between them? |
237 |
+ # |
238 |
+ # FTL_JIT requires llvm |
239 |
+ local mycmakeargs=( |
240 |
+ $(cmake-utils_use_enable aqua QUARTZ_TARGET) |
241 |
+ $(cmake-utils_use_enable test API_TESTS) |
242 |
+ $(cmake-utils_use_enable doc GTKDOC) |
243 |
+ $(cmake-utils_use_enable geoloc GEOLOCATION) |
244 |
+ $(cmake-utils_use_find_package gles2 OpenGLES2) |
245 |
+ $(cmake-utils_use_enable gles2 GLES2) |
246 |
+ $(cmake-utils_use_enable gnome-keyring CREDENTIAL_STORAGE) |
247 |
+ $(cmake-utils_use_enable gstreamer VIDEO) |
248 |
+ $(cmake-utils_use_enable gstreamer WEB_AUDIO) |
249 |
+ $(cmake-utils_use_enable introspection) |
250 |
+ $(cmake-utils_use_enable jit) |
251 |
+ $(cmake-utils_use_enable nsplugin PLUGIN_PROCESS_GTK2) |
252 |
+ $(cmake-utils_use_enable spell SPELLCHECK SPELLCHECK) |
253 |
+ $(cmake-utils_use_enable wayland WAYLAND_TARGET) |
254 |
+ $(cmake-utils_use_enable webgl WEBGL) |
255 |
+ $(cmake-utils_use_find_package egl EGL) |
256 |
+ $(cmake-utils_use_find_package opengl OpenGL) |
257 |
+ $(cmake-utils_use_enable X X11_TARGET) |
258 |
+ -DCMAKE_BUILD_TYPE=Release |
259 |
+ -DPORT=GTK |
260 |
+ ${ruby_interpreter} |
261 |
+ ) |
262 |
+ if tc-ld-is-gold ; then |
263 |
+ mycmakeargs+=( -DUSE_LD_GOLD=ON ) |
264 |
+ else |
265 |
+ mycmakeargs+=( -DUSE_LD_GOLD=OFF ) |
266 |
+ fi |
267 |
+ |
268 |
+ cmake-utils_src_configure |
269 |
+} |
270 |
+ |
271 |
+src_compile() { |
272 |
+ cmake-utils_src_compile |
273 |
+} |
274 |
+ |
275 |
+src_test() { |
276 |
+ # Prevents test failures on PaX systems |
277 |
+ use jit && pax-mark m $(list-paxables Programs/*[Tt]ests/*) # Programs/unittests/.libs/test* |
278 |
+ |
279 |
+ cmake-utils_src_test |
280 |
+} |
281 |
+ |
282 |
+src_install() { |
283 |
+ cmake-utils_src_install |
284 |
+ |
285 |
+ # Prevents crashes on PaX systems, bug #522808 |
286 |
+ use jit && pax-mark m "${ED}usr/bin/jsc" "${ED}usr/libexec/webkit2gtk-4.0/WebKitWebProcess" |
287 |
+ pax-mark m "${ED}usr/libexec/webkit2gtk-4.0/WebKitPluginProcess" |
288 |
+ use nsplugin && pax-mark m "${ED}usr/libexec/webkit2gtk-4.0/WebKitPluginProcess"2 |
289 |
+} |