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