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