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