diff options
author | Jason A. Donenfeld <zx2c4@gentoo.org> | 2012-10-19 20:10:37 +0000 |
---|---|---|
committer | Jason A. Donenfeld <zx2c4@gentoo.org> | 2012-10-19 20:10:37 +0000 |
commit | c86241dbdcaefbdc6a62819ede2258ec93c0a5ba (patch) | |
tree | 470590754f14d5be0a1cb84dc1710e79a5ff86b4 /www-plugins | |
parent | Security bump. Removed old (diff) | |
download | gentoo-2-c86241dbdcaefbdc6a62819ede2258ec93c0a5ba.tar.gz gentoo-2-c86241dbdcaefbdc6a62819ede2258ec93c0a5ba.tar.bz2 gentoo-2-c86241dbdcaefbdc6a62819ede2258ec93c0a5ba.zip |
New ebuild that imports Chrome's binary plugins into Chromium. Initially a live ebuild, with ugly live fetching semantics, but might in the future transition to something that's released in tandem with Chromium, with proper versioning.
(Portage version: 2.2.0_alpha141/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'www-plugins')
-rw-r--r-- | www-plugins/chrome-binary-plugins/ChangeLog | 12 | ||||
-rw-r--r-- | www-plugins/chrome-binary-plugins/chrome-binary-plugins-9999.ebuild | 70 | ||||
-rw-r--r-- | www-plugins/chrome-binary-plugins/metadata.xml | 13 |
3 files changed, 95 insertions, 0 deletions
diff --git a/www-plugins/chrome-binary-plugins/ChangeLog b/www-plugins/chrome-binary-plugins/ChangeLog new file mode 100644 index 000000000000..ebe8c6403633 --- /dev/null +++ b/www-plugins/chrome-binary-plugins/ChangeLog @@ -0,0 +1,12 @@ +# ChangeLog for www-plugins/chrome-binary-plugins +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/www-plugins/chrome-binary-plugins/ChangeLog,v 1.1 2012/10/19 20:10:37 zx2c4 Exp $ + +*chrome-binary-plugins-9999 (19 Oct 2012) + + 19 Oct 2012; Jason A. Donenfeld <zx2c4@gentoo.org> + +chrome-binary-plugins-9999.ebuild, +metadata.xml: + New ebuild that imports Chrome's binary plugins into Chromium. Initially a + live ebuild, with ugly live fetching semantics, but might in the future + transition to something that's released in tandem with Chromium, with proper + versioning. diff --git a/www-plugins/chrome-binary-plugins/chrome-binary-plugins-9999.ebuild b/www-plugins/chrome-binary-plugins/chrome-binary-plugins-9999.ebuild new file mode 100644 index 000000000000..1efb967aac37 --- /dev/null +++ b/www-plugins/chrome-binary-plugins/chrome-binary-plugins-9999.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-plugins/chrome-binary-plugins/chrome-binary-plugins-9999.ebuild,v 1.1 2012/10/19 20:10:37 zx2c4 Exp $ + +EAPI=4 + +DESCRIPTION="Binary plugins from Google Chrome for use in Chromium." +HOMEPAGE="http://www.google.com/chrome" +URI_BASE="https://dl.google.com/linux/direct/" +URI_BASE_NAME="google-chrome-unstable_current_" +SRC_URI="" # URI is left blank on live ebuild +RESTRICT="mirror strip" + +LICENSE="google-chrome" +SLOT="0" +KEYWORDS="" # KEYWORDS is also left blank on live ebuild +IUSE="+flash +pdf" + +DEPEND="www-client/chromium" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/opt/google/chrome" + +src_unpack() { + # We have to do this inside of here, since it's a live ebuild. :-( + + if use x86; then + G_ARCH="i386"; + elif use amd64; then + G_ARCH="amd64"; + else + die "This only supports x86 and amd64." + fi + wget "${URI_BASE}${URI_BASE_NAME}${G_ARCH}.deb" + unpack "./${URI_BASE_NAME}${G_ARCH}.deb" + unpack ./data.tar.* +} + +src_install() { + local version flapper + + insinto /usr/lib/chromium-browser/ + + use pdf && doins libpdf.so + + if use flash; then + doins -r PepperFlash + + # Since this is a live ebuild, we're forced to, unfortuantely, + # dynamically construct the command line args for Chromium. + version=$(sed -n 's/.*"version": "\(.*\)",.*/\1/p' PepperFlash/manifest.json) + flapper="${ROOT}usr/lib/chromium-browser/PepperFlash/libpepflashplayer.so" + echo -n "CHROMIUM_FLAGS=\"\${CHROMIUM_FLAGS} " > pepper-flash + echo -n "--ppapi-flash-path=$flapper " >> pepper-flash + echo "--ppapi-flash-version=$version\"" >> pepper-flash + + insinto /etc/chromium/ + doins pepper-flash + fi +} +pkg_postinst() { + use flash || return + + einfo + einfo "To enable Flash for Chromium, source ${ROOT}etc/chromium/pepper-flash" + einfo "inside ${ROOT}etc/chromium/default. You may run this as root:" + einfo + einfo " # echo . ${ROOT}etc/chromium/pepper-flash >> ${ROOT}etc/chromium/default" + einfo +} diff --git a/www-plugins/chrome-binary-plugins/metadata.xml b/www-plugins/chrome-binary-plugins/metadata.xml new file mode 100644 index 000000000000..e75f0ade7570 --- /dev/null +++ b/www-plugins/chrome-binary-plugins/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>chromium</herd> + <maintainer> + <email>zx2c4@gentoo.org</email> + <name>Jason A. Donenfeld</name> + </maintainer> + <use> + <flag name="pdf">Install Chrome's native PDF reader plugin.</flag> + <flag name="flash">Install Chrome's native Pepper Flash.</flag> + </use> +</pkgmetadata> |