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