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.83.ebuild chromium-9.0.597.45.ebuild
Date: Wed, 26 Jan 2011 10:56:20
Message-Id: 20110126105606.2178F20054@flycatcher.gentoo.org
1 phajdan.jr 11/01/26 10:56:06
2
3 Modified: ChangeLog
4 Added: chromium-9.0.597.83.ebuild
5 Removed: chromium-9.0.597.45.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.267 www-client/chromium/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.267&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.267&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?r1=1.266&r2=1.267
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v
21 retrieving revision 1.266
22 retrieving revision 1.267
23 diff -u -r1.266 -r1.267
24 --- ChangeLog 22 Jan 2011 16:18:21 -0000 1.266
25 +++ ChangeLog 26 Jan 2011 10:56:06 -0000 1.267
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.266 2011/01/22 16:18:21 phajdan.jr Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.267 2011/01/26 10:56:06 phajdan.jr Exp $
31 +
32 +*chromium-9.0.597.83 (26 Jan 2011)
33 +
34 + 26 Jan 2011; Pawel Hajdan jr <phajdan.jr@g.o>
35 + -chromium-9.0.597.45.ebuild, +chromium-9.0.597.83.ebuild:
36 + Version bump for beta channel release. Remove old.
37
38 *chromium-10.0.642.2-r1 (22 Jan 2011)
39
40
41
42
43 1.1 www-client/chromium/chromium-9.0.597.83.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-9.0.597.83.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-9.0.597.83.ebuild?rev=1.1&content-type=text/plain
47
48 Index: chromium-9.0.597.83.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.83.ebuild,v 1.1 2011/01/26 10:56:06 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 egyp ${myconf} || die
310 }
311
312 src_compile() {
313 emake chrome chrome_sandbox BUILDTYPE=Release V=1 || die
314 pax-mark m out/Release/chrome
315 }
316
317 src_install() {
318 exeinto "${CHROMIUM_HOME}"
319 doexe out/Release/chrome
320 doexe out/Release/chrome_sandbox || die
321 fperms 4755 "${CHROMIUM_HOME}/chrome_sandbox"
322 doexe out/Release/xdg-settings || die
323 doexe "${FILESDIR}"/chromium-launcher.sh || die
324
325 insinto "${CHROMIUM_HOME}"
326 doins out/Release/chrome.pak || die
327 doins out/Release/resources.pak || die
328
329 doins -r out/Release/locales || die
330 doins -r out/Release/resources || die
331
332 # chrome.1 is for chromium --help
333 newman out/Release/chrome.1 chrome.1 || die
334 newman out/Release/chrome.1 chromium.1 || die
335
336 # Chromium looks for these in its folder
337 # See media_posix.cc and base_paths_linux.cc
338 dosym /usr/$(get_libdir)/libavcodec.so.52 "${CHROMIUM_HOME}" || die
339 dosym /usr/$(get_libdir)/libavformat.so.52 "${CHROMIUM_HOME}" || die
340 dosym /usr/$(get_libdir)/libavutil.so.50 "${CHROMIUM_HOME}" || die
341
342 # Install icon and desktop entry.
343 newicon out/Release/product_logo_48.png ${PN}-browser.png || die
344 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium || die
345 make_desktop_entry chromium "Chromium" ${PN}-browser "Network;WebBrowser" \
346 "MimeType=text/html;text/xml;application/xhtml+xml;"
347 sed -e "/^Exec/s/$/ %U/" -i "${D}"/usr/share/applications/*.desktop || die
348
349 # Install GNOME default application entry (bug #303100).
350 if use gnome; then
351 dodir /usr/share/gnome-control-center/default-apps || die
352 insinto /usr/share/gnome-control-center/default-apps
353 doins "${FILESDIR}"/chromium.xml || die
354 fi
355 }