www-client/google-chrome-beta: automated update (65.0.3325.73)
[gentoo.git] / www-client / google-chrome-beta / google-chrome-beta-65.0.3325.73.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="6"
5
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"
9
10 inherit readme.gentoo-r1 chromium-2 eutils gnome2-utils pax-utils unpacker xdg-utils
11
12 DESCRIPTION="The web browser from Google"
13 HOMEPAGE="https://www.google.com/chrome"
14
15 if [[ ${PN} == google-chrome ]]; then
16         MY_PN=${PN}-stable
17 else
18         MY_PN=${PN}
19 fi
20
21 MY_P="${MY_PN}_${PV}-1"
22
23 SRC_URI="https://dl.google.com/linux/chrome/deb/pool/main/g/${MY_PN}/${MY_P}_amd64.deb"
24
25 LICENSE="google-chrome"
26 SLOT="0"
27 KEYWORDS="-* ~amd64"
28 IUSE="+plugins"
29 RESTRICT="bindist mirror strip"
30
31 DEPEND=""
32 RDEPEND="
33         app-accessibility/at-spi2-atk:2
34         app-arch/bzip2
35         app-misc/ca-certificates
36         dev-libs/atk
37         dev-libs/expat
38         dev-libs/glib:2
39         dev-libs/nspr
40         >=dev-libs/nss-3.26
41         gnome-base/gconf:2
42         media-libs/alsa-lib
43         media-libs/fontconfig
44         media-libs/freetype:2
45         net-print/cups
46         sys-apps/dbus
47         sys-libs/libcap
48         x11-libs/cairo
49         x11-libs/gdk-pixbuf:2
50         x11-libs/gtk+:3
51         >=x11-libs/libX11-1.5.0
52         x11-libs/libXcomposite
53         x11-libs/libXcursor
54         x11-libs/libXdamage
55         x11-libs/libXext
56         x11-libs/libXfixes
57         x11-libs/libXi
58         x11-libs/libXrandr
59         x11-libs/libXrender
60         x11-libs/libXScrnSaver
61         x11-libs/libXtst
62         x11-libs/libxcb
63         x11-libs/pango
64         x11-misc/xdg-utils
65 "
66
67 QA_PREBUILT="*"
68 QA_DESKTOP_FILE="usr/share/applications/google-chrome.*\\.desktop"
69 S=${WORKDIR}
70 CHROME_HOME="opt/google/chrome${PN#google-chrome}"
71
72 DISABLE_AUTOFORMATTING="yes"
73 DOC_CONTENTS="
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
79 - media-fonts/droid
80 - media-fonts/ipamonafont
81 - media-fonts/ja-ipafonts
82 - media-fonts/takao-fonts
83 - media-fonts/wqy-microhei
84 - media-fonts/wqy-zenhei
85
86 Depending on your desktop environment, you may need
87 to install additional packages to get icons on the Downloads page.
88
89 For KDE, the required package is kde-frameworks/oxygen-icons.
90
91 For other desktop environments, try one of the following:
92 - x11-themes/adwaita-icon-theme
93 - x11-themes/tango-icon-theme
94
95 Please notice the bundled flash player (PepperFlash).
96 You can (de)activate all flash plugins via chrome://plugins
97 "
98
99 pkg_nofetch() {
100         eerror "Please wait 24 hours and sync your tree before reporting a bug for google-chrome fetch failures."
101 }
102
103 pkg_pretend() {
104         # Protect against people using autounmask overzealously
105         use amd64 || die "google-chrome only works on amd64"
106 }
107
108 pkg_setup() {
109         chromium_suid_sandbox_check_kernel_config
110 }
111
112 src_unpack() {
113         :
114 }
115
116 src_install() {
117         dodir /
118         cd "${ED}" || die
119         unpacker
120
121         rm -r etc usr/share/menu || die
122         mv usr/share/doc/${MY_PN} usr/share/doc/${PF} || die
123
124         pushd "${CHROME_HOME}/locales" > /dev/null || die
125         chromium_remove_language_paks
126         popd > /dev/null || die
127
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
132         fi
133
134         local size
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
137         done
138
139         pax-mark m "${CHROME_HOME}/chrome"
140
141         readme.gentoo_create_doc
142 }
143
144 pkg_preinst() {
145         gnome2_icon_savelist
146 }
147
148 pkg_postrm() {
149         gnome2_icon_cache_update
150         xdg_desktop_database_update
151 }
152
153 pkg_postinst() {
154         gnome2_icon_cache_update
155         xdg_desktop_database_update
156         readme.gentoo_print_elog
157 }