1 |
commit: 5ca54dc21681fc99e101d9684a5f3940676ea513 |
2 |
Author: Pawel Hajdan, Jr <phajdan.jr <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Apr 27 19:15:52 2016 +0000 |
4 |
Commit: Paweł Hajdan <phajdan.jr <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Apr 27 19:15:52 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ca54dc2 |
7 |
|
8 |
www-client/chromium: dev channel bump (52.0.2716.0) |
9 |
|
10 |
Package-Manager: portage-2.2.26 |
11 |
|
12 |
www-client/chromium/Manifest | 1 + |
13 |
www-client/chromium/chromium-52.0.2716.0.ebuild | 702 ++++++++++++++++++++++++ |
14 |
2 files changed, 703 insertions(+) |
15 |
|
16 |
diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest |
17 |
index df11fbc..3e50329 100644 |
18 |
--- a/www-client/chromium/Manifest |
19 |
+++ b/www-client/chromium/Manifest |
20 |
@@ -2,3 +2,4 @@ DIST chromium-50.0.2661.75.tar.xz 531558012 SHA256 c12d644e711ec85c800ab61a749d1 |
21 |
DIST chromium-50.0.2661.86.tar.xz 531539124 SHA256 6cc22761c4a774408cb34e77e056691526f469eca0899f578d5372cf0f756786 SHA512 64549732146ab2aa3c7582b4596f2a4fde7769c76facf380a6f2e3504c32be42560d1b230a943edb79dd0f019eca7ad133a32765b17143fc9d3eada1d3744ddd WHIRLPOOL 837a977c7ec66e3d2f1b58a54875e3b5b1c130117a1add077b6f38c196c432f175d55a0663f5ac576dd44c9ee77199689125b8b57794e4422fed7b5fe9961fa0 |
22 |
DIST chromium-51.0.2704.19.tar.xz 459662212 SHA256 515846fadd3fb4a539c5b368854ba918aeeff910f83e346e2f2515e9251f2ef3 SHA512 86aca654f4ba1c6704748cb41c53273513f6de80a0482e1ae95d02306cc967b7d9d87cba8e9b4984287a4f38b821611fe42c3870c2c9f79997d6a5f8a00004ca WHIRLPOOL 5bf091f52335f7ba29f1acf78e0666673c5c4304e83d7537781691fdd483c45b6466333d64f756ce99ef47578b31fd2828f4124fda492cb62bc6974e71de67d9 |
23 |
DIST chromium-51.0.2704.22.tar.xz 459682528 SHA256 808ffd06a299a2f8d05deb8199c837cbd9e5b7091715ae48ec5872e8b5ef6bc0 SHA512 d09d2e78d87ed76df597fa764fd9487d04bf66016ce784cf34ac5e69d76535b2969d16d81c7abbd1a2286f35311ab050e4de98b211901a00c925c66b5a10383e WHIRLPOOL e15a330347b1b9b1fed3351ceddfa4eb847c08ebd87e9edf8917ee8e558a016a740da15260af92f3b9fad5ebe45f5654ee1a105d25334876b2948e3d9701b98d |
24 |
+DIST chromium-52.0.2716.0.tar.xz 461514628 SHA256 c0f593a640fce7a8c93081725bfc16fae0c4a268c846343fdfeba11fd35755fe SHA512 25cda422bc1af230613004db56fe8fa0d9a7ed3f9c20b357ff60f788854509ac60f855c1454db05e8921a8f83ba0e95a4f841255d8d6390df68808f04f94826e WHIRLPOOL e49f3f56a63afb755c1432ea82b77b9f4b4ce02559e24b2e11bdaa199df67a20d4a80470b6c0ae86f5091b24d77bdabf3d79f37d3d40604e0db11b823e7e3500 |
25 |
|
26 |
diff --git a/www-client/chromium/chromium-52.0.2716.0.ebuild b/www-client/chromium/chromium-52.0.2716.0.ebuild |
27 |
new file mode 100644 |
28 |
index 0000000..783fb6b |
29 |
--- /dev/null |
30 |
+++ b/www-client/chromium/chromium-52.0.2716.0.ebuild |
31 |
@@ -0,0 +1,702 @@ |
32 |
+# Copyright 1999-2016 Gentoo Foundation |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+# $Id$ |
35 |
+ |
36 |
+EAPI="5" |
37 |
+PYTHON_COMPAT=( python2_7 ) |
38 |
+ |
39 |
+CHROMIUM_LANGS="am ar bg bn ca cs da de el en_GB es es_LA et fa fi fil fr gu he |
40 |
+ hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt_BR pt_PT ro ru sk sl sr |
41 |
+ sv sw ta te th tr uk vi zh_CN zh_TW" |
42 |
+ |
43 |
+inherit check-reqs chromium eutils flag-o-matic multilib multiprocessing pax-utils \ |
44 |
+ portability python-any-r1 readme.gentoo-r1 toolchain-funcs versionator virtualx |
45 |
+ |
46 |
+DESCRIPTION="Open-source version of Google Chrome web browser" |
47 |
+HOMEPAGE="http://chromium.org/" |
48 |
+SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.xz" |
49 |
+ |
50 |
+LICENSE="BSD hotwording? ( no-source-code )" |
51 |
+SLOT="0" |
52 |
+KEYWORDS="~amd64 ~arm ~arm64 ~x86" |
53 |
+IUSE="cups gn gnome gnome-keyring gtk3 +hangouts hidpi hotwording kerberos neon pic +proprietary-codecs pulseaudio selinux +system-ffmpeg +tcmalloc widevine" |
54 |
+RESTRICT="!system-ffmpeg? ( proprietary-codecs? ( bindist ) )" |
55 |
+ |
56 |
+# TODO: bootstrapped gn binary hangs when using tcmalloc with portage's sandbox. |
57 |
+REQUIRED_USE="gn? ( kerberos !system-ffmpeg !tcmalloc )" |
58 |
+ |
59 |
+# Native Client binaries are compiled with different set of flags, bug #452066. |
60 |
+QA_FLAGS_IGNORED=".*\.nexe" |
61 |
+ |
62 |
+# Native Client binaries may be stripped by the build system, which uses the |
63 |
+# right tools for it, bug #469144 . |
64 |
+QA_PRESTRIPPED=".*\.nexe" |
65 |
+ |
66 |
+RDEPEND=" |
67 |
+ app-arch/bzip2:= |
68 |
+ cups? ( >=net-print/cups-1.3.11:= ) |
69 |
+ >=dev-libs/elfutils-0.149 |
70 |
+ dev-libs/expat:= |
71 |
+ dev-libs/glib:= |
72 |
+ >=dev-libs/jsoncpp-0.5.0-r1:= |
73 |
+ dev-libs/nspr:= |
74 |
+ >=dev-libs/nss-3.14.3:= |
75 |
+ gnome? ( >=gnome-base/gconf-2.24.0:= ) |
76 |
+ gnome-keyring? ( >=gnome-base/libgnome-keyring-3.12:= ) |
77 |
+ >=media-libs/alsa-lib-1.0.19:= |
78 |
+ media-libs/fontconfig:= |
79 |
+ media-libs/freetype:= |
80 |
+ media-libs/libexif:= |
81 |
+ media-libs/speex:= |
82 |
+ pulseaudio? ( media-sound/pulseaudio:= ) |
83 |
+ system-ffmpeg? ( >=media-video/ffmpeg-2.7.2:= ) |
84 |
+ sys-apps/dbus:= |
85 |
+ sys-apps/pciutils:= |
86 |
+ >=sys-libs/libcap-2.22:= |
87 |
+ virtual/udev |
88 |
+ x11-libs/cairo:= |
89 |
+ x11-libs/gdk-pixbuf:= |
90 |
+ gtk3? ( x11-libs/gtk+:3= ) |
91 |
+ !gtk3? ( x11-libs/gtk+:2= ) |
92 |
+ x11-libs/libdrm |
93 |
+ x11-libs/libX11:= |
94 |
+ x11-libs/libXcomposite:= |
95 |
+ x11-libs/libXcursor:= |
96 |
+ x11-libs/libXdamage:= |
97 |
+ x11-libs/libXext:= |
98 |
+ x11-libs/libXfixes:= |
99 |
+ >=x11-libs/libXi-1.6.0:= |
100 |
+ x11-libs/libXinerama:= |
101 |
+ x11-libs/libXrandr:= |
102 |
+ x11-libs/libXrender:= |
103 |
+ x11-libs/libXScrnSaver:= |
104 |
+ x11-libs/libXtst:= |
105 |
+ x11-libs/pango:= |
106 |
+ kerberos? ( virtual/krb5 ) |
107 |
+ !gn? ( |
108 |
+ >=app-accessibility/speech-dispatcher-0.8:= |
109 |
+ app-arch/snappy:= |
110 |
+ >=dev-libs/libevent-1.4.13:= |
111 |
+ dev-libs/libxml2:=[icu] |
112 |
+ dev-libs/libxslt:= |
113 |
+ media-libs/flac:= |
114 |
+ >=media-libs/harfbuzz-0.9.41:=[icu(+)] |
115 |
+ >=media-libs/libjpeg-turbo-1.2.0-r1:= |
116 |
+ >=media-libs/libwebp-0.4.0:= |
117 |
+ sys-libs/zlib:=[minizip] |
118 |
+ )" |
119 |
+DEPEND="${RDEPEND} |
120 |
+ !arm? ( |
121 |
+ dev-lang/yasm |
122 |
+ ) |
123 |
+ dev-lang/perl |
124 |
+ dev-perl/JSON |
125 |
+ >=dev-util/gperf-3.0.3 |
126 |
+ dev-util/ninja |
127 |
+ sys-apps/hwids[usb(+)] |
128 |
+ >=sys-devel/bison-2.4.3 |
129 |
+ sys-devel/flex |
130 |
+ virtual/pkgconfig" |
131 |
+ |
132 |
+# For nvidia-drivers blocker, see bug #413637 . |
133 |
+RDEPEND+=" |
134 |
+ !=www-client/chromium-9999 |
135 |
+ !<www-plugins/chrome-binary-plugins-37 |
136 |
+ x11-misc/xdg-utils |
137 |
+ virtual/opengl |
138 |
+ virtual/ttf-fonts |
139 |
+ selinux? ( sec-policy/selinux-chromium ) |
140 |
+ tcmalloc? ( !<x11-drivers/nvidia-drivers-331.20 ) |
141 |
+ widevine? ( www-plugins/chrome-binary-plugins[widevine(-)] )" |
142 |
+ |
143 |
+# Python dependencies. The DEPEND part needs to be kept in sync |
144 |
+# with python_check_deps. |
145 |
+DEPEND+=" $(python_gen_any_dep ' |
146 |
+ dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}] |
147 |
+ dev-python/beautifulsoup:4[${PYTHON_USEDEP}] |
148 |
+ dev-python/html5lib[${PYTHON_USEDEP}] |
149 |
+ dev-python/jinja[${PYTHON_USEDEP}] |
150 |
+ dev-python/ply[${PYTHON_USEDEP}] |
151 |
+ dev-python/simplejson[${PYTHON_USEDEP}] |
152 |
+')" |
153 |
+python_check_deps() { |
154 |
+ has_version --host-root "dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]" && |
155 |
+ has_version --host-root "dev-python/beautifulsoup:4[${PYTHON_USEDEP}]" && |
156 |
+ has_version --host-root "dev-python/html5lib[${PYTHON_USEDEP}]" && |
157 |
+ has_version --host-root "dev-python/jinja[${PYTHON_USEDEP}]" && |
158 |
+ has_version --host-root "dev-python/ply[${PYTHON_USEDEP}]" && |
159 |
+ has_version --host-root "dev-python/simplejson[${PYTHON_USEDEP}]" |
160 |
+} |
161 |
+ |
162 |
+if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then |
163 |
+ EBUILD_DEATH_HOOKS+=" chromium_pkg_die"; |
164 |
+fi |
165 |
+ |
166 |
+DISABLE_AUTOFORMATTING="yes" |
167 |
+DOC_CONTENTS=" |
168 |
+Some web pages may require additional fonts to display properly. |
169 |
+Try installing some of the following packages if some characters |
170 |
+are not displayed properly: |
171 |
+- media-fonts/arphicfonts |
172 |
+- media-fonts/bitstream-cyberbit |
173 |
+- media-fonts/droid |
174 |
+- media-fonts/ipamonafont |
175 |
+- media-fonts/ja-ipafonts |
176 |
+- media-fonts/takao-fonts |
177 |
+- media-fonts/wqy-microhei |
178 |
+- media-fonts/wqy-zenhei |
179 |
+ |
180 |
+Depending on your desktop environment, you may need |
181 |
+to install additional packages to get icons on the Downloads page. |
182 |
+ |
183 |
+For KDE, the required package is kde-frameworks/oxygen-icons. |
184 |
+ |
185 |
+For other desktop environments, try one of the following: |
186 |
+- x11-themes/gnome-icon-theme |
187 |
+- x11-themes/tango-icon-theme |
188 |
+" |
189 |
+ |
190 |
+pkg_pretend() { |
191 |
+ if [[ $(tc-getCC)$ == *gcc* ]] && \ |
192 |
+ [[ $(gcc-major-version)$(gcc-minor-version) -lt 48 ]]; then |
193 |
+ die 'At least gcc 4.8 is required, see bugs: #535730, #525374, #518668.' |
194 |
+ fi |
195 |
+ |
196 |
+ # Check build requirements, bug #541816 and bug #471810 . |
197 |
+ CHECKREQS_MEMORY="3G" |
198 |
+ CHECKREQS_DISK_BUILD="5G" |
199 |
+ eshopts_push -s extglob |
200 |
+ if is-flagq '-g?(gdb)?([1-9])'; then |
201 |
+ CHECKREQS_DISK_BUILD="25G" |
202 |
+ fi |
203 |
+ eshopts_pop |
204 |
+ check-reqs_pkg_pretend |
205 |
+} |
206 |
+ |
207 |
+pkg_setup() { |
208 |
+ if [[ "${SLOT}" == "0" ]]; then |
209 |
+ CHROMIUM_SUFFIX="" |
210 |
+ else |
211 |
+ CHROMIUM_SUFFIX="-${SLOT}" |
212 |
+ fi |
213 |
+ CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser${CHROMIUM_SUFFIX}" |
214 |
+ |
215 |
+ # Make sure the build system will use the right python, bug #344367. |
216 |
+ python-any-r1_pkg_setup |
217 |
+ |
218 |
+ chromium_suid_sandbox_check_kernel_config |
219 |
+} |
220 |
+ |
221 |
+src_prepare() { |
222 |
+ epatch "${FILESDIR}/${PN}-system-ffmpeg-r2.patch" |
223 |
+ epatch "${FILESDIR}/${PN}-system-jinja-r8.patch" |
224 |
+ epatch "${FILESDIR}/${PN}-widevine-r1.patch" |
225 |
+ epatch "${FILESDIR}/${PN}-last-commit-position-r0.patch" |
226 |
+ epatch "${FILESDIR}/${PN}-snapshot-toolchain-r1.patch" |
227 |
+ |
228 |
+ epatch_user |
229 |
+ |
230 |
+ local conditional_bundled_libraries="" |
231 |
+ if ! use system-ffmpeg; then |
232 |
+ conditional_bundled_libraries+=" third_party/ffmpeg" |
233 |
+ fi |
234 |
+ if use gn; then |
235 |
+ conditional_bundled_libraries+=" |
236 |
+ base/third_party/libevent |
237 |
+ third_party/adobe |
238 |
+ third_party/ffmpeg |
239 |
+ third_party/flac |
240 |
+ third_party/harfbuzz-ng |
241 |
+ third_party/icu |
242 |
+ third_party/jinja2 |
243 |
+ third_party/libjpeg_turbo |
244 |
+ third_party/libpng |
245 |
+ third_party/libwebp |
246 |
+ third_party/libxml |
247 |
+ third_party/libxslt |
248 |
+ third_party/markupsafe |
249 |
+ third_party/snappy |
250 |
+ third_party/speech-dispatcher |
251 |
+ third_party/usb_ids |
252 |
+ third_party/xdg-utils |
253 |
+ third_party/yasm |
254 |
+ third_party/zlib |
255 |
+ " |
256 |
+ fi |
257 |
+ |
258 |
+ # Remove most bundled libraries. Some are still needed. |
259 |
+ build/linux/unbundle/remove_bundled_libraries.py \ |
260 |
+ ${conditional_bundled_libraries} \ |
261 |
+ 'base/third_party/dmg_fp' \ |
262 |
+ 'base/third_party/dynamic_annotations' \ |
263 |
+ 'base/third_party/icu' \ |
264 |
+ 'base/third_party/nspr' \ |
265 |
+ 'base/third_party/superfasthash' \ |
266 |
+ 'base/third_party/symbolize' \ |
267 |
+ 'base/third_party/valgrind' \ |
268 |
+ 'base/third_party/xdg_mime' \ |
269 |
+ 'base/third_party/xdg_user_dirs' \ |
270 |
+ 'breakpad/src/third_party/curl' \ |
271 |
+ 'chrome/third_party/mozilla_security_manager' \ |
272 |
+ 'courgette/third_party' \ |
273 |
+ 'crypto/third_party/nss' \ |
274 |
+ 'net/third_party/mozilla_security_manager' \ |
275 |
+ 'net/third_party/nss' \ |
276 |
+ 'third_party/WebKit' \ |
277 |
+ 'third_party/analytics' \ |
278 |
+ 'third_party/angle' \ |
279 |
+ 'third_party/angle/src/third_party/compiler' \ |
280 |
+ 'third_party/angle/src/third_party/libXNVCtrl' \ |
281 |
+ 'third_party/angle/src/third_party/murmurhash' \ |
282 |
+ 'third_party/angle/src/third_party/trace_event' \ |
283 |
+ 'third_party/boringssl' \ |
284 |
+ 'third_party/brotli' \ |
285 |
+ 'third_party/cacheinvalidation' \ |
286 |
+ 'third_party/catapult' \ |
287 |
+ 'third_party/catapult/third_party/py_vulcanize' \ |
288 |
+ 'third_party/catapult/third_party/py_vulcanize/third_party/rcssmin' \ |
289 |
+ 'third_party/catapult/third_party/py_vulcanize/third_party/rjsmin' \ |
290 |
+ 'third_party/catapult/tracing/third_party/components/polymer' \ |
291 |
+ 'third_party/catapult/tracing/third_party/d3' \ |
292 |
+ 'third_party/catapult/tracing/third_party/gl-matrix' \ |
293 |
+ 'third_party/catapult/tracing/third_party/jszip' \ |
294 |
+ 'third_party/cld_2' \ |
295 |
+ 'third_party/cros_system_api' \ |
296 |
+ 'third_party/cython/python_flags.py' \ |
297 |
+ 'third_party/devscripts' \ |
298 |
+ 'third_party/dom_distiller_js' \ |
299 |
+ 'third_party/dom_distiller_js/dist/proto_gen/third_party/dom_distiller_js' \ |
300 |
+ 'third_party/fips181' \ |
301 |
+ 'third_party/flot' \ |
302 |
+ 'third_party/google_input_tools' \ |
303 |
+ 'third_party/google_input_tools/third_party/closure_library' \ |
304 |
+ 'third_party/google_input_tools/third_party/closure_library/third_party/closure' \ |
305 |
+ 'third_party/hunspell' \ |
306 |
+ 'third_party/iccjpeg' \ |
307 |
+ 'third_party/icu' \ |
308 |
+ 'third_party/jstemplate' \ |
309 |
+ 'third_party/khronos' \ |
310 |
+ 'third_party/leveldatabase' \ |
311 |
+ 'third_party/libXNVCtrl' \ |
312 |
+ 'third_party/libaddressinput' \ |
313 |
+ 'third_party/libjingle' \ |
314 |
+ 'third_party/libphonenumber' \ |
315 |
+ 'third_party/libpng' \ |
316 |
+ 'third_party/libsecret' \ |
317 |
+ 'third_party/libsrtp' \ |
318 |
+ 'third_party/libudev' \ |
319 |
+ 'third_party/libusb' \ |
320 |
+ 'third_party/libvpx' \ |
321 |
+ 'third_party/libvpx/source/libvpx/third_party/x86inc' \ |
322 |
+ 'third_party/libxml/chromium' \ |
323 |
+ 'third_party/libwebm' \ |
324 |
+ 'third_party/libyuv' \ |
325 |
+ 'third_party/lss' \ |
326 |
+ 'third_party/lzma_sdk' \ |
327 |
+ 'third_party/mesa' \ |
328 |
+ 'third_party/modp_b64' \ |
329 |
+ 'third_party/mt19937ar' \ |
330 |
+ 'third_party/openh264' \ |
331 |
+ 'third_party/openmax_dl' \ |
332 |
+ 'third_party/opus' \ |
333 |
+ 'third_party/ots' \ |
334 |
+ 'third_party/pdfium' \ |
335 |
+ 'third_party/pdfium/third_party/agg23' \ |
336 |
+ 'third_party/pdfium/third_party/base' \ |
337 |
+ 'third_party/pdfium/third_party/bigint' \ |
338 |
+ 'third_party/pdfium/third_party/freetype' \ |
339 |
+ 'third_party/pdfium/third_party/lcms2-2.6' \ |
340 |
+ 'third_party/pdfium/third_party/libjpeg' \ |
341 |
+ 'third_party/pdfium/third_party/libopenjpeg20' \ |
342 |
+ 'third_party/pdfium/third_party/zlib_v128' \ |
343 |
+ 'third_party/polymer' \ |
344 |
+ 'third_party/protobuf' \ |
345 |
+ 'third_party/qcms' \ |
346 |
+ 'third_party/re2' \ |
347 |
+ 'third_party/sfntly' \ |
348 |
+ 'third_party/skia' \ |
349 |
+ 'third_party/smhasher' \ |
350 |
+ 'third_party/sqlite' \ |
351 |
+ 'third_party/tcmalloc' \ |
352 |
+ 'third_party/usrsctp' \ |
353 |
+ 'third_party/web-animations-js' \ |
354 |
+ 'third_party/webdriver' \ |
355 |
+ 'third_party/webrtc' \ |
356 |
+ 'third_party/widevine' \ |
357 |
+ 'third_party/woff2' \ |
358 |
+ 'third_party/x86inc' \ |
359 |
+ 'third_party/zlib/google' \ |
360 |
+ 'url/third_party/mozilla' \ |
361 |
+ 'v8/src/third_party/fdlibm' \ |
362 |
+ 'v8/src/third_party/valgrind' \ |
363 |
+ --do-remove || die |
364 |
+} |
365 |
+ |
366 |
+src_configure() { |
367 |
+ local myconf_gyp="" |
368 |
+ local myconf_gn="" |
369 |
+ |
370 |
+ # GN needs explicit config for Debug/Release as opposed to inferring it from build directory. |
371 |
+ myconf_gn+=" is_debug=false" |
372 |
+ |
373 |
+ # Never tell the build system to "enable" SSE2, it has a few unexpected |
374 |
+ # additions, bug #336871. |
375 |
+ myconf_gyp+=" -Ddisable_sse2=1" |
376 |
+ |
377 |
+ # Disable nacl, we can't build without pnacl (http://crbug.com/269560). |
378 |
+ myconf_gyp+=" -Ddisable_nacl=1" |
379 |
+ myconf_gn+=" enable_nacl=false" |
380 |
+ |
381 |
+ # Make it possible to remove third_party/adobe. |
382 |
+ echo > "${T}/flapper_version.h" || die |
383 |
+ myconf_gyp+=" -Dflapper_version_h_file=${T}/flapper_version.h" |
384 |
+ |
385 |
+ # Use system-provided libraries. |
386 |
+ # TODO: use_system_hunspell (upstream changes needed). |
387 |
+ # TODO: use_system_icu (bug #576370). |
388 |
+ # TODO: use_system_libpng (bug #578212). |
389 |
+ # TODO: use_system_libsrtp (bug #459932). |
390 |
+ # TODO: use_system_libusb (http://crbug.com/266149). |
391 |
+ # TODO: use_system_libvpx (http://crbug.com/494939). |
392 |
+ # TODO: use_system_opus (https://code.google.com/p/webrtc/issues/detail?id=3077). |
393 |
+ # TODO: use_system_protobuf (bug #525560). |
394 |
+ # TODO: use_system_re2 (bug #571156). |
395 |
+ # TODO: use_system_ssl (http://crbug.com/58087). |
396 |
+ # TODO: use_system_sqlite (http://crbug.com/22208). |
397 |
+ myconf_gyp+=" |
398 |
+ -Duse_system_bzip2=1 |
399 |
+ -Duse_system_ffmpeg=$(usex system-ffmpeg 1 0) |
400 |
+ -Duse_system_flac=1 |
401 |
+ -Duse_system_harfbuzz=1 |
402 |
+ -Duse_system_jsoncpp=1 |
403 |
+ -Duse_system_libevent=1 |
404 |
+ -Duse_system_libjpeg=1 |
405 |
+ -Duse_system_libwebp=1 |
406 |
+ -Duse_system_libxml=1 |
407 |
+ -Duse_system_libxslt=1 |
408 |
+ -Duse_system_minizip=1 |
409 |
+ -Duse_system_nspr=1 |
410 |
+ -Duse_system_snappy=1 |
411 |
+ -Duse_system_speex=1 |
412 |
+ -Duse_system_xdg_utils=1 |
413 |
+ -Duse_system_zlib=1" |
414 |
+ |
415 |
+ # Needed for system icu - we don't need additional data files. |
416 |
+ # myconf_gyp+=" -Dicu_use_data_file_flag=0" |
417 |
+ |
418 |
+ # TODO: patch gyp so that this arm conditional is not needed. |
419 |
+ if ! use arm; then |
420 |
+ myconf_gyp+=" |
421 |
+ -Duse_system_yasm=1" |
422 |
+ fi |
423 |
+ |
424 |
+ # Optional dependencies. |
425 |
+ # TODO: linux_link_kerberos, bug #381289. |
426 |
+ myconf_gyp+=" |
427 |
+ $(gyp_use cups) |
428 |
+ $(gyp_use gnome use_gconf) |
429 |
+ $(gyp_use gnome-keyring use_gnome_keyring) |
430 |
+ $(gyp_use gnome-keyring linux_link_gnome_keyring) |
431 |
+ $(gyp_use gtk3) |
432 |
+ $(gyp_use hangouts enable_hangout_services_extension) |
433 |
+ $(gyp_use hidpi enable_hidpi) |
434 |
+ $(gyp_use hotwording enable_hotwording) |
435 |
+ $(gyp_use kerberos) |
436 |
+ $(gyp_use pulseaudio) |
437 |
+ $(gyp_use tcmalloc use_allocator tcmalloc none) |
438 |
+ $(gyp_use widevine enable_widevine)" |
439 |
+ |
440 |
+ myconf_gn+=" use_cups=$(usex cups true false)" |
441 |
+ myconf_gn+=" use_allocator=$(usex tcmalloc \"tcmalloc\" \"none\")" |
442 |
+ |
443 |
+ # Use explicit library dependencies instead of dlopen. |
444 |
+ # This makes breakages easier to detect by revdep-rebuild. |
445 |
+ myconf_gyp+=" |
446 |
+ -Dlinux_link_gsettings=1 |
447 |
+ -Dlinux_link_libpci=1 |
448 |
+ -Dlinux_link_libspeechd=1 |
449 |
+ -Dlibspeechd_h_prefix=speech-dispatcher/" |
450 |
+ |
451 |
+ # TODO: use the file at run time instead of effectively compiling it in. |
452 |
+ myconf_gyp+=" |
453 |
+ -Dusb_ids_path=/usr/share/misc/usb.ids" |
454 |
+ |
455 |
+ # Save space by removing DLOG and DCHECK messages (about 6% reduction). |
456 |
+ myconf_gyp+=" |
457 |
+ -Dlogging_like_official_build=1" |
458 |
+ |
459 |
+ if [[ $(tc-getCC) == *clang* ]]; then |
460 |
+ myconf_gyp+=" -Dclang=1" |
461 |
+ myconf_gn+=" is_clang=true" |
462 |
+ else |
463 |
+ myconf_gyp+=" -Dclang=0" |
464 |
+ myconf_gn+=" is_clang=false" |
465 |
+ fi |
466 |
+ |
467 |
+ # Never use bundled gold binary. Disable gold linker flags for now. |
468 |
+ # Do not use bundled clang. |
469 |
+ myconf_gyp+=" |
470 |
+ -Dclang_use_chrome_plugins=0 |
471 |
+ -Dhost_clang=0 |
472 |
+ -Dlinux_use_bundled_binutils=0 |
473 |
+ -Dlinux_use_bundled_gold=0 |
474 |
+ -Dlinux_use_gold_flags=0 |
475 |
+ -Dsysroot=" |
476 |
+ myconf_gn+=" use_sysroot=false" |
477 |
+ |
478 |
+ ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)" |
479 |
+ myconf_gyp+=" -Dproprietary_codecs=1 -Dffmpeg_branding=${ffmpeg_branding}" |
480 |
+ |
481 |
+ # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys . |
482 |
+ # Note: these are for Gentoo use ONLY. For your own distribution, |
483 |
+ # please get your own set of keys. Feel free to contact chromium@g.o |
484 |
+ # for more info. |
485 |
+ local google_api_key="AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc" |
486 |
+ local google_default_client_id="329227923882.apps.googleusercontent.com" |
487 |
+ local google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu" |
488 |
+ myconf_gyp+=" -Dgoogle_api_key=${google_api_key} |
489 |
+ -Dgoogle_default_client_id=${google_default_client_id} |
490 |
+ -Dgoogle_default_client_secret=${google_default_client_secret}" |
491 |
+ myconf_gn+=" google_api_key=\"${google_api_key}\"" |
492 |
+ myconf_gn+=" google_default_client_id=\"${google_default_client_id}\"" |
493 |
+ myconf_gn+=" google_default_client_secret=\"${google_default_client_secret}\"" |
494 |
+ |
495 |
+ local myarch="$(tc-arch)" |
496 |
+ if [[ $myarch = amd64 ]] ; then |
497 |
+ target_arch=x64 |
498 |
+ ffmpeg_target_arch=x64 |
499 |
+ elif [[ $myarch = x86 ]] ; then |
500 |
+ target_arch=ia32 |
501 |
+ ffmpeg_target_arch=ia32 |
502 |
+ elif [[ $myarch = arm64 ]] ; then |
503 |
+ target_arch=arm64 |
504 |
+ ffmpeg_target_arch=arm64 |
505 |
+ elif [[ $myarch = arm ]] ; then |
506 |
+ target_arch=arm |
507 |
+ ffmpeg_target_arch=$(usex neon arm-neon arm) |
508 |
+ # TODO: re-enable NaCl (NativeClient). |
509 |
+ local CTARGET=${CTARGET:-${CHOST}} |
510 |
+ if [[ $(tc-is-softfloat) == "no" ]]; then |
511 |
+ |
512 |
+ myconf_gyp+=" -Darm_float_abi=hard" |
513 |
+ fi |
514 |
+ filter-flags "-mfpu=*" |
515 |
+ use neon || myconf_gyp+=" -Darm_fpu=${ARM_FPU:-vfpv3-d16}" |
516 |
+ |
517 |
+ if [[ ${CTARGET} == armv[78]* ]]; then |
518 |
+ myconf_gyp+=" -Darmv7=1" |
519 |
+ else |
520 |
+ myconf_gyp+=" -Darmv7=0" |
521 |
+ fi |
522 |
+ myconf_gyp+=" -Dsysroot= |
523 |
+ $(gyp_use neon arm_neon) |
524 |
+ -Ddisable_nacl=1" |
525 |
+ else |
526 |
+ die "Failed to determine target arch, got '$myarch'." |
527 |
+ fi |
528 |
+ |
529 |
+ myconf_gyp+=" -Dtarget_arch=${target_arch}" |
530 |
+ |
531 |
+ # Make sure that -Werror doesn't get added to CFLAGS by the build system. |
532 |
+ # Depending on GCC version the warnings are different and we don't want |
533 |
+ # the build to fail because of that. |
534 |
+ myconf_gyp+=" -Dwerror=" |
535 |
+ myconf_gn+=" treat_warnings_as_errors=false" |
536 |
+ |
537 |
+ # Disable fatal linker warnings, bug 506268. |
538 |
+ myconf_gyp+=" -Ddisable_fatal_linker_warnings=1" |
539 |
+ |
540 |
+ # Avoid CFLAGS problems, bug #352457, bug #390147. |
541 |
+ if ! use custom-cflags; then |
542 |
+ replace-flags "-Os" "-O2" |
543 |
+ strip-flags |
544 |
+ |
545 |
+ # Prevent linker from running out of address space, bug #471810 . |
546 |
+ if use x86; then |
547 |
+ filter-flags "-g*" |
548 |
+ fi |
549 |
+ |
550 |
+ # Prevent libvpx build failures. Bug 530248, 544702, 546984. |
551 |
+ if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then |
552 |
+ filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2 |
553 |
+ fi |
554 |
+ fi |
555 |
+ |
556 |
+ # Make sure the build system will use the right tools, bug #340795. |
557 |
+ tc-export AR CC CXX NM |
558 |
+ |
559 |
+ # Tools for building programs to be executed on the build system, bug #410883. |
560 |
+ if tc-is-cross-compiler; then |
561 |
+ export AR_host=$(tc-getBUILD_AR) |
562 |
+ export CC_host=$(tc-getBUILD_CC) |
563 |
+ export CXX_host=$(tc-getBUILD_CXX) |
564 |
+ export NM_host=$(tc-getBUILD_NM) |
565 |
+ fi |
566 |
+ |
567 |
+ # Bug 491582. |
568 |
+ export TMPDIR="${WORKDIR}/temp" |
569 |
+ mkdir -p -m 755 "${TMPDIR}" || die |
570 |
+ |
571 |
+ # TODO: also do this for GN bundled ffmpeg build. |
572 |
+ if ! use system-ffmpeg && ! use gn; then |
573 |
+ local build_ffmpeg_args="" |
574 |
+ if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then |
575 |
+ build_ffmpeg_args+=" --disable-asm" |
576 |
+ fi |
577 |
+ |
578 |
+ # Re-configure bundled ffmpeg. See bug #491378 for example reasons. |
579 |
+ einfo "Configuring bundled ffmpeg..." |
580 |
+ pushd third_party/ffmpeg > /dev/null || die |
581 |
+ chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \ |
582 |
+ --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die |
583 |
+ chromium/scripts/copy_config.sh || die |
584 |
+ chromium/scripts/generate_gyp.py || die |
585 |
+ popd > /dev/null || die |
586 |
+ fi |
587 |
+ |
588 |
+ third_party/libaddressinput/chromium/tools/update-strings.py || die |
589 |
+ |
590 |
+ touch chrome/test/data/webui/i18n_process_css_test.html || die |
591 |
+ |
592 |
+ einfo "Configuring Chromium..." |
593 |
+ if use gn; then |
594 |
+ tools/gn/bootstrap/bootstrap.py -v --gn-gen-args "${myconf_gn}" || die |
595 |
+ out/Release/gn gen --args="${myconf_gn}" out/Release || die |
596 |
+ else |
597 |
+ build/linux/unbundle/replace_gyp_files.py ${myconf_gyp} || die |
598 |
+ egyp_chromium ${myconf_gyp} || die |
599 |
+ fi |
600 |
+} |
601 |
+ |
602 |
+eninja() { |
603 |
+ if [[ -z ${NINJAOPTS+set} ]]; then |
604 |
+ local jobs=$(makeopts_jobs) |
605 |
+ local loadavg=$(makeopts_loadavg) |
606 |
+ |
607 |
+ if [[ ${MAKEOPTS} == *-j* && ${jobs} != 999 ]]; then |
608 |
+ NINJAOPTS+=" -j ${jobs}" |
609 |
+ fi |
610 |
+ if [[ ${MAKEOPTS} == *-l* && ${loadavg} != 999 ]]; then |
611 |
+ NINJAOPTS+=" -l ${loadavg}" |
612 |
+ fi |
613 |
+ fi |
614 |
+ set -- ninja -v ${NINJAOPTS} "$@" |
615 |
+ echo "$@" |
616 |
+ "$@" |
617 |
+} |
618 |
+ |
619 |
+src_compile() { |
620 |
+ local ninja_targets="chrome chrome_sandbox chromedriver" |
621 |
+ |
622 |
+ if ! use gn; then |
623 |
+ # Build mksnapshot and pax-mark it. |
624 |
+ eninja -C out/Release mksnapshot || die |
625 |
+ pax-mark m out/Release/mksnapshot |
626 |
+ fi |
627 |
+ |
628 |
+ # Even though ninja autodetects number of CPUs, we respect |
629 |
+ # user's options, for debugging with -j 1 or any other reason. |
630 |
+ eninja -C out/Release ${ninja_targets} || die |
631 |
+ |
632 |
+ pax-mark m out/Release/chrome |
633 |
+} |
634 |
+ |
635 |
+src_install() { |
636 |
+ exeinto "${CHROMIUM_HOME}" |
637 |
+ doexe out/Release/chrome || die |
638 |
+ |
639 |
+ newexe out/Release/chrome_sandbox chrome-sandbox || die |
640 |
+ fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox" |
641 |
+ |
642 |
+ doexe out/Release/chromedriver || die |
643 |
+ use widevine && doexe out/Release/libwidevinecdmadapter.so |
644 |
+ |
645 |
+ # if ! use arm; then |
646 |
+ # doexe out/Release/nacl_helper{,_bootstrap} || die |
647 |
+ # insinto "${CHROMIUM_HOME}" |
648 |
+ # doins out/Release/nacl_irt_*.nexe || die |
649 |
+ # doins out/Release/libppGoogleNaClPluginChrome.so || die |
650 |
+ # fi |
651 |
+ |
652 |
+ local sedargs=( -e "s:/usr/lib/:/usr/$(get_libdir)/:g" ) |
653 |
+ if [[ -n ${CHROMIUM_SUFFIX} ]]; then |
654 |
+ sedargs+=( |
655 |
+ -e "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" |
656 |
+ -e "s:chromium.desktop:chromium${CHROMIUM_SUFFIX}.desktop:g" |
657 |
+ -e "s:plugins:plugins --user-data-dir=\${HOME}/.config/chromium${CHROMIUM_SUFFIX}:" |
658 |
+ ) |
659 |
+ fi |
660 |
+ sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r3.sh" > chromium-launcher.sh || die |
661 |
+ doexe chromium-launcher.sh |
662 |
+ |
663 |
+ # It is important that we name the target "chromium-browser", |
664 |
+ # xdg-utils expect it; bug #355517. |
665 |
+ dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser${CHROMIUM_SUFFIX} || die |
666 |
+ # keep the old symlink around for consistency |
667 |
+ dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium${CHROMIUM_SUFFIX} || die |
668 |
+ |
669 |
+ dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver${CHROMIUM_SUFFIX} || die |
670 |
+ |
671 |
+ # Allow users to override command-line options, bug #357629. |
672 |
+ dodir /etc/chromium || die |
673 |
+ insinto /etc/chromium |
674 |
+ newins "${FILESDIR}/chromium.default" "default" || die |
675 |
+ |
676 |
+ pushd out/Release/locales > /dev/null || die |
677 |
+ chromium_remove_language_paks |
678 |
+ popd |
679 |
+ |
680 |
+ insinto "${CHROMIUM_HOME}" |
681 |
+ doins out/Release/*.bin || die |
682 |
+ doins out/Release/*.pak || die |
683 |
+ |
684 |
+ doins out/Release/icudtl.dat || die |
685 |
+ |
686 |
+ doins -r out/Release/locales || die |
687 |
+ doins -r out/Release/resources || die |
688 |
+ |
689 |
+ newman out/Release/chrome.1 chromium${CHROMIUM_SUFFIX}.1 || die |
690 |
+ newman out/Release/chrome.1 chromium-browser${CHROMIUM_SUFFIX}.1 || die |
691 |
+ |
692 |
+ # Install icons and desktop entry. |
693 |
+ local branding size |
694 |
+ for size in 16 22 24 32 48 64 128 256 ; do |
695 |
+ case ${size} in |
696 |
+ 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;; |
697 |
+ *) branding="chrome/app/theme/chromium" ;; |
698 |
+ esac |
699 |
+ newicon -s ${size} "${branding}/product_logo_${size}.png" \ |
700 |
+ chromium-browser${CHROMIUM_SUFFIX}.png |
701 |
+ done |
702 |
+ |
703 |
+ local mime_types="text/html;text/xml;application/xhtml+xml;" |
704 |
+ mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797 |
705 |
+ mime_types+="x-scheme-handler/ftp;" # bug #412185 |
706 |
+ mime_types+="x-scheme-handler/mailto;x-scheme-handler/webcal;" # bug #416393 |
707 |
+ make_desktop_entry \ |
708 |
+ chromium-browser${CHROMIUM_SUFFIX} \ |
709 |
+ "Chromium${CHROMIUM_SUFFIX}" \ |
710 |
+ chromium-browser${CHROMIUM_SUFFIX} \ |
711 |
+ "Network;WebBrowser" \ |
712 |
+ "MimeType=${mime_types}\nStartupWMClass=chromium-browser" |
713 |
+ sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die |
714 |
+ |
715 |
+ # Install GNOME default application entry (bug #303100). |
716 |
+ if use gnome; then |
717 |
+ dodir /usr/share/gnome-control-center/default-apps || die |
718 |
+ insinto /usr/share/gnome-control-center/default-apps |
719 |
+ newins "${FILESDIR}"/chromium-browser.xml chromium-browser${CHROMIUM_SUFFIX}.xml || die |
720 |
+ if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then |
721 |
+ sed "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" -i \ |
722 |
+ "${ED}"/usr/share/gnome-control-center/default-apps/chromium-browser${CHROMIUM_SUFFIX}.xml |
723 |
+ fi |
724 |
+ fi |
725 |
+ |
726 |
+ readme.gentoo_create_doc |
727 |
+} |
728 |
+ |
729 |
+pkg_postinst() { |
730 |
+ fdo-mime_desktop_database_update |
731 |
+ gnome2_icon_cache_update |
732 |
+ readme.gentoo_print_elog |
733 |
+} |