1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit multilib unpacker
9 DESCRIPTION="Binary plugins from Google Chrome for use in Chromium"
10 HOMEPAGE="https://www.google.com/chrome"
15 CHROMEDIR="opt/google/chrome-${SLOT}"
20 CHROMEDIR="opt/google/chrome-${SLOT}"
25 CHROMEDIR="opt/google/chrome"
29 die "Invalid value for \${PV}: ${PV}"
33 MY_PN="google-chrome-${SLOT}"
34 MY_P="${MY_PN}_${MY_PV}"
38 https://dl.google.com/linux/chrome/deb/pool/main/g/${MY_PN}/${MY_P}_amd64.deb
43 LICENSE="google-chrome"
44 IUSE="+flash +widevine"
45 RESTRICT="bindist mirror strip"
47 for x in 0 beta stable unstable; do
48 if [[ ${SLOT} != ${x} ]]; then
49 RDEPEND+=" !${CATEGORY}/${PN}:${x}"
53 S="${WORKDIR}/${CHROMEDIR}"
57 eerror "Please wait 24 hours and sync your portage tree before reporting fetch failures."
63 insinto /usr/$(get_libdir)/chromium-browser/
66 doins libwidevinecdm.so
67 strings ./chrome | grep -C 1 " (version:" | tail -1 > widevine.version
68 doins widevine.version
74 # Since this is a live ebuild, we're forced to, unfortuantely,
75 # dynamically construct the command line args for Chromium.
76 version=$(sed -n 's/.*"version": "\(.*\)",.*/\1/p' PepperFlash/manifest.json)
77 flapper="${ROOT}usr/$(get_libdir)/chromium-browser/PepperFlash/libpepflashplayer.so"
78 echo -n "CHROMIUM_FLAGS=\"\${CHROMIUM_FLAGS} " > pepper-flash
79 echo -n "--ppapi-flash-path=$flapper " >> pepper-flash
80 echo "--ppapi-flash-version=$version\"" >> pepper-flash
82 insinto /etc/chromium/