1 |
commit: 6997dbe69bdaf81920096529a95264a50b838610 |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Dec 13 04:41:04 2018 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Dec 13 04:41:25 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6997dbe6 |
7 |
|
8 |
www-client/chromium: stable channel bump (71.0.3578.98) |
9 |
|
10 |
Package-Manager: Portage-2.3.52_p8, Repoman-2.3.12_p20 |
11 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
12 |
|
13 |
www-client/chromium/Manifest | 1 + |
14 |
www-client/chromium/chromium-71.0.3578.98.ebuild | 713 +++++++++++++++++++++++ |
15 |
2 files changed, 714 insertions(+) |
16 |
|
17 |
diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest |
18 |
index 130bee3cceb..f21ada13cca 100644 |
19 |
--- a/www-client/chromium/Manifest |
20 |
+++ b/www-client/chromium/Manifest |
21 |
@@ -1,2 +1,3 @@ |
22 |
DIST chromium-71.0.3578.80.tar.xz 633878288 BLAKE2B be6dcb4c1123830f8f0413e52e46c6e3356356cbfadcaa77c3960f22a6f1f2f5a7a2e7da415b7c19b75d6cd4b881d45a8aeaa7c311547ac58fc34c87fdf23891 SHA512 79b0f5ebe71a34d9f5215df1b4e47071f2337bb480fbec591011653acdfe524419bd10efdeab334ac34c07bc4eb2c485d60a9c3b2f053a721271130ff98af516 |
23 |
+DIST chromium-71.0.3578.98.tar.xz 633860888 BLAKE2B f232fa3ecef45b3e7d0c9876c2d9133ed0a51f2241c3b354592ea62817b7660e7a91869f0d7f1aee60384e9b87644b837af36ff5d802cee986346778946ce0be SHA512 dbeb90e16c6c05422c1f43e8fe747d60dab49c1fffdd0f33824ca24429f3871bda649eb1e6402470d3d9bb701e47d55d2fff4f46530e3f43e72f516d1837aad6 |
24 |
DIST chromium-72.0.3595.2.tar.xz 658797888 BLAKE2B 7f0274693e8fac283d75c7e7ff6f672a10937454d989e9aa728b4a9646fe92bd8aaa8c154913d71dd86fd7ced595c1b2475248a9fb521984049af04f289f3f43 SHA512 7d5130e45e28ccf7389c64ca24a12ffc84922ca40d2c0e9a2d9caf27eb40a08cfdda8a902c6d747f864071b6eec752287fe2654f62e7e6c5c42c1334c5f35766 |
25 |
|
26 |
diff --git a/www-client/chromium/chromium-71.0.3578.98.ebuild b/www-client/chromium/chromium-71.0.3578.98.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..fd9d0c56bc0 |
29 |
--- /dev/null |
30 |
+++ b/www-client/chromium/chromium-71.0.3578.98.ebuild |
31 |
@@ -0,0 +1,713 @@ |
32 |
+# Copyright 1999-2018 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=7 |
36 |
+PYTHON_COMPAT=( python2_7 ) |
37 |
+ |
38 |
+CHROMIUM_LANGS="am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu he |
39 |
+ 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 |
40 |
+ sv sw ta te th tr uk vi zh-CN zh-TW" |
41 |
+ |
42 |
+inherit check-reqs chromium-2 desktop flag-o-matic multilib ninja-utils pax-utils portability python-any-r1 readme.gentoo-r1 toolchain-funcs xdg-utils |
43 |
+ |
44 |
+DESCRIPTION="Open-source version of Google Chrome web browser" |
45 |
+HOMEPAGE="http://chromium.org/" |
46 |
+SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.xz" |
47 |
+ |
48 |
+LICENSE="BSD" |
49 |
+SLOT="0" |
50 |
+KEYWORDS="~amd64 ~x86" |
51 |
+IUSE="component-build cups gnome-keyring +hangouts jumbo-build kerberos neon pic +proprietary-codecs pulseaudio selinux +suid +system-ffmpeg +system-icu +system-libvpx +tcmalloc widevine" |
52 |
+RESTRICT="!system-ffmpeg? ( proprietary-codecs? ( bindist ) )" |
53 |
+ |
54 |
+COMMON_DEPEND=" |
55 |
+ >=app-accessibility/at-spi2-atk-2.26:2 |
56 |
+ app-arch/bzip2:= |
57 |
+ cups? ( >=net-print/cups-1.3.11:= ) |
58 |
+ >=dev-libs/atk-2.26 |
59 |
+ dev-libs/expat:= |
60 |
+ dev-libs/glib:2 |
61 |
+ system-icu? ( >=dev-libs/icu-59:= ) |
62 |
+ >=dev-libs/libxml2-2.9.4-r3:=[icu] |
63 |
+ dev-libs/libxslt:= |
64 |
+ dev-libs/nspr:= |
65 |
+ >=dev-libs/nss-3.26:= |
66 |
+ >=dev-libs/re2-0.2016.11.01:= |
67 |
+ gnome-keyring? ( >=gnome-base/libgnome-keyring-3.12:= ) |
68 |
+ >=media-libs/alsa-lib-1.0.19:= |
69 |
+ media-libs/fontconfig:= |
70 |
+ media-libs/freetype:= |
71 |
+ >=media-libs/harfbuzz-2.0.0:0=[icu(-)] |
72 |
+ media-libs/libjpeg-turbo:= |
73 |
+ media-libs/libpng:= |
74 |
+ system-libvpx? ( media-libs/libvpx:=[postproc,svc] ) |
75 |
+ >=media-libs/openh264-1.6.0:= |
76 |
+ pulseaudio? ( media-sound/pulseaudio:= ) |
77 |
+ system-ffmpeg? ( |
78 |
+ >=media-video/ffmpeg-4:= |
79 |
+ || ( |
80 |
+ media-video/ffmpeg[-samba] |
81 |
+ >=net-fs/samba-4.5.10-r1[-debug(-)] |
82 |
+ ) |
83 |
+ !=net-fs/samba-4.5.12-r0 |
84 |
+ media-libs/opus:= |
85 |
+ ) |
86 |
+ sys-apps/dbus:= |
87 |
+ sys-apps/pciutils:= |
88 |
+ virtual/udev |
89 |
+ x11-libs/cairo:= |
90 |
+ x11-libs/gdk-pixbuf:2 |
91 |
+ x11-libs/gtk+:3[X] |
92 |
+ x11-libs/libX11:= |
93 |
+ x11-libs/libXcomposite:= |
94 |
+ x11-libs/libXcursor:= |
95 |
+ x11-libs/libXdamage:= |
96 |
+ x11-libs/libXext:= |
97 |
+ x11-libs/libXfixes:= |
98 |
+ >=x11-libs/libXi-1.6.0:= |
99 |
+ x11-libs/libXrandr:= |
100 |
+ x11-libs/libXrender:= |
101 |
+ x11-libs/libXScrnSaver:= |
102 |
+ x11-libs/libXtst:= |
103 |
+ x11-libs/pango:= |
104 |
+ app-arch/snappy:= |
105 |
+ media-libs/flac:= |
106 |
+ >=media-libs/libwebp-0.4.0:= |
107 |
+ sys-libs/zlib:=[minizip] |
108 |
+ kerberos? ( virtual/krb5 ) |
109 |
+" |
110 |
+# For nvidia-drivers blocker, see bug #413637 . |
111 |
+RDEPEND="${COMMON_DEPEND} |
112 |
+ !<www-plugins/chrome-binary-plugins-57 |
113 |
+ x11-misc/xdg-utils |
114 |
+ virtual/opengl |
115 |
+ virtual/ttf-fonts |
116 |
+ selinux? ( sec-policy/selinux-chromium ) |
117 |
+ tcmalloc? ( !<x11-drivers/nvidia-drivers-331.20 ) |
118 |
+ widevine? ( www-plugins/chrome-binary-plugins[widevine(-)] ) |
119 |
+" |
120 |
+# dev-vcs/git - https://bugs.gentoo.org/593476 |
121 |
+# sys-apps/sandbox - https://crbug.com/586444 |
122 |
+DEPEND="${COMMON_DEPEND} |
123 |
+" |
124 |
+BDEPEND=" |
125 |
+ >=app-arch/gzip-1.7 |
126 |
+ !arm? ( |
127 |
+ dev-lang/yasm |
128 |
+ ) |
129 |
+ dev-lang/perl |
130 |
+ dev-util/gn |
131 |
+ >=dev-util/gperf-3.0.3 |
132 |
+ >=dev-util/ninja-1.7.2 |
133 |
+ >=net-libs/nodejs-7.6.0[inspector] |
134 |
+ sys-apps/hwids[usb(+)] |
135 |
+ >=sys-devel/bison-2.4.3 |
136 |
+ sys-devel/flex |
137 |
+ virtual/pkgconfig |
138 |
+ dev-vcs/git |
139 |
+" |
140 |
+ |
141 |
+: ${CHROMIUM_FORCE_CLANG=no} |
142 |
+ |
143 |
+if [[ ${CHROMIUM_FORCE_CLANG} == yes ]]; then |
144 |
+ BDEPEND+=" >=sys-devel/clang-5" |
145 |
+fi |
146 |
+ |
147 |
+if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then |
148 |
+ EBUILD_DEATH_HOOKS+=" chromium_pkg_die"; |
149 |
+fi |
150 |
+ |
151 |
+DISABLE_AUTOFORMATTING="yes" |
152 |
+DOC_CONTENTS=" |
153 |
+Some web pages may require additional fonts to display properly. |
154 |
+Try installing some of the following packages if some characters |
155 |
+are not displayed properly: |
156 |
+- media-fonts/arphicfonts |
157 |
+- media-fonts/droid |
158 |
+- media-fonts/ipamonafont |
159 |
+- media-fonts/noto |
160 |
+- media-fonts/ja-ipafonts |
161 |
+- media-fonts/takao-fonts |
162 |
+- media-fonts/wqy-microhei |
163 |
+- media-fonts/wqy-zenhei |
164 |
+ |
165 |
+To fix broken icons on the Downloads page, you should install an icon |
166 |
+theme that covers the appropriate MIME types, and configure this as your |
167 |
+GTK+ icon theme. |
168 |
+" |
169 |
+ |
170 |
+PATCHES=( |
171 |
+ "${FILESDIR}/chromium-compiler-r6.patch" |
172 |
+ "${FILESDIR}/chromium-widevine-r3.patch" |
173 |
+ "${FILESDIR}/chromium-webrtc-r0.patch" |
174 |
+ "${FILESDIR}/chromium-memcpy-r0.patch" |
175 |
+ "${FILESDIR}/chromium-math.h-r0.patch" |
176 |
+ "${FILESDIR}/chromium-stdint.patch" |
177 |
+ "${FILESDIR}/chromium-harfbuzz-r0.patch" |
178 |
+ "${FILESDIR}/chromium-71-gcc-0.patch" |
179 |
+) |
180 |
+ |
181 |
+pre_build_checks() { |
182 |
+ #if [[ ${MERGE_TYPE} != binary ]]; then |
183 |
+ # local -x CPP="$(tc-getCXX) -E" |
184 |
+ # if tc-is-clang && ! version_is_at_least "3.9.1" "$(clang-fullversion)"; then |
185 |
+ # # bugs: #601654 |
186 |
+ # die "At least clang 3.9.1 is required" |
187 |
+ # fi |
188 |
+ # if tc-is-gcc && ! version_is_at_least 5.0 "$(gcc-version)"; then |
189 |
+ # # bugs: #535730, #525374, #518668, #600288, #627356 |
190 |
+ # die "At least gcc 5.0 is required" |
191 |
+ # fi |
192 |
+ #fi |
193 |
+ |
194 |
+ # Check build requirements, bug #541816 and bug #471810 . |
195 |
+ CHECKREQS_MEMORY="3G" |
196 |
+ CHECKREQS_DISK_BUILD="5G" |
197 |
+ if ( shopt -s extglob; is-flagq '-g?(gdb)?([1-9])' ); then |
198 |
+ CHECKREQS_DISK_BUILD="25G" |
199 |
+ if ! use component-build; then |
200 |
+ CHECKREQS_MEMORY="16G" |
201 |
+ fi |
202 |
+ fi |
203 |
+ check-reqs_pkg_setup |
204 |
+} |
205 |
+ |
206 |
+pkg_pretend() { |
207 |
+ pre_build_checks |
208 |
+} |
209 |
+ |
210 |
+pkg_setup() { |
211 |
+ pre_build_checks |
212 |
+ |
213 |
+ chromium_suid_sandbox_check_kernel_config |
214 |
+} |
215 |
+ |
216 |
+src_prepare() { |
217 |
+ # Calling this here supports resumption via FEATURES=keepwork |
218 |
+ python_setup |
219 |
+ |
220 |
+ default |
221 |
+ |
222 |
+ mkdir -p third_party/node/linux/node-linux-x64/bin || die |
223 |
+ ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die |
224 |
+ |
225 |
+ local keeplibs=( |
226 |
+ base/third_party/dmg_fp |
227 |
+ base/third_party/dynamic_annotations |
228 |
+ base/third_party/icu |
229 |
+ base/third_party/nspr |
230 |
+ base/third_party/superfasthash |
231 |
+ base/third_party/symbolize |
232 |
+ base/third_party/valgrind |
233 |
+ base/third_party/xdg_mime |
234 |
+ base/third_party/xdg_user_dirs |
235 |
+ buildtools/third_party/libc++ |
236 |
+ buildtools/third_party/libc++abi |
237 |
+ chrome/third_party/mozilla_security_manager |
238 |
+ courgette/third_party |
239 |
+ net/third_party/http2 |
240 |
+ net/third_party/mozilla_security_manager |
241 |
+ net/third_party/nss |
242 |
+ net/third_party/quic |
243 |
+ net/third_party/spdy |
244 |
+ net/third_party/uri_template |
245 |
+ third_party/WebKit |
246 |
+ third_party/abseil-cpp |
247 |
+ third_party/analytics |
248 |
+ third_party/angle |
249 |
+ third_party/angle/src/common/third_party/base |
250 |
+ third_party/angle/src/common/third_party/smhasher |
251 |
+ third_party/angle/src/third_party/compiler |
252 |
+ third_party/angle/src/third_party/libXNVCtrl |
253 |
+ third_party/angle/src/third_party/trace_event |
254 |
+ third_party/angle/third_party/glslang |
255 |
+ third_party/angle/third_party/spirv-headers |
256 |
+ third_party/angle/third_party/spirv-tools |
257 |
+ third_party/angle/third_party/vulkan-headers |
258 |
+ third_party/angle/third_party/vulkan-loader |
259 |
+ third_party/angle/third_party/vulkan-tools |
260 |
+ third_party/angle/third_party/vulkan-validation-layers |
261 |
+ third_party/apple_apsl |
262 |
+ third_party/blink |
263 |
+ third_party/boringssl |
264 |
+ third_party/boringssl/src/third_party/fiat |
265 |
+ third_party/breakpad |
266 |
+ third_party/breakpad/breakpad/src/third_party/curl |
267 |
+ third_party/brotli |
268 |
+ third_party/cacheinvalidation |
269 |
+ third_party/catapult |
270 |
+ third_party/catapult/common/py_vulcanize/third_party/rcssmin |
271 |
+ third_party/catapult/common/py_vulcanize/third_party/rjsmin |
272 |
+ third_party/catapult/third_party/beautifulsoup4 |
273 |
+ third_party/catapult/third_party/html5lib-python |
274 |
+ third_party/catapult/third_party/polymer |
275 |
+ third_party/catapult/third_party/six |
276 |
+ third_party/catapult/tracing/third_party/d3 |
277 |
+ third_party/catapult/tracing/third_party/gl-matrix |
278 |
+ third_party/catapult/tracing/third_party/jszip |
279 |
+ third_party/catapult/tracing/third_party/mannwhitneyu |
280 |
+ third_party/catapult/tracing/third_party/oboe |
281 |
+ third_party/catapult/tracing/third_party/pako |
282 |
+ third_party/ced |
283 |
+ third_party/cld_3 |
284 |
+ third_party/crashpad |
285 |
+ third_party/crashpad/crashpad/third_party/zlib |
286 |
+ third_party/crc32c |
287 |
+ third_party/cros_system_api |
288 |
+ third_party/devscripts |
289 |
+ third_party/dom_distiller_js |
290 |
+ third_party/fips181 |
291 |
+ third_party/flatbuffers |
292 |
+ third_party/flot |
293 |
+ third_party/freetype |
294 |
+ third_party/glslang-angle |
295 |
+ third_party/google_input_tools |
296 |
+ third_party/google_input_tools/third_party/closure_library |
297 |
+ third_party/google_input_tools/third_party/closure_library/third_party/closure |
298 |
+ third_party/googletest |
299 |
+ third_party/hunspell |
300 |
+ third_party/iccjpeg |
301 |
+ third_party/inspector_protocol |
302 |
+ third_party/jinja2 |
303 |
+ third_party/jsoncpp |
304 |
+ third_party/jstemplate |
305 |
+ third_party/khronos |
306 |
+ third_party/leveldatabase |
307 |
+ third_party/libXNVCtrl |
308 |
+ third_party/libaddressinput |
309 |
+ third_party/libaom |
310 |
+ third_party/libaom/source/libaom/third_party/vector |
311 |
+ third_party/libaom/source/libaom/third_party/x86inc |
312 |
+ third_party/libjingle |
313 |
+ third_party/libphonenumber |
314 |
+ third_party/libsecret |
315 |
+ third_party/libsrtp |
316 |
+ third_party/libsync |
317 |
+ third_party/libudev |
318 |
+ third_party/libwebm |
319 |
+ third_party/libxml/chromium |
320 |
+ third_party/libyuv |
321 |
+ third_party/llvm |
322 |
+ third_party/lss |
323 |
+ third_party/lzma_sdk |
324 |
+ third_party/markupsafe |
325 |
+ third_party/mesa |
326 |
+ third_party/metrics_proto |
327 |
+ third_party/modp_b64 |
328 |
+ third_party/node |
329 |
+ third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2 |
330 |
+ third_party/openmax_dl |
331 |
+ third_party/ots |
332 |
+ third_party/pdfium |
333 |
+ third_party/pdfium/third_party/agg23 |
334 |
+ third_party/pdfium/third_party/base |
335 |
+ third_party/pdfium/third_party/bigint |
336 |
+ third_party/pdfium/third_party/freetype |
337 |
+ third_party/pdfium/third_party/lcms |
338 |
+ third_party/pdfium/third_party/libopenjpeg20 |
339 |
+ third_party/pdfium/third_party/libpng16 |
340 |
+ third_party/pdfium/third_party/libtiff |
341 |
+ third_party/pdfium/third_party/skia_shared |
342 |
+ third_party/perfetto |
343 |
+ third_party/ply |
344 |
+ third_party/polymer |
345 |
+ third_party/protobuf |
346 |
+ third_party/protobuf/third_party/six |
347 |
+ third_party/pyjson5 |
348 |
+ third_party/qcms |
349 |
+ third_party/rnnoise |
350 |
+ third_party/s2cellid |
351 |
+ third_party/sfntly |
352 |
+ third_party/simplejson |
353 |
+ third_party/skia |
354 |
+ third_party/skia/third_party/gif |
355 |
+ third_party/skia/third_party/skcms |
356 |
+ third_party/skia/third_party/vulkan |
357 |
+ third_party/smhasher |
358 |
+ third_party/spirv-headers |
359 |
+ third_party/SPIRV-Tools |
360 |
+ third_party/spirv-tools-angle |
361 |
+ third_party/sqlite |
362 |
+ third_party/swiftshader |
363 |
+ third_party/swiftshader/third_party/llvm-subzero |
364 |
+ third_party/swiftshader/third_party/subzero |
365 |
+ third_party/unrar |
366 |
+ third_party/usrsctp |
367 |
+ third_party/vulkan |
368 |
+ third_party/vulkan-validation-layers |
369 |
+ third_party/web-animations-js |
370 |
+ third_party/webdriver |
371 |
+ third_party/webrtc |
372 |
+ third_party/webrtc/common_audio/third_party/fft4g |
373 |
+ third_party/webrtc/common_audio/third_party/spl_sqrt_floor |
374 |
+ third_party/webrtc/modules/third_party/fft |
375 |
+ third_party/webrtc/modules/third_party/g711 |
376 |
+ third_party/webrtc/modules/third_party/g722 |
377 |
+ third_party/webrtc/rtc_base/third_party/base64 |
378 |
+ third_party/webrtc/rtc_base/third_party/sigslot |
379 |
+ third_party/widevine |
380 |
+ third_party/woff2 |
381 |
+ third_party/zlib/google |
382 |
+ url/third_party/mozilla |
383 |
+ v8/src/third_party/valgrind |
384 |
+ v8/src/third_party/utf8-decoder |
385 |
+ v8/third_party/inspector_protocol |
386 |
+ v8/third_party/v8 |
387 |
+ |
388 |
+ # gyp -> gn leftovers |
389 |
+ base/third_party/libevent |
390 |
+ third_party/adobe |
391 |
+ third_party/speech-dispatcher |
392 |
+ third_party/usb_ids |
393 |
+ third_party/xdg-utils |
394 |
+ third_party/yasm/run_yasm.py |
395 |
+ ) |
396 |
+ if ! use system-ffmpeg; then |
397 |
+ keeplibs+=( third_party/ffmpeg third_party/opus ) |
398 |
+ fi |
399 |
+ if ! use system-icu; then |
400 |
+ keeplibs+=( third_party/icu ) |
401 |
+ fi |
402 |
+ if ! use system-libvpx; then |
403 |
+ keeplibs+=( third_party/libvpx ) |
404 |
+ keeplibs+=( third_party/libvpx/source/libvpx/third_party/x86inc ) |
405 |
+ fi |
406 |
+ if use tcmalloc; then |
407 |
+ keeplibs+=( third_party/tcmalloc ) |
408 |
+ fi |
409 |
+ |
410 |
+ # Remove most bundled libraries. Some are still needed. |
411 |
+ build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die |
412 |
+} |
413 |
+ |
414 |
+src_configure() { |
415 |
+ # Calling this here supports resumption via FEATURES=keepwork |
416 |
+ python_setup |
417 |
+ |
418 |
+ local myconf_gn="" |
419 |
+ |
420 |
+ # Make sure the build system will use the right tools, bug #340795. |
421 |
+ tc-export AR CC CXX NM |
422 |
+ |
423 |
+ if [[ ${CHROMIUM_FORCE_CLANG} == yes ]] && ! tc-is-clang; then |
424 |
+ # Force clang since gcc is pretty broken at the moment. |
425 |
+ CC=${CHOST}-clang |
426 |
+ CXX=${CHOST}-clang++ |
427 |
+ strip-unsupported-flags |
428 |
+ fi |
429 |
+ |
430 |
+ if tc-is-clang; then |
431 |
+ myconf_gn+=" is_clang=true clang_use_chrome_plugins=false" |
432 |
+ else |
433 |
+ myconf_gn+=" is_clang=false" |
434 |
+ fi |
435 |
+ |
436 |
+ # Define a custom toolchain for GN |
437 |
+ myconf_gn+=" custom_toolchain=\"//build/toolchain/linux/unbundle:default\"" |
438 |
+ |
439 |
+ if tc-is-cross-compiler; then |
440 |
+ tc-export BUILD_{AR,CC,CXX,NM} |
441 |
+ myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:host\"" |
442 |
+ myconf_gn+=" v8_snapshot_toolchain=\"//build/toolchain/linux/unbundle:host\"" |
443 |
+ else |
444 |
+ myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:default\"" |
445 |
+ fi |
446 |
+ |
447 |
+ # GN needs explicit config for Debug/Release as opposed to inferring it from build directory. |
448 |
+ myconf_gn+=" is_debug=false" |
449 |
+ |
450 |
+ # Component build isn't generally intended for use by end users. It's mostly useful |
451 |
+ # for development and debugging. |
452 |
+ myconf_gn+=" is_component_build=$(usex component-build true false)" |
453 |
+ |
454 |
+ # https://chromium.googlesource.com/chromium/src/+/lkcr/docs/jumbo.md |
455 |
+ myconf_gn+=" use_jumbo_build=$(usex jumbo-build true false)" |
456 |
+ |
457 |
+ myconf_gn+=" use_allocator=$(usex tcmalloc \"tcmalloc\" \"none\")" |
458 |
+ |
459 |
+ # Disable nacl, we can't build without pnacl (http://crbug.com/269560). |
460 |
+ myconf_gn+=" enable_nacl=false" |
461 |
+ |
462 |
+ # Use system-provided libraries. |
463 |
+ # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733). |
464 |
+ # TODO: use_system_hunspell (upstream changes needed). |
465 |
+ # TODO: use_system_libsrtp (bug #459932). |
466 |
+ # TODO: use_system_protobuf (bug #525560). |
467 |
+ # TODO: use_system_ssl (http://crbug.com/58087). |
468 |
+ # TODO: use_system_sqlite (http://crbug.com/22208). |
469 |
+ |
470 |
+ # libevent: https://bugs.gentoo.org/593458 |
471 |
+ local gn_system_libraries=( |
472 |
+ flac |
473 |
+ fontconfig |
474 |
+ freetype |
475 |
+ # Need harfbuzz_from_pkgconfig target |
476 |
+ #harfbuzz-ng |
477 |
+ libdrm |
478 |
+ libjpeg |
479 |
+ libpng |
480 |
+ libwebp |
481 |
+ libxml |
482 |
+ libxslt |
483 |
+ openh264 |
484 |
+ re2 |
485 |
+ snappy |
486 |
+ yasm |
487 |
+ zlib |
488 |
+ ) |
489 |
+ if use system-ffmpeg; then |
490 |
+ gn_system_libraries+=( ffmpeg opus ) |
491 |
+ fi |
492 |
+ if use system-icu; then |
493 |
+ gn_system_libraries+=( icu ) |
494 |
+ fi |
495 |
+ if use system-libvpx; then |
496 |
+ gn_system_libraries+=( libvpx ) |
497 |
+ fi |
498 |
+ build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" || die |
499 |
+ |
500 |
+ # See dependency logic in third_party/BUILD.gn |
501 |
+ myconf_gn+=" use_system_harfbuzz=true" |
502 |
+ |
503 |
+ # Optional dependencies. |
504 |
+ myconf_gn+=" enable_hangout_services_extension=$(usex hangouts true false)" |
505 |
+ myconf_gn+=" enable_widevine=$(usex widevine true false)" |
506 |
+ myconf_gn+=" use_cups=$(usex cups true false)" |
507 |
+ myconf_gn+=" use_gnome_keyring=$(usex gnome-keyring true false)" |
508 |
+ myconf_gn+=" use_kerberos=$(usex kerberos true false)" |
509 |
+ myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)" |
510 |
+ |
511 |
+ # TODO: link_pulseaudio=true for GN. |
512 |
+ |
513 |
+ myconf_gn+=" fieldtrial_testing_like_official_build=true" |
514 |
+ |
515 |
+ # Never use bundled gold binary. Disable gold linker flags for now. |
516 |
+ # Do not use bundled clang. |
517 |
+ # Trying to use gold results in linker crash. |
518 |
+ myconf_gn+=" use_gold=false use_sysroot=false linux_use_bundled_binutils=false use_custom_libcxx=false" |
519 |
+ |
520 |
+ # Disable forced lld, bug 641556 |
521 |
+ myconf_gn+=" use_lld=false" |
522 |
+ |
523 |
+ ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)" |
524 |
+ myconf_gn+=" proprietary_codecs=$(usex proprietary-codecs true false)" |
525 |
+ myconf_gn+=" ffmpeg_branding=\"${ffmpeg_branding}\"" |
526 |
+ |
527 |
+ # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys . |
528 |
+ # Note: these are for Gentoo use ONLY. For your own distribution, |
529 |
+ # please get your own set of keys. Feel free to contact chromium@g.o |
530 |
+ # for more info. |
531 |
+ local google_api_key="AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc" |
532 |
+ local google_default_client_id="329227923882.apps.googleusercontent.com" |
533 |
+ local google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu" |
534 |
+ myconf_gn+=" google_api_key=\"${google_api_key}\"" |
535 |
+ myconf_gn+=" google_default_client_id=\"${google_default_client_id}\"" |
536 |
+ myconf_gn+=" google_default_client_secret=\"${google_default_client_secret}\"" |
537 |
+ |
538 |
+ local myarch="$(tc-arch)" |
539 |
+ if [[ $myarch = amd64 ]] ; then |
540 |
+ myconf_gn+=" target_cpu=\"x64\"" |
541 |
+ ffmpeg_target_arch=x64 |
542 |
+ elif [[ $myarch = x86 ]] ; then |
543 |
+ myconf_gn+=" target_cpu=\"x86\"" |
544 |
+ ffmpeg_target_arch=ia32 |
545 |
+ |
546 |
+ # This is normally defined by compiler_cpu_abi in |
547 |
+ # build/config/compiler/BUILD.gn, but we patch that part out. |
548 |
+ append-flags -msse2 -mfpmath=sse -mmmx |
549 |
+ elif [[ $myarch = arm64 ]] ; then |
550 |
+ myconf_gn+=" target_cpu=\"arm64\"" |
551 |
+ ffmpeg_target_arch=arm64 |
552 |
+ elif [[ $myarch = arm ]] ; then |
553 |
+ myconf_gn+=" target_cpu=\"arm\"" |
554 |
+ ffmpeg_target_arch=$(usex neon arm-neon arm) |
555 |
+ else |
556 |
+ die "Failed to determine target arch, got '$myarch'." |
557 |
+ fi |
558 |
+ |
559 |
+ # Make sure that -Werror doesn't get added to CFLAGS by the build system. |
560 |
+ # Depending on GCC version the warnings are different and we don't want |
561 |
+ # the build to fail because of that. |
562 |
+ myconf_gn+=" treat_warnings_as_errors=false" |
563 |
+ |
564 |
+ # Disable fatal linker warnings, bug 506268. |
565 |
+ myconf_gn+=" fatal_linker_warnings=false" |
566 |
+ |
567 |
+ # Avoid CFLAGS problems, bug #352457, bug #390147. |
568 |
+ if ! use custom-cflags; then |
569 |
+ replace-flags "-Os" "-O2" |
570 |
+ strip-flags |
571 |
+ |
572 |
+ # Prevent linker from running out of address space, bug #471810 . |
573 |
+ if use x86; then |
574 |
+ filter-flags "-g*" |
575 |
+ fi |
576 |
+ |
577 |
+ # Prevent libvpx build failures. Bug 530248, 544702, 546984. |
578 |
+ if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then |
579 |
+ filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2 |
580 |
+ fi |
581 |
+ fi |
582 |
+ |
583 |
+ # https://bugs.gentoo.org/588596 |
584 |
+ #append-cxxflags $(test-flags-CXX -fno-delete-null-pointer-checks) |
585 |
+ |
586 |
+ # Bug 491582. |
587 |
+ export TMPDIR="${WORKDIR}/temp" |
588 |
+ mkdir -p -m 755 "${TMPDIR}" || die |
589 |
+ |
590 |
+ # https://bugs.gentoo.org/654216 |
591 |
+ addpredict /dev/dri/ #nowarn |
592 |
+ |
593 |
+ #if ! use system-ffmpeg; then |
594 |
+ if false; then |
595 |
+ local build_ffmpeg_args="" |
596 |
+ if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then |
597 |
+ build_ffmpeg_args+=" --disable-asm" |
598 |
+ fi |
599 |
+ |
600 |
+ # Re-configure bundled ffmpeg. See bug #491378 for example reasons. |
601 |
+ einfo "Configuring bundled ffmpeg..." |
602 |
+ pushd third_party/ffmpeg > /dev/null || die |
603 |
+ chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \ |
604 |
+ --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die |
605 |
+ chromium/scripts/copy_config.sh || die |
606 |
+ chromium/scripts/generate_gn.py || die |
607 |
+ popd > /dev/null || die |
608 |
+ fi |
609 |
+ |
610 |
+ einfo "Configuring Chromium..." |
611 |
+ set -- gn gen --args="${myconf_gn} ${EXTRA_GN}" out/Release |
612 |
+ echo "$@" |
613 |
+ "$@" || die |
614 |
+} |
615 |
+ |
616 |
+src_compile() { |
617 |
+ # Final link uses lots of file descriptors. |
618 |
+ ulimit -n 2048 |
619 |
+ |
620 |
+ # Calling this here supports resumption via FEATURES=keepwork |
621 |
+ python_setup |
622 |
+ |
623 |
+ #"${EPYTHON}" tools/clang/scripts/update.py --force-local-build --gcc-toolchain /usr --skip-checkout --use-system-cmake --without-android || die |
624 |
+ |
625 |
+ # Work around broken deps |
626 |
+ eninja -C out/Release gen/ui/accessibility/ax_enums.mojom{,-shared}.h |
627 |
+ |
628 |
+ # Build mksnapshot and pax-mark it. |
629 |
+ local x |
630 |
+ for x in mksnapshot v8_context_snapshot_generator; do |
631 |
+ if tc-is-cross-compiler; then |
632 |
+ eninja -C out/Release "host/${x}" |
633 |
+ pax-mark m "out/Release/host/${x}" |
634 |
+ else |
635 |
+ eninja -C out/Release "${x}" |
636 |
+ pax-mark m "out/Release/${x}" |
637 |
+ fi |
638 |
+ done |
639 |
+ |
640 |
+ # Even though ninja autodetects number of CPUs, we respect |
641 |
+ # user's options, for debugging with -j 1 or any other reason. |
642 |
+ eninja -C out/Release chrome chromedriver |
643 |
+ use suid && eninja -C out/Release chrome_sandbox |
644 |
+ |
645 |
+ pax-mark m out/Release/chrome |
646 |
+} |
647 |
+ |
648 |
+src_install() { |
649 |
+ local CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser" |
650 |
+ exeinto "${CHROMIUM_HOME}" |
651 |
+ doexe out/Release/chrome |
652 |
+ |
653 |
+ if use suid; then |
654 |
+ newexe out/Release/chrome_sandbox chrome-sandbox |
655 |
+ fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox" |
656 |
+ fi |
657 |
+ |
658 |
+ doexe out/Release/chromedriver |
659 |
+ |
660 |
+ local sedargs=( -e "s:/usr/lib/:/usr/$(get_libdir)/:g" ) |
661 |
+ sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r3.sh" > chromium-launcher.sh || die |
662 |
+ doexe chromium-launcher.sh |
663 |
+ |
664 |
+ # It is important that we name the target "chromium-browser", |
665 |
+ # xdg-utils expect it; bug #355517. |
666 |
+ dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser |
667 |
+ # keep the old symlink around for consistency |
668 |
+ dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium |
669 |
+ |
670 |
+ dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver |
671 |
+ |
672 |
+ # Allow users to override command-line options, bug #357629. |
673 |
+ insinto /etc/chromium |
674 |
+ newins "${FILESDIR}/chromium.default" "default" |
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 |
682 |
+ doins out/Release/*.pak |
683 |
+ doins out/Release/*.so |
684 |
+ |
685 |
+ if ! use system-icu; then |
686 |
+ doins out/Release/icudtl.dat |
687 |
+ fi |
688 |
+ |
689 |
+ doins -r out/Release/locales |
690 |
+ doins -r out/Release/resources |
691 |
+ |
692 |
+ if [[ -d out/Release/swiftshader ]]; then |
693 |
+ insinto "${CHROMIUM_HOME}/swiftshader" |
694 |
+ doins out/Release/swiftshader/*.so |
695 |
+ fi |
696 |
+ |
697 |
+ # Install icons and desktop entry. |
698 |
+ local branding size |
699 |
+ for size in 16 22 24 32 48 64 128 256 ; do |
700 |
+ case ${size} in |
701 |
+ 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;; |
702 |
+ *) branding="chrome/app/theme/chromium" ;; |
703 |
+ esac |
704 |
+ newicon -s ${size} "${branding}/product_logo_${size}.png" \ |
705 |
+ chromium-browser.png |
706 |
+ done |
707 |
+ |
708 |
+ local mime_types="text/html;text/xml;application/xhtml+xml;" |
709 |
+ mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797 |
710 |
+ mime_types+="x-scheme-handler/ftp;" # bug #412185 |
711 |
+ mime_types+="x-scheme-handler/mailto;x-scheme-handler/webcal;" # bug #416393 |
712 |
+ make_desktop_entry \ |
713 |
+ chromium-browser \ |
714 |
+ "Chromium" \ |
715 |
+ chromium-browser \ |
716 |
+ "Network;WebBrowser" \ |
717 |
+ "MimeType=${mime_types}\nStartupWMClass=chromium-browser" |
718 |
+ sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die |
719 |
+ |
720 |
+ # Install GNOME default application entry (bug #303100). |
721 |
+ insinto /usr/share/gnome-control-center/default-apps |
722 |
+ newins "${FILESDIR}"/chromium-browser.xml chromium-browser.xml |
723 |
+ |
724 |
+ readme.gentoo_create_doc |
725 |
+} |
726 |
+ |
727 |
+pkg_postrm() { |
728 |
+ if type gtk-update-icon-cache &>/dev/null; then |
729 |
+ ebegin "Updating GTK icon cache" |
730 |
+ gtk-update-icon-cache "${EROOT}/usr/share/icons/hicolor" |
731 |
+ eend $? |
732 |
+ fi |
733 |
+ xdg_desktop_database_update |
734 |
+} |
735 |
+ |
736 |
+pkg_postinst() { |
737 |
+ if type gtk-update-icon-cache &>/dev/null; then |
738 |
+ ebegin "Updating GTK icon cache" |
739 |
+ gtk-update-icon-cache "${EROOT}/usr/share/icons/hicolor" |
740 |
+ eend $? |
741 |
+ fi |
742 |
+ xdg_desktop_database_update |
743 |
+ readme.gentoo_print_elog |
744 |
+} |