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.0.ebuild chromium-9.0.576.0.ebuild
Date: Thu, 02 Dec 2010 10:13:03
Message-Id: 20101202101247.0F9C220054@flycatcher.gentoo.org
1 phajdan.jr 10/12/02 10:12:47
2
3 Modified: ChangeLog
4 Added: chromium-9.0.597.0.ebuild
5 Removed: chromium-9.0.576.0.ebuild
6 Log:
7 Version bump for dev channel release. Remove old.
8
9 (Portage version: 2.1.9.24/cvs/Linux i686)
10
11 Revision Changes Path
12 1.232 www-client/chromium/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.232&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.232&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?r1=1.231&r2=1.232
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v
21 retrieving revision 1.231
22 retrieving revision 1.232
23 diff -u -r1.231 -r1.232
24 --- ChangeLog 29 Nov 2010 11:39:42 -0000 1.231
25 +++ ChangeLog 2 Dec 2010 10:12:46 -0000 1.232
26 @@ -1,6 +1,12 @@
27 # ChangeLog for www-client/chromium
28 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.231 2010/11/29 11:39:42 phajdan.jr Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.232 2010/12/02 10:12:46 phajdan.jr Exp $
31 +
32 +*chromium-9.0.597.0 (02 Dec 2010)
33 +
34 + 02 Dec 2010; Pawel Hajdan jr <phajdan.jr@g.o>
35 + -chromium-9.0.576.0.ebuild, +chromium-9.0.597.0.ebuild:
36 + Version bump for dev channel release. Remove old.
37
38 29 Nov 2010; Pawel Hajdan jr <phajdan.jr@g.o>
39 chromium-9.0.587.0-r1.ebuild, chromium-9999.ebuild:
40
41
42
43 1.1 www-client/chromium/chromium-9.0.597.0.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-9.0.597.0.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-9.0.597.0.ebuild?rev=1.1&content-type=text/plain
47
48 Index: chromium-9.0.597.0.ebuild
49 ===================================================================
50 # Copyright 1999-2010 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.0.ebuild,v 1.1 2010/12/02 10:12:46 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 ~arm ~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.1 )
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 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
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 remove_bundled_lib "third_party/bzip2"
159 remove_bundled_lib "third_party/codesighs"
160 remove_bundled_lib "third_party/icu"
161 remove_bundled_lib "third_party/jemalloc"
162 remove_bundled_lib "third_party/lcov"
163 remove_bundled_lib "third_party/libevent"
164 remove_bundled_lib "third_party/libjpeg"
165 remove_bundled_lib "third_party/libpng"
166 remove_bundled_lib "third_party/libvpx"
167 remove_bundled_lib "third_party/libxml"
168 remove_bundled_lib "third_party/libxslt"
169 remove_bundled_lib "third_party/lzma_sdk"
170 remove_bundled_lib "third_party/molokocacao"
171 remove_bundled_lib "third_party/ocmock"
172 remove_bundled_lib "third_party/pyftpdlib"
173 remove_bundled_lib "third_party/simplejson"
174 remove_bundled_lib "third_party/tlslite"
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 }
313
314 src_install() {
315 exeinto "${CHROMIUM_HOME}"
316 pax-mark m out/Release/chrome
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 }