1 |
floppym 12/02/11 22:57:49 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: chromium-19.0.1036.7.ebuild |
5 |
Log: |
6 |
Version bump for dev channel release. Disable gold linker flags. Depend on >=v8-3.9.4. Drop patches applied upstream. |
7 |
|
8 |
(Portage version: 2.2.0_alpha85/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.558 www-client/chromium/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.558&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.558&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?r1=1.557&r2=1.558 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v |
20 |
retrieving revision 1.557 |
21 |
retrieving revision 1.558 |
22 |
diff -u -r1.557 -r1.558 |
23 |
--- ChangeLog 11 Feb 2012 21:59:15 -0000 1.557 |
24 |
+++ ChangeLog 11 Feb 2012 22:57:49 -0000 1.558 |
25 |
@@ -1,6 +1,12 @@ |
26 |
# ChangeLog for www-client/chromium |
27 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.557 2012/02/11 21:59:15 floppym Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.558 2012/02/11 22:57:49 floppym Exp $ |
30 |
+ |
31 |
+*chromium-19.0.1036.7 (11 Feb 2012) |
32 |
+ |
33 |
+ 11 Feb 2012; Mike Gilbert <floppym@g.o> +chromium-19.0.1036.7.ebuild: |
34 |
+ Version bump for dev channel release. Disable gold linker flags. Depend on |
35 |
+ >=v8-3.9.4. Drop patches applied upstream. |
36 |
|
37 |
11 Feb 2012; Mike Gilbert <floppym@g.o> chromium-9999-r1.ebuild: |
38 |
Do not use gold linker flags. Depend on >=v8-3.9.4. |
39 |
|
40 |
|
41 |
|
42 |
1.1 www-client/chromium/chromium-19.0.1036.7.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-19.0.1036.7.ebuild?rev=1.1&view=markup |
45 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-19.0.1036.7.ebuild?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: chromium-19.0.1036.7.ebuild |
48 |
=================================================================== |
49 |
# Copyright 1999-2012 Gentoo Foundation |
50 |
# Distributed under the terms of the GNU General Public License v2 |
51 |
# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-19.0.1036.7.ebuild,v 1.1 2012/02/11 22:57:49 floppym Exp $ |
52 |
|
53 |
EAPI="4" |
54 |
PYTHON_DEPEND="2:2.6" |
55 |
|
56 |
inherit eutils fdo-mime flag-o-matic gnome2-utils linux-info multilib \ |
57 |
pax-utils portability python toolchain-funcs versionator virtualx |
58 |
|
59 |
DESCRIPTION="Open-source version of Google Chrome web browser" |
60 |
HOMEPAGE="http://chromium.org/" |
61 |
SRC_URI="http://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.bz2" |
62 |
|
63 |
LICENSE="BSD" |
64 |
SLOT="0" |
65 |
KEYWORDS="~amd64 ~x86" |
66 |
IUSE="bindist cups custom-cflags gnome gnome-keyring kerberos pulseaudio" |
67 |
|
68 |
# en_US is ommitted on purpose from the list below. It must always be available. |
69 |
LANGS="am ar bg bn ca cs da de el en_GB es es_LA et fa fi fil fr gu he hi hr |
70 |
hu id it ja kn ko lt lv ml mr ms nb nl pl pt_BR pt_PT ro ru sk sl sr sv sw ta te th |
71 |
tr uk vi zh_CN zh_TW" |
72 |
for lang in ${LANGS}; do |
73 |
IUSE+=" linguas_${lang}" |
74 |
done |
75 |
|
76 |
RDEPEND="app-arch/bzip2 |
77 |
cups? ( |
78 |
dev-libs/libgcrypt |
79 |
>=net-print/cups-1.3.11 |
80 |
) |
81 |
>=dev-lang/v8-3.9.4 |
82 |
dev-libs/dbus-glib |
83 |
dev-libs/elfutils |
84 |
>=dev-libs/icu-4.4.1 |
85 |
>=dev-libs/libevent-1.4.13 |
86 |
dev-libs/libxml2[icu] |
87 |
dev-libs/libxslt |
88 |
>=dev-libs/nss-3.12.3 |
89 |
gnome? ( >=gnome-base/gconf-2.24.0 ) |
90 |
gnome-keyring? ( >=gnome-base/gnome-keyring-2.28.2 ) |
91 |
>=media-libs/alsa-lib-1.0.19 |
92 |
media-libs/flac |
93 |
virtual/jpeg |
94 |
media-libs/libpng |
95 |
>=media-libs/libwebp-0.1.2 |
96 |
media-libs/speex |
97 |
pulseaudio? ( media-sound/pulseaudio ) |
98 |
sys-fs/udev |
99 |
sys-libs/zlib |
100 |
x11-libs/gtk+:2 |
101 |
x11-libs/libXinerama |
102 |
x11-libs/libXScrnSaver |
103 |
x11-libs/libXtst |
104 |
kerberos? ( virtual/krb5 )" |
105 |
DEPEND="${RDEPEND} |
106 |
>=dev-lang/nacl-toolchain-newlib-0_p7311 |
107 |
dev-lang/perl |
108 |
dev-lang/yasm |
109 |
dev-python/simplejson |
110 |
>=dev-util/gperf-3.0.3 |
111 |
>=dev-util/pkgconfig-0.23 |
112 |
>=sys-devel/bison-2.4.3 |
113 |
sys-devel/flex |
114 |
>=sys-devel/make-3.81-r2 |
115 |
test? ( dev-python/pyftpdlib )" |
116 |
RDEPEND+=" |
117 |
!=www-client/chromium-9999 |
118 |
x11-misc/xdg-utils |
119 |
virtual/ttf-fonts" |
120 |
|
121 |
gyp_use() { |
122 |
if [[ $# -lt 2 ]]; then |
123 |
echo "!!! usage: gyp_use <USEFLAG> <GYPFLAG>" >&2 |
124 |
return 1 |
125 |
fi |
126 |
if use "$1"; then echo "-D$2=1"; else echo "-D$2=0"; fi |
127 |
} |
128 |
|
129 |
egyp() { |
130 |
set -- build/gyp_chromium --depth=. "${@}" |
131 |
echo "${@}" >&2 |
132 |
"${@}" |
133 |
} |
134 |
|
135 |
# Chromium uses different names for some langs, |
136 |
# return Chromium name corresponding to a Gentoo lang. |
137 |
chromium_lang() { |
138 |
if [[ "$1" == "es_LA" ]]; then |
139 |
echo "es_419" |
140 |
else |
141 |
echo "$1" |
142 |
fi |
143 |
} |
144 |
|
145 |
get_bundled_v8_version() { |
146 |
"$(PYTHON -2)" "${FILESDIR}"/extract_v8_version.py v8/src/version.cc |
147 |
} |
148 |
|
149 |
get_installed_v8_version() { |
150 |
best_version dev-lang/v8 | sed -e 's@dev-lang/v8-@@g' |
151 |
} |
152 |
|
153 |
if ! has chromium-pkg_die ${EBUILD_DEATH_HOOKS}; then |
154 |
EBUILD_DEATH_HOOKS+=" chromium-pkg_die"; |
155 |
fi |
156 |
|
157 |
chromium-pkg_die() { |
158 |
if [[ "${EBUILD_PHASE}" != "compile" ]]; then |
159 |
return |
160 |
fi |
161 |
|
162 |
# Prevent user problems like bug #348235. |
163 |
eshopts_push -s extglob |
164 |
if is-flagq '-g?(gdb)?([1-9])'; then |
165 |
ewarn |
166 |
ewarn "You have enabled debug info (i.e. -g or -ggdb in your CFLAGS/CXXFLAGS)." |
167 |
ewarn "Please try removing -g{,gdb} before reporting a bug." |
168 |
ewarn |
169 |
fi |
170 |
eshopts_pop |
171 |
|
172 |
# ccache often causes bogus compile failures, especially when the cache gets |
173 |
# corrupted. |
174 |
if has ccache ${FEATURES}; then |
175 |
ewarn |
176 |
ewarn "You have enabled ccache. Please try disabling ccache" |
177 |
ewarn "before reporting a bug." |
178 |
ewarn |
179 |
fi |
180 |
|
181 |
# No ricer bugs. |
182 |
if use custom-cflags; then |
183 |
ewarn |
184 |
ewarn "You have enabled the custom-cflags USE flag." |
185 |
ewarn "Please disable it before reporting a bug." |
186 |
ewarn |
187 |
fi |
188 |
|
189 |
# If the system doesn't have enough memory, the compilation is known to |
190 |
# fail. Print info about memory to recognize this condition. |
191 |
einfo |
192 |
einfo "$(grep MemTotal /proc/meminfo)" |
193 |
einfo "$(grep SwapTotal /proc/meminfo)" |
194 |
einfo |
195 |
} |
196 |
|
197 |
pkg_setup() { |
198 |
if [[ "${SLOT}" == "0" ]]; then |
199 |
CHROMIUM_SUFFIX="" |
200 |
else |
201 |
CHROMIUM_SUFFIX="-${SLOT}" |
202 |
fi |
203 |
CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser${CHROMIUM_SUFFIX}" |
204 |
|
205 |
# Make sure the build system will use the right tools, bug #340795. |
206 |
tc-export AR CC CXX RANLIB |
207 |
|
208 |
# Make sure the build system will use the right python, bug #344367. |
209 |
python_set_active_version 2 |
210 |
python_pkg_setup |
211 |
|
212 |
if [[ "${MERGE_TYPE}" == "source" || "${MERGE_TYPE}" == "binary" ]]; then |
213 |
# Fail if the kernel doesn't support features needed for sandboxing, |
214 |
# bug #363907. |
215 |
ERROR_PID_NS="PID_NS is required for sandbox to work" |
216 |
ERROR_NET_NS="NET_NS is required for sandbox to work" |
217 |
CONFIG_CHECK="~PID_NS ~NET_NS" |
218 |
check_extra_config |
219 |
fi |
220 |
|
221 |
if use bindist; then |
222 |
elog "bindist enabled: H.264 video support will be disabled." |
223 |
else |
224 |
elog "bindist disabled: Resulting binaries may not be legal to re-distribute." |
225 |
fi |
226 |
} |
227 |
|
228 |
src_prepare() { |
229 |
ln -s /usr/$(get_libdir)/nacl-toolchain-newlib \ |
230 |
native_client/toolchain/linux_x86_newlib || die |
231 |
|
232 |
# zlib-1.2.5.1-r1 renames the OF macro in zconf.h, bug 383371. |
233 |
sed -i '1i#define OF(x) x' \ |
234 |
third_party/zlib/contrib/minizip/{ioapi,{,un}zip}.c \ |
235 |
chrome/common/zip*.cc || die |
236 |
|
237 |
# Revert WebKit changeset responsible for Gentoo bug #393471. |
238 |
epatch "${FILESDIR}/${PN}-revert-jpeg-swizzle-r2.patch" |
239 |
|
240 |
epatch_user |
241 |
|
242 |
# Remove most bundled libraries. Some are still needed. |
243 |
find third_party -type f \! -iname '*.gyp*' \ |
244 |
\! -path 'third_party/WebKit/*' \ |
245 |
\! -path 'third_party/angle/*' \ |
246 |
\! -path 'third_party/cacheinvalidation/*' \ |
247 |
\! -path 'third_party/cld/*' \ |
248 |
\! -path 'third_party/expat/*' \ |
249 |
\! -path 'third_party/ffmpeg/*' \ |
250 |
\! -path 'third_party/flac/flac.h' \ |
251 |
\! -path 'third_party/gpsd/*' \ |
252 |
\! -path 'third_party/harfbuzz/*' \ |
253 |
\! -path 'third_party/hunspell/*' \ |
254 |
\! -path 'third_party/iccjpeg/*' \ |
255 |
\! -path 'third_party/jsoncpp/*' \ |
256 |
\! -path 'third_party/khronos/*' \ |
257 |
\! -path 'third_party/launchpad_translations/*' \ |
258 |
\! -path 'third_party/leveldb/*' \ |
259 |
\! -path 'third_party/leveldatabase/*' \ |
260 |
\! -path 'third_party/libjingle/*' \ |
261 |
\! -path 'third_party/libphonenumber/*' \ |
262 |
\! -path 'third_party/libsrtp/*' \ |
263 |
\! -path 'third_party/libvpx/*' \ |
264 |
\! -path 'third_party/libyuv/*' \ |
265 |
\! -path 'third_party/lss/*' \ |
266 |
\! -path 'third_party/mesa/*' \ |
267 |
\! -path 'third_party/modp_b64/*' \ |
268 |
\! -path 'third_party/mongoose/*' \ |
269 |
\! -path 'third_party/npapi/*' \ |
270 |
\! -path 'third_party/openmax/*' \ |
271 |
\! -path 'third_party/ots/*' \ |
272 |
\! -path 'third_party/protobuf/*' \ |
273 |
\! -path 'third_party/scons-2.0.1/*' \ |
274 |
\! -path 'third_party/sfntly/*' \ |
275 |
\! -path 'third_party/skia/*' \ |
276 |
\! -path 'third_party/smhasher/*' \ |
277 |
\! -path 'third_party/speex/speex.h' \ |
278 |
\! -path 'third_party/sqlite/*' \ |
279 |
\! -path 'third_party/tcmalloc/*' \ |
280 |
\! -path 'third_party/tlslite/*' \ |
281 |
\! -path 'third_party/undoview/*' \ |
282 |
\! -path 'third_party/v8-i18n/*' \ |
283 |
\! -path 'third_party/webdriver/*' \ |
284 |
\! -path 'third_party/webgl_conformance/*' \ |
285 |
\! -path 'third_party/webrtc/*' \ |
286 |
\! -path 'third_party/zlib/contrib/minizip/*' \ |
287 |
-delete || die |
288 |
|
289 |
local v8_bundled="$(get_bundled_v8_version)" |
290 |
local v8_installed="$(get_installed_v8_version)" |
291 |
elog "V8 version: bundled - ${v8_bundled}; installed - ${v8_installed}" |
292 |
|
293 |
# Remove bundled v8. |
294 |
find v8 -type f \! -iname '*.gyp*' -delete || die |
295 |
|
296 |
# The implementation files include v8 headers with full path, |
297 |
# like #include "v8/include/v8.h". Make sure the system headers |
298 |
# will be used. |
299 |
# TODO: find a solution that can be upstreamed. |
300 |
rmdir v8/include || die |
301 |
ln -s /usr/include v8/include || die |
302 |
|
303 |
# Make sure the build system will use the right python, bug #344367. |
304 |
# Only convert directories that need it, to save time. |
305 |
python_convert_shebangs -q -r 2 build tools |
306 |
} |
307 |
|
308 |
src_configure() { |
309 |
local myconf="" |
310 |
|
311 |
# Never tell the build system to "enable" SSE2, it has a few unexpected |
312 |
# additions, bug #336871. |
313 |
myconf+=" -Ddisable_sse2=1" |
314 |
|
315 |
# Use system-provided libraries. |
316 |
# TODO: use_system_ffmpeg |
317 |
# TODO: use_system_hunspell (upstream changes needed). |
318 |
# TODO: use_system_ssl (http://crbug.com/58087). |
319 |
# TODO: use_system_sqlite (http://crbug.com/22208). |
320 |
# TODO: use_system_vpx |
321 |
myconf+=" |
322 |
-Duse_system_bzip2=1 |
323 |
-Duse_system_flac=1 |
324 |
-Duse_system_icu=1 |
325 |
-Duse_system_libevent=1 |
326 |
-Duse_system_libjpeg=1 |
327 |
-Duse_system_libpng=1 |
328 |
-Duse_system_libwebp=1 |
329 |
-Duse_system_libxml=1 |
330 |
-Duse_system_speex=1 |
331 |
-Duse_system_v8=1 |
332 |
-Duse_system_xdg_utils=1 |
333 |
-Duse_system_yasm=1 |
334 |
-Duse_system_zlib=1" |
335 |
|
336 |
# Optional dependencies. |
337 |
# TODO: linux_link_kerberos, bug #381289. |
338 |
myconf+=" |
339 |
$(gyp_use cups use_cups) |
340 |
$(gyp_use gnome use_gconf) |
341 |
$(gyp_use gnome-keyring use_gnome_keyring) |
342 |
$(gyp_use gnome-keyring linux_link_gnome_keyring) |
343 |
$(gyp_use kerberos use_kerberos) |
344 |
$(gyp_use pulseaudio use_pulseaudio)" |
345 |
|
346 |
# Enable sandbox. |
347 |
myconf+=" |
348 |
-Dlinux_sandbox_path=${CHROMIUM_HOME}/chrome_sandbox |
349 |
-Dlinux_sandbox_chrome_path=${CHROMIUM_HOME}/chrome" |
350 |
|
351 |
# Never use bundled gold binary. Disable gold linker flags for now. |
352 |
myconf+=" |
353 |
-Dlinux_use_gold_binary=0 |
354 |
-Dlinux_use_gold_flags=0" |
355 |
|
356 |
# if host-is-pax; then |
357 |
# # Prevent the build from failing (bug #301880). The performance |
358 |
# # difference is very small. |
359 |
# myconf+=" -Dv8_use_snapshot=0" |
360 |
# fi |
361 |
|
362 |
# Our system ffmpeg should support more codecs than the bundled one |
363 |
# for Chromium. |
364 |
# myconf+=" -Dproprietary_codecs=1" |
365 |
|
366 |
if ! use bindist; then |
367 |
# Enable H.624 support in bundled ffmpeg. |
368 |
myconf+=" -Dproprietary_codecs=1 -Dffmpeg_branding=Chrome" |
369 |
fi |
370 |
|
371 |
local myarch="$(tc-arch)" |
372 |
if [[ $myarch = amd64 ]] ; then |
373 |
myconf+=" -Dtarget_arch=x64" |
374 |
elif [[ $myarch = x86 ]] ; then |
375 |
myconf+=" -Dtarget_arch=ia32" |
376 |
elif [[ $myarch = arm ]] ; then |
377 |
# TODO: check this again after |
378 |
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39509 is fixed. |
379 |
append-flags -fno-tree-sink |
380 |
|
381 |
myconf+=" -Dtarget_arch=arm -Ddisable_nacl=1 -Dlinux_use_tcmalloc=0" |
382 |
else |
383 |
die "Failed to determine target arch, got '$myarch'." |
384 |
fi |
385 |
|
386 |
# Make sure that -Werror doesn't get added to CFLAGS by the build system. |
387 |
# Depending on GCC version the warnings are different and we don't want |
388 |
# the build to fail because of that. |
389 |
myconf+=" -Dwerror=" |
390 |
|
391 |
# Avoid CFLAGS problems, bug #352457, bug #390147. |
392 |
if ! use custom-cflags; then |
393 |
replace-flags "-Os" "-O2" |
394 |
strip-flags |
395 |
fi |
396 |
|
397 |
egyp ${myconf} || die |
398 |
} |
399 |
|
400 |
src_compile() { |
401 |
emake chrome chrome_sandbox chromedriver BUILDTYPE=Release V=1 || die |
402 |
pax-mark m out/Release/chrome |
403 |
if use test; then |
404 |
emake {base,cacheinvalidation,crypto,googleurl,gpu,media,net,printing}_unittests BUILDTYPE=Release V=1 || die |
405 |
pax-mark m out/Release/{base,cacheinvalidation,crypto,googleurl,gpu,media,net,printing}_unittests |
406 |
fi |
407 |
} |
408 |
|
409 |
src_test() { |
410 |
# For more info see bug #350349. |
411 |
local mylocale='en_US.utf8' |
412 |
if ! locale -a | grep -q "$mylocale"; then |
413 |
eerror "${PN} requires ${mylocale} locale for tests" |
414 |
eerror "Please read the following guides for more information:" |
415 |
eerror " http://www.gentoo.org/doc/en/guide-localization.xml" |
416 |
eerror " http://www.gentoo.org/doc/en/utf-8.xml" |
417 |
die "locale ${mylocale} is not supported" |
418 |
fi |
419 |
|
420 |
# For more info see bug #370957. |
421 |
if [[ $UID -eq 0 ]]; then |
422 |
die "Tests must be run as non-root. Please use FEATURES=userpriv." |
423 |
fi |
424 |
|
425 |
# ICUStringConversionsTest: bug #350347. |
426 |
# MessagePumpLibeventTest: bug #398501. |
427 |
LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/base_unittests virtualmake \ |
428 |
'--gtest_filter=-ICUStringConversionsTest.*:MessagePumpLibeventTest.*' |
429 |
|
430 |
LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/cacheinvalidation_unittests virtualmake |
431 |
LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/crypto_unittests virtualmake |
432 |
LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/googleurl_unittests virtualmake |
433 |
LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/gpu_unittests virtualmake |
434 |
LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/media_unittests virtualmake |
435 |
|
436 |
# NetUtilTest: bug #361885. |
437 |
# DnsConfigServiceTest.GetSystemConfig: bug #394883. |
438 |
LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/net_unittests virtualmake \ |
439 |
'--gtest_filter=-NetUtilTest.IDNToUnicode*:NetUtilTest.FormatUrl*:DnsConfigServiceTest.GetSystemConfig' |
440 |
|
441 |
LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/printing_unittests virtualmake |
442 |
} |
443 |
|
444 |
src_install() { |
445 |
exeinto "${CHROMIUM_HOME}" |
446 |
doexe out/Release/chrome || die |
447 |
doexe out/Release/chrome_sandbox || die |
448 |
fperms 4755 "${CHROMIUM_HOME}/chrome_sandbox" |
449 |
|
450 |
doexe out/Release/chromedriver || die |
451 |
|
452 |
# Install Native Client files on platforms that support it. |
453 |
insinto "${CHROMIUM_HOME}" |
454 |
case "$(tc-arch)" in |
455 |
amd64) |
456 |
doexe out/Release/nacl_helper{,_bootstrap} || die |
457 |
doins out/Release/nacl_irt_x86_64.nexe || die |
458 |
doins out/Release/libppGoogleNaClPluginChrome.so || die |
459 |
;; |
460 |
x86) |
461 |
doexe out/Release/nacl_helper{,_bootstrap} || die |
462 |
doins out/Release/nacl_irt_x86_32.nexe || die |
463 |
doins out/Release/libppGoogleNaClPluginChrome.so || die |
464 |
;; |
465 |
esac |
466 |
|
467 |
newexe "${FILESDIR}"/chromium-launcher-r2.sh chromium-launcher.sh || die |
468 |
if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then |
469 |
sed "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" \ |
470 |
-i "${ED}"/"${CHROMIUM_HOME}"/chromium-launcher.sh || die |
471 |
sed "s:chromium.desktop:chromium${CHROMIUM_SUFFIX}.desktop:g" \ |
472 |
-i "${ED}"/"${CHROMIUM_HOME}"/chromium-launcher.sh || die |
473 |
sed "s:plugins:plugins --user-data-dir=\${HOME}/.config/chromium${CHROMIUM_SUFFIX}:" \ |
474 |
-i "${ED}"/"${CHROMIUM_HOME}"/chromium-launcher.sh || die |
475 |
fi |
476 |
|
477 |
# It is important that we name the target "chromium-browser", |
478 |
# xdg-utils expect it; bug #355517. |
479 |
dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser${CHROMIUM_SUFFIX} || die |
480 |
# keep the old symlink around for consistency |
481 |
dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium${CHROMIUM_SUFFIX} || die |
482 |
|
483 |
# Allow users to override command-line options, bug #357629. |
484 |
dodir /etc/chromium || die |
485 |
insinto /etc/chromium |
486 |
newins "${FILESDIR}/chromium.default" "default" || die |
487 |
|
488 |
# Support LINGUAS, bug #332751. |
489 |
local pak |
490 |
for pak in out/Release/locales/*.pak; do |
491 |
local pakbasename="$(basename ${pak})" |
492 |
local pakname="${pakbasename%.pak}" |
493 |
local langname="${pakname//-/_}" |
494 |
|
495 |
# Do not issue warning for en_US locale. This is the fallback |
496 |
# locale so it should always be installed. |
497 |
if [[ "${langname}" == "en_US" ]]; then |
498 |
continue |
499 |
fi |
500 |
|
501 |
local found=false |
502 |
local lang |
503 |
for lang in ${LANGS}; do |
504 |
local crlang="$(chromium_lang ${lang})" |
505 |
if [[ "${langname}" == "${crlang}" ]]; then |
506 |
found=true |
507 |
break |
508 |
fi |
509 |
done |
510 |
if ! $found; then |
511 |
ewarn "LINGUAS warning: no ${langname} in LANGS" |
512 |
fi |
513 |
done |
514 |
local lang |
515 |
for lang in ${LANGS}; do |
516 |
local crlang="$(chromium_lang ${lang})" |
517 |
local pakfile="out/Release/locales/${crlang//_/-}.pak" |
518 |
if [ ! -f "${pakfile}" ]; then |
519 |
ewarn "LINGUAS warning: no .pak file for ${lang} (${pakfile} not found)" |
520 |
fi |
521 |
if ! use linguas_${lang}; then |
522 |
rm "${pakfile}" || die |
523 |
fi |
524 |
done |
525 |
|
526 |
insinto "${CHROMIUM_HOME}" |
527 |
doins out/Release/chrome.pak || die |
528 |
doins out/Release/resources.pak || die |
529 |
|
530 |
doins -r out/Release/locales || die |
531 |
doins -r out/Release/resources || die |
532 |
|
533 |
newman out/Release/chrome.1 chromium${CHROMIUM_SUFFIX}.1 || die |
534 |
newman out/Release/chrome.1 chromium-browser${CHROMIUM_SUFFIX}.1 || die |
535 |
|
536 |
# Chromium looks for these in its folder |
537 |
# See media_posix.cc and base_paths_linux.cc |
538 |
# dosym /usr/$(get_libdir)/libavcodec.so.52 "${CHROMIUM_HOME}" || die |
539 |
# dosym /usr/$(get_libdir)/libavformat.so.52 "${CHROMIUM_HOME}" || die |
540 |
# dosym /usr/$(get_libdir)/libavutil.so.50 "${CHROMIUM_HOME}" || die |
541 |
doexe out/Release/libffmpegsumo.so || die |
542 |
|
543 |
# Install icons and desktop entry. |
544 |
for SIZE in 16 22 24 32 48 64 128 256 ; do |
545 |
insinto /usr/share/icons/hicolor/${SIZE}x${SIZE}/apps |
546 |
newins chrome/app/theme/chromium/product_logo_${SIZE}.png \ |
547 |
chromium-browser${CHROMIUM_SUFFIX}.png || die |
548 |
done |
549 |
local mime_types="text/html;text/xml;application/xhtml+xml;" |
550 |
mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797 |
551 |
make_desktop_entry \ |
552 |
chromium-browser${CHROMIUM_SUFFIX} \ |
553 |
"Chromium${CHROMIUM_SUFFIX}" \ |
554 |
chromium-browser${CHROMIUM_SUFFIX} \ |
555 |
"Network;WebBrowser" \ |
556 |
"MimeType=${mime_types}\nStartupWMClass=chromium-browser" |
557 |
sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die |
558 |
|
559 |
# Install GNOME default application entry (bug #303100). |
560 |
if use gnome; then |
561 |
dodir /usr/share/gnome-control-center/default-apps || die |
562 |
insinto /usr/share/gnome-control-center/default-apps |
563 |
newins "${FILESDIR}"/chromium-browser.xml chromium-browser${CHROMIUM_SUFFIX}.xml || die |
564 |
if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then |
565 |
sed "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" -i \ |
566 |
"${ED}"/usr/share/gnome-control-center/default-apps/chromium-browser${CHROMIUM_SUFFIX}.xml |
567 |
fi |
568 |
fi |
569 |
} |
570 |
|
571 |
pkg_preinst() { |
572 |
gnome2_icon_savelist |
573 |
} |
574 |
|
575 |
pkg_postinst() { |
576 |
fdo-mime_desktop_database_update |
577 |
gnome2_icon_cache_update |
578 |
|
579 |
# For more info see bug #292201, bug #352263, bug #361859. |
580 |
elog |
581 |
elog "Depending on your desktop environment, you may need" |
582 |
elog "to install additional packages to get icons on the Downloads page." |
583 |
elog |
584 |
elog "For KDE, the required package is kde-base/oxygen-icons." |
585 |
elog |
586 |
elog "For other desktop environments, try one of the following:" |
587 |
elog " - x11-themes/gnome-icon-theme" |
588 |
elog " - x11-themes/tango-icon-theme" |
589 |
|
590 |
# For more info see bug #359153. |
591 |
elog |
592 |
elog "Some web pages may require additional fonts to display properly." |
593 |
elog "Try installing some of the following packages if some characters" |
594 |
elog "are not displayed properly:" |
595 |
elog " - media-fonts/arphicfonts" |
596 |
elog " - media-fonts/bitstream-cyberbit" |
597 |
elog " - media-fonts/droid" |
598 |
elog " - media-fonts/ipamonafont" |
599 |
elog " - media-fonts/ja-ipafonts" |
600 |
elog " - media-fonts/takao-fonts" |
601 |
elog " - media-fonts/wqy-microhei" |
602 |
elog " - media-fonts/wqy-zenhei" |
603 |
} |
604 |
|
605 |
pkg_postrm() { |
606 |
gnome2_icon_cache_update |
607 |
} |