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