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