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