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