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