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