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-11.0.672.2-r1.ebuild ChangeLog chromium-9999.ebuild
Date: Tue, 22 Feb 2011 13:33:42
Message-Id: 20110222133306.9487220054@flycatcher.gentoo.org
1 phajdan.jr 11/02/22 13:33:06
2
3 Modified: ChangeLog chromium-9999.ebuild
4 Added: chromium-11.0.672.2-r1.ebuild
5 Log:
6 Rename the launcher from chromium to chromium-browser, for xdg-open; bug #355517 by Dean Matzkov <Bapabooiee@×××××.com>.
7
8 (Portage version: 2.1.9.25/cvs/Linux i686)
9
10 Revision Changes Path
11 1.287 www-client/chromium/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.287&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.287&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?r1=1.286&r2=1.287
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v
20 retrieving revision 1.286
21 retrieving revision 1.287
22 diff -u -r1.286 -r1.287
23 --- ChangeLog 20 Feb 2011 17:37:41 -0000 1.286
24 +++ ChangeLog 22 Feb 2011 13:33:06 -0000 1.287
25 @@ -1,6 +1,14 @@
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.286 2011/02/20 17:37:41 maekke Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.287 2011/02/22 13:33:06 phajdan.jr Exp $
30 +
31 +*chromium-11.0.672.2-r1 (22 Feb 2011)
32 +
33 + 22 Feb 2011; Pawel Hajdan jr <phajdan.jr@g.o>
34 + +files/chromium-launcher-r1.sh, +chromium-11.0.672.2-r1.ebuild,
35 + chromium-9999.ebuild:
36 + Rename the launcher from chromium to chromium-browser, for xdg-open; bug
37 + #355517 by Dean Matzkov <Bapabooiee@×××××.com>.
38
39 20 Feb 2011; Markus Meier <maekke@g.o> chromium-10.0.648.82.ebuild:
40 add ~arm, bug #350648
41
42
43
44 1.134 www-client/chromium/chromium-9999.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-9999.ebuild?rev=1.134&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-9999.ebuild?rev=1.134&content-type=text/plain
48 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-9999.ebuild?r1=1.133&r2=1.134
49
50 Index: chromium-9999.ebuild
51 ===================================================================
52 RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-9999.ebuild,v
53 retrieving revision 1.133
54 retrieving revision 1.134
55 diff -u -r1.133 -r1.134
56 --- chromium-9999.ebuild 18 Feb 2011 10:46:51 -0000 1.133
57 +++ chromium-9999.ebuild 22 Feb 2011 13:33:06 -0000 1.134
58 @@ -1,12 +1,12 @@
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.ebuild,v 1.133 2011/02/18 10:46:51 phajdan.jr Exp $
62 +# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-9999.ebuild,v 1.134 2011/02/22 13:33:06 phajdan.jr Exp $
63
64 EAPI="3"
65 PYTHON_DEPEND="2:2.6"
66
67 -inherit eutils flag-o-matic multilib pax-utils portability python subversion \
68 - toolchain-funcs versionator virtualx
69 +inherit eutils fdo-mime flag-o-matic multilib pax-utils portability python \
70 + subversion toolchain-funcs versionator virtualx
71
72 DESCRIPTION="Open-source version of Google Chrome web browser"
73 HOMEPAGE="http://chromium.org/"
74 @@ -330,7 +330,11 @@
75 doexe out/Release/chrome
76 doexe out/Release/chrome_sandbox || die
77 fperms 4755 "${CHROMIUM_HOME}/chrome_sandbox"
78 - doexe "${FILESDIR}"/chromium-launcher.sh || die
79 + newexe "${FILESDIR}"/chromium-launcher-r1.sh chromium-launcher.sh || die
80 +
81 + # It is important that we name the target "chromium-browser",
82 + # xdg-utils expect it; bug #355517.
83 + dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser || die
84
85 insinto "${CHROMIUM_HOME}"
86 doins out/Release/chrome.pak || die
87 @@ -341,7 +345,7 @@
88
89 # chrome.1 is for chromium --help
90 newman out/Release/chrome.1 chrome.1 || die
91 - newman out/Release/chrome.1 chromium.1 || die
92 + newman out/Release/chrome.1 chromium-browser.1 || die
93
94 # Chromium looks for these in its folder
95 # See media_posix.cc and base_paths_linux.cc
96 @@ -350,10 +354,10 @@
97 dosym /usr/$(get_libdir)/libavutil.so.50 "${CHROMIUM_HOME}" || die
98
99 # Install icon and desktop entry.
100 - newicon chrome/app/theme/chromium/product_logo_48.png ${PN}-browser.png || die
101 - dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium || die
102 - make_desktop_entry chromium "Chromium" ${PN}-browser "Network;WebBrowser" \
103 - "MimeType=text/html;text/xml;application/xhtml+xml;"
104 + newicon chrome/app/theme/chromium/product_logo_48.png \
105 + chromium-browser.png || die
106 + make_desktop_entry chromium-browser "Chromium" chromium-browser \
107 + "Network;WebBrowser" "MimeType=text/html;text/xml;application/xhtml+xml;"
108 sed -e "/^Exec/s/$/ %U/" -i "${D}"/usr/share/applications/*.desktop || die
109
110 # Install GNOME default application entry (bug #303100).
111 @@ -363,3 +367,7 @@
112 doins "${FILESDIR}"/chromium.xml || die
113 fi
114 }
115 +
116 +pkg_postinst() {
117 + fdo-mime_desktop_database_update
118 +}
119
120
121
122 1.1 www-client/chromium/chromium-11.0.672.2-r1.ebuild
123
124 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-11.0.672.2-r1.ebuild?rev=1.1&view=markup
125 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-11.0.672.2-r1.ebuild?rev=1.1&content-type=text/plain
126
127 Index: chromium-11.0.672.2-r1.ebuild
128 ===================================================================
129 # Copyright 1999-2011 Gentoo Foundation
130 # Distributed under the terms of the GNU General Public License v2
131 # $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-11.0.672.2-r1.ebuild,v 1.1 2011/02/22 13:33:06 phajdan.jr Exp $
132
133 EAPI="3"
134 PYTHON_DEPEND="2:2.6"
135 V8_DEPEND="3.1.4"
136
137 inherit eutils fdo-mime flag-o-matic multilib pax-utils portability python \
138 toolchain-funcs versionator virtualx
139
140 DESCRIPTION="Open-source version of Google Chrome web browser"
141 HOMEPAGE="http://chromium.org/"
142 SRC_URI="http://build.chromium.org/official/${P}.tar.bz2"
143
144 LICENSE="BSD"
145 SLOT="0"
146 KEYWORDS="~amd64 ~x86"
147 IUSE="cups +gecko-mediaplayer gnome gnome-keyring"
148
149 RDEPEND="app-arch/bzip2
150 >=dev-lang/v8-${V8_DEPEND}
151 dev-libs/dbus-glib
152 >=dev-libs/icu-4.4.1
153 >=dev-libs/libevent-1.4.13
154 dev-libs/libxml2[icu]
155 dev-libs/libxslt
156 >=dev-libs/nss-3.12.3
157 gnome? ( >=gnome-base/gconf-2.24.0 )
158 gnome-keyring? ( >=gnome-base/gnome-keyring-2.28.2 )
159 >=media-libs/alsa-lib-1.0.19
160 media-libs/flac
161 virtual/jpeg
162 media-libs/libpng
163 media-libs/libvpx
164 media-libs/speex
165 >=media-video/ffmpeg-0.6_p25767[threads]
166 cups? ( >=net-print/cups-1.3.11 )
167 sys-libs/zlib
168 >=x11-libs/gtk+-2.14.7
169 x11-libs/libXScrnSaver
170 x11-libs/libXtst"
171 DEPEND="${RDEPEND}
172 dev-lang/perl
173 >=dev-util/chromium-tools-0.1.4
174 >=dev-util/gperf-3.0.3
175 >=dev-util/pkgconfig-0.23
176 sys-devel/flex
177 >=sys-devel/make-3.81-r2"
178 RDEPEND+="
179 || (
180 x11-themes/gnome-icon-theme
181 x11-themes/oxygen-molecule
182 x11-themes/tango-icon-theme
183 x11-themes/xfce4-icon-theme
184 )
185 x11-misc/xdg-utils
186 virtual/ttf-fonts
187 gecko-mediaplayer? ( !www-plugins/gecko-mediaplayer[gnome] )"
188
189 egyp() {
190 set -- build/gyp_chromium --depth=. "${@}"
191 echo "${@}" >&2
192 "${@}"
193 }
194
195 pkg_setup() {
196 CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser"
197
198 # Make sure the build system will use the right tools, bug #340795.
199 tc-export AR CC CXX RANLIB
200
201 # Make sure the build system will use the right python, bug #344367.
202 python_set_active_version 2
203 python_pkg_setup
204
205 # Prevent user problems like bug #299777.
206 if ! grep -q /dev/shm <<< $(get_mounts); then
207 ewarn "You don't have tmpfs mounted at /dev/shm."
208 ewarn "${PN} may fail to start in that configuration."
209 ewarn "Please uncomment the /dev/shm entry in /etc/fstab,"
210 ewarn "and run 'mount /dev/shm'."
211 fi
212 if [ `stat -c %a /dev/shm` -ne 1777 ]; then
213 ewarn "/dev/shm does not have correct permissions."
214 ewarn "${PN} may fail to start in that configuration."
215 ewarn "Please run 'chmod 1777 /dev/shm'."
216 fi
217
218 # Prevent user problems like bug #348235.
219 eshopts_push -s extglob
220 if is-flagq '-g?(gdb)?([1-9])'; then
221 ewarn "You have enabled debug info (probably have -g or -ggdb in your \$C{,XX}FLAGS)."
222 ewarn "You may experience really long compilation times and/or increased memory usage."
223 ewarn "If compilation fails, please try removing -g{,gdb} before reporting a bug."
224 fi
225 eshopts_pop
226 }
227
228 src_prepare() {
229 # Enable optional support for gecko-mediaplayer.
230 epatch "${FILESDIR}"/${PN}-gecko-mediaplayer-r1.patch
231
232 # Make sure we don't use bundled libvpx headers.
233 epatch "${FILESDIR}"/${PN}-system-vpx-r2.patch
234
235 # Make sure we don't use bundled FLAC.
236 epatch "${FILESDIR}"/${PN}-system-flac-r0.patch
237
238 # Remove most bundled libraries. Some are still needed.
239 find third_party -type f \! -iname '*.gyp*' \
240 \! -path 'third_party/WebKit/*' \
241 \! -path 'third_party/angle/*' \
242 \! -path 'third_party/cacheinvalidation/*' \
243 \! -path 'third_party/cld/*' \
244 \! -path 'third_party/expat/*' \
245 \! -path 'third_party/ffmpeg/*' \
246 \! -path 'third_party/flac/flac.h' \
247 \! -path 'third_party/gpsd/*' \
248 \! -path 'third_party/harfbuzz/*' \
249 \! -path 'third_party/hunspell/*' \
250 \! -path 'third_party/iccjpeg/*' \
251 \! -path 'third_party/launchpad_translations/*' \
252 \! -path 'third_party/libjingle/*' \
253 \! -path 'third_party/libsrtp/*' \
254 \! -path 'third_party/libwebp/*' \
255 \! -path 'third_party/mesa/*' \
256 \! -path 'third_party/modp_b64/*' \
257 \! -path 'third_party/npapi/*' \
258 \! -path 'third_party/openmax/*' \
259 \! -path 'third_party/ots/*' \
260 \! -path 'third_party/protobuf/*' \
261 \! -path 'third_party/skia/*' \
262 \! -path 'third_party/speex/speex.h' \
263 \! -path 'third_party/sqlite/*' \
264 \! -path 'third_party/tcmalloc/*' \
265 \! -path 'third_party/undoview/*' \
266 \! -path 'third_party/zlib/contrib/minizip/*' \
267 -delete || die
268
269 # Provide our own gyp file to use system flac.
270 # TODO: move this upstream.
271 cp "${FILESDIR}/flac.gyp" "third_party/flac" || die
272
273 # Check for the maintainer to ensure that the dependencies
274 # are up-to-date.
275 local v8_bundled="$(v8-extract-version v8/src/version.cc)"
276 if [ "${V8_DEPEND}" != "${v8_bundled}" ]; then
277 die "update v8 dependency to ${v8_bundled}"
278 fi
279
280 # Remove bundled v8.
281 find v8 -type f \! -iname '*.gyp*' -delete || die
282
283 # Disable experimental extensions incompatible with system-provided V8,
284 # bug #354343.
285 cp "${FILESDIR}/experimental.gyp" "v8/src/extensions/experimental" || die
286 sed -e 's/ENABLE_JAVASCRIPT_I18N_API=1/ENABLE_JAVASCRIPT_I18N_API=0/g' \
287 -i build/features_override.gypi || die
288
289 # The implementation files include v8 headers with full path,
290 # like #include "v8/include/v8.h". Make sure the system headers
291 # will be used.
292 # TODO: find a solution that can be upstreamed.
293 rmdir v8/include || die
294 ln -s /usr/include v8/include || die
295
296 # Make sure the build system will use the right python, bug #344367.
297 # Only convert directories that need it, to save time.
298 python_convert_shebangs -q -r 2 build tools
299 }
300
301 src_configure() {
302 local myconf=""
303
304 # Never tell the build system to "enable" SSE2, it has a few unexpected
305 # additions, bug #336871.
306 myconf+=" -Ddisable_sse2=1"
307
308 # Use system-provided libraries.
309 # TODO: use_system_hunspell (upstream changes needed).
310 # TODO: use_system_ssl (http://crbug.com/58087).
311 # TODO: use_system_sqlite (http://crbug.com/22208).
312 myconf+="
313 -Duse_system_bzip2=1
314 -Duse_system_ffmpeg=1
315 -Duse_system_icu=1
316 -Duse_system_libevent=1
317 -Duse_system_libjpeg=1
318 -Duse_system_libpng=1
319 -Duse_system_libxml=1
320 -Duse_system_speex=1
321 -Duse_system_v8=1
322 -Duse_system_vpx=1
323 -Duse_system_xdg_utils=1
324 -Duse_system_zlib=1"
325
326 # The dependency on cups is optional, see bug #324105.
327 if use cups; then
328 myconf+=" -Duse_cups=1"
329 else
330 myconf+=" -Duse_cups=0"
331 fi
332
333 # Make GConf dependency optional, http://crbug.com/13322.
334 if use gnome; then
335 myconf+=" -Duse_gconf=1"
336 else
337 myconf+=" -Duse_gconf=0"
338 fi
339
340 if use "gnome-keyring"; then
341 myconf+=" -Duse_gnome_keyring=1 -Dlinux_link_gnome_keyring=1"
342 else
343 # TODO: we should also disable code trying to dlopen
344 # gnome-keyring in that case.
345 myconf+=" -Duse_gnome_keyring=0 -Dlinux_link_gnome_keyring=0"
346 fi
347
348 # Enable sandbox.
349 myconf+="
350 -Dlinux_sandbox_path=${CHROMIUM_HOME}/chrome_sandbox
351 -Dlinux_sandbox_chrome_path=${CHROMIUM_HOME}/chrome"
352
353 if use gecko-mediaplayer; then
354 # Disable hardcoded blacklist for gecko-mediaplayer.
355 # When www-plugins/gecko-mediaplayer is compiled with USE=gnome, it causes
356 # the browser to hang. We can handle the situation via dependencies,
357 # thus making it possible to use gecko-mediaplayer.
358 append-flags -DGENTOO_CHROMIUM_ENABLE_GECKO_MEDIAPLAYER
359 fi
360
361 # Our system ffmpeg should support more codecs than the bundled one
362 # for Chromium.
363 myconf+=" -Dproprietary_codecs=1"
364
365 # Use target arch detection logic from bug #296917.
366 local myarch="$ABI"
367 [[ $myarch = "" ]] && myarch="$ARCH"
368
369 if [[ $myarch = amd64 ]] ; then
370 myconf+=" -Dtarget_arch=x64"
371 elif [[ $myarch = x86 ]] ; then
372 myconf+=" -Dtarget_arch=ia32"
373 elif [[ $myarch = arm ]] ; then
374 # TODO: check this again after
375 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39509 is fixed.
376 append-flags -fno-tree-sink
377
378 myconf+=" -Dtarget_arch=arm -Ddisable_nacl=1 -Dlinux_use_tcmalloc=0"
379 else
380 die "Failed to determine target arch, got '$myarch'."
381 fi
382
383 # Make sure that -Werror doesn't get added to CFLAGS by the build system.
384 # Depending on GCC version the warnings are different and we don't want
385 # the build to fail because of that.
386 myconf+=" -Dwerror="
387
388 # Avoid a build error with -Os, bug #352457.
389 replace-flags "-Os" "-O2"
390
391 egyp ${myconf} || die
392 }
393
394 src_compile() {
395 emake chrome chrome_sandbox BUILDTYPE=Release V=1 || die
396 pax-mark m out/Release/chrome
397 if use test; then
398 emake base_unittests BUILDTYPE=Release V=1 || die
399 pax-mark m out/Release/base_unittests
400 fi
401 }
402
403 src_test() {
404 # For more info see bug #350349.
405 local mylocale='en_US.utf8'
406 if ! locale -a | grep -q "$mylocale"; then
407 eerror "${PN} requires ${mylocale} locale for tests"
408 eerror "Please read the following guides for more information:"
409 eerror " http://www.gentoo.org/doc/en/guide-localization.xml"
410 eerror " http://www.gentoo.org/doc/en/utf-8.xml"
411 die "locale ${mylocale} is not supported"
412 fi
413
414 # For more info see bug #350347.
415 LC_ALL="${mylocale}" maketype=out/Release/base_unittests virtualmake \
416 '--gtest_filter=-ICUStringConversionsTest.*' || die
417 }
418
419 src_install() {
420 exeinto "${CHROMIUM_HOME}"
421 doexe out/Release/chrome
422 doexe out/Release/chrome_sandbox || die
423 fperms 4755 "${CHROMIUM_HOME}/chrome_sandbox"
424 newexe "${FILESDIR}"/chromium-launcher-r1.sh chromium-launcher.sh || die
425
426 # It is important that we name the target "chromium-browser",
427 # xdg-utils expect it; bug #355517.
428 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser || die
429
430 insinto "${CHROMIUM_HOME}"
431 doins out/Release/chrome.pak || die
432 doins out/Release/resources.pak || die
433
434 doins -r out/Release/locales || die
435 doins -r out/Release/resources || die
436
437 # chrome.1 is for chromium --help
438 newman out/Release/chrome.1 chrome.1 || die
439 newman out/Release/chrome.1 chromium-browser.1 || die
440
441 # Chromium looks for these in its folder
442 # See media_posix.cc and base_paths_linux.cc
443 dosym /usr/$(get_libdir)/libavcodec.so.52 "${CHROMIUM_HOME}" || die
444 dosym /usr/$(get_libdir)/libavformat.so.52 "${CHROMIUM_HOME}" || die
445 dosym /usr/$(get_libdir)/libavutil.so.50 "${CHROMIUM_HOME}" || die
446
447 # Install icon and desktop entry.
448 newicon chrome/app/theme/chromium/product_logo_48.png \
449 chromium-browser.png || die
450 make_desktop_entry chromium-browser "Chromium" chromium-browser \
451 "Network;WebBrowser" "MimeType=text/html;text/xml;application/xhtml+xml;"
452 sed -e "/^Exec/s/$/ %U/" -i "${D}"/usr/share/applications/*.desktop || die
453
454 # Install GNOME default application entry (bug #303100).
455 if use gnome; then
456 dodir /usr/share/gnome-control-center/default-apps || die
457 insinto /usr/share/gnome-control-center/default-apps
458 doins "${FILESDIR}"/chromium.xml || die
459 fi
460 }
461
462 pkg_postinst() {
463 fdo-mime_desktop_database_update
464 }