summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorJory Pratt <anarchy@gentoo.org>2011-11-21 16:31:49 +0000
committerJory Pratt <anarchy@gentoo.org>2011-11-21 16:31:49 +0000
commit9e607e3dde51ddb23041a72496ba50929528b866 (patch)
tree3bf4d208ae0311e0b532f4f0c34aa030785dee7a /eclass
parentVersion Bump, #391045, cleaned old, moved to bashcompletion-r1.eclass, sorted... (diff)
downloadhistorical-9e607e3dde51ddb23041a72496ba50929528b866.tar.gz
historical-9e607e3dde51ddb23041a72496ba50929528b866.tar.bz2
historical-9e607e3dde51ddb23041a72496ba50929528b866.zip
assign nsplugins.eclass to mozilla herd, add share_plugins_dir function for mozilla applications.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog6
-rw-r--r--eclass/nsplugins.eclass32
2 files changed, 33 insertions, 5 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index 09b222b7d10a..ea79f01d6ae8 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for eclass directory
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.23 2011/11/21 15:29:36 anarchy Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.24 2011/11/21 16:31:49 anarchy Exp $
+
+ 21 Nov 2011; Jory A. Pratt <anarchy@gentoo.org> nsplugins.eclass:
+ Assign to mozilla herd, add share_plugins_dir function for mozilla
+ applications.
21 Nov 2011; Jory A. Pratt <anarchy@gentoo.org> mozconfig-3.eclass:
Fix handling of crashreporter use.
diff --git a/eclass/nsplugins.eclass b/eclass/nsplugins.eclass
index 247978b05974..d784e6ac7139 100644
--- a/eclass/nsplugins.eclass
+++ b/eclass/nsplugins.eclass
@@ -1,10 +1,16 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/nsplugins.eclass,v 1.26 2011/10/05 15:14:07 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/nsplugins.eclass,v 1.27 2011/11/21 16:31:49 anarchy Exp $
#
-# Author: Martin Schlemmer <azarah@gentoo.org>
-#
-# Just some re-usable functions for the netscape/moz plugins sharing
+# @ECLASS: nsplugins.eclass
+# @MAINTAINER:
+# Mozilla Team <mozilla@gentoo.org>
+# @AUTHOR:
+# Original Author: Martin Schlemmer <azarah@gentoo.org>
+# @BLURB: reusable functions for netscape/moz plugin sharing
+# @DESCRIPTION:
+# Reusable functions that promote sharing of netscape/moz plugins, also provides
+# share_plugins_dir function for mozilla applications.
inherit eutils
@@ -47,3 +53,21 @@ inst_plugin() {
dodir /usr/$(get_libdir)/${PLUGINS_DIR}
dosym ${1} /usr/$(get_libdir)/${PLUGINS_DIR}/$(basename ${1})
}
+
+# This function ensures we use proper plugin path for Gentoo.
+# This should only be used by mozilla packages.
+# ${MOZILLA_FIVE_HOME} must be defined in src_install to support
+share_plugins_dir() {
+ if [[ ${PN} == seamonkey ]] ; then
+ rm -rf "${D}"${MOZILLA_FIVE_HOME}/plugins \
+ || die "failed to remove existing plugins dir"
+ fi
+
+ if [[ ${PN} == *-bin ]] ; then
+ PLUGIN_BASE_PATH="/usr/$(get_libdir)"
+ else
+ PLUGIN_BASE_PATH=".."
+ fi
+
+ dosym "${PLUGIN_BASE_PATH}/nsbrowser/plugins" "${MOZILLA_FIVE_HOME}/plugins"
+}