1 |
wired 11/03/01 13:52:49 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: chromium-9999-r1.ebuild |
5 |
chromium-11.0.672.2-r3.ebuild |
6 |
Removed: chromium-9999.ebuild chromium-11.0.672.2-r1.ebuild |
7 |
chromium-11.0.672.2-r2.ebuild |
8 |
Log: |
9 |
live ebuild now slotted, installable alongside releases. removed failing patches. man page fix in 9999 and dev channel. |
10 |
|
11 |
(Portage version: 2.2.0_alpha25/cvs/Linux x86_64) |
12 |
|
13 |
Revision Changes Path |
14 |
1.294 www-client/chromium/ChangeLog |
15 |
|
16 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.294&view=markup |
17 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.294&content-type=text/plain |
18 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?r1=1.293&r2=1.294 |
19 |
|
20 |
Index: ChangeLog |
21 |
=================================================================== |
22 |
RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v |
23 |
retrieving revision 1.293 |
24 |
retrieving revision 1.294 |
25 |
diff -u -r1.293 -r1.294 |
26 |
--- ChangeLog 1 Mar 2011 11:14:19 -0000 1.293 |
27 |
+++ ChangeLog 1 Mar 2011 13:52:49 -0000 1.294 |
28 |
@@ -1,6 +1,17 @@ |
29 |
# ChangeLog for www-client/chromium |
30 |
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
31 |
-# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.293 2011/03/01 11:14:19 hwoarang Exp $ |
32 |
+# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.294 2011/03/01 13:52:49 wired Exp $ |
33 |
+ |
34 |
+*chromium-9999-r1 (01 Mar 2011) |
35 |
+*chromium-11.0.672.2-r3 (01 Mar 2011) |
36 |
+ |
37 |
+ 01 Mar 2011; Alex Alexander <wired@g.o> |
38 |
+ -chromium-11.0.672.2-r1.ebuild, -chromium-11.0.672.2-r2.ebuild, |
39 |
+ +chromium-11.0.672.2-r3.ebuild, -chromium-9999.ebuild, |
40 |
+ +chromium-9999-r1.ebuild, +files/chromium-browser.xml, |
41 |
+ files/chromium-launcher-r1.sh: |
42 |
+ live ebuild now slotted, installable alongside releases. removed failing |
43 |
+ patches. man page fix in 9999 and dev channel. |
44 |
|
45 |
01 Mar 2011; Markos Chandras <hwoarang@g.o> |
46 |
chromium-9.0.597.107.ebuild: |
47 |
|
48 |
|
49 |
|
50 |
1.1 www-client/chromium/chromium-9999-r1.ebuild |
51 |
|
52 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-9999-r1.ebuild?rev=1.1&view=markup |
53 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-9999-r1.ebuild?rev=1.1&content-type=text/plain |
54 |
|
55 |
Index: chromium-9999-r1.ebuild |
56 |
=================================================================== |
57 |
# Copyright 1999-2011 Gentoo Foundation |
58 |
# Distributed under the terms of the GNU General Public License v2 |
59 |
# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-9999-r1.ebuild,v 1.1 2011/03/01 13:52:49 wired Exp $ |
60 |
|
61 |
EAPI="3" |
62 |
PYTHON_DEPEND="2:2.6" |
63 |
|
64 |
inherit eutils fdo-mime flag-o-matic multilib pax-utils portability python \ |
65 |
subversion toolchain-funcs versionator virtualx |
66 |
|
67 |
DESCRIPTION="Open-source version of Google Chrome web browser" |
68 |
HOMEPAGE="http://chromium.org/" |
69 |
# subversion eclass fetches gclient, which will then fetch chromium itself |
70 |
ESVN_REPO_URI="http://src.chromium.org/svn/trunk/tools/depot_tools" |
71 |
EGCLIENT_REPO_URI="http://src.chromium.org/svn/trunk/src/" |
72 |
|
73 |
LICENSE="BSD" |
74 |
SLOT="live" |
75 |
KEYWORDS="" |
76 |
IUSE="cups gnome gnome-keyring" |
77 |
|
78 |
RDEPEND="app-arch/bzip2 |
79 |
dev-lang/v8 |
80 |
dev-libs/dbus-glib |
81 |
>=dev-libs/icu-4.4.1 |
82 |
>=dev-libs/libevent-1.4.13 |
83 |
dev-libs/libxml2[icu] |
84 |
dev-libs/libxslt |
85 |
>=dev-libs/nss-3.12.3 |
86 |
gnome? ( >=gnome-base/gconf-2.24.0 ) |
87 |
gnome-keyring? ( >=gnome-base/gnome-keyring-2.28.2 ) |
88 |
>=media-libs/alsa-lib-1.0.19 |
89 |
media-libs/flac |
90 |
virtual/jpeg |
91 |
media-libs/libpng |
92 |
media-libs/libvpx |
93 |
media-libs/speex |
94 |
>=media-video/ffmpeg-0.6_p25767[threads] |
95 |
cups? ( >=net-print/cups-1.3.11 ) |
96 |
sys-libs/zlib |
97 |
x11-libs/gtk+:2 |
98 |
x11-libs/libXScrnSaver |
99 |
x11-libs/libXtst" |
100 |
DEPEND="${RDEPEND} |
101 |
dev-lang/perl |
102 |
>=dev-util/chromium-tools-0.1.4 |
103 |
>=dev-util/gperf-3.0.3 |
104 |
>=dev-util/pkgconfig-0.23 |
105 |
sys-devel/flex |
106 |
>=sys-devel/make-3.81-r2" |
107 |
RDEPEND+=" |
108 |
!=www-client/chromium-9999 |
109 |
|| ( |
110 |
x11-themes/gnome-icon-theme |
111 |
x11-themes/xfce4-icon-theme |
112 |
) |
113 |
x11-misc/xdg-utils |
114 |
virtual/ttf-fonts" |
115 |
|
116 |
src_unpack() { |
117 |
subversion_src_unpack |
118 |
mv "${S}" "${WORKDIR}"/depot_tools |
119 |
|
120 |
# Most subversion checks and configurations were already run |
121 |
EGCLIENT="${WORKDIR}"/depot_tools/gclient |
122 |
cd "${ESVN_STORE_DIR}" || die "gclient: can't chdir to ${ESVN_STORE_DIR}" |
123 |
|
124 |
if [[ ! -d ${PN} ]]; then |
125 |
mkdir -p "${PN}" || die "gclient: can't mkdir ${PN}." |
126 |
fi |
127 |
|
128 |
cd "${PN}" || die "gclient: can't chdir to ${PN}" |
129 |
|
130 |
if [[ ! -f .gclient ]]; then |
131 |
einfo "gclient config -->" |
132 |
${EGCLIENT} config ${EGCLIENT_REPO_URI} || die "gclient: error creating config" |
133 |
fi |
134 |
|
135 |
einfo "gclient sync start -->" |
136 |
einfo " repository: ${EGCLIENT_REPO_URI}" |
137 |
${EGCLIENT} sync --nohooks || die |
138 |
einfo " working copy: ${ESVN_STORE_DIR}/${PN}" |
139 |
|
140 |
mkdir -p "${S}" |
141 |
# From export_tarball.py |
142 |
CHROMIUM_EXCLUDES="--exclude=src/chrome/test/data |
143 |
--exclude=src/chrome/tools/test/reference_build |
144 |
--exclude=src/chrome_frame --exclude=src/gears/binaries |
145 |
--exclude=src/net/data/cache_tests --exclude=src/o3d/documentation |
146 |
--exclude=src/o3d/samples --exclude=src/third_party/lighttpd |
147 |
--exclude=src/third_party/WebKit/LayoutTests |
148 |
--exclude=src/webkit/data/layout_tests |
149 |
--exclude=src/webkit/tools/test/reference_build" |
150 |
rsync -rlpgo --exclude=".svn/" ${CHROMIUM_EXCLUDES} src/ "${S}" || die "gclient: can't export to ${S}." |
151 |
|
152 |
# Display correct svn revision in about box, and log new version |
153 |
CREV=$(subversion__svn_info "src" "Revision") |
154 |
echo ${CREV} > "${S}"/build/LASTCHANGE.in || die "setting revision failed" |
155 |
. src/chrome/VERSION |
156 |
elog "Installing/updating to version ${MAJOR}.${MINOR}.${BUILD}.${PATCH}_p${CREV} " |
157 |
} |
158 |
|
159 |
egyp() { |
160 |
set -- build/gyp_chromium --depth=. "${@}" |
161 |
echo "${@}" >&2 |
162 |
"${@}" |
163 |
} |
164 |
|
165 |
pkg_setup() { |
166 |
SUFFIX="-${SLOT}" |
167 |
CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser${SUFFIX}" |
168 |
|
169 |
# Make sure the build system will use the right tools, bug #340795. |
170 |
tc-export AR CC CXX RANLIB |
171 |
|
172 |
# Make sure the build system will use the right python, bug #344367. |
173 |
python_set_active_version 2 |
174 |
python_pkg_setup |
175 |
|
176 |
# Prevent user problems like bug #299777. |
177 |
if ! grep -q /dev/shm <<< $(get_mounts); then |
178 |
ewarn "You don't have tmpfs mounted at /dev/shm." |
179 |
ewarn "${PN} may fail to start in that configuration." |
180 |
ewarn "Please uncomment the /dev/shm entry in /etc/fstab," |
181 |
ewarn "and run 'mount /dev/shm'." |
182 |
fi |
183 |
if [ `stat -c %a /dev/shm` -ne 1777 ]; then |
184 |
ewarn "/dev/shm does not have correct permissions." |
185 |
ewarn "${PN} may fail to start in that configuration." |
186 |
ewarn "Please run 'chmod 1777 /dev/shm'." |
187 |
fi |
188 |
|
189 |
# Prevent user problems like bug #348235. |
190 |
eshopts_push -s extglob |
191 |
if is-flagq '-g?(gdb)?([1-9])'; then |
192 |
ewarn "You have enabled debug info (probably have -g or -ggdb in your \$C{,XX}FLAGS)." |
193 |
ewarn "You may experience really long compilation times and/or increased memory usage." |
194 |
ewarn "If compilation fails, please try removing -g{,gdb} before reporting a bug." |
195 |
fi |
196 |
eshopts_pop |
197 |
} |
198 |
|
199 |
src_prepare() { |
200 |
# Make sure we don't use bundled libvpx headers. |
201 |
epatch "${FILESDIR}"/${PN}-system-vpx-r2.patch |
202 |
|
203 |
# Remove most bundled libraries. Some are still needed. |
204 |
find third_party -type f \! -iname '*.gyp*' \ |
205 |
\! -path 'third_party/WebKit/*' \ |
206 |
\! -path 'third_party/angle/*' \ |
207 |
\! -path 'third_party/cacheinvalidation/*' \ |
208 |
\! -path 'third_party/cld/*' \ |
209 |
\! -path 'third_party/expat/*' \ |
210 |
\! -path 'third_party/ffmpeg/*' \ |
211 |
\! -path 'third_party/flac/flac.h' \ |
212 |
\! -path 'third_party/gpsd/*' \ |
213 |
\! -path 'third_party/harfbuzz/*' \ |
214 |
\! -path 'third_party/hunspell/*' \ |
215 |
\! -path 'third_party/iccjpeg/*' \ |
216 |
\! -path 'third_party/launchpad_translations/*' \ |
217 |
\! -path 'third_party/libjingle/*' \ |
218 |
\! -path 'third_party/libsrtp/*' \ |
219 |
\! -path 'third_party/libwebp/*' \ |
220 |
\! -path 'third_party/mesa/*' \ |
221 |
\! -path 'third_party/modp_b64/*' \ |
222 |
\! -path 'third_party/npapi/*' \ |
223 |
\! -path 'third_party/openmax/*' \ |
224 |
\! -path 'third_party/ots/*' \ |
225 |
\! -path 'third_party/protobuf/*' \ |
226 |
\! -path 'third_party/skia/*' \ |
227 |
\! -path 'third_party/speex/speex.h' \ |
228 |
\! -path 'third_party/sqlite/*' \ |
229 |
\! -path 'third_party/tcmalloc/*' \ |
230 |
\! -path 'third_party/undoview/*' \ |
231 |
\! -path 'third_party/zlib/contrib/minizip/*' \ |
232 |
-delete || die |
233 |
|
234 |
# Provide our own gyp file to use system flac. |
235 |
# TODO: move this upstream. |
236 |
cp "${FILESDIR}/flac.gyp" "third_party/flac" || die |
237 |
|
238 |
# Remove bundled v8. |
239 |
find v8 -type f \! -iname '*.gyp*' -delete || die |
240 |
|
241 |
# Disable experimental extensions incompatible with system-provided V8, |
242 |
# bug #354343. |
243 |
cp "${FILESDIR}/experimental.gyp" "v8/src/extensions/experimental" || die |
244 |
sed -e 's/ENABLE_JAVASCRIPT_I18N_API=1/ENABLE_JAVASCRIPT_I18N_API=0/g' \ |
245 |
-i build/features_override.gypi || die |
246 |
|
247 |
# The implementation files include v8 headers with full path, |
248 |
# like #include "v8/include/v8.h". Make sure the system headers |
249 |
# will be used. |
250 |
# TODO: find a solution that can be upstreamed. |
251 |
rmdir v8/include || die |
252 |
ln -s /usr/include v8/include || die |
253 |
|
254 |
# Make sure the build system will use the right python, bug #344367. |
255 |
# Only convert directories that need it, to save time. |
256 |
python_convert_shebangs -q -r 2 build tools |
257 |
} |
258 |
|
259 |
src_configure() { |
260 |
local myconf="" |
261 |
|
262 |
# Never tell the build system to "enable" SSE2, it has a few unexpected |
263 |
# additions, bug #336871. |
264 |
myconf+=" -Ddisable_sse2=1" |
265 |
|
266 |
# Use system-provided libraries. |
267 |
# TODO: use_system_hunspell (upstream changes needed). |
268 |
# TODO: use_system_ssl (http://crbug.com/58087). |
269 |
# TODO: use_system_sqlite (http://crbug.com/22208). |
270 |
myconf+=" |
271 |
-Duse_system_bzip2=1 |
272 |
-Duse_system_ffmpeg=1 |
273 |
-Duse_system_icu=1 |
274 |
-Duse_system_libevent=1 |
275 |
-Duse_system_libjpeg=1 |
276 |
-Duse_system_libpng=1 |
277 |
-Duse_system_libxml=1 |
278 |
-Duse_system_speex=1 |
279 |
-Duse_system_v8=1 |
280 |
-Duse_system_vpx=1 |
281 |
-Duse_system_xdg_utils=1 |
282 |
-Duse_system_zlib=1" |
283 |
|
284 |
# The dependency on cups is optional, see bug #324105. |
285 |
if use cups; then |
286 |
myconf+=" -Duse_cups=1" |
287 |
else |
288 |
myconf+=" -Duse_cups=0" |
289 |
fi |
290 |
|
291 |
# Make GConf dependency optional, http://crbug.com/13322. |
292 |
if use gnome; then |
293 |
myconf+=" -Duse_gconf=1" |
294 |
else |
295 |
myconf+=" -Duse_gconf=0" |
296 |
fi |
297 |
|
298 |
if use "gnome-keyring"; then |
299 |
myconf+=" -Duse_gnome_keyring=1 -Dlinux_link_gnome_keyring=1" |
300 |
else |
301 |
# TODO: we should also disable code trying to dlopen |
302 |
# gnome-keyring in that case. |
303 |
myconf+=" -Duse_gnome_keyring=0 -Dlinux_link_gnome_keyring=0" |
304 |
fi |
305 |
|
306 |
# Enable sandbox. |
307 |
myconf+=" |
308 |
-Dlinux_sandbox_path=${CHROMIUM_HOME}/chrome_sandbox |
309 |
-Dlinux_sandbox_chrome_path=${CHROMIUM_HOME}/chrome" |
310 |
|
311 |
# Our system ffmpeg should support more codecs than the bundled one |
312 |
# for Chromium. |
313 |
myconf+=" -Dproprietary_codecs=1" |
314 |
|
315 |
# Use target arch detection logic from bug #296917. |
316 |
local myarch="$ABI" |
317 |
[[ $myarch = "" ]] && myarch="$ARCH" |
318 |
|
319 |
if [[ $myarch = amd64 ]] ; then |
320 |
myconf+=" -Dtarget_arch=x64" |
321 |
elif [[ $myarch = x86 ]] ; then |
322 |
myconf+=" -Dtarget_arch=ia32" |
323 |
elif [[ $myarch = arm ]] ; then |
324 |
# TODO: check this again after |
325 |
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39509 is fixed. |
326 |
append-flags -fno-tree-sink |
327 |
|
328 |
myconf+=" -Dtarget_arch=arm -Ddisable_nacl=1 -Dlinux_use_tcmalloc=0" |
329 |
else |
330 |
die "Failed to determine target arch, got '$myarch'." |
331 |
fi |
332 |
|
333 |
# Make sure that -Werror doesn't get added to CFLAGS by the build system. |
334 |
# Depending on GCC version the warnings are different and we don't want |
335 |
# the build to fail because of that. |
336 |
myconf+=" -Dwerror=" |
337 |
|
338 |
# Avoid a build error with -Os, bug #352457. |
339 |
replace-flags "-Os" "-O2" |
340 |
|
341 |
egyp ${myconf} || die |
342 |
} |
343 |
|
344 |
src_compile() { |
345 |
emake chrome chrome_sandbox BUILDTYPE=Release V=1 || die |
346 |
pax-mark m out/Release/chrome |
347 |
if use test; then |
348 |
emake base_unittests BUILDTYPE=Release V=1 || die |
349 |
pax-mark m out/Release/base_unittests |
350 |
fi |
351 |
} |
352 |
|
353 |
src_test() { |
354 |
# For more info see bug #350349. |
355 |
local mylocale='en_US.utf8' |
356 |
if ! locale -a | grep -q "$mylocale"; then |
357 |
eerror "${PN} requires ${mylocale} locale for tests" |
358 |
eerror "Please read the following guides for more information:" |
359 |
eerror " http://www.gentoo.org/doc/en/guide-localization.xml" |
360 |
eerror " http://www.gentoo.org/doc/en/utf-8.xml" |
361 |
die "locale ${mylocale} is not supported" |
362 |
fi |
363 |
|
364 |
# For more info see bug #350347. |
365 |
LC_ALL="${mylocale}" maketype=out/Release/base_unittests virtualmake \ |
366 |
'--gtest_filter=-ICUStringConversionsTest.*' || die |
367 |
} |
368 |
|
369 |
src_install() { |
370 |
exeinto "${CHROMIUM_HOME}" |
371 |
doexe out/Release/chrome |
372 |
doexe out/Release/chrome_sandbox || die |
373 |
fperms 4755 "${CHROMIUM_HOME}/chrome_sandbox" |
374 |
newexe "${FILESDIR}"/chromium-launcher-r1.sh chromium-launcher.sh || die |
375 |
sed "s:chromium-browser:chromium-browser${SUFFIX}:g" \ |
376 |
-i "${D}"/"${CHROMIUM_HOME}"/chromium-launcher.sh || die |
377 |
sed "s:chromium.desktop:chromium${SUFFIX}.desktop:g" \ |
378 |
-i "${D}"/"${CHROMIUM_HOME}"/chromium-launcher.sh || die |
379 |
sed "s:plugins:plugins --user-data-dir=\${HOME}/.config/chromium${SUFFIX}:" \ |
380 |
-i "${D}"/"${CHROMIUM_HOME}"/chromium-launcher.sh || die |
381 |
|
382 |
# It is important that we name the target "chromium-browser", |
383 |
# xdg-utils expect it; bug #355517. |
384 |
dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser${SUFFIX} || die |
385 |
# keep the old symlink around for consistency |
386 |
dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium${SUFFIX} || die |
387 |
|
388 |
insinto "${CHROMIUM_HOME}" |
389 |
doins out/Release/chrome.pak || die |
390 |
doins out/Release/resources.pak || die |
391 |
|
392 |
doins -r out/Release/locales || die |
393 |
doins -r out/Release/resources || die |
394 |
|
395 |
newman out/Release/chrome.1 chromium${SUFFIX}.1 || die |
396 |
newman out/Release/chrome.1 chromium-browser${SUFFIX}.1 || die |
397 |
|
398 |
# Chromium looks for these in its folder |
399 |
# See media_posix.cc and base_paths_linux.cc |
400 |
dosym /usr/$(get_libdir)/libavcodec.so.52 "${CHROMIUM_HOME}" || die |
401 |
dosym /usr/$(get_libdir)/libavformat.so.52 "${CHROMIUM_HOME}" || die |
402 |
dosym /usr/$(get_libdir)/libavutil.so.50 "${CHROMIUM_HOME}" || die |
403 |
|
404 |
# Install icon and desktop entry. |
405 |
newicon chrome/app/theme/chromium/product_logo_48.png \ |
406 |
chromium-browser${SUFFIX}.png || die |
407 |
make_desktop_entry chromium-browser${SUFFIX} "Chromium ${SLOT}" chromium-browser${SUFFIX} \ |
408 |
"Network;WebBrowser" "MimeType=text/html;text/xml;application/xhtml+xml;" |
409 |
sed -e "/^Exec/s/$/ %U/" -i "${D}"/usr/share/applications/*.desktop || die |
410 |
|
411 |
# Install GNOME default application entry (bug #303100). |
412 |
if use gnome; then |
413 |
dodir /usr/share/gnome-control-center/default-apps || die |
414 |
insinto /usr/share/gnome-control-center/default-apps |
415 |
newins "${FILESDIR}"/chromium-browser.xml chromium-browser${SUFFIX}.xml || die |
416 |
sed "s:chromium-browser:chromium-browser${SUFFIX}:g" -i \ |
417 |
"${D}"/usr/share/gnome-control-center/default-apps/chromium-browser${SUFFIX}.xml |
418 |
fi |
419 |
} |
420 |
|
421 |
pkg_postinst() { |
422 |
fdo-mime_desktop_database_update |
423 |
|
424 |
elog |
425 |
elog "The live ebuild of chromium is now in its own slot." |
426 |
elog "This means that you can have it installed alongside a versioned" |
427 |
elog "release and it has its own configuration folder, located at" |
428 |
elog " \${HOME}/.config/chromium-live" |
429 |
elog "If you want to use any existing, old configuration, you'll have to" |
430 |
elog "rename the old config directory *before* launching chromium-live:" |
431 |
elog " mv \${HOME}/.config/chromium \${HOME}/.config/chromium-live" |
432 |
elog "To run, execute chromium-live or chromium-browser-live." |
433 |
elog |
434 |
} |
435 |
|
436 |
|
437 |
|
438 |
1.1 www-client/chromium/chromium-11.0.672.2-r3.ebuild |
439 |
|
440 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-11.0.672.2-r3.ebuild?rev=1.1&view=markup |
441 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-11.0.672.2-r3.ebuild?rev=1.1&content-type=text/plain |
442 |
|
443 |
Index: chromium-11.0.672.2-r3.ebuild |
444 |
=================================================================== |
445 |
# Copyright 1999-2011 Gentoo Foundation |
446 |
# Distributed under the terms of the GNU General Public License v2 |
447 |
# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-11.0.672.2-r3.ebuild,v 1.1 2011/03/01 13:52:49 wired Exp $ |
448 |
|
449 |
EAPI="3" |
450 |
PYTHON_DEPEND="2:2.6" |
451 |
V8_DEPEND="3.1.4" |
452 |
|
453 |
inherit eutils fdo-mime flag-o-matic multilib pax-utils portability python \ |
454 |
toolchain-funcs versionator virtualx |
455 |
|
456 |
DESCRIPTION="Open-source version of Google Chrome web browser" |
457 |
HOMEPAGE="http://chromium.org/" |
458 |
SRC_URI="http://build.chromium.org/official/${P}.tar.bz2" |
459 |
|
460 |
LICENSE="BSD" |
461 |
SLOT="0" |
462 |
KEYWORDS="~amd64 ~x86" |
463 |
IUSE="cups +gecko-mediaplayer gnome gnome-keyring" |
464 |
|
465 |
RDEPEND="app-arch/bzip2 |
466 |
>=dev-lang/v8-${V8_DEPEND} |
467 |
dev-libs/dbus-glib |
468 |
>=dev-libs/icu-4.4.1 |
469 |
>=dev-libs/libevent-1.4.13 |
470 |
dev-libs/libxml2[icu] |
471 |
dev-libs/libxslt |
472 |
>=dev-libs/nss-3.12.3 |
473 |
gnome? ( >=gnome-base/gconf-2.24.0 ) |
474 |
gnome-keyring? ( >=gnome-base/gnome-keyring-2.28.2 ) |
475 |
>=media-libs/alsa-lib-1.0.19 |
476 |
media-libs/flac |
477 |
virtual/jpeg |
478 |
media-libs/libpng |
479 |
media-libs/libvpx |
480 |
media-libs/speex |
481 |
>=media-video/ffmpeg-0.6_p25767[threads] |
482 |
cups? ( >=net-print/cups-1.3.11 ) |
483 |
sys-libs/zlib |
484 |
x11-libs/gtk+:2 |
485 |
x11-libs/libXScrnSaver |
486 |
x11-libs/libXtst" |
487 |
DEPEND="${RDEPEND} |
488 |
dev-lang/perl |
489 |
>=dev-util/chromium-tools-0.1.4 |
490 |
>=dev-util/gperf-3.0.3 |
491 |
>=dev-util/pkgconfig-0.23 |
492 |
sys-devel/flex |
493 |
>=sys-devel/make-3.81-r2" |
494 |
RDEPEND+=" |
495 |
|| ( |
496 |
x11-themes/gnome-icon-theme |
497 |
x11-themes/xfce4-icon-theme |
498 |
) |
499 |
x11-misc/xdg-utils |
500 |
virtual/ttf-fonts |
501 |
gecko-mediaplayer? ( !www-plugins/gecko-mediaplayer[gnome] )" |
502 |
|
503 |
egyp() { |
504 |
set -- build/gyp_chromium --depth=. "${@}" |
505 |
echo "${@}" >&2 |
506 |
"${@}" |
507 |
} |
508 |
|
509 |
pkg_setup() { |
510 |
CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser" |
511 |
|
512 |
# Make sure the build system will use the right tools, bug #340795. |
513 |
tc-export AR CC CXX RANLIB |
514 |
|
515 |
# Make sure the build system will use the right python, bug #344367. |
516 |
python_set_active_version 2 |
517 |
python_pkg_setup |
518 |
|
519 |
# Prevent user problems like bug #299777. |
520 |
if ! grep -q /dev/shm <<< $(get_mounts); then |
521 |
ewarn "You don't have tmpfs mounted at /dev/shm." |
522 |
ewarn "${PN} may fail to start in that configuration." |
523 |
ewarn "Please uncomment the /dev/shm entry in /etc/fstab," |
524 |
ewarn "and run 'mount /dev/shm'." |
525 |
fi |
526 |
if [ `stat -c %a /dev/shm` -ne 1777 ]; then |
527 |
ewarn "/dev/shm does not have correct permissions." |
528 |
ewarn "${PN} may fail to start in that configuration." |
529 |
ewarn "Please run 'chmod 1777 /dev/shm'." |
530 |
fi |
531 |
|
532 |
# Prevent user problems like bug #348235. |
533 |
eshopts_push -s extglob |
534 |
if is-flagq '-g?(gdb)?([1-9])'; then |
535 |
ewarn "You have enabled debug info (probably have -g or -ggdb in your \$C{,XX}FLAGS)." |
536 |
ewarn "You may experience really long compilation times and/or increased memory usage." |
537 |
ewarn "If compilation fails, please try removing -g{,gdb} before reporting a bug." |
538 |
fi |
539 |
eshopts_pop |
540 |
} |
541 |
|
542 |
src_prepare() { |
543 |
# Enable optional support for gecko-mediaplayer. |
544 |
epatch "${FILESDIR}"/${PN}-gecko-mediaplayer-r1.patch |
545 |
|
546 |
# Make sure we don't use bundled libvpx headers. |
547 |
epatch "${FILESDIR}"/${PN}-system-vpx-r2.patch |
548 |
|
549 |
# Make sure we don't use bundled FLAC. |
550 |
epatch "${FILESDIR}"/${PN}-system-flac-r0.patch |
551 |
|
552 |
# Remove most bundled libraries. Some are still needed. |
553 |
find third_party -type f \! -iname '*.gyp*' \ |
554 |
\! -path 'third_party/WebKit/*' \ |
555 |
\! -path 'third_party/angle/*' \ |
556 |
\! -path 'third_party/cacheinvalidation/*' \ |
557 |
\! -path 'third_party/cld/*' \ |
558 |
\! -path 'third_party/expat/*' \ |
559 |
\! -path 'third_party/ffmpeg/*' \ |
560 |
\! -path 'third_party/flac/flac.h' \ |
561 |
\! -path 'third_party/gpsd/*' \ |
562 |
\! -path 'third_party/harfbuzz/*' \ |
563 |
\! -path 'third_party/hunspell/*' \ |
564 |
\! -path 'third_party/iccjpeg/*' \ |
565 |
\! -path 'third_party/launchpad_translations/*' \ |
566 |
\! -path 'third_party/libjingle/*' \ |
567 |
\! -path 'third_party/libsrtp/*' \ |
568 |
\! -path 'third_party/libwebp/*' \ |
569 |
\! -path 'third_party/mesa/*' \ |
570 |
\! -path 'third_party/modp_b64/*' \ |
571 |
\! -path 'third_party/npapi/*' \ |
572 |
\! -path 'third_party/openmax/*' \ |
573 |
\! -path 'third_party/ots/*' \ |
574 |
\! -path 'third_party/protobuf/*' \ |
575 |
\! -path 'third_party/skia/*' \ |
576 |
\! -path 'third_party/speex/speex.h' \ |
577 |
\! -path 'third_party/sqlite/*' \ |
578 |
\! -path 'third_party/tcmalloc/*' \ |
579 |
\! -path 'third_party/undoview/*' \ |
580 |
\! -path 'third_party/zlib/contrib/minizip/*' \ |
581 |
-delete || die |
582 |
|
583 |
# Provide our own gyp file to use system flac. |
584 |
# TODO: move this upstream. |
585 |
cp "${FILESDIR}/flac.gyp" "third_party/flac" || die |
586 |
|
587 |
# Check for the maintainer to ensure that the dependencies |
588 |
# are up-to-date. |
589 |
local v8_bundled="$(v8-extract-version v8/src/version.cc)" |
590 |
if [ "${V8_DEPEND}" != "${v8_bundled}" ]; then |
591 |
die "update v8 dependency to ${v8_bundled}" |
592 |
fi |
593 |
|
594 |
# Remove bundled v8. |
595 |
find v8 -type f \! -iname '*.gyp*' -delete || die |
596 |
|
597 |
# Disable experimental extensions incompatible with system-provided V8, |
598 |
# bug #354343. |
599 |
cp "${FILESDIR}/experimental.gyp" "v8/src/extensions/experimental" || die |
600 |
sed -e 's/ENABLE_JAVASCRIPT_I18N_API=1/ENABLE_JAVASCRIPT_I18N_API=0/g' \ |
601 |
-i build/features_override.gypi || die |
602 |
|
603 |
# The implementation files include v8 headers with full path, |
604 |
# like #include "v8/include/v8.h". Make sure the system headers |
605 |
# will be used. |
606 |
# TODO: find a solution that can be upstreamed. |
607 |
rmdir v8/include || die |
608 |
ln -s /usr/include v8/include || die |
609 |
|
610 |
# Make sure the build system will use the right python, bug #344367. |
611 |
# Only convert directories that need it, to save time. |
612 |
python_convert_shebangs -q -r 2 build tools |
613 |
} |
614 |
|
615 |
src_configure() { |
616 |
local myconf="" |
617 |
|
618 |
# Never tell the build system to "enable" SSE2, it has a few unexpected |
619 |
# additions, bug #336871. |
620 |
myconf+=" -Ddisable_sse2=1" |
621 |
|
622 |
# Use system-provided libraries. |
623 |
# TODO: use_system_hunspell (upstream changes needed). |
624 |
# TODO: use_system_ssl (http://crbug.com/58087). |
625 |
# TODO: use_system_sqlite (http://crbug.com/22208). |
626 |
myconf+=" |
627 |
-Duse_system_bzip2=1 |
628 |
-Duse_system_ffmpeg=1 |
629 |
-Duse_system_icu=1 |
630 |
-Duse_system_libevent=1 |
631 |
-Duse_system_libjpeg=1 |
632 |
-Duse_system_libpng=1 |
633 |
-Duse_system_libxml=1 |
634 |
-Duse_system_speex=1 |
635 |
-Duse_system_v8=1 |
636 |
-Duse_system_vpx=1 |
637 |
-Duse_system_xdg_utils=1 |
638 |
-Duse_system_zlib=1" |
639 |
|
640 |
# The dependency on cups is optional, see bug #324105. |
641 |
if use cups; then |
642 |
myconf+=" -Duse_cups=1" |
643 |
else |
644 |
myconf+=" -Duse_cups=0" |
645 |
fi |
646 |
|
647 |
# Make GConf dependency optional, http://crbug.com/13322. |
648 |
if use gnome; then |
649 |
myconf+=" -Duse_gconf=1" |
650 |
else |
651 |
myconf+=" -Duse_gconf=0" |
652 |
fi |
653 |
|
654 |
if use "gnome-keyring"; then |
655 |
myconf+=" -Duse_gnome_keyring=1 -Dlinux_link_gnome_keyring=1" |
656 |
else |
657 |
# TODO: we should also disable code trying to dlopen |
658 |
# gnome-keyring in that case. |
659 |
myconf+=" -Duse_gnome_keyring=0 -Dlinux_link_gnome_keyring=0" |
660 |
fi |
661 |
|
662 |
# Enable sandbox. |
663 |
myconf+=" |
664 |
-Dlinux_sandbox_path=${CHROMIUM_HOME}/chrome_sandbox |
665 |
-Dlinux_sandbox_chrome_path=${CHROMIUM_HOME}/chrome" |
666 |
|
667 |
if use gecko-mediaplayer; then |
668 |
# Disable hardcoded blacklist for gecko-mediaplayer. |
669 |
# When www-plugins/gecko-mediaplayer is compiled with USE=gnome, it causes |
670 |
# the browser to hang. We can handle the situation via dependencies, |
671 |
# thus making it possible to use gecko-mediaplayer. |
672 |
append-flags -DGENTOO_CHROMIUM_ENABLE_GECKO_MEDIAPLAYER |
673 |
fi |
674 |
|
675 |
# Our system ffmpeg should support more codecs than the bundled one |
676 |
# for Chromium. |
677 |
myconf+=" -Dproprietary_codecs=1" |
678 |
|
679 |
# Use target arch detection logic from bug #296917. |
680 |
local myarch="$ABI" |
681 |
[[ $myarch = "" ]] && myarch="$ARCH" |
682 |
|
683 |
if [[ $myarch = amd64 ]] ; then |
684 |
myconf+=" -Dtarget_arch=x64" |
685 |
elif [[ $myarch = x86 ]] ; then |
686 |
myconf+=" -Dtarget_arch=ia32" |
687 |
elif [[ $myarch = arm ]] ; then |
688 |
# TODO: check this again after |
689 |
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39509 is fixed. |
690 |
append-flags -fno-tree-sink |
691 |
|
692 |
myconf+=" -Dtarget_arch=arm -Ddisable_nacl=1 -Dlinux_use_tcmalloc=0" |
693 |
else |
694 |
die "Failed to determine target arch, got '$myarch'." |
695 |
fi |
696 |
|
697 |
# Make sure that -Werror doesn't get added to CFLAGS by the build system. |
698 |
# Depending on GCC version the warnings are different and we don't want |
699 |
# the build to fail because of that. |
700 |
myconf+=" -Dwerror=" |
701 |
|
702 |
# Avoid a build error with -Os, bug #352457. |
703 |
replace-flags "-Os" "-O2" |
704 |
|
705 |
egyp ${myconf} || die |
706 |
} |
707 |
|
708 |
src_compile() { |
709 |
emake chrome chrome_sandbox BUILDTYPE=Release V=1 || die |
710 |
pax-mark m out/Release/chrome |
711 |
if use test; then |
712 |
emake base_unittests BUILDTYPE=Release V=1 || die |
713 |
pax-mark m out/Release/base_unittests |
714 |
fi |
715 |
} |
716 |
|
717 |
src_test() { |
718 |
# For more info see bug #350349. |
719 |
local mylocale='en_US.utf8' |
720 |
if ! locale -a | grep -q "$mylocale"; then |
721 |
eerror "${PN} requires ${mylocale} locale for tests" |
722 |
eerror "Please read the following guides for more information:" |
723 |
eerror " http://www.gentoo.org/doc/en/guide-localization.xml" |
724 |
eerror " http://www.gentoo.org/doc/en/utf-8.xml" |
725 |
die "locale ${mylocale} is not supported" |
726 |
fi |
727 |
|
728 |
# For more info see bug #350347. |
729 |
LC_ALL="${mylocale}" maketype=out/Release/base_unittests virtualmake \ |
730 |
'--gtest_filter=-ICUStringConversionsTest.*' || die |
731 |
} |
732 |
|
733 |
src_install() { |
734 |
exeinto "${CHROMIUM_HOME}" |
735 |
doexe out/Release/chrome |
736 |
doexe out/Release/chrome_sandbox || die |
737 |
fperms 4755 "${CHROMIUM_HOME}/chrome_sandbox" |
738 |
newexe "${FILESDIR}"/chromium-launcher-r1.sh chromium-launcher.sh || die |
739 |
|
740 |
# It is important that we name the target "chromium-browser", |
741 |
# xdg-utils expect it; bug #355517. |
742 |
dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser || die |
743 |
# keep the old symlink around for consistency |
744 |
dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium || die |
745 |
|
746 |
insinto "${CHROMIUM_HOME}" |
747 |
doins out/Release/chrome.pak || die |
748 |
doins out/Release/resources.pak || die |
749 |
|
750 |
doins -r out/Release/locales || die |
751 |
doins -r out/Release/resources || die |
752 |
|
753 |
newman out/Release/chrome.1 chromium.1 || die |
754 |
newman out/Release/chrome.1 chromium-browser.1 || die |
755 |
|
756 |
# Chromium looks for these in its folder |
757 |
# See media_posix.cc and base_paths_linux.cc |
758 |
dosym /usr/$(get_libdir)/libavcodec.so.52 "${CHROMIUM_HOME}" || die |
759 |
dosym /usr/$(get_libdir)/libavformat.so.52 "${CHROMIUM_HOME}" || die |
760 |
dosym /usr/$(get_libdir)/libavutil.so.50 "${CHROMIUM_HOME}" || die |
761 |
|
762 |
# Install icon and desktop entry. |
763 |
newicon chrome/app/theme/chromium/product_logo_48.png \ |
764 |
chromium-browser.png || die |
765 |
make_desktop_entry chromium-browser "Chromium" chromium-browser \ |
766 |
"Network;WebBrowser" "MimeType=text/html;text/xml;application/xhtml+xml;" |
767 |
sed -e "/^Exec/s/$/ %U/" -i "${D}"/usr/share/applications/*.desktop || die |
768 |
|
769 |
# Install GNOME default application entry (bug #303100). |
770 |
if use gnome; then |
771 |
dodir /usr/share/gnome-control-center/default-apps || die |
772 |
insinto /usr/share/gnome-control-center/default-apps |
773 |
doins "${FILESDIR}"/chromium-browser.xml || die |
774 |
fi |
775 |
} |
776 |
|
777 |
pkg_postinst() { |
778 |
fdo-mime_desktop_database_update |
779 |
} |