1 |
commit: ff15d406bae5363e64f783f2faa7e03cd402b5bd |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Apr 1 03:26:24 2017 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Apr 1 03:26:40 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff15d406 |
7 |
|
8 |
www-client/chromium: stable channel bump (57.0.2987.133) |
9 |
|
10 |
Package-Manager: Portage-2.3.5_p2, Repoman-2.3.2_p32 |
11 |
|
12 |
www-client/chromium/Manifest | 1 + |
13 |
www-client/chromium/chromium-57.0.2987.133.ebuild | 645 ++++++++++++++++++++++ |
14 |
2 files changed, 646 insertions(+) |
15 |
|
16 |
diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest |
17 |
index 882c46b6ff2..eb4915cca8f 100644 |
18 |
--- a/www-client/chromium/Manifest |
19 |
+++ b/www-client/chromium/Manifest |
20 |
@@ -1,3 +1,4 @@ |
21 |
+DIST chromium-57.0.2987.133.tar.xz 525240460 SHA256 70011770a7e522c92826a3af48d3fd28a46bf8042897d072d20c748cbf828cf7 SHA512 b53fb357d3f11b45a46b3fe52a10b0d20cf8f3fedc8454ceca6b8d1ea9c526493cfeeb4472766e3f23ceba5cd53b089a2639d6a166fbfa91db05153571b59039 WHIRLPOOL 25854c4c1c9b9fde2c0bd9af7c374fe3fe78a19a34703cf54cb157a257c7408bf1bf58c199afbc16009e99bc4a3cdc578e907e78fc45bc781e59ab39b877c374 |
22 |
DIST chromium-57.0.2987.98.tar.xz 525286840 SHA256 16b5ecf70fcab8476231636ec20f5415897781b01ed21640283cb358322f792d SHA512 10b832e1cb3693899499080d62f7b9162dd807308b9228b1aeebf0f3481db85d301fcce16cbc089909f4cd08f77205805c7215127415ab2679d15e5dcb87a912 WHIRLPOOL 372dae1469374a156be7343042d48fa27fafcd1007bc64954f88dbb021a793c4ef90ec69b83965ca0b10aa85b0b39d490cd9d106251796184a779ce559ff087d |
23 |
DIST chromium-58.0.3029.14.tar.xz 509043400 SHA256 b7a02ec45d61516552f7377bd066ee1d77a4ededc03c4c53c18373797dc8d8c4 SHA512 b84c422965c694eee4159bd4f8c102fda5e7d8012adf195c2882f9ef3030a0433fac666de85bfcdd4e635d82a57dfa9f3d4e8000dfb8ada2e068348190a4524c WHIRLPOOL dc47733b3344f58fa1a3bc3f1dcac5088d9bbfcffa1c395547ff42367d2164f51cced3f9ad4afc7157834339dbe3fbe6790c835345533c917013770fe11ebec7 |
24 |
DIST chromium-58.0.3029.19.tar.xz 509050504 SHA256 ffe5b52faf219bee7675460ac56b3d62a3ee9fd2001f4a854224a1445b8af5e6 SHA512 b1780d4920d14e4861b5e5895accf49d7b65d49345ec243d7d1042ca1d0246cb3b4fcfa383ea3a6ef9a2145bc526be71286af156051a058f4f699b64cce772cb WHIRLPOOL e5e57370aa06ef8ef7b1e923f684148a1035dc3c4282e6a327cbe4f6e7a472ed724e5c4edb3e5ea91ed3620ea6a9d9f23c5ddb52246ff840b7997e3b00bebc8a |
25 |
|
26 |
diff --git a/www-client/chromium/chromium-57.0.2987.133.ebuild b/www-client/chromium/chromium-57.0.2987.133.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..3245e00617e |
29 |
--- /dev/null |
30 |
+++ b/www-client/chromium/chromium-57.0.2987.133.ebuild |
31 |
@@ -0,0 +1,645 @@ |
32 |
+# Copyright 1999-2017 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 multiprocessing pax-utils portability python-any-r1 readme.gentoo-r1 toolchain-funcs versionator virtualx 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 gconf gnome-keyring gtk3 +hangouts kerberos neon pic +proprietary-codecs pulseaudio selinux +suid +system-ffmpeg +system-libvpx +tcmalloc widevine" |
52 |
+RESTRICT="!system-ffmpeg? ( proprietary-codecs? ( bindist ) )" |
53 |
+ |
54 |
+# Native Client binaries are compiled with different set of flags, bug #452066. |
55 |
+QA_FLAGS_IGNORED=".*\.nexe" |
56 |
+ |
57 |
+# Native Client binaries may be stripped by the build system, which uses the |
58 |
+# right tools for it, bug #469144 . |
59 |
+QA_PRESTRIPPED=".*\.nexe" |
60 |
+ |
61 |
+COMMON_DEPEND=" |
62 |
+ app-arch/bzip2:= |
63 |
+ cups? ( >=net-print/cups-1.3.11:= ) |
64 |
+ >=dev-libs/elfutils-0.149 |
65 |
+ dev-libs/expat:= |
66 |
+ dev-libs/glib:2 |
67 |
+ dev-libs/icu:= |
68 |
+ >=dev-libs/jsoncpp-0.5.0-r1:= |
69 |
+ dev-libs/libxml2:=[icu] |
70 |
+ dev-libs/libxslt:= |
71 |
+ dev-libs/nspr:= |
72 |
+ >=dev-libs/nss-3.14.3:= |
73 |
+ >=dev-libs/re2-0.2016.05.01:= |
74 |
+ gconf? ( >=gnome-base/gconf-2.24.0:= ) |
75 |
+ gnome-keyring? ( >=gnome-base/libgnome-keyring-3.12:= ) |
76 |
+ >=media-libs/alsa-lib-1.0.19:= |
77 |
+ media-libs/fontconfig:= |
78 |
+ media-libs/freetype:= |
79 |
+ >=media-libs/harfbuzz-1.3.1:=[icu(+)] |
80 |
+ media-libs/libexif:= |
81 |
+ media-libs/libjpeg-turbo:= |
82 |
+ media-libs/libpng:= |
83 |
+ system-libvpx? ( media-libs/libvpx:=[postproc,svc] ) |
84 |
+ media-libs/speex:= |
85 |
+ pulseaudio? ( media-sound/pulseaudio:= ) |
86 |
+ system-ffmpeg? ( >=media-video/ffmpeg-3:= ) |
87 |
+ sys-apps/dbus:= |
88 |
+ sys-apps/pciutils:= |
89 |
+ >=sys-libs/libcap-2.22:= |
90 |
+ virtual/udev |
91 |
+ x11-libs/cairo:= |
92 |
+ x11-libs/gdk-pixbuf:2 |
93 |
+ x11-libs/libdrm |
94 |
+ x11-libs/libX11:= |
95 |
+ x11-libs/libXcomposite:= |
96 |
+ x11-libs/libXcursor:= |
97 |
+ x11-libs/libXdamage:= |
98 |
+ x11-libs/libXext:= |
99 |
+ x11-libs/libXfixes:= |
100 |
+ >=x11-libs/libXi-1.6.0:= |
101 |
+ x11-libs/libXinerama:= |
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 |
+ !gtk3? ( x11-libs/gtk+:2 ) |
121 |
+ gtk3? ( x11-libs/gtk+:3 ) |
122 |
+ selinux? ( sec-policy/selinux-chromium ) |
123 |
+ tcmalloc? ( !<x11-drivers/nvidia-drivers-331.20 ) |
124 |
+ widevine? ( www-plugins/chrome-binary-plugins[widevine(-)] ) |
125 |
+" |
126 |
+# dev-vcs/git - https://bugs.gentoo.org/593476 |
127 |
+DEPEND="${COMMON_DEPEND} |
128 |
+ >=app-arch/gzip-1.7 |
129 |
+ !arm? ( |
130 |
+ dev-lang/yasm |
131 |
+ ) |
132 |
+ dev-lang/perl |
133 |
+ dev-perl/JSON |
134 |
+ >=dev-util/gperf-3.0.3 |
135 |
+ dev-util/ninja |
136 |
+ sys-apps/hwids[usb(+)] |
137 |
+ >=sys-devel/bison-2.4.3 |
138 |
+ sys-devel/flex |
139 |
+ virtual/pkgconfig |
140 |
+ dev-vcs/git |
141 |
+ x11-libs/gtk+:2 |
142 |
+ x11-libs/gtk+:3 |
143 |
+ $(python_gen_any_dep ' |
144 |
+ dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}] |
145 |
+ >=dev-python/beautifulsoup-4.3.2:4[${PYTHON_USEDEP}] |
146 |
+ dev-python/html5lib[${PYTHON_USEDEP}] |
147 |
+ dev-python/simplejson[${PYTHON_USEDEP}] |
148 |
+ ') |
149 |
+" |
150 |
+ |
151 |
+# Keep this in sync with the python_gen_any_dep call. |
152 |
+python_check_deps() { |
153 |
+ has_version --host-root "dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]" && |
154 |
+ has_version --host-root ">=dev-python/beautifulsoup-4.3.2:4[${PYTHON_USEDEP}]" && |
155 |
+ has_version --host-root "dev-python/html5lib[${PYTHON_USEDEP}]" && |
156 |
+ has_version --host-root "dev-python/simplejson[${PYTHON_USEDEP}]" |
157 |
+} |
158 |
+ |
159 |
+if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then |
160 |
+ EBUILD_DEATH_HOOKS+=" chromium_pkg_die"; |
161 |
+fi |
162 |
+ |
163 |
+DISABLE_AUTOFORMATTING="yes" |
164 |
+DOC_CONTENTS=" |
165 |
+Some web pages may require additional fonts to display properly. |
166 |
+Try installing some of the following packages if some characters |
167 |
+are not displayed properly: |
168 |
+- media-fonts/arphicfonts |
169 |
+- media-fonts/bitstream-cyberbit |
170 |
+- media-fonts/droid |
171 |
+- media-fonts/ipamonafont |
172 |
+- media-fonts/noto |
173 |
+- media-fonts/ja-ipafonts |
174 |
+- media-fonts/takao-fonts |
175 |
+- media-fonts/wqy-microhei |
176 |
+- media-fonts/wqy-zenhei |
177 |
+ |
178 |
+Depending on your desktop environment, you may need |
179 |
+to install additional packages to get icons on the Downloads page. |
180 |
+ |
181 |
+For KDE, the required package is kde-frameworks/oxygen-icons. |
182 |
+ |
183 |
+For other desktop environments, try one of the following: |
184 |
+- x11-themes/gnome-icon-theme |
185 |
+- x11-themes/tango-icon-theme |
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 4.9 "$(gcc-version)"; then |
196 |
+ # bugs: #535730, #525374, #518668, #600288 |
197 |
+ die "At least gcc 4.9 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 |
+ # Make sure the build system will use the right python, bug #344367. |
223 |
+ python-any-r1_pkg_setup |
224 |
+ |
225 |
+ chromium_suid_sandbox_check_kernel_config |
226 |
+} |
227 |
+ |
228 |
+src_prepare() { |
229 |
+ local PATCHES=( |
230 |
+ "${FILESDIR}/${PN}-widevine-r1.patch" |
231 |
+ "${FILESDIR}/${PN}-FORTIFY_SOURCE.patch" |
232 |
+ "${FILESDIR}/chromium-57-gcc4.patch" |
233 |
+ ) |
234 |
+ |
235 |
+ use system-ffmpeg && PATCHES+=( "${FILESDIR}/${PN}-system-ffmpeg-r4.patch" ) |
236 |
+ |
237 |
+ default |
238 |
+ |
239 |
+ local keeplibs=( |
240 |
+ base/third_party/dmg_fp |
241 |
+ base/third_party/dynamic_annotations |
242 |
+ base/third_party/icu |
243 |
+ base/third_party/nspr |
244 |
+ base/third_party/superfasthash |
245 |
+ base/third_party/symbolize |
246 |
+ base/third_party/valgrind |
247 |
+ base/third_party/xdg_mime |
248 |
+ base/third_party/xdg_user_dirs |
249 |
+ breakpad/src/third_party/curl |
250 |
+ chrome/third_party/mozilla_security_manager |
251 |
+ courgette/third_party |
252 |
+ net/third_party/mozilla_security_manager |
253 |
+ net/third_party/nss |
254 |
+ third_party/WebKit |
255 |
+ third_party/analytics |
256 |
+ third_party/angle |
257 |
+ third_party/angle/src/common/third_party/numerics |
258 |
+ third_party/angle/src/third_party/compiler |
259 |
+ third_party/angle/src/third_party/libXNVCtrl |
260 |
+ third_party/angle/src/third_party/murmurhash |
261 |
+ third_party/angle/src/third_party/trace_event |
262 |
+ third_party/boringssl |
263 |
+ third_party/brotli |
264 |
+ third_party/cacheinvalidation |
265 |
+ third_party/catapult |
266 |
+ third_party/catapult/third_party/polymer |
267 |
+ third_party/catapult/third_party/py_vulcanize |
268 |
+ third_party/catapult/third_party/py_vulcanize/third_party/rcssmin |
269 |
+ third_party/catapult/third_party/py_vulcanize/third_party/rjsmin |
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/ced |
275 |
+ third_party/cld_2 |
276 |
+ third_party/cld_3 |
277 |
+ third_party/cros_system_api |
278 |
+ third_party/devscripts |
279 |
+ third_party/dom_distiller_js |
280 |
+ third_party/fips181 |
281 |
+ third_party/flatbuffers |
282 |
+ third_party/flot |
283 |
+ third_party/google_input_tools |
284 |
+ third_party/google_input_tools/third_party/closure_library |
285 |
+ third_party/google_input_tools/third_party/closure_library/third_party/closure |
286 |
+ third_party/hunspell |
287 |
+ third_party/iccjpeg |
288 |
+ third_party/inspector_protocol |
289 |
+ third_party/jinja2 |
290 |
+ third_party/jstemplate |
291 |
+ third_party/khronos |
292 |
+ third_party/leveldatabase |
293 |
+ third_party/libXNVCtrl |
294 |
+ third_party/libaddressinput |
295 |
+ third_party/libjingle |
296 |
+ third_party/libphonenumber |
297 |
+ third_party/libsecret |
298 |
+ third_party/libsrtp |
299 |
+ third_party/libudev |
300 |
+ third_party/libusb |
301 |
+ third_party/libwebm |
302 |
+ third_party/libxml/chromium |
303 |
+ third_party/libyuv |
304 |
+ third_party/lss |
305 |
+ third_party/lzma_sdk |
306 |
+ third_party/markupsafe |
307 |
+ third_party/mesa |
308 |
+ third_party/modp_b64 |
309 |
+ third_party/mt19937ar |
310 |
+ third_party/openh264 |
311 |
+ third_party/openmax_dl |
312 |
+ third_party/opus |
313 |
+ third_party/ots |
314 |
+ third_party/pdfium |
315 |
+ third_party/pdfium/third_party/agg23 |
316 |
+ third_party/pdfium/third_party/base |
317 |
+ third_party/pdfium/third_party/bigint |
318 |
+ third_party/pdfium/third_party/freetype |
319 |
+ third_party/pdfium/third_party/lcms2-2.6 |
320 |
+ third_party/pdfium/third_party/libjpeg |
321 |
+ third_party/pdfium/third_party/libopenjpeg20 |
322 |
+ third_party/pdfium/third_party/libpng16 |
323 |
+ third_party/pdfium/third_party/libtiff |
324 |
+ third_party/pdfium/third_party/zlib_v128 |
325 |
+ third_party/ply |
326 |
+ third_party/polymer |
327 |
+ third_party/protobuf |
328 |
+ third_party/protobuf/third_party/six |
329 |
+ third_party/qcms |
330 |
+ third_party/sfntly |
331 |
+ third_party/skia |
332 |
+ third_party/smhasher |
333 |
+ third_party/sqlite |
334 |
+ third_party/tcmalloc |
335 |
+ third_party/usrsctp |
336 |
+ third_party/web-animations-js |
337 |
+ third_party/webdriver |
338 |
+ third_party/webrtc |
339 |
+ third_party/widevine |
340 |
+ third_party/woff2 |
341 |
+ third_party/x86inc |
342 |
+ third_party/zlib/google |
343 |
+ url/third_party/mozilla |
344 |
+ v8/src/third_party/valgrind |
345 |
+ v8/third_party/inspector_protocol |
346 |
+ |
347 |
+ # gyp -> gn leftovers |
348 |
+ base/third_party/libevent |
349 |
+ third_party/adobe |
350 |
+ third_party/speech-dispatcher |
351 |
+ third_party/usb_ids |
352 |
+ third_party/xdg-utils |
353 |
+ third_party/yasm/run_yasm.py |
354 |
+ ) |
355 |
+ if ! use system-ffmpeg; then |
356 |
+ keeplibs+=( third_party/ffmpeg ) |
357 |
+ fi |
358 |
+ if ! use system-libvpx; then |
359 |
+ keeplibs+=( third_party/libvpx ) |
360 |
+ keeplibs+=( third_party/libvpx/source/libvpx/third_party/x86inc ) |
361 |
+ fi |
362 |
+ |
363 |
+ # Remove most bundled libraries. Some are still needed. |
364 |
+ build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die |
365 |
+} |
366 |
+ |
367 |
+src_configure() { |
368 |
+ local myconf_gn="" |
369 |
+ |
370 |
+ # GN needs explicit config for Debug/Release as opposed to inferring it from build directory. |
371 |
+ myconf_gn+=" is_debug=false" |
372 |
+ |
373 |
+ # Component build isn't generally intended for use by end users. It's mostly useful |
374 |
+ # for development and debugging. |
375 |
+ myconf_gn+=" is_component_build=$(usex component-build true false)" |
376 |
+ |
377 |
+ # Disable nacl, we can't build without pnacl (http://crbug.com/269560). |
378 |
+ myconf_gn+=" enable_nacl=false" |
379 |
+ |
380 |
+ # Use system-provided libraries. |
381 |
+ # TODO: use_system_hunspell (upstream changes needed). |
382 |
+ # TODO: use_system_libsrtp (bug #459932). |
383 |
+ # TODO: use_system_libusb (http://crbug.com/266149). |
384 |
+ # TODO: use_system_opus (https://code.google.com/p/webrtc/issues/detail?id=3077). |
385 |
+ # TODO: use_system_protobuf (bug #525560). |
386 |
+ # TODO: use_system_ssl (http://crbug.com/58087). |
387 |
+ # TODO: use_system_sqlite (http://crbug.com/22208). |
388 |
+ |
389 |
+ # libevent: https://bugs.gentoo.org/593458 |
390 |
+ local gn_system_libraries=( |
391 |
+ flac |
392 |
+ harfbuzz-ng |
393 |
+ icu |
394 |
+ libjpeg |
395 |
+ libpng |
396 |
+ libwebp |
397 |
+ libxml |
398 |
+ libxslt |
399 |
+ re2 |
400 |
+ snappy |
401 |
+ yasm |
402 |
+ zlib |
403 |
+ ) |
404 |
+ if use system-ffmpeg; then |
405 |
+ gn_system_libraries+=( ffmpeg ) |
406 |
+ fi |
407 |
+ if use system-libvpx; then |
408 |
+ gn_system_libraries+=( libvpx ) |
409 |
+ fi |
410 |
+ build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" || die |
411 |
+ |
412 |
+ # Optional dependencies. |
413 |
+ myconf_gn+=" enable_hangout_services_extension=$(usex hangouts true false)" |
414 |
+ myconf_gn+=" enable_widevine=$(usex widevine true false)" |
415 |
+ myconf_gn+=" use_cups=$(usex cups true false)" |
416 |
+ myconf_gn+=" use_gconf=$(usex gconf true false)" |
417 |
+ myconf_gn+=" use_gnome_keyring=$(usex gnome-keyring true false)" |
418 |
+ myconf_gn+=" use_gtk3=$(usex gtk3 true false)" |
419 |
+ myconf_gn+=" use_kerberos=$(usex kerberos true false)" |
420 |
+ myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)" |
421 |
+ |
422 |
+ # TODO: link_pulseaudio=true for GN. |
423 |
+ |
424 |
+ myconf_gn+=" fieldtrial_testing_like_official_build=true" |
425 |
+ |
426 |
+ if tc-is-clang; then |
427 |
+ myconf_gn+=" is_clang=true clang_base_path=\"/usr\" clang_use_chrome_plugins=false" |
428 |
+ else |
429 |
+ myconf_gn+=" is_clang=false" |
430 |
+ fi |
431 |
+ |
432 |
+ # Never use bundled gold binary. Disable gold linker flags for now. |
433 |
+ # Do not use bundled clang. |
434 |
+ # Trying to use gold results in linker crash. |
435 |
+ myconf_gn+=" use_gold=false use_sysroot=false linux_use_bundled_binutils=false" |
436 |
+ |
437 |
+ ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)" |
438 |
+ myconf_gn+=" proprietary_codecs=$(usex proprietary-codecs true false)" |
439 |
+ myconf_gn+=" ffmpeg_branding=\"${ffmpeg_branding}\"" |
440 |
+ |
441 |
+ # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys . |
442 |
+ # Note: these are for Gentoo use ONLY. For your own distribution, |
443 |
+ # please get your own set of keys. Feel free to contact chromium@g.o |
444 |
+ # for more info. |
445 |
+ local google_api_key="AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc" |
446 |
+ local google_default_client_id="329227923882.apps.googleusercontent.com" |
447 |
+ local google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu" |
448 |
+ myconf_gn+=" google_api_key=\"${google_api_key}\"" |
449 |
+ myconf_gn+=" google_default_client_id=\"${google_default_client_id}\"" |
450 |
+ myconf_gn+=" google_default_client_secret=\"${google_default_client_secret}\"" |
451 |
+ |
452 |
+ local myarch="$(tc-arch)" |
453 |
+ if [[ $myarch = amd64 ]] ; then |
454 |
+ target_arch=x64 |
455 |
+ ffmpeg_target_arch=x64 |
456 |
+ elif [[ $myarch = x86 ]] ; then |
457 |
+ target_arch=ia32 |
458 |
+ ffmpeg_target_arch=ia32 |
459 |
+ elif [[ $myarch = arm64 ]] ; then |
460 |
+ target_arch=arm64 |
461 |
+ ffmpeg_target_arch=arm64 |
462 |
+ elif [[ $myarch = arm ]] ; then |
463 |
+ target_arch=arm |
464 |
+ ffmpeg_target_arch=$(usex neon arm-neon arm) |
465 |
+ else |
466 |
+ die "Failed to determine target arch, got '$myarch'." |
467 |
+ fi |
468 |
+ |
469 |
+ # Make sure that -Werror doesn't get added to CFLAGS by the build system. |
470 |
+ # Depending on GCC version the warnings are different and we don't want |
471 |
+ # the build to fail because of that. |
472 |
+ myconf_gn+=" treat_warnings_as_errors=false" |
473 |
+ |
474 |
+ # Disable fatal linker warnings, bug 506268. |
475 |
+ myconf_gn+=" fatal_linker_warnings=false" |
476 |
+ |
477 |
+ # Avoid CFLAGS problems, bug #352457, bug #390147. |
478 |
+ if ! use custom-cflags; then |
479 |
+ replace-flags "-Os" "-O2" |
480 |
+ strip-flags |
481 |
+ |
482 |
+ # Prevent linker from running out of address space, bug #471810 . |
483 |
+ if use x86; then |
484 |
+ filter-flags "-g*" |
485 |
+ fi |
486 |
+ |
487 |
+ # Prevent libvpx build failures. Bug 530248, 544702, 546984. |
488 |
+ if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then |
489 |
+ filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2 |
490 |
+ fi |
491 |
+ fi |
492 |
+ |
493 |
+ # Make sure the build system will use the right tools, bug #340795. |
494 |
+ tc-export AR CC CXX NM |
495 |
+ |
496 |
+ # https://bugs.gentoo.org/588596 |
497 |
+ append-cxxflags $(test-flags-CXX -fno-delete-null-pointer-checks) |
498 |
+ |
499 |
+ # Define a custom toolchain for GN |
500 |
+ myconf_gn+=" custom_toolchain=\"${FILESDIR}/toolchain:default\"" |
501 |
+ |
502 |
+ # Tools for building programs to be executed on the build system, bug #410883. |
503 |
+ if tc-is-cross-compiler; then |
504 |
+ export AR_host=$(tc-getBUILD_AR) |
505 |
+ export CC_host=$(tc-getBUILD_CC) |
506 |
+ export CXX_host=$(tc-getBUILD_CXX) |
507 |
+ export NM_host=$(tc-getBUILD_NM) |
508 |
+ fi |
509 |
+ |
510 |
+ # Bug 491582. |
511 |
+ export TMPDIR="${WORKDIR}/temp" |
512 |
+ mkdir -p -m 755 "${TMPDIR}" || die |
513 |
+ |
514 |
+ if ! use system-ffmpeg; then |
515 |
+ local build_ffmpeg_args="" |
516 |
+ if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then |
517 |
+ build_ffmpeg_args+=" --disable-asm" |
518 |
+ fi |
519 |
+ |
520 |
+ # Re-configure bundled ffmpeg. See bug #491378 for example reasons. |
521 |
+ einfo "Configuring bundled ffmpeg..." |
522 |
+ pushd third_party/ffmpeg > /dev/null || die |
523 |
+ chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \ |
524 |
+ --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die |
525 |
+ chromium/scripts/copy_config.sh || die |
526 |
+ chromium/scripts/generate_gn.py || die |
527 |
+ popd > /dev/null || die |
528 |
+ fi |
529 |
+ |
530 |
+ third_party/libaddressinput/chromium/tools/update-strings.py || die |
531 |
+ |
532 |
+ touch chrome/test/data/webui/i18n_process_css_test.html || die |
533 |
+ |
534 |
+ einfo "Configuring Chromium..." |
535 |
+ # TODO: bootstrapped gn binary hangs when using tcmalloc with portage's sandbox. |
536 |
+ tools/gn/bootstrap/bootstrap.py -v --gn-gen-args "${myconf_gn} use_allocator=\"none\"" || die |
537 |
+ myconf_gn+=" use_allocator=$(usex tcmalloc \"tcmalloc\" \"none\")" |
538 |
+ out/Release/gn gen --args="${myconf_gn}" out/Release || die |
539 |
+} |
540 |
+ |
541 |
+eninja() { |
542 |
+ if [[ -z ${NINJAOPTS+set} ]]; then |
543 |
+ local jobs=$(makeopts_jobs) |
544 |
+ local loadavg=$(makeopts_loadavg) |
545 |
+ |
546 |
+ if [[ ${MAKEOPTS} == *-j* && ${jobs} != 999 ]]; then |
547 |
+ NINJAOPTS+=" -j ${jobs}" |
548 |
+ fi |
549 |
+ if [[ ${MAKEOPTS} == *-l* && ${loadavg} != 999 ]]; then |
550 |
+ NINJAOPTS+=" -l ${loadavg}" |
551 |
+ fi |
552 |
+ fi |
553 |
+ set -- ninja -v ${NINJAOPTS} "$@" |
554 |
+ echo "$@" |
555 |
+ "$@" |
556 |
+} |
557 |
+ |
558 |
+src_compile() { |
559 |
+ local ninja_targets="chrome chromedriver" |
560 |
+ if use suid; then |
561 |
+ ninja_targets+=" chrome_sandbox" |
562 |
+ fi |
563 |
+ |
564 |
+ # Build mksnapshot and pax-mark it. |
565 |
+ eninja -C out/Release mksnapshot || die |
566 |
+ pax-mark m out/Release/mksnapshot |
567 |
+ |
568 |
+ # Even though ninja autodetects number of CPUs, we respect |
569 |
+ # user's options, for debugging with -j 1 or any other reason. |
570 |
+ eninja -C out/Release ${ninja_targets} || die |
571 |
+ |
572 |
+ pax-mark m out/Release/chrome |
573 |
+} |
574 |
+ |
575 |
+src_install() { |
576 |
+ local CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser" |
577 |
+ exeinto "${CHROMIUM_HOME}" |
578 |
+ doexe out/Release/chrome |
579 |
+ |
580 |
+ if use suid; then |
581 |
+ newexe out/Release/chrome_sandbox chrome-sandbox |
582 |
+ fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox" |
583 |
+ fi |
584 |
+ |
585 |
+ doexe out/Release/chromedriver |
586 |
+ |
587 |
+ # if ! use arm; then |
588 |
+ # doexe out/Release/nacl_helper{,_bootstrap} || die |
589 |
+ # insinto "${CHROMIUM_HOME}" |
590 |
+ # doins out/Release/nacl_irt_*.nexe || die |
591 |
+ # doins out/Release/libppGoogleNaClPluginChrome.so || die |
592 |
+ # fi |
593 |
+ |
594 |
+ local sedargs=( -e "s:/usr/lib/:/usr/$(get_libdir)/:g" ) |
595 |
+ sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r3.sh" > chromium-launcher.sh || die |
596 |
+ doexe chromium-launcher.sh |
597 |
+ |
598 |
+ # It is important that we name the target "chromium-browser", |
599 |
+ # xdg-utils expect it; bug #355517. |
600 |
+ dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser |
601 |
+ # keep the old symlink around for consistency |
602 |
+ dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium |
603 |
+ |
604 |
+ dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver |
605 |
+ |
606 |
+ # Allow users to override command-line options, bug #357629. |
607 |
+ insinto /etc/chromium |
608 |
+ newins "${FILESDIR}/chromium.default" "default" |
609 |
+ |
610 |
+ pushd out/Release/locales > /dev/null || die |
611 |
+ chromium_remove_language_paks |
612 |
+ popd |
613 |
+ |
614 |
+ if use widevine; then |
615 |
+ # These will be provided by chrome-binary-plugins |
616 |
+ rm out/Release/libwidevinecdm*.so || die |
617 |
+ fi |
618 |
+ |
619 |
+ insinto "${CHROMIUM_HOME}" |
620 |
+ doins out/Release/*.bin |
621 |
+ doins out/Release/*.pak |
622 |
+ doins out/Release/*.so |
623 |
+ |
624 |
+ # Needed by bundled icu |
625 |
+ # doins out/Release/icudtl.dat |
626 |
+ |
627 |
+ doins -r out/Release/locales |
628 |
+ doins -r out/Release/resources |
629 |
+ |
630 |
+ newman out/Release/chrome.1 chromium.1 |
631 |
+ newman out/Release/chrome.1 chromium-browser.1 |
632 |
+ |
633 |
+ # Install icons and desktop entry. |
634 |
+ local branding size |
635 |
+ for size in 16 22 24 32 48 64 128 256 ; do |
636 |
+ case ${size} in |
637 |
+ 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;; |
638 |
+ *) branding="chrome/app/theme/chromium" ;; |
639 |
+ esac |
640 |
+ newicon -s ${size} "${branding}/product_logo_${size}.png" \ |
641 |
+ chromium-browser.png |
642 |
+ done |
643 |
+ |
644 |
+ local mime_types="text/html;text/xml;application/xhtml+xml;" |
645 |
+ mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797 |
646 |
+ mime_types+="x-scheme-handler/ftp;" # bug #412185 |
647 |
+ mime_types+="x-scheme-handler/mailto;x-scheme-handler/webcal;" # bug #416393 |
648 |
+ make_desktop_entry \ |
649 |
+ chromium-browser \ |
650 |
+ "Chromium" \ |
651 |
+ chromium-browser \ |
652 |
+ "Network;WebBrowser" \ |
653 |
+ "MimeType=${mime_types}\nStartupWMClass=chromium-browser" |
654 |
+ sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die |
655 |
+ |
656 |
+ # Install GNOME default application entry (bug #303100). |
657 |
+ insinto /usr/share/gnome-control-center/default-apps |
658 |
+ newins "${FILESDIR}"/chromium-browser.xml chromium-browser.xml |
659 |
+ |
660 |
+ readme.gentoo_create_doc |
661 |
+} |
662 |
+ |
663 |
+pkg_preinst() { |
664 |
+ gnome2_icon_savelist |
665 |
+} |
666 |
+ |
667 |
+pkg_postrm() { |
668 |
+ gnome2_icon_cache_update |
669 |
+ xdg_desktop_database_update |
670 |
+} |
671 |
+ |
672 |
+pkg_postinst() { |
673 |
+ gnome2_icon_cache_update |
674 |
+ xdg_desktop_database_update |
675 |
+ readme.gentoo_print_elog |
676 |
+} |