1 |
commit: 4558cba62dcd25a2afd55523fea2b07017f3b9b5 |
2 |
Author: Pawel Hajdan, Jr <phajdan.jr <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Mar 25 22:09:56 2016 +0000 |
4 |
Commit: Paweł Hajdan <phajdan.jr <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Mar 25 22:09:56 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4558cba6 |
7 |
|
8 |
www-client/chromium: dev channel bump (51.0.2693.2) |
9 |
|
10 |
Package-Manager: portage-2.2.26 |
11 |
|
12 |
www-client/chromium/Manifest | 1 + |
13 |
www-client/chromium/chromium-51.0.2693.2.ebuild | 697 ++++++++++++++++++++++++ |
14 |
2 files changed, 698 insertions(+) |
15 |
|
16 |
diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest |
17 |
index 0c13158..8f5ed27 100644 |
18 |
--- a/www-client/chromium/Manifest |
19 |
+++ b/www-client/chromium/Manifest |
20 |
@@ -1,3 +1,4 @@ |
21 |
DIST chromium-49.0.2623.108.tar.xz 520440328 SHA256 da083a2bf17ff4c9b09b7451a81dfb41ece6b50ad363df20e918909e8cbcb1c0 SHA512 4b52bad489c21f20598c2770a4240e07e57fc127492eea6d7401214d3dbc74fdc68a8f20bbcff5c12ff5ff51cb0e76e2585ed590c2ca14fac7b99f4dd9281ee3 WHIRLPOOL cd7ec9002e1c1bd794fd1448294bd7aedd9bfe83839f4270046edab7c66d11c0d9f3223aabdc33870831592c939aff4d7fc1e73608d4cc21709f1cd523f34728 |
22 |
DIST chromium-50.0.2661.37.tar.xz 462477912 SHA256 e67a0e083a446ab57cabe8c7d8e1047aac128ee1aecaddc3d9f801b178a7be39 SHA512 e620d005a1ce2bfd0f3fe940914ac4e117feadbc8a569fa6e32be2593d540dc350c1282675a9f8cb07402a5393203eed77894531f3a9fe2cf16cbb8f70c124d3 WHIRLPOOL 97b66dbfa1824f45a038f761aa1d41852c174853b80bc8c297497ac4d549e46d84b6eb1f6732615c258f14c12aa3b02f3826bebcf2afceca27d8e04f1b311cf8 |
23 |
DIST chromium-51.0.2687.0.tar.xz 462664524 SHA256 2453e8c43cec937e8ec38e69714a2a18827fffbd4646c62e50f64d99fb9d32f0 SHA512 518d22e5171bc668775356878b4d949ad9e531b329b06ea29f3c909865671da55ec809c058d262e9ece23fa0def805f02d893aba80e487259722a837315e99e2 WHIRLPOOL 98cb82f412c562c16b942000fb44102356bc74bfcc7917ce33db2839caddc5d69998c6e6307c4f35bc30c95ed7e6970a2500e86e1dc34da13ccfcb0656232452 |
24 |
+DIST chromium-51.0.2693.2.tar.xz 462914536 SHA256 14ce7bbdce06b1c548cd012572895ed7688d477456d354c99ad0cae8e9345010 SHA512 0b679d084f62f47d967674fd19af90d686f5aa0119ab350d167267a7b0b8acd7bdc53972292802e7987a4c52a254ef3a89d235135c48e70eac2e1282b1d92933 WHIRLPOOL f99bc9a76514ec008ee6aa5b3f739fa75cecf6148b61efdd70ac1787d3d96c308c0c5df4d8d3ca20ff374cd5560eafdbd33f1d156c5c32870b6d079ee2a51b82 |
25 |
|
26 |
diff --git a/www-client/chromium/chromium-51.0.2693.2.ebuild b/www-client/chromium/chromium-51.0.2693.2.ebuild |
27 |
new file mode 100644 |
28 |
index 0000000..c86d313 |
29 |
--- /dev/null |
30 |
+++ b/www-client/chromium/chromium-51.0.2693.2.ebuild |
31 |
@@ -0,0 +1,697 @@ |
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 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 |
+ epatch "${FILESDIR}/${PN}-gn-r0.patch" |
228 |
+ |
229 |
+ epatch_user |
230 |
+ |
231 |
+ local conditional_bundled_libraries="" |
232 |
+ if ! use system-ffmpeg; then |
233 |
+ conditional_bundled_libraries+=" third_party/ffmpeg" |
234 |
+ fi |
235 |
+ if use gn; then |
236 |
+ conditional_bundled_libraries+=" |
237 |
+ base/third_party/libevent |
238 |
+ third_party/adobe |
239 |
+ third_party/ffmpeg |
240 |
+ third_party/flac |
241 |
+ third_party/harfbuzz-ng |
242 |
+ third_party/icu |
243 |
+ third_party/jinja2 |
244 |
+ third_party/libjpeg_turbo |
245 |
+ third_party/libpng |
246 |
+ third_party/libwebp |
247 |
+ third_party/libxml |
248 |
+ third_party/libxslt |
249 |
+ third_party/markupsafe |
250 |
+ third_party/snappy |
251 |
+ third_party/speech-dispatcher |
252 |
+ third_party/usb_ids |
253 |
+ third_party/xdg-utils |
254 |
+ third_party/yasm |
255 |
+ third_party/zlib |
256 |
+ " |
257 |
+ fi |
258 |
+ |
259 |
+ # Remove most bundled libraries. Some are still needed. |
260 |
+ build/linux/unbundle/remove_bundled_libraries.py \ |
261 |
+ ${conditional_bundled_libraries} \ |
262 |
+ 'base/third_party/dmg_fp' \ |
263 |
+ 'base/third_party/dynamic_annotations' \ |
264 |
+ 'base/third_party/icu' \ |
265 |
+ 'base/third_party/nspr' \ |
266 |
+ 'base/third_party/superfasthash' \ |
267 |
+ 'base/third_party/symbolize' \ |
268 |
+ 'base/third_party/valgrind' \ |
269 |
+ 'base/third_party/xdg_mime' \ |
270 |
+ 'base/third_party/xdg_user_dirs' \ |
271 |
+ 'breakpad/src/third_party/curl' \ |
272 |
+ 'chrome/third_party/mozilla_security_manager' \ |
273 |
+ 'courgette/third_party' \ |
274 |
+ 'crypto/third_party/nss' \ |
275 |
+ 'net/third_party/mozilla_security_manager' \ |
276 |
+ 'net/third_party/nss' \ |
277 |
+ 'third_party/WebKit' \ |
278 |
+ 'third_party/analytics' \ |
279 |
+ 'third_party/angle' \ |
280 |
+ 'third_party/angle/src/third_party/compiler' \ |
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/npapi' \ |
331 |
+ 'third_party/openh264' \ |
332 |
+ 'third_party/openmax_dl' \ |
333 |
+ 'third_party/opus' \ |
334 |
+ 'third_party/ots' \ |
335 |
+ 'third_party/pdfium' \ |
336 |
+ 'third_party/pdfium/third_party/agg23' \ |
337 |
+ 'third_party/pdfium/third_party/base' \ |
338 |
+ 'third_party/pdfium/third_party/bigint' \ |
339 |
+ 'third_party/pdfium/third_party/freetype' \ |
340 |
+ 'third_party/pdfium/third_party/lcms2-2.6' \ |
341 |
+ 'third_party/pdfium/third_party/libjpeg' \ |
342 |
+ 'third_party/pdfium/third_party/libopenjpeg20' \ |
343 |
+ 'third_party/pdfium/third_party/zlib_v128' \ |
344 |
+ 'third_party/polymer' \ |
345 |
+ 'third_party/protobuf' \ |
346 |
+ 'third_party/qcms' \ |
347 |
+ 'third_party/re2' \ |
348 |
+ 'third_party/sfntly' \ |
349 |
+ 'third_party/skia' \ |
350 |
+ 'third_party/smhasher' \ |
351 |
+ 'third_party/sqlite' \ |
352 |
+ 'third_party/tcmalloc' \ |
353 |
+ 'third_party/usrsctp' \ |
354 |
+ 'third_party/web-animations-js' \ |
355 |
+ 'third_party/webdriver' \ |
356 |
+ 'third_party/webrtc' \ |
357 |
+ 'third_party/widevine' \ |
358 |
+ 'third_party/woff2' \ |
359 |
+ 'third_party/x86inc' \ |
360 |
+ 'third_party/zlib/google' \ |
361 |
+ 'url/third_party/mozilla' \ |
362 |
+ 'v8/src/third_party/fdlibm' \ |
363 |
+ 'v8/src/third_party/valgrind' \ |
364 |
+ --do-remove || die |
365 |
+} |
366 |
+ |
367 |
+src_configure() { |
368 |
+ local myconf_gyp="" |
369 |
+ local myconf_gn="" |
370 |
+ |
371 |
+ # GN needs explicit config for Debug/Release as opposed to inferring it from build directory. |
372 |
+ myconf_gn+=" is_debug=false" |
373 |
+ |
374 |
+ # Never tell the build system to "enable" SSE2, it has a few unexpected |
375 |
+ # additions, bug #336871. |
376 |
+ myconf_gyp+=" -Ddisable_sse2=1" |
377 |
+ |
378 |
+ # Disable nacl, we can't build without pnacl (http://crbug.com/269560). |
379 |
+ myconf_gyp+=" -Ddisable_nacl=1" |
380 |
+ myconf_gn+=" enable_nacl=false" |
381 |
+ |
382 |
+ # Make it possible to remove third_party/adobe. |
383 |
+ echo > "${T}/flapper_version.h" || die |
384 |
+ myconf_gyp+=" -Dflapper_version_h_file=${T}/flapper_version.h" |
385 |
+ |
386 |
+ # Use system-provided libraries. |
387 |
+ # TODO: use_system_hunspell (upstream changes needed). |
388 |
+ # TODO: use_system_icu (bug #576370). |
389 |
+ # TODO: use_system_libpng (bug #578212). |
390 |
+ # TODO: use_system_libsrtp (bug #459932). |
391 |
+ # TODO: use_system_libusb (http://crbug.com/266149). |
392 |
+ # TODO: use_system_libvpx (http://crbug.com/494939). |
393 |
+ # TODO: use_system_opus (https://code.google.com/p/webrtc/issues/detail?id=3077). |
394 |
+ # TODO: use_system_protobuf (bug #525560). |
395 |
+ # TODO: use_system_re2 (bug #571156). |
396 |
+ # TODO: use_system_ssl (http://crbug.com/58087). |
397 |
+ # TODO: use_system_sqlite (http://crbug.com/22208). |
398 |
+ myconf_gyp+=" |
399 |
+ -Duse_system_bzip2=1 |
400 |
+ -Duse_system_ffmpeg=$(usex system-ffmpeg 1 0) |
401 |
+ -Duse_system_flac=1 |
402 |
+ -Duse_system_harfbuzz=1 |
403 |
+ -Duse_system_jsoncpp=1 |
404 |
+ -Duse_system_libevent=1 |
405 |
+ -Duse_system_libjpeg=1 |
406 |
+ -Duse_system_libwebp=1 |
407 |
+ -Duse_system_libxml=1 |
408 |
+ -Duse_system_libxslt=1 |
409 |
+ -Duse_system_minizip=1 |
410 |
+ -Duse_system_nspr=1 |
411 |
+ -Duse_system_snappy=1 |
412 |
+ -Duse_system_speex=1 |
413 |
+ -Duse_system_xdg_utils=1 |
414 |
+ -Duse_system_zlib=1" |
415 |
+ |
416 |
+ # Needed for system icu - we don't need additional data files. |
417 |
+ # myconf_gyp+=" -Dicu_use_data_file_flag=0" |
418 |
+ |
419 |
+ # TODO: patch gyp so that this arm conditional is not needed. |
420 |
+ if ! use arm; then |
421 |
+ myconf_gyp+=" |
422 |
+ -Duse_system_yasm=1" |
423 |
+ fi |
424 |
+ |
425 |
+ # Optional dependencies. |
426 |
+ # TODO: linux_link_kerberos, bug #381289. |
427 |
+ myconf_gyp+=" |
428 |
+ $(gyp_use cups) |
429 |
+ $(gyp_use gnome use_gconf) |
430 |
+ $(gyp_use gnome-keyring use_gnome_keyring) |
431 |
+ $(gyp_use gnome-keyring linux_link_gnome_keyring) |
432 |
+ $(gyp_use gtk3) |
433 |
+ $(gyp_use hangouts enable_hangout_services_extension) |
434 |
+ $(gyp_use hidpi enable_hidpi) |
435 |
+ $(gyp_use hotwording enable_hotwording) |
436 |
+ $(gyp_use kerberos) |
437 |
+ $(gyp_use pulseaudio) |
438 |
+ $(gyp_use tcmalloc use_allocator tcmalloc none) |
439 |
+ $(gyp_use widevine enable_widevine)" |
440 |
+ |
441 |
+ myconf_gn+=" use_cups=$(usex cups true false)" |
442 |
+ myconf_gn+=" use_allocator=$(usex tcmalloc \"tcmalloc\" \"none\")" |
443 |
+ |
444 |
+ # Use explicit library dependencies instead of dlopen. |
445 |
+ # This makes breakages easier to detect by revdep-rebuild. |
446 |
+ myconf_gyp+=" |
447 |
+ -Dlinux_link_gsettings=1 |
448 |
+ -Dlinux_link_libpci=1 |
449 |
+ -Dlinux_link_libspeechd=1 |
450 |
+ -Dlibspeechd_h_prefix=speech-dispatcher/" |
451 |
+ |
452 |
+ # TODO: use the file at run time instead of effectively compiling it in. |
453 |
+ myconf_gyp+=" |
454 |
+ -Dusb_ids_path=/usr/share/misc/usb.ids" |
455 |
+ |
456 |
+ # Save space by removing DLOG and DCHECK messages (about 6% reduction). |
457 |
+ myconf_gyp+=" |
458 |
+ -Dlogging_like_official_build=1" |
459 |
+ |
460 |
+ if [[ $(tc-getCC) == *clang* ]]; then |
461 |
+ myconf_gyp+=" -Dclang=1" |
462 |
+ myconf_gn+=" is_clang=true" |
463 |
+ else |
464 |
+ myconf_gyp+=" -Dclang=0" |
465 |
+ myconf_gn+=" is_clang=false" |
466 |
+ fi |
467 |
+ |
468 |
+ # Never use bundled gold binary. Disable gold linker flags for now. |
469 |
+ # Do not use bundled clang. |
470 |
+ myconf_gyp+=" |
471 |
+ -Dclang_use_chrome_plugins=0 |
472 |
+ -Dhost_clang=0 |
473 |
+ -Dlinux_use_bundled_binutils=0 |
474 |
+ -Dlinux_use_bundled_gold=0 |
475 |
+ -Dlinux_use_gold_flags=0 |
476 |
+ -Dsysroot=" |
477 |
+ myconf_gn+=" use_sysroot=false" |
478 |
+ |
479 |
+ ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)" |
480 |
+ myconf_gyp+=" -Dproprietary_codecs=1 -Dffmpeg_branding=${ffmpeg_branding}" |
481 |
+ |
482 |
+ # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys . |
483 |
+ # Note: these are for Gentoo use ONLY. For your own distribution, |
484 |
+ # please get your own set of keys. Feel free to contact chromium@g.o |
485 |
+ # for more info. |
486 |
+ myconf_gyp+=" -Dgoogle_api_key=AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc |
487 |
+ -Dgoogle_default_client_id=329227923882.apps.googleusercontent.com |
488 |
+ -Dgoogle_default_client_secret=vgKG0NNv7GoDpbtoFNLxCUXu" |
489 |
+ |
490 |
+ local myarch="$(tc-arch)" |
491 |
+ if [[ $myarch = amd64 ]] ; then |
492 |
+ target_arch=x64 |
493 |
+ ffmpeg_target_arch=x64 |
494 |
+ elif [[ $myarch = x86 ]] ; then |
495 |
+ target_arch=ia32 |
496 |
+ ffmpeg_target_arch=ia32 |
497 |
+ elif [[ $myarch = arm64 ]] ; then |
498 |
+ target_arch=arm64 |
499 |
+ ffmpeg_target_arch=arm64 |
500 |
+ elif [[ $myarch = arm ]] ; then |
501 |
+ target_arch=arm |
502 |
+ ffmpeg_target_arch=$(usex neon arm-neon arm) |
503 |
+ # TODO: re-enable NaCl (NativeClient). |
504 |
+ local CTARGET=${CTARGET:-${CHOST}} |
505 |
+ if [[ $(tc-is-softfloat) == "no" ]]; then |
506 |
+ |
507 |
+ myconf_gyp+=" -Darm_float_abi=hard" |
508 |
+ fi |
509 |
+ filter-flags "-mfpu=*" |
510 |
+ use neon || myconf_gyp+=" -Darm_fpu=${ARM_FPU:-vfpv3-d16}" |
511 |
+ |
512 |
+ if [[ ${CTARGET} == armv[78]* ]]; then |
513 |
+ myconf_gyp+=" -Darmv7=1" |
514 |
+ else |
515 |
+ myconf_gyp+=" -Darmv7=0" |
516 |
+ fi |
517 |
+ myconf_gyp+=" -Dsysroot= |
518 |
+ $(gyp_use neon arm_neon) |
519 |
+ -Ddisable_nacl=1" |
520 |
+ else |
521 |
+ die "Failed to determine target arch, got '$myarch'." |
522 |
+ fi |
523 |
+ |
524 |
+ myconf_gyp+=" -Dtarget_arch=${target_arch}" |
525 |
+ |
526 |
+ # Make sure that -Werror doesn't get added to CFLAGS by the build system. |
527 |
+ # Depending on GCC version the warnings are different and we don't want |
528 |
+ # the build to fail because of that. |
529 |
+ myconf_gyp+=" -Dwerror=" |
530 |
+ myconf_gn+=" treat_warnings_as_errors=false" |
531 |
+ |
532 |
+ # Disable fatal linker warnings, bug 506268. |
533 |
+ myconf_gyp+=" -Ddisable_fatal_linker_warnings=1" |
534 |
+ |
535 |
+ # Avoid CFLAGS problems, bug #352457, bug #390147. |
536 |
+ if ! use custom-cflags; then |
537 |
+ replace-flags "-Os" "-O2" |
538 |
+ strip-flags |
539 |
+ |
540 |
+ # Prevent linker from running out of address space, bug #471810 . |
541 |
+ if use x86; then |
542 |
+ filter-flags "-g*" |
543 |
+ fi |
544 |
+ |
545 |
+ # Prevent libvpx build failures. Bug 530248, 544702, 546984. |
546 |
+ if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then |
547 |
+ filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2 |
548 |
+ fi |
549 |
+ fi |
550 |
+ |
551 |
+ # Make sure the build system will use the right tools, bug #340795. |
552 |
+ tc-export AR CC CXX NM |
553 |
+ |
554 |
+ # Tools for building programs to be executed on the build system, bug #410883. |
555 |
+ if tc-is-cross-compiler; then |
556 |
+ export AR_host=$(tc-getBUILD_AR) |
557 |
+ export CC_host=$(tc-getBUILD_CC) |
558 |
+ export CXX_host=$(tc-getBUILD_CXX) |
559 |
+ export NM_host=$(tc-getBUILD_NM) |
560 |
+ fi |
561 |
+ |
562 |
+ # Bug 491582. |
563 |
+ export TMPDIR="${WORKDIR}/temp" |
564 |
+ mkdir -p -m 755 "${TMPDIR}" || die |
565 |
+ |
566 |
+ # TODO: also do this for GN bundled ffmpeg build. |
567 |
+ if ! use system-ffmpeg && ! use gn; then |
568 |
+ local build_ffmpeg_args="" |
569 |
+ if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then |
570 |
+ build_ffmpeg_args+=" --disable-asm" |
571 |
+ fi |
572 |
+ |
573 |
+ # Re-configure bundled ffmpeg. See bug #491378 for example reasons. |
574 |
+ einfo "Configuring bundled ffmpeg..." |
575 |
+ pushd third_party/ffmpeg > /dev/null || die |
576 |
+ chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \ |
577 |
+ --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die |
578 |
+ chromium/scripts/copy_config.sh || die |
579 |
+ chromium/scripts/generate_gyp.py || die |
580 |
+ popd > /dev/null || die |
581 |
+ fi |
582 |
+ |
583 |
+ third_party/libaddressinput/chromium/tools/update-strings.py || die |
584 |
+ |
585 |
+ touch chrome/test/data/webui/i18n_process_css_test.html || die |
586 |
+ |
587 |
+ einfo "Configuring Chromium..." |
588 |
+ if use gn; then |
589 |
+ tools/gn/bootstrap/bootstrap.py -v --gn-gen-args "${myconf_gn}" || die |
590 |
+ out/Release/gn gen --args="${myconf_gn}" out/Release || die |
591 |
+ else |
592 |
+ build/linux/unbundle/replace_gyp_files.py ${myconf_gyp} || die |
593 |
+ egyp_chromium ${myconf_gyp} || die |
594 |
+ fi |
595 |
+} |
596 |
+ |
597 |
+eninja() { |
598 |
+ if [[ -z ${NINJAOPTS+set} ]]; then |
599 |
+ local jobs=$(makeopts_jobs) |
600 |
+ local loadavg=$(makeopts_loadavg) |
601 |
+ |
602 |
+ if [[ ${MAKEOPTS} == *-j* && ${jobs} != 999 ]]; then |
603 |
+ NINJAOPTS+=" -j ${jobs}" |
604 |
+ fi |
605 |
+ if [[ ${MAKEOPTS} == *-l* && ${loadavg} != 999 ]]; then |
606 |
+ NINJAOPTS+=" -l ${loadavg}" |
607 |
+ fi |
608 |
+ fi |
609 |
+ set -- ninja -v ${NINJAOPTS} "$@" |
610 |
+ echo "$@" |
611 |
+ "$@" |
612 |
+} |
613 |
+ |
614 |
+src_compile() { |
615 |
+ local ninja_targets="chrome chrome_sandbox chromedriver" |
616 |
+ |
617 |
+ if ! use gn; then |
618 |
+ # Build mksnapshot and pax-mark it. |
619 |
+ eninja -C out/Release mksnapshot || die |
620 |
+ pax-mark m out/Release/mksnapshot |
621 |
+ fi |
622 |
+ |
623 |
+ # Even though ninja autodetects number of CPUs, we respect |
624 |
+ # user's options, for debugging with -j 1 or any other reason. |
625 |
+ eninja -C out/Release ${ninja_targets} || die |
626 |
+ |
627 |
+ pax-mark m out/Release/chrome |
628 |
+} |
629 |
+ |
630 |
+src_install() { |
631 |
+ exeinto "${CHROMIUM_HOME}" |
632 |
+ doexe out/Release/chrome || die |
633 |
+ |
634 |
+ newexe out/Release/chrome_sandbox chrome-sandbox || die |
635 |
+ fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox" |
636 |
+ |
637 |
+ doexe out/Release/chromedriver || die |
638 |
+ use widevine && doexe out/Release/libwidevinecdmadapter.so |
639 |
+ |
640 |
+ # if ! use arm; then |
641 |
+ # doexe out/Release/nacl_helper{,_bootstrap} || die |
642 |
+ # insinto "${CHROMIUM_HOME}" |
643 |
+ # doins out/Release/nacl_irt_*.nexe || die |
644 |
+ # doins out/Release/libppGoogleNaClPluginChrome.so || die |
645 |
+ # fi |
646 |
+ |
647 |
+ local sedargs=( -e "s:/usr/lib/:/usr/$(get_libdir)/:g" ) |
648 |
+ if [[ -n ${CHROMIUM_SUFFIX} ]]; then |
649 |
+ sedargs+=( |
650 |
+ -e "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" |
651 |
+ -e "s:chromium.desktop:chromium${CHROMIUM_SUFFIX}.desktop:g" |
652 |
+ -e "s:plugins:plugins --user-data-dir=\${HOME}/.config/chromium${CHROMIUM_SUFFIX}:" |
653 |
+ ) |
654 |
+ fi |
655 |
+ sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r3.sh" > chromium-launcher.sh || die |
656 |
+ doexe chromium-launcher.sh |
657 |
+ |
658 |
+ # It is important that we name the target "chromium-browser", |
659 |
+ # xdg-utils expect it; bug #355517. |
660 |
+ dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser${CHROMIUM_SUFFIX} || die |
661 |
+ # keep the old symlink around for consistency |
662 |
+ dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium${CHROMIUM_SUFFIX} || die |
663 |
+ |
664 |
+ dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver${CHROMIUM_SUFFIX} || die |
665 |
+ |
666 |
+ # Allow users to override command-line options, bug #357629. |
667 |
+ dodir /etc/chromium || die |
668 |
+ insinto /etc/chromium |
669 |
+ newins "${FILESDIR}/chromium.default" "default" || die |
670 |
+ |
671 |
+ pushd out/Release/locales > /dev/null || die |
672 |
+ chromium_remove_language_paks |
673 |
+ popd |
674 |
+ |
675 |
+ insinto "${CHROMIUM_HOME}" |
676 |
+ doins out/Release/*.bin || die |
677 |
+ doins out/Release/*.pak || die |
678 |
+ |
679 |
+ doins out/Release/icudtl.dat || die |
680 |
+ |
681 |
+ doins -r out/Release/locales || die |
682 |
+ doins -r out/Release/resources || die |
683 |
+ |
684 |
+ newman out/Release/chrome.1 chromium${CHROMIUM_SUFFIX}.1 || die |
685 |
+ newman out/Release/chrome.1 chromium-browser${CHROMIUM_SUFFIX}.1 || die |
686 |
+ |
687 |
+ # Install icons and desktop entry. |
688 |
+ local branding size |
689 |
+ for size in 16 22 24 32 48 64 128 256 ; do |
690 |
+ case ${size} in |
691 |
+ 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;; |
692 |
+ *) branding="chrome/app/theme/chromium" ;; |
693 |
+ esac |
694 |
+ newicon -s ${size} "${branding}/product_logo_${size}.png" \ |
695 |
+ chromium-browser${CHROMIUM_SUFFIX}.png |
696 |
+ done |
697 |
+ |
698 |
+ local mime_types="text/html;text/xml;application/xhtml+xml;" |
699 |
+ mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797 |
700 |
+ mime_types+="x-scheme-handler/ftp;" # bug #412185 |
701 |
+ mime_types+="x-scheme-handler/mailto;x-scheme-handler/webcal;" # bug #416393 |
702 |
+ make_desktop_entry \ |
703 |
+ chromium-browser${CHROMIUM_SUFFIX} \ |
704 |
+ "Chromium${CHROMIUM_SUFFIX}" \ |
705 |
+ chromium-browser${CHROMIUM_SUFFIX} \ |
706 |
+ "Network;WebBrowser" \ |
707 |
+ "MimeType=${mime_types}\nStartupWMClass=chromium-browser" |
708 |
+ sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die |
709 |
+ |
710 |
+ # Install GNOME default application entry (bug #303100). |
711 |
+ if use gnome; then |
712 |
+ dodir /usr/share/gnome-control-center/default-apps || die |
713 |
+ insinto /usr/share/gnome-control-center/default-apps |
714 |
+ newins "${FILESDIR}"/chromium-browser.xml chromium-browser${CHROMIUM_SUFFIX}.xml || die |
715 |
+ if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then |
716 |
+ sed "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" -i \ |
717 |
+ "${ED}"/usr/share/gnome-control-center/default-apps/chromium-browser${CHROMIUM_SUFFIX}.xml |
718 |
+ fi |
719 |
+ fi |
720 |
+ |
721 |
+ readme.gentoo_create_doc |
722 |
+} |
723 |
+ |
724 |
+pkg_postinst() { |
725 |
+ fdo-mime_desktop_database_update |
726 |
+ gnome2_icon_cache_update |
727 |
+ readme.gentoo_print_elog |
728 |
+} |