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