1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 CHROMIUM_LANGS="am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu he
7 hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk sl sr
8 sv sw ta te th tr uk vi zh-CN zh-TW"
10 inherit readme.gentoo-r1 chromium-2 eutils gnome2-utils pax-utils unpacker xdg-utils
12 DESCRIPTION="The web browser from Google"
13 HOMEPAGE="https://www.google.com/chrome"
15 if [[ ${PN} == google-chrome ]]; then
21 MY_P="${MY_PN}_${PV}-1"
23 SRC_URI="https://dl.google.com/linux/chrome/deb/pool/main/g/${MY_PN}/${MY_P}_amd64.deb"
25 LICENSE="google-chrome"
29 RESTRICT="bindist mirror strip"
33 app-accessibility/at-spi2-atk:2
35 app-misc/ca-certificates
51 >=x11-libs/libX11-1.5.0
52 x11-libs/libXcomposite
60 x11-libs/libXScrnSaver
68 QA_DESKTOP_FILE="usr/share/applications/google-chrome.*\\.desktop"
70 CHROME_HOME="opt/google/chrome${PN#google-chrome}"
72 DISABLE_AUTOFORMATTING="yes"
74 Some web pages may require additional fonts to display properly.
75 Try installing some of the following packages if some characters
76 are not displayed properly:
77 - media-fonts/arphicfonts
78 - media-fonts/bitstream-cyberbit
80 - media-fonts/ipamonafont
81 - media-fonts/ja-ipafonts
82 - media-fonts/takao-fonts
83 - media-fonts/wqy-microhei
84 - media-fonts/wqy-zenhei
86 Depending on your desktop environment, you may need
87 to install additional packages to get icons on the Downloads page.
89 For KDE, the required package is kde-frameworks/oxygen-icons.
91 For other desktop environments, try one of the following:
92 - x11-themes/adwaita-icon-theme
93 - x11-themes/tango-icon-theme
95 Please notice the bundled flash player (PepperFlash).
96 You can (de)activate all flash plugins via chrome://plugins
100 eerror "Please wait 24 hours and sync your tree before reporting a bug for google-chrome fetch failures."
104 # Protect against people using autounmask overzealously
105 use amd64 || die "google-chrome only works on amd64"
109 chromium_suid_sandbox_check_kernel_config
121 rm -r etc usr/share/menu || die
122 mv usr/share/doc/${MY_PN} usr/share/doc/${PF} || die
124 pushd "${CHROME_HOME}/locales" > /dev/null || die
125 chromium_remove_language_paks
126 popd > /dev/null || die
128 if use plugins ; then
129 local plugins="--extra-plugin-dir=/usr/$(get_libdir)/nsbrowser/plugins"
130 sed -e "/^exec/ i set -- \"${plugins}\" \"\$@\"" \
131 -i "${CHROME_HOME}/${PN}" || die
135 for size in 16 22 24 32 48 64 128 256 ; do
136 newicon -s ${size} "${CHROME_HOME}/product_logo_${size}_beta.png" ${PN}.png
139 pax-mark m "${CHROME_HOME}/chrome"
141 readme.gentoo_create_doc
149 gnome2_icon_cache_update
150 xdg_desktop_database_update
154 gnome2_icon_cache_update
155 xdg_desktop_database_update
156 readme.gentoo_print_elog