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-9.0.597.42.ebuild
Date: Wed, 05 Jan 2011 09:17:28
Message-Id: 20110105091718.18C9F20051@flycatcher.gentoo.org
1 phajdan.jr 11/01/05 09:17:18
2
3 Modified: ChangeLog
4 Added: chromium-9.0.597.42.ebuild
5 Log:
6 Version bump for beta channel release. Remove broken src_test.
7
8 (Portage version: 2.1.9.25/cvs/Linux i686)
9
10 Revision Changes Path
11 1.251 www-client/chromium/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.251&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.251&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?r1=1.250&r2=1.251
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v
20 retrieving revision 1.250
21 retrieving revision 1.251
22 diff -u -r1.250 -r1.251
23 --- ChangeLog 3 Jan 2011 14:57:26 -0000 1.250
24 +++ ChangeLog 5 Jan 2011 09:17:18 -0000 1.251
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.250 2011/01/03 14:57:26 phajdan.jr Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.251 2011/01/05 09:17:18 phajdan.jr Exp $
30 +
31 +*chromium-9.0.597.42 (05 Jan 2011)
32 +
33 + 05 Jan 2011; Pawel Hajdan jr <phajdan.jr@g.o>
34 + +chromium-9.0.597.42.ebuild:
35 + Version bump for beta channel release. Remove broken src_test.
36
37 03 Jan 2011; Pawel Hajdan jr <phajdan.jr@g.o>
38 +files/chromium-gecko-mediaplayer-r1.patch, chromium-9999.ebuild,
39
40
41
42 1.1 www-client/chromium/chromium-9.0.597.42.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-9.0.597.42.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-9.0.597.42.ebuild?rev=1.1&content-type=text/plain
46
47 Index: chromium-9.0.597.42.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-9.0.597.42.ebuild,v 1.1 2011/01/05 09:17:18 phajdan.jr Exp $
52
53 EAPI="3"
54 PYTHON_DEPEND="2:2.6"
55
56 inherit eutils flag-o-matic multilib pax-utils portability python \
57 toolchain-funcs versionator
58
59 DESCRIPTION="Open-source version of Google Chrome web browser"
60 HOMEPAGE="http://chromium.org/"
61 SRC_URI="http://build.chromium.org/buildbot/official/${P}.tar.bz2"
62
63 LICENSE="BSD"
64 SLOT="0"
65 KEYWORDS="~amd64 ~x86"
66 IUSE="cups +gecko-mediaplayer gnome gnome-keyring system-sqlite system-v8"
67
68 RDEPEND="app-arch/bzip2
69 system-sqlite? (
70 >=dev-db/sqlite-3.6.23.1[fts3,icu,secure-delete,threadsafe]
71 )
72 system-v8? ( >=dev-lang/v8-2.5.9.1 )
73 dev-libs/dbus-glib
74 >=dev-libs/icu-4.4.1
75 >=dev-libs/libevent-1.4.13
76 dev-libs/libxml2
77 dev-libs/libxslt
78 >=dev-libs/nss-3.12.3
79 gnome? ( >=gnome-base/gconf-2.24.0 )
80 gnome-keyring? ( >=gnome-base/gnome-keyring-2.28.2 )
81 >=media-libs/alsa-lib-1.0.19
82 virtual/jpeg
83 media-libs/libpng
84 media-libs/libvpx
85 >=media-video/ffmpeg-0.6_p25767[threads]
86 cups? ( >=net-print/cups-1.3.11 )
87 sys-libs/zlib
88 >=x11-libs/gtk+-2.14.7
89 x11-libs/libXScrnSaver
90 x11-libs/libXtst"
91 DEPEND="${RDEPEND}
92 dev-lang/perl
93 >=dev-util/chromium-tools-0.1.4
94 >=dev-util/gperf-3.0.3
95 >=dev-util/pkgconfig-0.23
96 sys-devel/flex"
97 RDEPEND+="
98 || (
99 x11-themes/gnome-icon-theme
100 x11-themes/oxygen-molecule
101 x11-themes/tango-icon-theme
102 x11-themes/xfce4-icon-theme
103 )
104 x11-misc/xdg-utils
105 virtual/ttf-fonts
106 gecko-mediaplayer? ( !www-plugins/gecko-mediaplayer[gnome] )"
107
108 egyp() {
109 set -- build/gyp_chromium --depth=. "${@}"
110 echo "${@}" >&2
111 "${@}"
112 }
113
114 get_installed_v8_version() {
115 best_version dev-lang/v8 | sed -e 's@dev-lang/v8-@@g'
116 }
117
118 remove_bundled_lib() {
119 local out
120 out="$(find $1 -type f \! -iname '*.gyp' -print -delete)" \
121 || die "failed to remove bundled library $1"
122 if [[ -z $out ]]; then
123 die "no files matched when removing bundled library $1"
124 fi
125 }
126
127 pkg_setup() {
128 CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser"
129
130 # Make sure the build system will use the right tools, bug #340795.
131 tc-export AR CC CXX RANLIB
132
133 # Make sure the build system will use the right python, bug #344367.
134 python_set_active_version 2
135 python_pkg_setup
136
137 # Prevent user problems like bug #299777.
138 if ! grep -q /dev/shm <<< $(get_mounts); then
139 ewarn "You don't have tmpfs mounted at /dev/shm."
140 ewarn "${PN} may fail to start in that configuration."
141 ewarn "Please uncomment the /dev/shm entry in /etc/fstab,"
142 ewarn "and run 'mount /dev/shm'."
143 fi
144 if [ `stat -c %a /dev/shm` -ne 1777 ]; then
145 ewarn "/dev/shm does not have correct permissions."
146 ewarn "${PN} may fail to start in that configuration."
147 ewarn "Please run 'chmod 1777 /dev/shm'."
148 fi
149 }
150
151 src_prepare() {
152 # Enable optional support for gecko-mediaplayer.
153 epatch "${FILESDIR}"/${PN}-gecko-mediaplayer-r0.patch
154
155 # Make sure we don't use bundled libvpx headers.
156 epatch "${FILESDIR}"/${PN}-system-vpx-r1.patch
157
158 # Small fixes to make tests compile, to be upstreamed.
159 epatch "${FILESDIR}"/${PN}-tests-r0.patch
160
161 remove_bundled_lib "third_party/bzip2"
162 remove_bundled_lib "third_party/codesighs"
163 remove_bundled_lib "third_party/icu"
164 remove_bundled_lib "third_party/jemalloc"
165 remove_bundled_lib "third_party/lcov"
166 remove_bundled_lib "third_party/libevent"
167 remove_bundled_lib "third_party/libjpeg"
168 remove_bundled_lib "third_party/libpng"
169 remove_bundled_lib "third_party/libvpx"
170 remove_bundled_lib "third_party/libxml"
171 remove_bundled_lib "third_party/libxslt"
172 remove_bundled_lib "third_party/lzma_sdk"
173 remove_bundled_lib "third_party/molokocacao"
174 remove_bundled_lib "third_party/ocmock"
175 remove_bundled_lib "third_party/yasm"
176 # TODO: also remove third_party/ffmpeg (needs to be compile-tested).
177 # TODO: also remove third_party/zlib. For now the compilation fails if we
178 # remove it (minizip-related).
179
180 local v8_bundled="$(v8-extract-version v8/src/version.cc)"
181 if use system-v8; then
182 local v8_installed="$(get_installed_v8_version)"
183 einfo "V8 version: bundled - ${v8_bundled}; installed - ${v8_installed}"
184 version_is_at_least "${v8_bundled}" "${v8_installed}" || die
185 else
186 einfo "Bundled V8 version: ${v8_bundled}"
187 fi
188
189 if use system-sqlite; then
190 remove_bundled_lib "third_party/sqlite/src"
191 remove_bundled_lib "third_party/sqlite/preprocessed"
192 fi
193
194 if use system-v8; then
195 # Provide our own gyp file that links with the system v8.
196 # TODO: move this upstream.
197 cp "${FILESDIR}"/v8.gyp v8/tools/gyp || die
198
199 remove_bundled_lib "v8"
200
201 # The implementation files include v8 headers with full path,
202 # like #include "v8/include/v8.h". Make sure the system headers
203 # will be used.
204 # TODO: find a solution that can be upstreamed.
205 rmdir v8/include || die
206 ln -s /usr/include v8/include || die
207 fi
208
209 # Make sure the build system will use the right python, bug #344367.
210 # Only convert directories that need it, to save time.
211 python_convert_shebangs -q -r 2 build tools
212 }
213
214 src_configure() {
215 local myconf=""
216
217 # Never tell the build system to "enable" SSE2, it has a few unexpected
218 # additions, bug #336871.
219 myconf+=" -Ddisable_sse2=1"
220
221 # Use system-provided libraries.
222 # TODO: use_system_hunspell (upstream changes needed).
223 # TODO: use_system_ssl (need to consult upstream).
224 myconf+="
225 -Duse_system_bzip2=1
226 -Duse_system_ffmpeg=1
227 -Duse_system_icu=1
228 -Duse_system_libevent=1
229 -Duse_system_libjpeg=1
230 -Duse_system_libpng=1
231 -Duse_system_libxml=1
232 -Duse_system_vpx=1
233 -Duse_system_zlib=1"
234
235 if use system-sqlite; then
236 myconf+=" -Duse_system_sqlite=1"
237 fi
238
239 # The dependency on cups is optional, see bug #324105.
240 if use cups; then
241 myconf+=" -Duse_cups=1"
242 else
243 myconf+=" -Duse_cups=0"
244 fi
245
246 # Make GConf dependency optional, http://crbug.com/13322.
247 if use gnome; then
248 myconf+=" -Duse_gconf=1"
249 else
250 myconf+=" -Duse_gconf=0"
251 fi
252
253 if use "gnome-keyring"; then
254 myconf+=" -Duse_gnome_keyring=1 -Dlinux_link_gnome_keyring=1"
255 else
256 # TODO: we should also disable code trying to dlopen
257 # gnome-keyring in that case.
258 myconf+=" -Duse_gnome_keyring=0 -Dlinux_link_gnome_keyring=0"
259 fi
260
261 # Enable sandbox.
262 myconf+="
263 -Dlinux_sandbox_path=${CHROMIUM_HOME}/chrome_sandbox
264 -Dlinux_sandbox_chrome_path=${CHROMIUM_HOME}/chrome"
265
266 if host-is-pax; then
267 # Prevent the build from failing (bug #301880). The performance
268 # difference is very small.
269 myconf+=" -Dv8_use_snapshot=0"
270 fi
271
272 if use gecko-mediaplayer; then
273 # Disable hardcoded blacklist for gecko-mediaplayer.
274 # When www-plugins/gecko-mediaplayer is compiled with USE=gnome, it causes
275 # the browser to hang. We can handle the situation via dependencies,
276 # thus making it possible to use gecko-mediaplayer.
277 append-flags -DGENTOO_CHROMIUM_ENABLE_GECKO_MEDIAPLAYER
278 fi
279
280 # Our system ffmpeg should support more codecs than the bundled one
281 # for Chromium.
282 myconf+=" -Dproprietary_codecs=1"
283
284 # Use target arch detection logic from bug #296917.
285 local myarch="$ABI"
286 [[ $myarch = "" ]] && myarch="$ARCH"
287
288 if [[ $myarch = amd64 ]] ; then
289 myconf+=" -Dtarget_arch=x64"
290 elif [[ $myarch = x86 ]] ; then
291 myconf+=" -Dtarget_arch=ia32"
292 elif [[ $myarch = arm ]] ; then
293 # TODO: check this again after
294 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39509 is fixed.
295 append-flags -fno-tree-sink
296
297 myconf+=" -Dtarget_arch=arm -Ddisable_nacl=1 -Dlinux_use_tcmalloc=0"
298 else
299 die "Failed to determine target arch, got '$myarch'."
300 fi
301
302 # Make sure that -Werror doesn't get added to CFLAGS by the build system.
303 # Depending on GCC version the warnings are different and we don't want
304 # the build to fail because of that.
305 myconf+=" -Dwerror="
306
307 egyp ${myconf} || die
308 }
309
310 src_compile() {
311 emake chrome chrome_sandbox BUILDTYPE=Release V=1 || die
312 pax-mark m out/Release/chrome
313 }
314
315 src_install() {
316 exeinto "${CHROMIUM_HOME}"
317 doexe out/Release/chrome
318 doexe out/Release/chrome_sandbox || die
319 fperms 4755 "${CHROMIUM_HOME}/chrome_sandbox"
320 doexe out/Release/xdg-settings || die
321 doexe "${FILESDIR}"/chromium-launcher.sh || die
322
323 insinto "${CHROMIUM_HOME}"
324 doins out/Release/chrome.pak || die
325 doins out/Release/resources.pak || die
326
327 doins -r out/Release/locales || die
328 doins -r out/Release/resources || die
329
330 # chrome.1 is for chromium --help
331 newman out/Release/chrome.1 chrome.1 || die
332 newman out/Release/chrome.1 chromium.1 || die
333
334 # Chromium looks for these in its folder
335 # See media_posix.cc and base_paths_linux.cc
336 dosym /usr/$(get_libdir)/libavcodec.so.52 "${CHROMIUM_HOME}" || die
337 dosym /usr/$(get_libdir)/libavformat.so.52 "${CHROMIUM_HOME}" || die
338 dosym /usr/$(get_libdir)/libavutil.so.50 "${CHROMIUM_HOME}" || die
339
340 # Install icon and desktop entry.
341 newicon out/Release/product_logo_48.png ${PN}-browser.png || die
342 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium || die
343 make_desktop_entry chromium "Chromium" ${PN}-browser "Network;WebBrowser" \
344 "MimeType=text/html;text/xml;application/xhtml+xml;"
345 sed -e "/^Exec/s/$/ %U/" -i "${D}"/usr/share/applications/*.desktop || die
346
347 # Install GNOME default application entry (bug #303100).
348 if use gnome; then
349 dodir /usr/share/gnome-control-center/default-apps || die
350 insinto /usr/share/gnome-control-center/default-apps
351 doins "${FILESDIR}"/chromium.xml || die
352 fi
353 }