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