1 |
commit: 54660b6e0b4766d8150b544b969eef9231c3489f |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Sep 26 15:51:24 2015 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 26 15:51:24 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54660b6e |
7 |
|
8 |
www-client/chromium: Stable bump to 45.0.2454.101 |
9 |
|
10 |
Package-Manager: portage-2.2.21_p119 |
11 |
|
12 |
www-client/chromium/Manifest | 1 + |
13 |
www-client/chromium/chromium-45.0.2454.101.ebuild | 631 ++++++++++++++++++++++ |
14 |
2 files changed, 632 insertions(+) |
15 |
|
16 |
diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest |
17 |
index 5d02d4a..49fcd4e 100644 |
18 |
--- a/www-client/chromium/Manifest |
19 |
+++ b/www-client/chromium/Manifest |
20 |
@@ -1,3 +1,4 @@ |
21 |
+DIST chromium-45.0.2454.101-lite.tar.xz 242364644 SHA256 014720920ad049e354aa190eba66badb4eef106ad1064209141d3f5272a308fa SHA512 e43f9ba6424370258eecbeba53275553988453ba1e5d665857c5cae9a7238a428e24d2462a33831e83108d17c4d170747f234403ab94251097ed6a4b5b151edd WHIRLPOOL 5977fef019ada796960582ac175f013b83d666d215e02fbba82556bfe76281fff684a77974832be9cb5c81992a267ecefbe0da192fdb534c59786275b3560a62 |
22 |
DIST chromium-45.0.2454.85-lite.tar.xz 242569440 SHA256 fafb4792c69c235d6ea85e904df68a64c51783cb338b783a1092b4ea6c888e71 SHA512 04f482ef18cddaf140224a98189ebd565416e3fe617877d58b2e691fb6030a3c9248720efcb7285cd18a034c345f9a65c677489d8a49f1ac95deafecb9b7d82a WHIRLPOOL 86b382b4dd2406559cef76ae260fcfe26e376bd957be3381b9822f706e8a5fb0ac7240fb00d64858ee1262eec17fadd253acae2b8a9318d3d996fb5d596de665 |
23 |
DIST chromium-46.0.2490.13-lite.tar.xz 261760812 SHA256 8b582b05a61b207ebec6a65577e413c00e5f7d330ec1adb24d9681d14640fc88 SHA512 d73f10a8521183ec8253dad8e82c8b6357c080cb76b91b8a8eb69cce05225dd843edf01c04a7478e04a7da22330332832f9c7a63f59346333eda83b9133c4213 WHIRLPOOL 098ec84c56ac43800bd3f5d5f60dcdc167b045b1cf3736bca72b21e1ffbf33937541f810cc2e976f6a86dca0035c4b59000a5532f4974ec2cee9156acd7c488d |
24 |
DIST chromium-46.0.2490.22-lite.tar.xz 261632508 SHA256 23a7448cfca032c240262a8d5760f23d9e89bf783ef54467353297856620edb6 SHA512 8d4f8c4cb2c7a4c3c9fb557b4fb2d34c5d7313a82c84fce340254ae59b5fcbc21b2d7b7723d8dd3f7b717175ac12e87373d0889397f01ce189c5718a7deb6de4 WHIRLPOOL dc1fee05d0acc46f9842281e475d1f9d006216c8d8e264ea3eecee63eb14054ff94ed6dd15e6d690305b08670516888a3361f5a3be8f0189c41472d77f0172bb |
25 |
|
26 |
diff --git a/www-client/chromium/chromium-45.0.2454.101.ebuild b/www-client/chromium/chromium-45.0.2454.101.ebuild |
27 |
new file mode 100644 |
28 |
index 0000000..a640c07 |
29 |
--- /dev/null |
30 |
+++ b/www-client/chromium/chromium-45.0.2454.101.ebuild |
31 |
@@ -0,0 +1,631 @@ |
32 |
+# Copyright 1999-2015 Gentoo Foundation |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+# $Id$ |
35 |
+ |
36 |
+EAPI="5" |
37 |
+PYTHON_COMPAT=( python2_7 ) |
38 |
+ |
39 |
+CHROMIUM_LANGS="am ar bg bn ca cs da de el en_GB es es_LA et fa fi fil fr gu he |
40 |
+ 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 |
41 |
+ sv sw ta te th tr uk vi zh_CN zh_TW" |
42 |
+ |
43 |
+inherit check-reqs chromium eutils flag-o-matic multilib multiprocessing pax-utils \ |
44 |
+ portability python-any-r1 readme.gentoo toolchain-funcs versionator virtualx |
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}-lite.tar.xz" |
49 |
+ |
50 |
+LICENSE="BSD hotwording? ( no-source-code )" |
51 |
+SLOT="0" |
52 |
+KEYWORDS="~amd64 ~arm ~x86" |
53 |
+IUSE="cups gnome gnome-keyring hidpi hotwording kerberos neon pic +proprietary-codecs pulseaudio selinux +tcmalloc" |
54 |
+RESTRICT="proprietary-codecs? ( bindist )" |
55 |
+ |
56 |
+# Native Client binaries are compiled with different set of flags, bug #452066. |
57 |
+QA_FLAGS_IGNORED=".*\.nexe" |
58 |
+ |
59 |
+# Native Client binaries may be stripped by the build system, which uses the |
60 |
+# right tools for it, bug #469144 . |
61 |
+QA_PRESTRIPPED=".*\.nexe" |
62 |
+ |
63 |
+RDEPEND=">=app-accessibility/speech-dispatcher-0.8:= |
64 |
+ app-arch/bzip2:= |
65 |
+ app-arch/snappy:= |
66 |
+ cups? ( >=net-print/cups-1.3.11:= ) |
67 |
+ >=dev-libs/elfutils-0.149 |
68 |
+ dev-libs/expat:= |
69 |
+ dev-libs/glib:= |
70 |
+ >=dev-libs/icu-55.1:= |
71 |
+ >=dev-libs/jsoncpp-0.5.0-r1:= |
72 |
+ >=dev-libs/libevent-1.4.13:= |
73 |
+ dev-libs/libxml2:=[icu] |
74 |
+ dev-libs/libxslt:= |
75 |
+ dev-libs/nspr:= |
76 |
+ >=dev-libs/nss-3.14.3:= |
77 |
+ dev-libs/re2:= |
78 |
+ gnome? ( >=gnome-base/gconf-2.24.0:= ) |
79 |
+ gnome-keyring? ( >=gnome-base/libgnome-keyring-3.12:= ) |
80 |
+ >=media-libs/alsa-lib-1.0.19:= |
81 |
+ media-libs/flac:= |
82 |
+ media-libs/fontconfig:= |
83 |
+ media-libs/freetype:= |
84 |
+ media-libs/harfbuzz:=[icu(+)] |
85 |
+ media-libs/libexif:= |
86 |
+ >=media-libs/libjpeg-turbo-1.2.0-r1:= |
87 |
+ media-libs/libpng:0= |
88 |
+ >=media-libs/libwebp-0.4.0:= |
89 |
+ media-libs/speex:= |
90 |
+ pulseaudio? ( media-sound/pulseaudio:= ) |
91 |
+ sys-apps/dbus:= |
92 |
+ sys-apps/pciutils:= |
93 |
+ >=sys-libs/libcap-2.22:= |
94 |
+ sys-libs/zlib:=[minizip] |
95 |
+ virtual/udev |
96 |
+ x11-libs/cairo:= |
97 |
+ x11-libs/gdk-pixbuf:= |
98 |
+ x11-libs/gtk+:2= |
99 |
+ x11-libs/libdrm |
100 |
+ x11-libs/libX11:= |
101 |
+ x11-libs/libXcomposite:= |
102 |
+ x11-libs/libXcursor:= |
103 |
+ x11-libs/libXdamage:= |
104 |
+ x11-libs/libXext:= |
105 |
+ x11-libs/libXfixes:= |
106 |
+ >=x11-libs/libXi-1.6.0:= |
107 |
+ x11-libs/libXinerama:= |
108 |
+ x11-libs/libXrandr:= |
109 |
+ x11-libs/libXrender:= |
110 |
+ x11-libs/libXScrnSaver:= |
111 |
+ x11-libs/libXtst:= |
112 |
+ x11-libs/pango:= |
113 |
+ kerberos? ( virtual/krb5 )" |
114 |
+DEPEND="${RDEPEND} |
115 |
+ !arm? ( |
116 |
+ dev-lang/yasm |
117 |
+ ) |
118 |
+ dev-lang/perl |
119 |
+ dev-perl/JSON |
120 |
+ >=dev-util/gperf-3.0.3 |
121 |
+ dev-util/ninja |
122 |
+ sys-apps/hwids[usb(+)] |
123 |
+ >=sys-devel/bison-2.4.3 |
124 |
+ sys-devel/flex |
125 |
+ virtual/pkgconfig" |
126 |
+ |
127 |
+# For nvidia-drivers blocker, see bug #413637 . |
128 |
+RDEPEND+=" |
129 |
+ !=www-client/chromium-9999 |
130 |
+ !<www-plugins/chrome-binary-plugins-37 |
131 |
+ x11-misc/xdg-utils |
132 |
+ virtual/opengl |
133 |
+ virtual/ttf-fonts |
134 |
+ selinux? ( sec-policy/selinux-chromium ) |
135 |
+ tcmalloc? ( !<x11-drivers/nvidia-drivers-331.20 )" |
136 |
+ |
137 |
+# Python dependencies. The DEPEND part needs to be kept in sync |
138 |
+# with python_check_deps. |
139 |
+DEPEND+=" $(python_gen_any_dep ' |
140 |
+ dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}] |
141 |
+ dev-python/jinja[${PYTHON_USEDEP}] |
142 |
+ dev-python/ply[${PYTHON_USEDEP}] |
143 |
+ dev-python/simplejson[${PYTHON_USEDEP}] |
144 |
+')" |
145 |
+python_check_deps() { |
146 |
+ has_version "dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]" && \ |
147 |
+ has_version "dev-python/jinja[${PYTHON_USEDEP}]" && \ |
148 |
+ has_version "dev-python/ply[${PYTHON_USEDEP}]" && \ |
149 |
+ has_version "dev-python/simplejson[${PYTHON_USEDEP}]" |
150 |
+} |
151 |
+ |
152 |
+if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then |
153 |
+ EBUILD_DEATH_HOOKS+=" chromium_pkg_die"; |
154 |
+fi |
155 |
+ |
156 |
+DISABLE_AUTOFORMATTING="yes" |
157 |
+DOC_CONTENTS=" |
158 |
+Some web pages may require additional fonts to display properly. |
159 |
+Try installing some of the following packages if some characters |
160 |
+are not displayed properly: |
161 |
+- media-fonts/arphicfonts |
162 |
+- media-fonts/bitstream-cyberbit |
163 |
+- media-fonts/droid |
164 |
+- media-fonts/ipamonafont |
165 |
+- media-fonts/ja-ipafonts |
166 |
+- media-fonts/takao-fonts |
167 |
+- media-fonts/wqy-microhei |
168 |
+- media-fonts/wqy-zenhei |
169 |
+ |
170 |
+Depending on your desktop environment, you may need |
171 |
+to install additional packages to get icons on the Downloads page. |
172 |
+ |
173 |
+For KDE, the required package is kde-apps/oxygen-icons. |
174 |
+ |
175 |
+For other desktop environments, try one of the following: |
176 |
+- x11-themes/gnome-icon-theme |
177 |
+- x11-themes/tango-icon-theme |
178 |
+" |
179 |
+ |
180 |
+pkg_pretend() { |
181 |
+ if [[ $(tc-getCC)$ == *gcc* ]] && \ |
182 |
+ [[ $(gcc-major-version)$(gcc-minor-version) -lt 48 ]]; then |
183 |
+ die 'At least gcc 4.8 is required, see bugs: #535730, #525374, #518668.' |
184 |
+ fi |
185 |
+ |
186 |
+ # Check build requirements, bug #541816 and bug #471810 . |
187 |
+ CHECKREQS_MEMORY="3G" |
188 |
+ CHECKREQS_DISK_BUILD="5G" |
189 |
+ eshopts_push -s extglob |
190 |
+ if is-flagq '-g?(gdb)?([1-9])'; then |
191 |
+ CHECKREQS_DISK_BUILD="25G" |
192 |
+ fi |
193 |
+ eshopts_pop |
194 |
+ check-reqs_pkg_pretend |
195 |
+} |
196 |
+ |
197 |
+pkg_setup() { |
198 |
+ if [[ "${SLOT}" == "0" ]]; then |
199 |
+ CHROMIUM_SUFFIX="" |
200 |
+ else |
201 |
+ CHROMIUM_SUFFIX="-${SLOT}" |
202 |
+ fi |
203 |
+ CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser${CHROMIUM_SUFFIX}" |
204 |
+ |
205 |
+ # Make sure the build system will use the right python, bug #344367. |
206 |
+ python-any-r1_pkg_setup |
207 |
+ |
208 |
+ chromium_suid_sandbox_check_kernel_config |
209 |
+} |
210 |
+ |
211 |
+src_prepare() { |
212 |
+ # if ! use arm; then |
213 |
+ # mkdir -p out/Release/gen/sdk/toolchain || die |
214 |
+ # # Do not preserve SELinux context, bug #460892 . |
215 |
+ # cp -a --no-preserve=context /usr/$(get_libdir)/nacl-toolchain-newlib \ |
216 |
+ # out/Release/gen/sdk/toolchain/linux_x86_newlib || die |
217 |
+ # touch out/Release/gen/sdk/toolchain/linux_x86_newlib/stamp.untar || die |
218 |
+ # fi |
219 |
+ |
220 |
+ epatch "${FILESDIR}/${PN}-system-jinja-r7.patch" |
221 |
+ epatch "${FILESDIR}/${PN}-tracing-r0.patch" |
222 |
+ |
223 |
+ epatch_user |
224 |
+ |
225 |
+ # Remove most bundled libraries. Some are still needed. |
226 |
+ build/linux/unbundle/remove_bundled_libraries.py \ |
227 |
+ 'base/third_party/dmg_fp' \ |
228 |
+ 'base/third_party/dynamic_annotations' \ |
229 |
+ 'base/third_party/icu' \ |
230 |
+ 'base/third_party/nspr' \ |
231 |
+ 'base/third_party/superfasthash' \ |
232 |
+ 'base/third_party/symbolize' \ |
233 |
+ 'base/third_party/valgrind' \ |
234 |
+ 'base/third_party/xdg_mime' \ |
235 |
+ 'base/third_party/xdg_user_dirs' \ |
236 |
+ 'breakpad/src/third_party/curl' \ |
237 |
+ 'chrome/third_party/mozilla_security_manager' \ |
238 |
+ 'courgette/third_party' \ |
239 |
+ 'crypto/third_party/nss' \ |
240 |
+ 'net/third_party/mozilla_security_manager' \ |
241 |
+ 'net/third_party/nss' \ |
242 |
+ 'third_party/WebKit' \ |
243 |
+ 'third_party/analytics' \ |
244 |
+ 'third_party/angle' \ |
245 |
+ 'third_party/angle/src/third_party/compiler' \ |
246 |
+ 'third_party/boringssl' \ |
247 |
+ 'third_party/brotli' \ |
248 |
+ 'third_party/cacheinvalidation' \ |
249 |
+ 'third_party/cld_2' \ |
250 |
+ 'third_party/cros_system_api' \ |
251 |
+ 'third_party/cython/python_flags.py' \ |
252 |
+ 'third_party/devscripts' \ |
253 |
+ 'third_party/dom_distiller_js' \ |
254 |
+ 'third_party/dom_distiller_js/dist/proto_gen/third_party/dom_distiller_js' \ |
255 |
+ 'third_party/ffmpeg' \ |
256 |
+ 'third_party/fips181' \ |
257 |
+ 'third_party/flot' \ |
258 |
+ 'third_party/google_input_tools' \ |
259 |
+ 'third_party/google_input_tools/third_party/closure_library' \ |
260 |
+ 'third_party/google_input_tools/third_party/closure_library/third_party/closure' \ |
261 |
+ 'third_party/hunspell' \ |
262 |
+ 'third_party/iccjpeg' \ |
263 |
+ 'third_party/jstemplate' \ |
264 |
+ 'third_party/khronos' \ |
265 |
+ 'third_party/leveldatabase' \ |
266 |
+ 'third_party/libXNVCtrl' \ |
267 |
+ 'third_party/libaddressinput' \ |
268 |
+ 'third_party/libjingle' \ |
269 |
+ 'third_party/libphonenumber' \ |
270 |
+ 'third_party/libsecret' \ |
271 |
+ 'third_party/libsrtp' \ |
272 |
+ 'third_party/libudev' \ |
273 |
+ 'third_party/libusb' \ |
274 |
+ 'third_party/libvpx' \ |
275 |
+ 'third_party/libvpx/source/libvpx/third_party/x86inc' \ |
276 |
+ 'third_party/libxml/chromium' \ |
277 |
+ 'third_party/libyuv' \ |
278 |
+ 'third_party/lss' \ |
279 |
+ 'third_party/lzma_sdk' \ |
280 |
+ 'third_party/mesa' \ |
281 |
+ 'third_party/modp_b64' \ |
282 |
+ 'third_party/mojo' \ |
283 |
+ 'third_party/mt19937ar' \ |
284 |
+ 'third_party/npapi' \ |
285 |
+ 'third_party/openmax_dl' \ |
286 |
+ 'third_party/opus' \ |
287 |
+ 'third_party/ots' \ |
288 |
+ 'third_party/pdfium' \ |
289 |
+ 'third_party/pdfium/third_party/agg23' \ |
290 |
+ 'third_party/pdfium/third_party/base' \ |
291 |
+ 'third_party/pdfium/third_party/bigint' \ |
292 |
+ 'third_party/pdfium/third_party/freetype' \ |
293 |
+ 'third_party/pdfium/third_party/lcms2-2.6' \ |
294 |
+ 'third_party/pdfium/third_party/libjpeg' \ |
295 |
+ 'third_party/pdfium/third_party/libopenjpeg20' \ |
296 |
+ 'third_party/pdfium/third_party/zlib_v128' \ |
297 |
+ 'third_party/polymer' \ |
298 |
+ 'third_party/protobuf' \ |
299 |
+ 'third_party/qcms' \ |
300 |
+ 'third_party/readability' \ |
301 |
+ 'third_party/sfntly' \ |
302 |
+ 'third_party/skia' \ |
303 |
+ 'third_party/smhasher' \ |
304 |
+ 'third_party/sqlite' \ |
305 |
+ 'third_party/tcmalloc' \ |
306 |
+ 'third_party/trace-viewer' \ |
307 |
+ 'third_party/trace-viewer/tracing/third_party/components/polymer' \ |
308 |
+ 'third_party/trace-viewer/tracing/third_party/d3' \ |
309 |
+ 'third_party/trace-viewer/tracing/third_party/gl-matrix' \ |
310 |
+ 'third_party/trace-viewer/tracing/third_party/jszip' \ |
311 |
+ 'third_party/trace-viewer/tracing/third_party/tvcm' \ |
312 |
+ 'third_party/trace-viewer/tracing/third_party/tvcm/third_party/beautifulsoup/polymer_soup.py' \ |
313 |
+ 'third_party/trace-viewer/tracing/third_party/tvcm/third_party/rcssmin' \ |
314 |
+ 'third_party/trace-viewer/tracing/third_party/tvcm/third_party/rjsmin' \ |
315 |
+ 'third_party/usrsctp' \ |
316 |
+ 'third_party/web-animations-js' \ |
317 |
+ 'third_party/webdriver' \ |
318 |
+ 'third_party/webrtc' \ |
319 |
+ 'third_party/widevine' \ |
320 |
+ 'third_party/x86inc' \ |
321 |
+ 'third_party/zlib/google' \ |
322 |
+ 'url/third_party/mozilla' \ |
323 |
+ 'v8/src/third_party/fdlibm' \ |
324 |
+ 'v8/src/third_party/valgrind' \ |
325 |
+ --do-remove || die |
326 |
+} |
327 |
+ |
328 |
+src_configure() { |
329 |
+ local myconf="" |
330 |
+ |
331 |
+ # Never tell the build system to "enable" SSE2, it has a few unexpected |
332 |
+ # additions, bug #336871. |
333 |
+ myconf+=" -Ddisable_sse2=1" |
334 |
+ |
335 |
+ # Disable nacl, we can't build without pnacl (http://crbug.com/269560). |
336 |
+ myconf+=" -Ddisable_nacl=1" |
337 |
+ |
338 |
+ # Disable glibc Native Client toolchain, we don't need it (bug #417019). |
339 |
+ # myconf+=" -Ddisable_glibc=1" |
340 |
+ |
341 |
+ # TODO: also build with pnacl |
342 |
+ # myconf+=" -Ddisable_pnacl=1" |
343 |
+ |
344 |
+ # It would be awkward for us to tar the toolchain and get it untarred again |
345 |
+ # during the build. |
346 |
+ # myconf+=" -Ddisable_newlib_untar=1" |
347 |
+ |
348 |
+ # Make it possible to remove third_party/adobe. |
349 |
+ echo > "${T}/flapper_version.h" || die |
350 |
+ myconf+=" -Dflapper_version_h_file=${T}/flapper_version.h" |
351 |
+ |
352 |
+ # Use system-provided libraries. |
353 |
+ # TODO: use_system_hunspell (upstream changes needed). |
354 |
+ # TODO: use_system_libsrtp (bug #459932). |
355 |
+ # TODO: use_system_libusb (http://crbug.com/266149). |
356 |
+ # TODO: use_system_libvpx (http://crbug.com/494939). |
357 |
+ # TODO: use_system_opus (https://code.google.com/p/webrtc/issues/detail?id=3077). |
358 |
+ # TODO: use_system_protobuf (bug #525560). |
359 |
+ # TODO: use_system_ssl (http://crbug.com/58087). |
360 |
+ # TODO: use_system_sqlite (http://crbug.com/22208). |
361 |
+ myconf+=" |
362 |
+ -Duse_system_bzip2=1 |
363 |
+ -Duse_system_flac=1 |
364 |
+ -Duse_system_harfbuzz=1 |
365 |
+ -Duse_system_icu=1 |
366 |
+ -Duse_system_jsoncpp=1 |
367 |
+ -Duse_system_libevent=1 |
368 |
+ -Duse_system_libjpeg=1 |
369 |
+ -Duse_system_libpng=1 |
370 |
+ -Duse_system_libwebp=1 |
371 |
+ -Duse_system_libxml=1 |
372 |
+ -Duse_system_libxslt=1 |
373 |
+ -Duse_system_minizip=1 |
374 |
+ -Duse_system_nspr=1 |
375 |
+ -Duse_system_re2=1 |
376 |
+ -Duse_system_snappy=1 |
377 |
+ -Duse_system_speex=1 |
378 |
+ -Duse_system_xdg_utils=1 |
379 |
+ -Duse_system_zlib=1" |
380 |
+ |
381 |
+ # Needed for system icu - we don't need additional data files. |
382 |
+ myconf+=" -Dicu_use_data_file_flag=0" |
383 |
+ |
384 |
+ # TODO: patch gyp so that this arm conditional is not needed. |
385 |
+ if ! use arm; then |
386 |
+ myconf+=" |
387 |
+ -Duse_system_yasm=1" |
388 |
+ fi |
389 |
+ |
390 |
+ # Optional dependencies. |
391 |
+ # TODO: linux_link_kerberos, bug #381289. |
392 |
+ myconf+=" |
393 |
+ $(gyp_use cups) |
394 |
+ $(gyp_use gnome use_gconf) |
395 |
+ $(gyp_use gnome-keyring use_gnome_keyring) |
396 |
+ $(gyp_use gnome-keyring linux_link_gnome_keyring) |
397 |
+ $(gyp_use hidpi enable_hidpi) |
398 |
+ $(gyp_use hotwording enable_hotwording) |
399 |
+ $(gyp_use kerberos) |
400 |
+ $(gyp_use pulseaudio) |
401 |
+ $(gyp_use tcmalloc use_allocator tcmalloc none)" |
402 |
+ |
403 |
+ # Use explicit library dependencies instead of dlopen. |
404 |
+ # This makes breakages easier to detect by revdep-rebuild. |
405 |
+ myconf+=" |
406 |
+ -Dlinux_link_gsettings=1 |
407 |
+ -Dlinux_link_libpci=1 |
408 |
+ -Dlinux_link_libspeechd=1 |
409 |
+ -Dlibspeechd_h_prefix=speech-dispatcher/" |
410 |
+ |
411 |
+ # TODO: use the file at run time instead of effectively compiling it in. |
412 |
+ myconf+=" |
413 |
+ -Dusb_ids_path=/usr/share/misc/usb.ids" |
414 |
+ |
415 |
+ # Save space by removing DLOG and DCHECK messages (about 6% reduction). |
416 |
+ myconf+=" |
417 |
+ -Dlogging_like_official_build=1" |
418 |
+ |
419 |
+ if [[ $(tc-getCC) == *clang* ]]; then |
420 |
+ myconf+=" -Dclang=1" |
421 |
+ else |
422 |
+ myconf+=" -Dclang=0" |
423 |
+ fi |
424 |
+ |
425 |
+ # Never use bundled gold binary. Disable gold linker flags for now. |
426 |
+ # Do not use bundled clang. |
427 |
+ myconf+=" |
428 |
+ -Dclang_use_chrome_plugins=0 |
429 |
+ -Dhost_clang=0 |
430 |
+ -Dlinux_use_bundled_binutils=0 |
431 |
+ -Dlinux_use_bundled_gold=0 |
432 |
+ -Dlinux_use_gold_flags=0" |
433 |
+ |
434 |
+ ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)" |
435 |
+ myconf+=" -Dproprietary_codecs=1 -Dffmpeg_branding=${ffmpeg_branding}" |
436 |
+ |
437 |
+ # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys . |
438 |
+ # Note: these are for Gentoo use ONLY. For your own distribution, |
439 |
+ # please get your own set of keys. Feel free to contact chromium@g.o |
440 |
+ # for more info. |
441 |
+ myconf+=" -Dgoogle_api_key=AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc |
442 |
+ -Dgoogle_default_client_id=329227923882.apps.googleusercontent.com |
443 |
+ -Dgoogle_default_client_secret=vgKG0NNv7GoDpbtoFNLxCUXu" |
444 |
+ |
445 |
+ local myarch="$(tc-arch)" |
446 |
+ if [[ $myarch = amd64 ]] ; then |
447 |
+ target_arch=x64 |
448 |
+ ffmpeg_target_arch=x64 |
449 |
+ elif [[ $myarch = x86 ]] ; then |
450 |
+ target_arch=ia32 |
451 |
+ ffmpeg_target_arch=ia32 |
452 |
+ elif [[ $myarch = arm ]] ; then |
453 |
+ target_arch=arm |
454 |
+ ffmpeg_target_arch=$(usex neon arm-neon arm) |
455 |
+ # TODO: re-enable NaCl (NativeClient). |
456 |
+ local CTARGET=${CTARGET:-${CHOST}} |
457 |
+ if [[ $(tc-is-softfloat) == "no" ]]; then |
458 |
+ |
459 |
+ myconf+=" -Darm_float_abi=hard" |
460 |
+ fi |
461 |
+ filter-flags "-mfpu=*" |
462 |
+ use neon || myconf+=" -Darm_fpu=${ARM_FPU:-vfpv3-d16}" |
463 |
+ |
464 |
+ if [[ ${CTARGET} == armv[78]* ]]; then |
465 |
+ myconf+=" -Darmv7=1" |
466 |
+ else |
467 |
+ myconf+=" -Darmv7=0" |
468 |
+ fi |
469 |
+ myconf+=" -Dsysroot= |
470 |
+ $(gyp_use neon arm_neon) |
471 |
+ -Ddisable_nacl=1" |
472 |
+ else |
473 |
+ die "Failed to determine target arch, got '$myarch'." |
474 |
+ fi |
475 |
+ |
476 |
+ myconf+=" -Dtarget_arch=${target_arch}" |
477 |
+ |
478 |
+ # Make sure that -Werror doesn't get added to CFLAGS by the build system. |
479 |
+ # Depending on GCC version the warnings are different and we don't want |
480 |
+ # the build to fail because of that. |
481 |
+ myconf+=" -Dwerror=" |
482 |
+ |
483 |
+ # Disable fatal linker warnings, bug 506268. |
484 |
+ myconf+=" -Ddisable_fatal_linker_warnings=1" |
485 |
+ |
486 |
+ # Avoid CFLAGS problems, bug #352457, bug #390147. |
487 |
+ if ! use custom-cflags; then |
488 |
+ replace-flags "-Os" "-O2" |
489 |
+ strip-flags |
490 |
+ |
491 |
+ # Prevent linker from running out of address space, bug #471810 . |
492 |
+ if use x86; then |
493 |
+ filter-flags "-g*" |
494 |
+ fi |
495 |
+ |
496 |
+ # Prevent libvpx build failures. Bug 530248, 544702, 546984. |
497 |
+ if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then |
498 |
+ filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2 |
499 |
+ fi |
500 |
+ fi |
501 |
+ |
502 |
+ # Make sure the build system will use the right tools, bug #340795. |
503 |
+ tc-export AR CC CXX RANLIB |
504 |
+ |
505 |
+ # Tools for building programs to be executed on the build system, bug #410883. |
506 |
+ export AR_host=$(tc-getBUILD_AR) |
507 |
+ export CC_host=$(tc-getBUILD_CC) |
508 |
+ export CXX_host=$(tc-getBUILD_CXX) |
509 |
+ export LD_host=${CXX_host} |
510 |
+ |
511 |
+ # Bug 491582. |
512 |
+ export TMPDIR="${WORKDIR}/temp" |
513 |
+ mkdir -m 755 "${TMPDIR}" || die |
514 |
+ |
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_gyp.py || die |
527 |
+ popd > /dev/null || die |
528 |
+ |
529 |
+ third_party/libaddressinput/chromium/tools/update-strings.py || die |
530 |
+ |
531 |
+ einfo "Configuring Chromium..." |
532 |
+ build/linux/unbundle/replace_gyp_files.py ${myconf} || die |
533 |
+ egyp_chromium ${myconf} || die |
534 |
+} |
535 |
+ |
536 |
+eninja() { |
537 |
+ if [[ -z ${NINJAOPTS+set} ]]; then |
538 |
+ local jobs=$(makeopts_jobs) |
539 |
+ local loadavg=$(makeopts_loadavg) |
540 |
+ |
541 |
+ if [[ ${MAKEOPTS} == *-j* && ${jobs} != 999 ]]; then |
542 |
+ NINJAOPTS+=" -j ${jobs}" |
543 |
+ fi |
544 |
+ if [[ ${MAKEOPTS} == *-l* && ${loadavg} != 999 ]]; then |
545 |
+ NINJAOPTS+=" -l ${loadavg}" |
546 |
+ fi |
547 |
+ fi |
548 |
+ set -- ninja -v ${NINJAOPTS} "$@" |
549 |
+ echo "$@" |
550 |
+ "$@" |
551 |
+} |
552 |
+ |
553 |
+src_compile() { |
554 |
+ local ninja_targets="chrome chrome_sandbox chromedriver" |
555 |
+ |
556 |
+ # Build mksnapshot and pax-mark it. |
557 |
+ eninja -C out/Release mksnapshot || die |
558 |
+ pax-mark m out/Release/mksnapshot |
559 |
+ |
560 |
+ # Even though ninja autodetects number of CPUs, we respect |
561 |
+ # user's options, for debugging with -j 1 or any other reason. |
562 |
+ eninja -C out/Release ${ninja_targets} || die |
563 |
+ |
564 |
+ pax-mark m out/Release/chrome |
565 |
+} |
566 |
+ |
567 |
+src_install() { |
568 |
+ exeinto "${CHROMIUM_HOME}" |
569 |
+ doexe out/Release/chrome || die |
570 |
+ |
571 |
+ newexe out/Release/chrome_sandbox chrome-sandbox || die |
572 |
+ fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox" |
573 |
+ |
574 |
+ doexe out/Release/chromedriver || die |
575 |
+ |
576 |
+ # if ! use arm; then |
577 |
+ # doexe out/Release/nacl_helper{,_bootstrap} || die |
578 |
+ # insinto "${CHROMIUM_HOME}" |
579 |
+ # doins out/Release/nacl_irt_*.nexe || die |
580 |
+ # doins out/Release/libppGoogleNaClPluginChrome.so || die |
581 |
+ # fi |
582 |
+ |
583 |
+ local sedargs=( -e "s:/usr/lib/:/usr/$(get_libdir)/:g" ) |
584 |
+ if [[ -n ${CHROMIUM_SUFFIX} ]]; then |
585 |
+ sedargs+=( |
586 |
+ -e "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" |
587 |
+ -e "s:chromium.desktop:chromium${CHROMIUM_SUFFIX}.desktop:g" |
588 |
+ -e "s:plugins:plugins --user-data-dir=\${HOME}/.config/chromium${CHROMIUM_SUFFIX}:" |
589 |
+ ) |
590 |
+ fi |
591 |
+ sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r3.sh" > chromium-launcher.sh || die |
592 |
+ doexe chromium-launcher.sh |
593 |
+ |
594 |
+ # It is important that we name the target "chromium-browser", |
595 |
+ # xdg-utils expect it; bug #355517. |
596 |
+ dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser${CHROMIUM_SUFFIX} || die |
597 |
+ # keep the old symlink around for consistency |
598 |
+ dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium${CHROMIUM_SUFFIX} || die |
599 |
+ |
600 |
+ dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver${CHROMIUM_SUFFIX} || die |
601 |
+ |
602 |
+ # Allow users to override command-line options, bug #357629. |
603 |
+ dodir /etc/chromium || die |
604 |
+ insinto /etc/chromium |
605 |
+ newins "${FILESDIR}/chromium.default" "default" || die |
606 |
+ |
607 |
+ pushd out/Release/locales > /dev/null || die |
608 |
+ chromium_remove_language_paks |
609 |
+ popd |
610 |
+ |
611 |
+ insinto "${CHROMIUM_HOME}" |
612 |
+ doins out/Release/*.bin || die |
613 |
+ doins out/Release/*.pak || die |
614 |
+ |
615 |
+ doins -r out/Release/locales || die |
616 |
+ doins -r out/Release/resources || die |
617 |
+ |
618 |
+ newman out/Release/chrome.1 chromium${CHROMIUM_SUFFIX}.1 || die |
619 |
+ newman out/Release/chrome.1 chromium-browser${CHROMIUM_SUFFIX}.1 || die |
620 |
+ |
621 |
+ # Install icons and desktop entry. |
622 |
+ local branding size |
623 |
+ for size in 16 22 24 32 48 64 128 256 ; do |
624 |
+ case ${size} in |
625 |
+ 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;; |
626 |
+ *) branding="chrome/app/theme/chromium" ;; |
627 |
+ esac |
628 |
+ newicon -s ${size} "${branding}/product_logo_${size}.png" \ |
629 |
+ chromium-browser${CHROMIUM_SUFFIX}.png |
630 |
+ done |
631 |
+ |
632 |
+ local mime_types="text/html;text/xml;application/xhtml+xml;" |
633 |
+ mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797 |
634 |
+ mime_types+="x-scheme-handler/ftp;" # bug #412185 |
635 |
+ mime_types+="x-scheme-handler/mailto;x-scheme-handler/webcal;" # bug #416393 |
636 |
+ make_desktop_entry \ |
637 |
+ chromium-browser${CHROMIUM_SUFFIX} \ |
638 |
+ "Chromium${CHROMIUM_SUFFIX}" \ |
639 |
+ chromium-browser${CHROMIUM_SUFFIX} \ |
640 |
+ "Network;WebBrowser" \ |
641 |
+ "MimeType=${mime_types}\nStartupWMClass=chromium-browser" |
642 |
+ sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die |
643 |
+ |
644 |
+ # Install GNOME default application entry (bug #303100). |
645 |
+ if use gnome; then |
646 |
+ dodir /usr/share/gnome-control-center/default-apps || die |
647 |
+ insinto /usr/share/gnome-control-center/default-apps |
648 |
+ newins "${FILESDIR}"/chromium-browser.xml chromium-browser${CHROMIUM_SUFFIX}.xml || die |
649 |
+ if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then |
650 |
+ sed "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" -i \ |
651 |
+ "${ED}"/usr/share/gnome-control-center/default-apps/chromium-browser${CHROMIUM_SUFFIX}.xml |
652 |
+ fi |
653 |
+ fi |
654 |
+ |
655 |
+ readme.gentoo_create_doc |
656 |
+} |
657 |
+ |
658 |
+pkg_postinst() { |
659 |
+ fdo-mime_desktop_database_update |
660 |
+ gnome2_icon_cache_update |
661 |
+ readme.gentoo_print_elog |
662 |
+} |