Gentoo Archives: gentoo-commits

From: "PaweA Hajdan (phajdan.jr)" <phajdan.jr@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-client/chromium: chromium-9.0.570.0.ebuild ChangeLog chromium-8.0.552.28.ebuild chromium-9999.ebuild chromium-7.0.517.44.ebuild chromium-7.0.517.41-r1.ebuild chromium-8.0.552.23.ebuild
Date: Thu, 04 Nov 2010 20:58:38
Message-Id: 20101104205833.A316620051@flycatcher.gentoo.org
1 phajdan.jr 10/11/04 20:58:33
2
3 Modified: chromium-9.0.570.0.ebuild ChangeLog
4 chromium-9999.ebuild
5 Added: chromium-8.0.552.28.ebuild
6 chromium-7.0.517.44.ebuild
7 Removed: chromium-7.0.517.41-r1.ebuild
8 chromium-8.0.552.23.ebuild
9 Log:
10 Version bump for beta and stable channel releases. Fix bug #343971 by Sok Ann Yap <sokann@×××××.com>. Lower cups dependency to 1.3.x everywhere, it is just too much trouble to maintain. Remove old.
11 (Portage version: 2.1.8.3/cvs/Linux i686)
12
13 Revision Changes Path
14 1.3 www-client/chromium/chromium-9.0.570.0.ebuild
15
16 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-9.0.570.0.ebuild?rev=1.3&view=markup
17 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-9.0.570.0.ebuild?rev=1.3&content-type=text/plain
18 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-9.0.570.0.ebuild?r1=1.2&r2=1.3
19
20 Index: chromium-9.0.570.0.ebuild
21 ===================================================================
22 RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-9.0.570.0.ebuild,v
23 retrieving revision 1.2
24 retrieving revision 1.3
25 diff -u -r1.2 -r1.3
26 --- chromium-9.0.570.0.ebuild 3 Nov 2010 17:56:06 -0000 1.2
27 +++ chromium-9.0.570.0.ebuild 4 Nov 2010 20:58:33 -0000 1.3
28 @@ -1,6 +1,6 @@
29 # Copyright 1999-2010 Gentoo Foundation
30 # Distributed under the terms of the GNU General Public License v2
31 -# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-9.0.570.0.ebuild,v 1.2 2010/11/03 17:56:06 phajdan.jr Exp $
32 +# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-9.0.570.0.ebuild,v 1.3 2010/11/04 20:58:33 phajdan.jr Exp $
33
34 EAPI="2"
35
36 @@ -31,7 +31,7 @@
37 media-libs/jpeg:0
38 media-libs/libpng
39 >=media-video/ffmpeg-0.6_p25423[threads]
40 - cups? ( >=net-print/cups-1.4.4 )
41 + cups? ( >=net-print/cups-1.3.11 )
42 sys-libs/zlib
43 >=x11-libs/gtk+-2.14.7
44 x11-libs/libXScrnSaver"
45
46
47
48 1.215 www-client/chromium/ChangeLog
49
50 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.215&view=markup
51 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.215&content-type=text/plain
52 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?r1=1.214&r2=1.215
53
54 Index: ChangeLog
55 ===================================================================
56 RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v
57 retrieving revision 1.214
58 retrieving revision 1.215
59 diff -u -r1.214 -r1.215
60 --- ChangeLog 3 Nov 2010 17:56:06 -0000 1.214
61 +++ ChangeLog 4 Nov 2010 20:58:33 -0000 1.215
62 @@ -1,6 +1,18 @@
63 # ChangeLog for www-client/chromium
64 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
65 -# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.214 2010/11/03 17:56:06 phajdan.jr Exp $
66 +# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.215 2010/11/04 20:58:33 phajdan.jr Exp $
67 +
68 +*chromium-8.0.552.28 (04 Nov 2010)
69 +*chromium-7.0.517.44 (04 Nov 2010)
70 +
71 + 04 Nov 2010; Pawel Hajdan jr <phajdan.jr@g.o>
72 + +files/chromium-locale-glib-r0.patch, -chromium-7.0.517.41-r1.ebuild,
73 + -chromium-8.0.552.23.ebuild, +files/chromium-locale-glib-r1.patch,
74 + +chromium-7.0.517.44.ebuild, +chromium-8.0.552.28.ebuild,
75 + chromium-9.0.570.0.ebuild, chromium-9999.ebuild:
76 + Version bump for beta and stable channel releases. Fix bug #343971 by Sok
77 + Ann Yap <sokann@×××××.com>. Lower cups dependency to 1.3.x everywhere, it
78 + is just too much trouble to maintain. Remove old.
79
80 03 Nov 2010; Pawel Hajdan jr <phajdan.jr@g.o>
81 chromium-9.0.570.0.ebuild, chromium-9999.ebuild:
82
83
84
85 1.101 www-client/chromium/chromium-9999.ebuild
86
87 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-9999.ebuild?rev=1.101&view=markup
88 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-9999.ebuild?rev=1.101&content-type=text/plain
89 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-9999.ebuild?r1=1.100&r2=1.101
90
91 Index: chromium-9999.ebuild
92 ===================================================================
93 RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-9999.ebuild,v
94 retrieving revision 1.100
95 retrieving revision 1.101
96 diff -u -r1.100 -r1.101
97 --- chromium-9999.ebuild 3 Nov 2010 17:56:06 -0000 1.100
98 +++ chromium-9999.ebuild 4 Nov 2010 20:58:33 -0000 1.101
99 @@ -1,6 +1,6 @@
100 # Copyright 1999-2010 Gentoo Foundation
101 # Distributed under the terms of the GNU General Public License v2
102 -# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-9999.ebuild,v 1.100 2010/11/03 17:56:06 phajdan.jr Exp $
103 +# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-9999.ebuild,v 1.101 2010/11/04 20:58:33 phajdan.jr Exp $
104
105 EAPI="2"
106
107 @@ -33,7 +33,7 @@
108 media-libs/jpeg:0
109 media-libs/libpng
110 >=media-video/ffmpeg-0.6_p25423[threads]
111 - cups? ( >=net-print/cups-1.4.4 )
112 + cups? ( >=net-print/cups-1.3.11 )
113 sys-libs/zlib
114 >=x11-libs/gtk+-2.14.7
115 x11-libs/libXScrnSaver"
116
117
118
119 1.1 www-client/chromium/chromium-8.0.552.28.ebuild
120
121 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-8.0.552.28.ebuild?rev=1.1&view=markup
122 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-8.0.552.28.ebuild?rev=1.1&content-type=text/plain
123
124 Index: chromium-8.0.552.28.ebuild
125 ===================================================================
126 # Copyright 1999-2010 Gentoo Foundation
127 # Distributed under the terms of the GNU General Public License v2
128 # $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-8.0.552.28.ebuild,v 1.1 2010/11/04 20:58:33 phajdan.jr Exp $
129
130 EAPI="2"
131
132 inherit eutils flag-o-matic multilib pax-utils toolchain-funcs
133
134 DESCRIPTION="Open-source version of Google Chrome web browser"
135 HOMEPAGE="http://chromium.org/"
136 SRC_URI="http://build.chromium.org/buildbot/official/${P}.tar.bz2"
137
138 LICENSE="BSD"
139 SLOT="0"
140 KEYWORDS="~amd64 ~arm ~x86"
141 IUSE="cups +gecko-mediaplayer gnome gnome-keyring system-sqlite system-v8"
142
143 RDEPEND="app-arch/bzip2
144 system-sqlite? (
145 >=dev-db/sqlite-3.6.23.1[fts3,icu,secure-delete,threadsafe]
146 )
147 system-v8? ( ~dev-lang/v8-2.4.9.10 )
148 >=dev-libs/icu-4.4.1
149 >=dev-libs/libevent-1.4.13
150 dev-libs/libxml2
151 dev-libs/libxslt
152 >=dev-libs/nss-3.12.3
153 >=gnome-base/gconf-2.24.0
154 gnome-keyring? ( >=gnome-base/gnome-keyring-2.28.2 )
155 >=media-libs/alsa-lib-1.0.19
156 media-libs/jpeg:0
157 media-libs/libpng
158 >=media-video/ffmpeg-0.6_p25423[threads]
159 cups? ( >=net-print/cups-1.3.11 )
160 sys-libs/zlib
161 >=x11-libs/gtk+-2.14.7
162 x11-libs/libXScrnSaver"
163 DEPEND="${RDEPEND}
164 dev-lang/perl
165 >=dev-util/gperf-3.0.3
166 >=dev-util/pkgconfig-0.23
167 sys-devel/flex"
168 RDEPEND+="
169 || (
170 x11-themes/gnome-icon-theme
171 x11-themes/oxygen-molecule
172 x11-themes/tango-icon-theme
173 x11-themes/xfce4-icon-theme
174 )
175 x11-apps/xmessage
176 x11-misc/xdg-utils
177 virtual/ttf-fonts
178 gecko-mediaplayer? ( !www-plugins/gecko-mediaplayer[gnome] )"
179
180 remove_bundled_lib() {
181 einfo "Removing bundled library $1 ..."
182 local out
183 out="$(find $1 -type f \! -iname '*.gyp' -print -delete)" \
184 || die "failed to remove bundled library $1"
185 if [[ -z $out ]]; then
186 die "no files matched when removing bundled library $1"
187 fi
188 }
189
190 pkg_setup() {
191 CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser"
192
193 # Make sure the build system will use the right tools, bug #340795.
194 tc-export AR CC CXX RANLIB
195 }
196
197 src_prepare() {
198 # Small fix to the system-provided icu support,
199 # to be upstreamed.
200 epatch "${FILESDIR}"/${PN}-system-icu-r1.patch
201
202 # Enable optional support for gecko-mediaplayer.
203 epatch "${FILESDIR}"/${PN}-gecko-mediaplayer-r0.patch
204
205 # Backport a fix for bug #343971.
206 epatch "${FILESDIR}"/${PN}-locale-glib-r1.patch
207
208 remove_bundled_lib "third_party/bzip2"
209 remove_bundled_lib "third_party/codesighs"
210 remove_bundled_lib "third_party/icu"
211 remove_bundled_lib "third_party/jemalloc"
212 remove_bundled_lib "third_party/lcov"
213 remove_bundled_lib "third_party/libevent"
214 remove_bundled_lib "third_party/libjpeg"
215 remove_bundled_lib "third_party/libpng"
216 remove_bundled_lib "third_party/libxml"
217 remove_bundled_lib "third_party/libxslt"
218 remove_bundled_lib "third_party/lzma_sdk"
219 remove_bundled_lib "third_party/molokocacao"
220 remove_bundled_lib "third_party/ocmock"
221 remove_bundled_lib "third_party/pyftpdlib"
222 remove_bundled_lib "third_party/simplejson"
223 remove_bundled_lib "third_party/tlslite"
224 # TODO: also remove third_party/ffmpeg (needs to be compile-tested).
225 # TODO: also remove third_party/zlib. For now the compilation fails if we
226 # remove it (minizip-related).
227
228 if use system-sqlite; then
229 remove_bundled_lib "third_party/sqlite/src"
230 remove_bundled_lib "third_party/sqlite/preprocessed"
231 fi
232
233 if use system-v8; then
234 # Provide our own gyp file that links with the system v8.
235 # TODO: move this upstream.
236 cp "${FILESDIR}"/v8.gyp v8/tools/gyp || die
237
238 remove_bundled_lib "v8"
239
240 # The implementation files include v8 headers with full path,
241 # like #include "v8/include/v8.h". Make sure the system headers
242 # will be used.
243 # TODO: find a solution that can be upstreamed.
244 rmdir v8/include || die
245 ln -s /usr/include v8/include || die
246 fi
247 }
248
249 src_configure() {
250 local myconf=""
251
252 # Never tell the build system to "enable" SSE2, it has a few unexpected
253 # additions, bug #336871.
254 myconf+=" -Ddisable_sse2=1"
255
256 # Use system-provided libraries.
257 # TODO: use_system_hunspell (upstream changes needed).
258 # TODO: use_system_ssl (need to consult upstream).
259 myconf+="
260 -Duse_system_bzip2=1
261 -Duse_system_ffmpeg=1
262 -Duse_system_icu=1
263 -Duse_system_libevent=1
264 -Duse_system_libjpeg=1
265 -Duse_system_libpng=1
266 -Duse_system_libxml=1
267 -Duse_system_zlib=1"
268
269 if use system-sqlite; then
270 myconf+=" -Duse_system_sqlite=1"
271 fi
272
273 # The dependency on cups is optional, see bug #324105.
274 if use cups; then
275 myconf+=" -Duse_cups=1"
276 else
277 myconf+=" -Duse_cups=0"
278 fi
279
280 if use "gnome-keyring"; then
281 myconf+=" -Duse_gnome_keyring=1 -Dlinux_link_gnome_keyring=1"
282 else
283 # TODO: we should also disable code trying to dlopen
284 # gnome-keyring in that case.
285 myconf+=" -Duse_gnome_keyring=0 -Dlinux_link_gnome_keyring=0"
286 fi
287
288 # Enable sandbox.
289 myconf+="
290 -Dlinux_sandbox_path=${CHROMIUM_HOME}/chrome_sandbox
291 -Dlinux_sandbox_chrome_path=${CHROMIUM_HOME}/chrome"
292
293 if host-is-pax; then
294 # Prevent the build from failing (bug #301880). The performance
295 # difference is very small.
296 myconf+=" -Dv8_use_snapshot=0"
297 fi
298
299 if use gecko-mediaplayer; then
300 # Disable hardcoded blacklist for gecko-mediaplayer.
301 # When www-plugins/gecko-mediaplayer is compiled with USE=gnome, it causes
302 # the browser to hang. We can handle the situation via dependencies,
303 # thus making it possible to use gecko-mediaplayer.
304 append-flags -DGENTOO_CHROMIUM_ENABLE_GECKO_MEDIAPLAYER
305 fi
306
307 # Our system ffmpeg should support more codecs than the bundled one
308 # for Chromium.
309 myconf+=" -Dproprietary_codecs=1"
310
311 # Use target arch detection logic from bug #296917.
312 local myarch="$ABI"
313 [[ $myarch = "" ]] && myarch="$ARCH"
314
315 if [[ $myarch = amd64 ]] ; then
316 myconf+=" -Dtarget_arch=x64"
317 elif [[ $myarch = x86 ]] ; then
318 myconf+=" -Dtarget_arch=ia32"
319 elif [[ $myarch = arm ]] ; then
320 # TODO: check this again after
321 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39509 is fixed.
322 append-flags -fno-tree-sink
323
324 myconf+=" -Dtarget_arch=arm -Ddisable_nacl=1 -Dlinux_use_tcmalloc=0"
325 else
326 die "Failed to determine target arch, got '$myarch'."
327 fi
328
329 if [[ "$(gcc-major-version)$(gcc-minor-version)" == "44" ]]; then
330 myconf+=" -Dno_strict_aliasing=1 -Dgcc_version=44"
331 fi
332
333 # Work around a likely GCC bug, see bug #331945.
334 if [[ "$(gcc-major-version)$(gcc-minor-version)" == "45" ]]; then
335 append-flags -fno-ipa-cp
336 fi
337
338 # Make sure that -Werror doesn't get added to CFLAGS by the build system.
339 # Depending on GCC version the warnings are different and we don't want
340 # the build to fail because of that.
341 myconf+=" -Dwerror="
342
343 build/gyp_chromium --depth=. ${myconf} || die
344 }
345
346 src_compile() {
347 emake chrome chrome_sandbox BUILDTYPE=Release V=1 || die
348 }
349
350 src_install() {
351 exeinto "${CHROMIUM_HOME}"
352 pax-mark m out/Release/chrome
353 doexe out/Release/chrome
354 doexe out/Release/chrome_sandbox || die
355 fperms 4755 "${CHROMIUM_HOME}/chrome_sandbox"
356 doexe out/Release/xdg-settings || die
357 doexe "${FILESDIR}"/chromium-launcher.sh || die
358
359 insinto "${CHROMIUM_HOME}"
360 doins out/Release/chrome.pak || die
361 doins out/Release/resources.pak || die
362
363 doins -r out/Release/locales || die
364 doins -r out/Release/resources || die
365
366 # chrome.1 is for chromium --help
367 newman out/Release/chrome.1 chrome.1 || die
368 newman out/Release/chrome.1 chromium.1 || die
369
370 # Chromium looks for these in its folder
371 # See media_posix.cc and base_paths_linux.cc
372 dosym /usr/$(get_libdir)/libavcodec.so.52 "${CHROMIUM_HOME}" || die
373 dosym /usr/$(get_libdir)/libavformat.so.52 "${CHROMIUM_HOME}" || die
374 dosym /usr/$(get_libdir)/libavutil.so.50 "${CHROMIUM_HOME}" || die
375
376 # Install icon and desktop entry.
377 newicon out/Release/product_logo_48.png ${PN}-browser.png || die
378 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium || die
379 make_desktop_entry chromium "Chromium" ${PN}-browser "Network;WebBrowser" \
380 "MimeType=text/html;text/xml;application/xhtml+xml;"
381 sed -e "/^Exec/s/$/ %U/" -i "${D}"/usr/share/applications/*.desktop || die
382
383 # Install GNOME default application entry (bug #303100).
384 if use gnome; then
385 dodir /usr/share/gnome-control-center/default-apps || die
386 insinto /usr/share/gnome-control-center/default-apps
387 doins "${FILESDIR}"/chromium.xml || die
388 fi
389 }
390
391
392
393 1.1 www-client/chromium/chromium-7.0.517.44.ebuild
394
395 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-7.0.517.44.ebuild?rev=1.1&view=markup
396 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-7.0.517.44.ebuild?rev=1.1&content-type=text/plain
397
398 Index: chromium-7.0.517.44.ebuild
399 ===================================================================
400 # Copyright 1999-2010 Gentoo Foundation
401 # Distributed under the terms of the GNU General Public License v2
402 # $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-7.0.517.44.ebuild,v 1.1 2010/11/04 20:58:33 phajdan.jr Exp $
403
404 EAPI="2"
405
406 inherit eutils flag-o-matic multilib pax-utils toolchain-funcs
407
408 DESCRIPTION="Open-source version of Google Chrome web browser"
409 HOMEPAGE="http://chromium.org/"
410 SRC_URI="http://build.chromium.org/buildbot/official/${P}.tar.bz2"
411
412 LICENSE="BSD"
413 SLOT="0"
414 KEYWORDS="~amd64 ~arm ~x86"
415 IUSE="cups gnome gnome-keyring"
416
417 RDEPEND="app-arch/bzip2
418 >=dev-libs/icu-4.4.1
419 >=dev-libs/libevent-1.4.13
420 dev-libs/libxml2
421 dev-libs/libxslt
422 >=dev-libs/nss-3.12.3
423 >=gnome-base/gconf-2.24.0
424 gnome-keyring? ( >=gnome-base/gnome-keyring-2.28.2 )
425 >=media-libs/alsa-lib-1.0.19
426 media-libs/jpeg:0
427 media-libs/libpng
428 cups? ( >=net-print/cups-1.3.11 )
429 sys-libs/zlib
430 >=x11-libs/gtk+-2.14.7
431 x11-libs/libXScrnSaver"
432 DEPEND="${RDEPEND}
433 dev-lang/perl
434 >=dev-util/gperf-3.0.3
435 >=dev-util/pkgconfig-0.23
436 sys-devel/flex"
437 RDEPEND+="
438 || (
439 x11-themes/gnome-icon-theme
440 x11-themes/oxygen-molecule
441 x11-themes/tango-icon-theme
442 x11-themes/xfce4-icon-theme
443 )
444 x11-apps/xmessage
445 x11-misc/xdg-utils
446 virtual/ttf-fonts"
447
448 remove_bundled_lib() {
449 einfo "Removing bundled library $1 ..."
450 local out
451 out="$(find $1 -mindepth 1 \! -iname '*.gyp' -print -delete)" \
452 || die "failed to remove bundled library $1"
453 if [[ -z $out ]]; then
454 die "no files matched when removing bundled library $1"
455 fi
456 }
457
458 pkg_setup() {
459 CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser"
460 }
461
462 src_prepare() {
463 # Add Gentoo plugin paths.
464 epatch "${FILESDIR}"/${PN}-plugins-path-r0.patch
465
466 # Make compile-time dependency on gnome-keyring optional, bug #332411.
467 epatch "${FILESDIR}"/${PN}-gnome-keyring-r0.patch
468
469 # Backport a fix for bug #343971.
470 epatch "${FILESDIR}"/${PN}-locale-glib-r0.patch
471
472 remove_bundled_lib "third_party/bzip2"
473 remove_bundled_lib "third_party/codesighs"
474 remove_bundled_lib "third_party/cros"
475 remove_bundled_lib "third_party/icu"
476 remove_bundled_lib "third_party/jemalloc"
477 remove_bundled_lib "third_party/lcov"
478 remove_bundled_lib "third_party/libevent"
479 remove_bundled_lib "third_party/libjpeg"
480 remove_bundled_lib "third_party/libpng"
481 remove_bundled_lib "third_party/libxml"
482 remove_bundled_lib "third_party/libxslt"
483 remove_bundled_lib "third_party/lzma_sdk"
484 remove_bundled_lib "third_party/molokocacao"
485 remove_bundled_lib "third_party/ocmock"
486 remove_bundled_lib "third_party/pyftpdlib"
487 remove_bundled_lib "third_party/simplejson"
488 remove_bundled_lib "third_party/tlslite"
489 # TODO: also remove third_party/zlib. For now the compilation fails if we
490 # remove it (minizip-related).
491 }
492
493 src_configure() {
494 local myconf=""
495
496 # Never tell the build system to "enable" SSE2, it has a few unexpected
497 # additions, bug #336871.
498 myconf+=" -Ddisable_sse2=1"
499
500 # Use system-provided libraries.
501 # TODO: use_system_ffmpeg (http://crbug.com/50678).
502 # TODO: use_system_sqlite (http://crbug.com/22208).
503 # TODO: use_system_hunspell (upstream changes needed).
504 # TODO: use_system_ssl when we have a recent enough system NSS.
505 myconf+="
506 -Duse_system_bzip2=1
507 -Duse_system_icu=1
508 -Duse_system_libevent=1
509 -Duse_system_libjpeg=1
510 -Duse_system_libpng=1
511 -Duse_system_libxml=1
512 -Duse_system_zlib=1"
513
514 # The dependency on cups is optional, see bug #324105.
515 if use cups; then
516 myconf+=" -Duse_cups=1"
517 else
518 myconf+=" -Duse_cups=0"
519 fi
520
521 if use "gnome-keyring"; then
522 myconf+=" -Duse_gnome_keyring=1 -Dlinux_link_gnome_keyring=1"
523 else
524 # TODO: we should also disable code trying to dlopen
525 # gnome-keyring in that case.
526 myconf+=" -Duse_gnome_keyring=0 -Dlinux_link_gnome_keyring=0"
527 fi
528
529 # Enable sandbox.
530 myconf+="
531 -Dlinux_sandbox_path=${CHROMIUM_HOME}/chrome_sandbox
532 -Dlinux_sandbox_chrome_path=${CHROMIUM_HOME}/chrome"
533
534 # Disable the V8 snapshot. It breaks the build on hardened (bug #301880),
535 # and the performance gain isn't worth it.
536 myconf+=" -Dv8_use_snapshot=0"
537
538 # Disable tcmalloc memory allocator. It causes problems,
539 # for example bug #320419.
540 myconf+=" -Dlinux_use_tcmalloc=0"
541
542 # Use target arch detection logic from bug #296917.
543 local myarch="$ABI"
544 [[ $myarch = "" ]] && myarch="$ARCH"
545
546 if [[ $myarch = amd64 ]] ; then
547 myconf+=" -Dtarget_arch=x64"
548 elif [[ $myarch = x86 ]] ; then
549 myconf+=" -Dtarget_arch=ia32"
550 elif [[ $myarch = arm ]] ; then
551 # TODO: check this again after
552 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39509 is fixed.
553 append-flags -fno-tree-sink
554
555 myconf+=" -Dtarget_arch=arm -Ddisable_nacl=1 -Dlinux_use_tcmalloc=0"
556 else
557 die "Failed to determine target arch, got '$myarch'."
558 fi
559
560 if [[ "$(gcc-major-version)$(gcc-minor-version)" == "44" ]]; then
561 myconf+=" -Dno_strict_aliasing=1 -Dgcc_version=44"
562 fi
563
564 # Work around a likely GCC bug, see bug #331945.
565 if [[ "$(gcc-major-version)$(gcc-minor-version)" == "45" ]]; then
566 append-flags -fno-ipa-cp
567 fi
568
569 # Make sure that -Werror doesn't get added to CFLAGS by the build system.
570 # Depending on GCC version the warnings are different and we don't want
571 # the build to fail because of that.
572 myconf+=" -Dwerror="
573
574 build/gyp_chromium -f make build/all.gyp ${myconf} --depth=. || die
575 }
576
577 src_compile() {
578 emake -r V=1 chrome chrome_sandbox BUILDTYPE=Release \
579 CC="$(tc-getCC)" \
580 CXX="$(tc-getCXX)" \
581 AR="$(tc-getAR)" \
582 RANLIB="$(tc-getRANLIB)" \
583 || die
584 }
585
586 src_install() {
587 exeinto "${CHROMIUM_HOME}"
588 pax-mark m out/Release/chrome
589 doexe out/Release/chrome
590 doexe out/Release/chrome_sandbox || die
591 fperms 4755 "${CHROMIUM_HOME}/chrome_sandbox"
592 doexe out/Release/xdg-settings || die
593 doexe "${FILESDIR}"/chromium-launcher.sh || die
594
595 insinto "${CHROMIUM_HOME}"
596 doins out/Release/chrome.pak || die
597 doins out/Release/resources.pak || die
598
599 doins -r out/Release/locales || die
600 doins -r out/Release/resources || die
601
602 # chrome.1 is for chromium --help
603 newman out/Release/chrome.1 chrome.1 || die
604 newman out/Release/chrome.1 chromium.1 || die
605
606 doexe out/Release/ffmpegsumo_nolink || die
607 doexe out/Release/libffmpegsumo.so || die
608
609 # Install icon and desktop entry.
610 newicon out/Release/product_logo_48.png ${PN}-browser.png || die
611 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium || die
612 make_desktop_entry chromium "Chromium" ${PN}-browser "Network;WebBrowser" \
613 "MimeType=text/html;text/xml;application/xhtml+xml;"
614 sed -e "/^Exec/s/$/ %U/" -i "${D}"/usr/share/applications/*.desktop || die
615
616 # Install GNOME default application entry (bug #303100).
617 if use gnome; then
618 dodir /usr/share/gnome-control-center/default-apps || die
619 insinto /usr/share/gnome-control-center/default-apps
620 doins "${FILESDIR}"/chromium.xml || die
621 fi
622 }