Gentoo Archives: gentoo-commits

From: "Mike Gilbert (floppym)" <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-client/chromium: ChangeLog chromium-15.0.874.54.ebuild chromium-15.0.874.21.ebuild
Date: Fri, 30 Sep 2011 18:33:56
Message-Id: 20110930183346.2DBD020036@flycatcher.gentoo.org
1 floppym 11/09/30 18:33:46
2
3 Modified: ChangeLog
4 Added: chromium-15.0.874.54.ebuild
5 Removed: chromium-15.0.874.21.ebuild
6 Log:
7 Version bump for beta channel release. Remove old.
8
9 (Portage version: 2.2.0_alpha60/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.454 www-client/chromium/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.454&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.454&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?r1=1.453&r2=1.454
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v
21 retrieving revision 1.453
22 retrieving revision 1.454
23 diff -u -r1.453 -r1.454
24 --- ChangeLog 29 Sep 2011 02:11:01 -0000 1.453
25 +++ ChangeLog 30 Sep 2011 18:33:46 -0000 1.454
26 @@ -1,6 +1,12 @@
27 # ChangeLog for www-client/chromium
28 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.453 2011/09/29 02:11:01 floppym Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.454 2011/09/30 18:33:46 floppym Exp $
31 +
32 +*chromium-15.0.874.54 (30 Sep 2011)
33 +
34 + 30 Sep 2011; Mike Gilbert <floppym@g.o> -chromium-15.0.874.21.ebuild,
35 + +chromium-15.0.874.54.ebuild:
36 + Version bump for beta channel release. Remove old.
37
38 *chromium-15.0.874.51 (29 Sep 2011)
39
40
41
42
43 1.1 www-client/chromium/chromium-15.0.874.54.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-15.0.874.54.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-15.0.874.54.ebuild?rev=1.1&content-type=text/plain
47
48 Index: chromium-15.0.874.54.ebuild
49 ===================================================================
50 # Copyright 1999-2011 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-15.0.874.54.ebuild,v 1.1 2011/09/30 18:33:46 floppym Exp $
53
54 EAPI="3"
55 PYTHON_DEPEND="2:2.6"
56
57 inherit eutils fdo-mime flag-o-matic gnome2-utils linux-info multilib \
58 pax-utils portability python toolchain-funcs versionator virtualx
59
60 DESCRIPTION="Open-source version of Google Chrome web browser"
61 HOMEPAGE="http://chromium.org/"
62 SRC_URI="http://build.chromium.org/official/${P}.tar.bz2"
63
64 LICENSE="BSD"
65 SLOT="0"
66 KEYWORDS="~amd64 ~x86"
67 IUSE="bindist chromedriver cups gnome gnome-keyring kerberos pulseaudio"
68
69 # en_US is ommitted on purpose from the list below. It must always be available.
70 LANGS="am ar bg bn ca cs da de el en_GB es es_LA et fa fi fil fr gu he hi hr
71 hu id it ja kn ko lt lv ml mr nb nl pl pt_BR pt_PT ro ru sk sl sr sv sw ta te th
72 tr uk vi zh_CN zh_TW"
73 for lang in ${LANGS}; do
74 IUSE+=" linguas_${lang}"
75 done
76
77 RDEPEND="app-arch/bzip2
78 dev-libs/dbus-glib
79 >=dev-libs/icu-4.4.1
80 >=dev-libs/libevent-1.4.13
81 dev-libs/libxml2[icu]
82 dev-libs/libxslt
83 >=dev-libs/nss-3.12.3
84 gnome? ( >=gnome-base/gconf-2.24.0 )
85 gnome-keyring? ( >=gnome-base/gnome-keyring-2.28.2 )
86 >=media-libs/alsa-lib-1.0.19
87 media-libs/flac
88 virtual/jpeg
89 media-libs/libpng
90 >=media-libs/libwebp-0.1.2
91 media-libs/speex
92 pulseaudio? ( media-sound/pulseaudio )
93 cups? (
94 dev-libs/libgcrypt
95 >=net-print/cups-1.3.11
96 )
97 sys-libs/zlib
98 x11-libs/gtk+:2
99 x11-libs/libXinerama
100 x11-libs/libXScrnSaver
101 x11-libs/libXtst
102 kerberos? ( virtual/krb5 )"
103 DEPEND="${RDEPEND}
104 dev-lang/perl
105 >=dev-util/gperf-3.0.3
106 >=dev-util/pkgconfig-0.23
107 >=sys-devel/bison-2.4.3
108 sys-devel/flex
109 >=sys-devel/make-3.81-r2
110 test? (
111 dev-python/pyftpdlib
112 dev-python/simplejson
113 )"
114 RDEPEND+="
115 x11-misc/xdg-utils
116 virtual/ttf-fonts"
117
118 gyp_use() {
119 if [[ $# -lt 2 ]]; then
120 echo "!!! usage: gyp_use <USEFLAG> <GYPFLAG>" >&2
121 return 1
122 fi
123 if use "$1"; then echo "-D$2=1"; else echo "-D$2=0"; fi
124 }
125
126 egyp() {
127 set -- build/gyp_chromium --depth=. "${@}"
128 echo "${@}" >&2
129 "${@}"
130 }
131
132 # Chromium uses different names for some langs,
133 # return Chromium name corresponding to a Gentoo lang.
134 chromium_lang() {
135 if [[ "$1" == "es_LA" ]]; then
136 echo "es_419"
137 else
138 echo "$1"
139 fi
140 }
141
142 pkg_setup() {
143 CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser"
144
145 # Make sure the build system will use the right tools, bug #340795.
146 tc-export AR CC CXX RANLIB
147
148 # Make sure the build system will use the right python, bug #344367.
149 python_set_active_version 2
150 python_pkg_setup
151
152 # Prevent user problems like bug #348235.
153 eshopts_push -s extglob
154 if is-flagq '-g?(gdb)?([1-9])'; then
155 ewarn "You have enabled debug info (probably have -g or -ggdb in your \$C{,XX}FLAGS)."
156 ewarn "You may experience really long compilation times and/or increased memory usage."
157 ewarn "If compilation fails, please try removing -g{,gdb} before reporting a bug."
158 fi
159 eshopts_pop
160
161 # Warn if the kernel doesn't support features useful for sandboxing,
162 # bug #363907.
163 CONFIG_CHECK="~PID_NS ~NET_NS"
164 check_extra_config
165
166 if use bindist; then
167 elog "bindist enabled: H.264 video support will be disabled."
168 else
169 elog "bindist disabled: Resulting binaries may not be legal to re-distribute."
170 fi
171 }
172
173 src_prepare() {
174 cp "${FILESDIR}/nacl.gypi" chrome/ || die
175
176 # zlib-1.2.5.1-r1 renames the OF macro in zconf.h, bug 383371.
177 sed -i '1i#define OF(x) x' \
178 third_party/zlib/contrib/minizip/{ioapi,{,un}zip}.c \
179 chrome/common/zip.cc || die
180
181 epatch_user
182
183 # Remove most bundled libraries. Some are still needed.
184 find third_party -type f \! -iname '*.gyp*' \
185 \! -path 'third_party/WebKit/*' \
186 \! -path 'third_party/angle/*' \
187 \! -path 'third_party/cacheinvalidation/*' \
188 \! -path 'third_party/cld/*' \
189 \! -path 'third_party/expat/*' \
190 \! -path 'third_party/ffmpeg/*' \
191 \! -path 'third_party/flac/flac.h' \
192 \! -path 'third_party/gpsd/*' \
193 \! -path 'third_party/harfbuzz/*' \
194 \! -path 'third_party/hunspell/*' \
195 \! -path 'third_party/iccjpeg/*' \
196 \! -path 'third_party/launchpad_translations/*' \
197 \! -path 'third_party/leveldb/*' \
198 \! -path 'third_party/leveldatabase/*' \
199 \! -path 'third_party/libjingle/*' \
200 \! -path 'third_party/libphonenumber/*' \
201 \! -path 'third_party/libvpx/*' \
202 \! -path 'third_party/mesa/*' \
203 \! -path 'third_party/modp_b64/*' \
204 \! -path 'third_party/mongoose/*' \
205 \! -path 'third_party/npapi/*' \
206 \! -path 'third_party/openmax/*' \
207 \! -path 'third_party/ots/*' \
208 \! -path 'third_party/protobuf/*' \
209 \! -path 'third_party/sfntly/*' \
210 \! -path 'third_party/skia/*' \
211 \! -path 'third_party/smhasher/*' \
212 \! -path 'third_party/speex/speex.h' \
213 \! -path 'third_party/sqlite/*' \
214 \! -path 'third_party/tcmalloc/*' \
215 \! -path 'third_party/tlslite/*' \
216 \! -path 'third_party/undoview/*' \
217 \! -path 'third_party/v8-i18n/*' \
218 \! -path 'third_party/webdriver/*' \
219 \! -path 'third_party/webgl_conformance/*' \
220 \! -path 'third_party/webrtc/*' \
221 \! -path 'third_party/yasm/*' \
222 \! -path 'third_party/zlib/contrib/minizip/*' \
223 -delete || die
224
225 # Make sure the build system will use the right python, bug #344367.
226 # Only convert directories that need it, to save time.
227 python_convert_shebangs -q -r 2 build tools
228 }
229
230 src_configure() {
231 local myconf=""
232
233 # Never tell the build system to "enable" SSE2, it has a few unexpected
234 # additions, bug #336871.
235 myconf+=" -Ddisable_sse2=1"
236
237 # Disable NaCl temporarily, this tarball doesn't have IRT.
238 myconf+=" -Ddisable_nacl=1"
239
240 # Disable WebRTC until they make PulseAudio dependency optional,
241 # bug #377847.
242 myconf+=" -Denable_webrtc=0"
243
244 # Use system-provided libraries.
245 # TODO: use_system_ffmpeg
246 # TODO: use_system_hunspell (upstream changes needed).
247 # TODO: use_system_ssl (http://crbug.com/58087).
248 # TODO: use_system_sqlite (http://crbug.com/22208).
249 # TODO: use_system_vpx
250 myconf+="
251 -Duse_system_bzip2=1
252 -Duse_system_flac=1
253 -Duse_system_icu=1
254 -Duse_system_libevent=1
255 -Duse_system_libjpeg=1
256 -Duse_system_libpng=1
257 -Duse_system_libwebp=1
258 -Duse_system_libxml=1
259 -Duse_system_speex=1
260 -Duse_system_xdg_utils=1
261 -Duse_system_zlib=1"
262
263 # Optional dependencies.
264 # TODO: linux_link_kerberos, bug #381289.
265 myconf+="
266 $(gyp_use cups use_cups)
267 $(gyp_use gnome use_gconf)
268 $(gyp_use gnome-keyring use_gnome_keyring)
269 $(gyp_use gnome-keyring linux_link_gnome_keyring)
270 $(gyp_use kerberos use_kerberos)
271 $(gyp_use pulseaudio use_pulseaudio)"
272
273 # Enable sandbox.
274 myconf+="
275 -Dlinux_sandbox_path=${CHROMIUM_HOME}/chrome_sandbox
276 -Dlinux_sandbox_chrome_path=${CHROMIUM_HOME}/chrome"
277
278 if host-is-pax; then
279 # Prevent the build from failing (bug #301880). The performance
280 # difference is very small.
281 myconf+=" -Dv8_use_snapshot=0"
282 fi
283
284 # Our system ffmpeg should support more codecs than the bundled one
285 # for Chromium.
286 # myconf+=" -Dproprietary_codecs=1"
287
288 if ! use bindist; then
289 # Enable H.624 support in bundled ffmpeg.
290 myconf+=" -Dproprietary_codecs=1 -Dffmpeg_branding=Chrome"
291 fi
292
293 local myarch="$(tc-arch)"
294 if [[ $myarch = amd64 ]] ; then
295 myconf+=" -Dtarget_arch=x64"
296 elif [[ $myarch = x86 ]] ; then
297 myconf+=" -Dtarget_arch=ia32"
298 elif [[ $myarch = arm ]] ; then
299 # TODO: check this again after
300 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39509 is fixed.
301 append-flags -fno-tree-sink
302
303 myconf+=" -Dtarget_arch=arm -Ddisable_nacl=1 -Dlinux_use_tcmalloc=0"
304 else
305 die "Failed to determine target arch, got '$myarch'."
306 fi
307
308 # Make sure that -Werror doesn't get added to CFLAGS by the build system.
309 # Depending on GCC version the warnings are different and we don't want
310 # the build to fail because of that.
311 myconf+=" -Dwerror="
312
313 # Avoid a build error with -Os, bug #352457.
314 replace-flags "-Os" "-O2"
315
316 egyp ${myconf} || die
317 }
318
319 src_compile() {
320 emake chrome chrome_sandbox BUILDTYPE=Release V=1 || die
321 pax-mark m out/Release/chrome
322 if use chromedriver; then
323 emake chromedriver BUILDTYPE=Release V=1 || die
324 fi
325 if use test; then
326 emake {base,crypto,googleurl,net}_unittests BUILDTYPE=Release V=1 || die
327 pax-mark m out/Release/{base,crypto,googleurl,net}_unittests
328 fi
329 }
330
331 src_test() {
332 # For more info see bug #350349.
333 local mylocale='en_US.utf8'
334 if ! locale -a | grep -q "$mylocale"; then
335 eerror "${PN} requires ${mylocale} locale for tests"
336 eerror "Please read the following guides for more information:"
337 eerror " http://www.gentoo.org/doc/en/guide-localization.xml"
338 eerror " http://www.gentoo.org/doc/en/utf-8.xml"
339 die "locale ${mylocale} is not supported"
340 fi
341
342 # For more info see bug #370957.
343 if [[ $UID -eq 0 ]]; then
344 die "Tests must be run as non-root. Please use FEATURES=userpriv."
345 fi
346
347 # For more info see bug #350347.
348 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/base_unittests virtualmake \
349 '--gtest_filter=-ICUStringConversionsTest.*'
350
351 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/crypto_unittests virtualmake
352 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/googleurl_unittests virtualmake
353
354 # NetUtilTest: bug #361885.
355 # NetUtilTest.GenerateFileName: some locale-related mismatch.
356 # UDP: unstable, active development. We should revisit this later.
357 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/net_unittests virtualmake \
358 '--gtest_filter=-NetUtilTest.IDNToUnicode*:NetUtilTest.FormatUrl*:NetUtilTest.GenerateFileName:*UDP*'
359 }
360
361 src_install() {
362 exeinto "${CHROMIUM_HOME}"
363 doexe out/Release/chrome || die
364 doexe out/Release/chrome_sandbox || die
365 fperms 4755 "${CHROMIUM_HOME}/chrome_sandbox"
366
367 if use chromedriver; then
368 doexe out/Release/chromedriver || die
369 fi
370
371 # Install Native Client files on platforms that support it.
372 # insinto "${CHROMIUM_HOME}"
373 # case "$(tc-arch)" in
374 # amd64)
375 # doins native_client/irt_binaries/nacl_irt_x86_64.nexe || die
376 # doins out/Release/libppGoogleNaClPluginChrome.so || die
377 # ;;
378 # x86)
379 # doins native_client/irt_binaries/nacl_irt_x86_32.nexe || die
380 # doins out/Release/libppGoogleNaClPluginChrome.so || die
381 # ;;
382 # esac
383
384 newexe "${FILESDIR}"/chromium-launcher-r2.sh chromium-launcher.sh || die
385
386 # It is important that we name the target "chromium-browser",
387 # xdg-utils expect it; bug #355517.
388 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser || die
389 # keep the old symlink around for consistency
390 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium || die
391
392 # Allow users to override command-line options, bug #357629.
393 dodir /etc/chromium || die
394 insinto /etc/chromium
395 newins "${FILESDIR}/chromium.default" "default" || die
396
397 # Support LINGUAS, bug #332751.
398 local pak
399 for pak in out/Release/locales/*.pak; do
400 local pakbasename="$(basename ${pak})"
401 local pakname="${pakbasename%.pak}"
402 local langname="${pakname//-/_}"
403
404 # Do not issue warning for en_US locale. This is the fallback
405 # locale so it should always be installed.
406 if [[ "${langname}" == "en_US" ]]; then
407 continue
408 fi
409
410 local found=false
411 local lang
412 for lang in ${LANGS}; do
413 local crlang="$(chromium_lang ${lang})"
414 if [[ "${langname}" == "${crlang}" ]]; then
415 found=true
416 break
417 fi
418 done
419 if ! $found; then
420 ewarn "LINGUAS warning: no ${langname} in LANGS"
421 fi
422 done
423 local lang
424 for lang in ${LANGS}; do
425 local crlang="$(chromium_lang ${lang})"
426 local pakfile="out/Release/locales/${crlang//_/-}.pak"
427 if [ ! -f "${pakfile}" ]; then
428 ewarn "LINGUAS warning: no .pak file for ${lang} (${pakfile} not found)"
429 fi
430 if ! use linguas_${lang}; then
431 rm "${pakfile}" || die
432 fi
433 done
434
435 insinto "${CHROMIUM_HOME}"
436 doins out/Release/chrome.pak || die
437 doins out/Release/resources.pak || die
438
439 doins -r out/Release/locales || die
440 doins -r out/Release/resources || die
441
442 newman out/Release/chrome.1 chromium.1 || die
443 newman out/Release/chrome.1 chromium-browser.1 || die
444
445 # Chromium looks for these in its folder
446 # See media_posix.cc and base_paths_linux.cc
447 # dosym /usr/$(get_libdir)/libavcodec.so.52 "${CHROMIUM_HOME}" || die
448 # dosym /usr/$(get_libdir)/libavformat.so.52 "${CHROMIUM_HOME}" || die
449 # dosym /usr/$(get_libdir)/libavutil.so.50 "${CHROMIUM_HOME}" || die
450 doexe out/Release/libffmpegsumo.so || die
451
452 # Install icons and desktop entry.
453 for SIZE in 16 22 24 32 48 64 128 256 ; do
454 insinto /usr/share/icons/hicolor/${SIZE}x${SIZE}/apps
455 newins chrome/app/theme/chromium/product_logo_${SIZE}.png \
456 chromium-browser.png || die
457 done
458 local mime_types="text/html;text/xml;application/xhtml+xml;"
459 mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797
460 make_desktop_entry chromium-browser "Chromium" chromium-browser \
461 "Network;WebBrowser" \
462 "MimeType=${mime_types}\nStartupWMClass=chromium-browser"
463 sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die
464
465 # Install GNOME default application entry (bug #303100).
466 if use gnome; then
467 dodir /usr/share/gnome-control-center/default-apps || die
468 insinto /usr/share/gnome-control-center/default-apps
469 doins "${FILESDIR}"/chromium-browser.xml || die
470 fi
471 }
472
473 pkg_preinst() {
474 gnome2_icon_savelist
475 }
476
477 pkg_postinst() {
478 fdo-mime_desktop_database_update
479 gnome2_icon_cache_update
480
481 # For more info see bug #292201, bug #352263, bug #361859.
482 elog
483 elog "Depending on your desktop environment, you may need"
484 elog "to install additional packages to get icons on the Downloads page."
485 elog
486 elog "For KDE, the required package is kde-base/oxygen-icons."
487 elog
488 elog "For other desktop environments, try one of the following:"
489 elog " - x11-themes/gnome-icon-theme"
490 elog " - x11-themes/tango-icon-theme"
491
492 # For more info see bug #359153.
493 elog
494 elog "Some web pages may require additional fonts to display properly."
495 elog "Try installing some of the following packages if some characters"
496 elog "are not displayed properly:"
497 elog " - media-fonts/arphicfonts"
498 elog " - media-fonts/bitstream-cyberbit"
499 elog " - media-fonts/droid"
500 elog " - media-fonts/ipamonafont"
501 elog " - media-fonts/ja-ipafonts"
502 elog " - media-fonts/takao-fonts"
503 elog " - media-fonts/wqy-microhei"
504 elog " - media-fonts/wqy-zenhei"
505 }
506
507 pkg_postrm() {
508 gnome2_icon_cache_update
509 }