5ab3a0cae742959f963ba98bbd4f11c2ecda90d9
[gentoo.git] / www-plugins / chrome-binary-plugins / chrome-binary-plugins-84.0.4143.2_alpha.ebuild
1 # Copyright 2012-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit multilib unpacker
7
8 DESCRIPTION="Binary plugins from Google Chrome for use in Chromium"
9 HOMEPAGE="https://www.google.com/chrome"
10
11 case ${PV} in
12         *_alpha*)
13                 SLOT="unstable"
14                 CHROMEDIR="opt/google/chrome-${SLOT}"
15                 MY_PV=${PV%_alpha}-1
16                 ;;
17         *_beta*)
18                 SLOT="beta"
19                 CHROMEDIR="opt/google/chrome-${SLOT}"
20                 MY_PV=${PV%_beta}-1
21                 ;;
22         *)
23                 SLOT="stable"
24                 CHROMEDIR="opt/google/chrome"
25                 MY_PV=${PV}-1
26                 ;;
27 esac
28
29 MY_PN="google-chrome-${SLOT}"
30 MY_P="${MY_PN}_${MY_PV}"
31
32 SRC_URI="https://dl.google.com/linux/chrome/deb/pool/main/g/${MY_PN}/${MY_P}_amd64.deb"
33 KEYWORDS="-* ~amd64"
34
35 LICENSE="google-chrome"
36 RESTRICT="bindist mirror strip"
37
38 RDEPEND="
39         dev-libs/glib:2
40         dev-libs/nspr
41         dev-libs/nss
42 "
43
44 for x in 0 beta stable unstable; do
45         if [[ ${SLOT} != ${x} ]]; then
46                 RDEPEND+=" !${CATEGORY}/${PN}:${x}"
47         fi
48 done
49
50 S="${WORKDIR}/${CHROMEDIR}"
51 QA_PREBUILT="*"
52
53 pkg_nofetch() {
54         eerror "Please wait 24 hours and sync your portage tree before reporting fetch failures."
55 }
56
57 src_install() {
58         insinto "/usr/$(get_libdir)/chromium-browser"
59         doins -r WidevineCdm
60 }