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: ChangeLog chromium-12.0.742.12.ebuild chromium-12.0.742.5.ebuild
Date: Fri, 29 Apr 2011 08:45:11
Message-Id: 20110429084455.ACE5720054@flycatcher.gentoo.org
1 phajdan.jr 11/04/29 08:44:55
2
3 Modified: ChangeLog
4 Added: chromium-12.0.742.12.ebuild
5 Removed: chromium-12.0.742.5.ebuild
6 Log:
7 Version bump for dev channel release. Remove old.
8
9 (Portage version: 2.1.9.42/cvs/Linux i686)
10
11 Revision Changes Path
12 1.347 www-client/chromium/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.347&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.347&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?r1=1.346&r2=1.347
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v
21 retrieving revision 1.346
22 retrieving revision 1.347
23 diff -u -r1.346 -r1.347
24 --- ChangeLog 28 Apr 2011 16:12:17 -0000 1.346
25 +++ ChangeLog 29 Apr 2011 08:44:55 -0000 1.347
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.346 2011/04/28 16:12:17 hwoarang Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.347 2011/04/29 08:44:55 phajdan.jr Exp $
31 +
32 +*chromium-12.0.742.12 (29 Apr 2011)
33 +
34 + 29 Apr 2011; Pawel Hajdan jr <phajdan.jr@g.o>
35 + -chromium-12.0.742.5.ebuild, +chromium-12.0.742.12.ebuild:
36 + Version bump for dev channel release. Remove old.
37
38 28 Apr 2011; Markos Chandras <hwoarang@g.o>
39 chromium-11.0.696.57.ebuild:
40
41
42
43 1.1 www-client/chromium/chromium-12.0.742.12.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-12.0.742.12.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-12.0.742.12.ebuild?rev=1.1&content-type=text/plain
47
48 Index: chromium-12.0.742.12.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-12.0.742.12.ebuild,v 1.1 2011/04/29 08:44:55 phajdan.jr 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 ~arm ~x86"
67 IUSE="cups gnome gnome-keyring kerberos xinerama"
68
69 RDEPEND="app-arch/bzip2
70 dev-libs/dbus-glib
71 >=dev-libs/icu-4.4.1
72 >=dev-libs/libevent-1.4.13
73 dev-libs/libxml2[icu]
74 dev-libs/libxslt
75 >=dev-libs/nss-3.12.3
76 gnome? ( >=gnome-base/gconf-2.24.0 )
77 gnome-keyring? ( >=gnome-base/gnome-keyring-2.28.2 )
78 >=media-libs/alsa-lib-1.0.19
79 media-libs/flac
80 virtual/jpeg
81 media-libs/libpng
82 >=media-libs/libvpx-0.9.5
83 >=media-libs/libwebp-0.1.2
84 media-libs/speex
85 cups? ( >=net-print/cups-1.3.11 )
86 sys-libs/pam
87 sys-libs/zlib
88 >=virtual/ffmpeg-0.6.90[threads]
89 x11-libs/gtk+:2
90 x11-libs/libXScrnSaver
91 x11-libs/libXtst"
92 DEPEND="${RDEPEND}
93 dev-lang/perl
94 >=dev-util/gperf-3.0.3
95 >=dev-util/pkgconfig-0.23
96 sys-devel/flex
97 >=sys-devel/make-3.81-r2
98 x11-libs/libXinerama
99 test? ( dev-python/simplejson virtual/krb5 )"
100 RDEPEND+="
101 kerberos? ( virtual/krb5 )
102 xinerama? ( x11-libs/libXinerama )
103 x11-misc/xdg-utils
104 virtual/ttf-fonts"
105
106 gyp_use() {
107 if [[ $# -lt 2 ]]; then
108 echo "!!! usage: gyp_use <USEFLAG> <GYPFLAG>" >&2
109 return 1
110 fi
111 if use "$1"; then echo "-D$2=1"; else echo "-D$2=0"; fi
112 }
113
114 egyp() {
115 set -- build/gyp_chromium --depth=. "${@}"
116 echo "${@}" >&2
117 "${@}"
118 }
119
120 pkg_setup() {
121 CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser"
122
123 # Make sure the build system will use the right tools, bug #340795.
124 tc-export AR CC CXX RANLIB
125
126 # Make sure the build system will use the right python, bug #344367.
127 python_set_active_version 2
128 python_pkg_setup
129
130 # Prevent user problems like bug #299777.
131 if ! grep -q /dev/shm <<< $(get_mounts); then
132 ewarn "You don't have tmpfs mounted at /dev/shm."
133 ewarn "${PN} may fail to start in that configuration."
134 ewarn "Please uncomment the /dev/shm entry in /etc/fstab,"
135 ewarn "and run 'mount /dev/shm'."
136 fi
137 if [ `stat -c %a /dev/shm` -ne 1777 ]; then
138 ewarn "/dev/shm does not have correct permissions."
139 ewarn "${PN} may fail to start in that configuration."
140 ewarn "Please run 'chmod 1777 /dev/shm'."
141 fi
142
143 # Prevent user problems like bug #348235.
144 eshopts_push -s extglob
145 if is-flagq '-g?(gdb)?([1-9])'; then
146 ewarn "You have enabled debug info (probably have -g or -ggdb in your \$C{,XX}FLAGS)."
147 ewarn "You may experience really long compilation times and/or increased memory usage."
148 ewarn "If compilation fails, please try removing -g{,gdb} before reporting a bug."
149 fi
150 eshopts_pop
151
152 # Warn if the kernel doesn't support features useful for sandboxing,
153 # bug #363907.
154 CONFIG_CHECK="~PID_NS ~NET_NS"
155 PID_NS_WARNING="PID (process id) namespaces are needed for sandboxing."
156 NET_NS_WARNING="Network namespaces are needed for sandboxing."
157 check_extra_config
158 }
159
160 src_prepare() {
161 # Make sure we don't use bundled libvpx headers.
162 epatch "${FILESDIR}/${PN}-system-vpx-r4.patch"
163
164 # Fix compilation with system zlib, bug #364205. To be upstreamed.
165 epatch "${FILESDIR}/${PN}-system-zlib-r0.patch"
166
167 # Fix compilation without CUPS, bug #364525. To be upstreamed.
168 epatch "${FILESDIR}/${PN}-cups-r0.patch"
169
170 # Remove most bundled libraries. Some are still needed.
171 find third_party -type f \! -iname '*.gyp*' \
172 \! -path 'third_party/WebKit/*' \
173 \! -path 'third_party/angle/*' \
174 \! -path 'third_party/cacheinvalidation/*' \
175 \! -path 'third_party/cld/*' \
176 \! -path 'third_party/expat/*' \
177 \! -path 'third_party/ffmpeg/*' \
178 \! -path 'third_party/flac/flac.h' \
179 \! -path 'third_party/gpsd/*' \
180 \! -path 'third_party/harfbuzz/*' \
181 \! -path 'third_party/hunspell/*' \
182 \! -path 'third_party/iccjpeg/*' \
183 \! -path 'third_party/launchpad_translations/*' \
184 \! -path 'third_party/leveldb/*' \
185 \! -path 'third_party/libjingle/*' \
186 \! -path 'third_party/libsrtp/*' \
187 \! -path 'third_party/libvpx/libvpx.h' \
188 \! -path 'third_party/mesa/*' \
189 \! -path 'third_party/modp_b64/*' \
190 \! -path 'third_party/npapi/*' \
191 \! -path 'third_party/openmax/*' \
192 \! -path 'third_party/ots/*' \
193 \! -path 'third_party/protobuf/*' \
194 \! -path 'third_party/pyftpdlib/*' \
195 \! -path 'third_party/skia/*' \
196 \! -path 'third_party/speex/speex.h' \
197 \! -path 'third_party/sqlite/*' \
198 \! -path 'third_party/tcmalloc/*' \
199 \! -path 'third_party/tlslite/*' \
200 \! -path 'third_party/undoview/*' \
201 \! -path 'third_party/zlib/contrib/minizip/*' \
202 -delete || die
203
204 # Make sure the build system will use the right python, bug #344367.
205 # Only convert directories that need it, to save time.
206 python_convert_shebangs -q -r 2 build tools
207 }
208
209 src_configure() {
210 local myconf=""
211
212 # Never tell the build system to "enable" SSE2, it has a few unexpected
213 # additions, bug #336871.
214 myconf+=" -Ddisable_sse2=1"
215
216 # Use system-provided libraries.
217 # TODO: use_system_hunspell (upstream changes needed).
218 # TODO: use_system_ssl (http://crbug.com/58087).
219 # TODO: use_system_sqlite (http://crbug.com/22208).
220 myconf+="
221 -Duse_system_bzip2=1
222 -Duse_system_flac=1
223 -Duse_system_ffmpeg=1
224 -Duse_system_icu=1
225 -Duse_system_libevent=1
226 -Duse_system_libjpeg=1
227 -Duse_system_libpng=1
228 -Duse_system_libwebp=1
229 -Duse_system_libxml=1
230 -Duse_system_speex=1
231 -Duse_system_vpx=1
232 -Duse_system_xdg_utils=1
233 -Duse_system_zlib=1"
234
235 # Optional dependencies.
236 myconf+="
237 $(gyp_use cups use_cups)
238 $(gyp_use gnome use_gconf)
239 $(gyp_use gnome-keyring use_gnome_keyring)
240 $(gyp_use gnome-keyring linux_link_gnome_keyring)"
241
242 # Enable sandbox.
243 myconf+="
244 -Dlinux_sandbox_path=${CHROMIUM_HOME}/chrome_sandbox
245 -Dlinux_sandbox_chrome_path=${CHROMIUM_HOME}/chrome"
246
247 if host-is-pax; then
248 # Prevent the build from failing (bug #301880). The performance
249 # difference is very small.
250 myconf+=" -Dv8_use_snapshot=0"
251 fi
252
253 # Our system ffmpeg should support more codecs than the bundled one
254 # for Chromium.
255 myconf+=" -Dproprietary_codecs=1"
256
257 # Use target arch detection logic from bug #354601.
258 case ${CHOST} in
259 i?86-*) myarch=x86 ;;
260 x86_64-*)
261 if [[ $ABI = "" ]] ; then
262 myarch=amd64
263 else
264 myarch="$ABI"
265 fi ;;
266 arm*-*) myarch=arm ;;
267 *) die "Unrecognized CHOST: ${CHOST}"
268 esac
269
270 if [[ $myarch = amd64 ]] ; then
271 myconf+=" -Dtarget_arch=x64"
272 elif [[ $myarch = x86 ]] ; then
273 myconf+=" -Dtarget_arch=ia32"
274 elif [[ $myarch = arm ]] ; then
275 # TODO: check this again after
276 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39509 is fixed.
277 append-flags -fno-tree-sink
278
279 myconf+=" -Dtarget_arch=arm -Ddisable_nacl=1 -Dlinux_use_tcmalloc=0"
280 else
281 die "Failed to determine target arch, got '$myarch'."
282 fi
283
284 # Make sure that -Werror doesn't get added to CFLAGS by the build system.
285 # Depending on GCC version the warnings are different and we don't want
286 # the build to fail because of that.
287 myconf+=" -Dwerror="
288
289 # Avoid a build error with -Os, bug #352457.
290 replace-flags "-Os" "-O2"
291
292 egyp ${myconf} || die
293 }
294
295 src_compile() {
296 emake chrome chrome_sandbox BUILDTYPE=Release V=1 || die
297 pax-mark m out/Release/chrome
298 if use test; then
299 emake {base,crypto,googleurl,net}_unittests BUILDTYPE=Release V=1 || die
300 pax-mark m out/Release/{base,crypto,googleurl,net}_unittests
301 fi
302 }
303
304 src_test() {
305 # For more info see bug #350349.
306 local mylocale='en_US.utf8'
307 if ! locale -a | grep -q "$mylocale"; then
308 eerror "${PN} requires ${mylocale} locale for tests"
309 eerror "Please read the following guides for more information:"
310 eerror " http://www.gentoo.org/doc/en/guide-localization.xml"
311 eerror " http://www.gentoo.org/doc/en/utf-8.xml"
312 die "locale ${mylocale} is not supported"
313 fi
314
315 # For more info see bug #350347.
316 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/base_unittests virtualmake \
317 '--gtest_filter=-ICUStringConversionsTest.*'
318
319 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/crypto_unittests virtualmake
320 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/googleurl_unittests virtualmake
321
322 # NetUtilTest: bug #361885.
323 # UDP: unstable, active development. We should revisit this later.
324 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/net_unittests virtualmake \
325 '--gtest_filter=-NetUtilTest.IDNToUnicode*:NetUtilTest.FormatUrl*:*UDP*'
326 }
327
328 src_install() {
329 exeinto "${CHROMIUM_HOME}"
330 doexe out/Release/chrome
331 doexe out/Release/chrome_sandbox || die
332 fperms 4755 "${CHROMIUM_HOME}/chrome_sandbox"
333 newexe "${FILESDIR}"/chromium-launcher-r1.sh chromium-launcher.sh || die
334
335 # It is important that we name the target "chromium-browser",
336 # xdg-utils expect it; bug #355517.
337 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser || die
338 # keep the old symlink around for consistency
339 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium || die
340
341 insinto "${CHROMIUM_HOME}"
342 doins out/Release/chrome.pak || die
343 doins out/Release/resources.pak || die
344
345 doins -r out/Release/locales || die
346 doins -r out/Release/resources || die
347
348 newman out/Release/chrome.1 chromium.1 || die
349 newman out/Release/chrome.1 chromium-browser.1 || die
350
351 # Chromium looks for these in its folder
352 # See media_posix.cc and base_paths_linux.cc
353 dosym /usr/$(get_libdir)/libavcodec.so.52 "${CHROMIUM_HOME}" || die
354 dosym /usr/$(get_libdir)/libavformat.so.52 "${CHROMIUM_HOME}" || die
355 dosym /usr/$(get_libdir)/libavutil.so.50 "${CHROMIUM_HOME}" || die
356
357 # Install icons and desktop entry.
358 for SIZE in 16 22 24 32 48 64 128 256 ; do
359 insinto /usr/share/icons/hicolor/${SIZE}x${SIZE}/apps
360 newins chrome/app/theme/chromium/product_logo_${SIZE}.png \
361 chromium-browser.png || die
362 done
363 local mime_types="text/html;text/xml;application/xhtml+xml;"
364 mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797
365 make_desktop_entry chromium-browser "Chromium" chromium-browser \
366 "Network;WebBrowser" "MimeType=${mime_types}"
367 sed -e "/^Exec/s/$/ %U/" -i "${D}"/usr/share/applications/*.desktop || die
368
369 # Install GNOME default application entry (bug #303100).
370 if use gnome; then
371 dodir /usr/share/gnome-control-center/default-apps || die
372 insinto /usr/share/gnome-control-center/default-apps
373 doins "${FILESDIR}"/chromium-browser.xml || die
374 fi
375 }
376
377 pkg_preinst() {
378 gnome2_icon_savelist
379 }
380
381 pkg_postinst() {
382 fdo-mime_desktop_database_update
383 gnome2_icon_cache_update
384
385 # For more info see bug #292201, bug #352263, bug #361859.
386 elog
387 elog "Depending on your desktop environment, you may need"
388 elog "to install additional packages to get icons on the Downloads page."
389 elog
390 elog "For KDE, the required package is kde-base/oxygen-icons."
391 elog
392 elog "For other desktop environments, try one of the following:"
393 elog " - x11-themes/gnome-icon-theme"
394 elog " - x11-themes/tango-icon-theme"
395
396 # For more info see bug #359153.
397 elog
398 elog "Some web pages may require additional fonts to display properly."
399 elog "Try installing some of the following packages if some characters"
400 elog "are not displayed properly:"
401 elog " - media-fonts/arphicfonts"
402 elog " - media-fonts/bitstream-cyberbit"
403 elog " - media-fonts/droid"
404 elog " - media-fonts/ipamonafont"
405 elog " - media-fonts/ja-ipafonts"
406 elog " - media-fonts/takao-fonts"
407 elog " - media-fonts/wqy-microhei"
408 elog " - media-fonts/wqy-zenhei"
409 }
410
411 pkg_postrm() {
412 gnome2_icon_cache_update
413 }