/[gentoo-x86]/eclass/nsplugins.eclass
Gentoo

Diff of /eclass/nsplugins.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.26 Revision 1.27
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2009 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/nsplugins.eclass,v 1.26 2011/10/05 15:14:07 scarabeus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/nsplugins.eclass,v 1.27 2011/11/21 16:31:49 anarchy Exp $
4# 4#
5# @ECLASS: nsplugins.eclass
6# @MAINTAINER:
7# Mozilla Team <mozilla@gentoo.org>
8# @AUTHOR:
5# Author: Martin Schlemmer <azarah@gentoo.org> 9# Original Author: Martin Schlemmer <azarah@gentoo.org>
6#
7# Just some re-usable functions for the netscape/moz plugins sharing 10# @BLURB: reusable functions for netscape/moz plugin sharing
11# @DESCRIPTION:
12# Reusable functions that promote sharing of netscape/moz plugins, also provides
13# share_plugins_dir function for mozilla applications.
8 14
9inherit eutils 15inherit eutils
10 16
11DESCRIPTION="Based on the ${ECLASS} eclass" 17DESCRIPTION="Based on the ${ECLASS} eclass"
12 18
45# First argument should be the plugin file. 51# First argument should be the plugin file.
46inst_plugin() { 52inst_plugin() {
47 dodir /usr/$(get_libdir)/${PLUGINS_DIR} 53 dodir /usr/$(get_libdir)/${PLUGINS_DIR}
48 dosym ${1} /usr/$(get_libdir)/${PLUGINS_DIR}/$(basename ${1}) 54 dosym ${1} /usr/$(get_libdir)/${PLUGINS_DIR}/$(basename ${1})
49} 55}
56
57# This function ensures we use proper plugin path for Gentoo.
58# This should only be used by mozilla packages.
59# ${MOZILLA_FIVE_HOME} must be defined in src_install to support
60share_plugins_dir() {
61 if [[ ${PN} == seamonkey ]] ; then
62 rm -rf "${D}"${MOZILLA_FIVE_HOME}/plugins \
63 || die "failed to remove existing plugins dir"
64 fi
65
66 if [[ ${PN} == *-bin ]] ; then
67 PLUGIN_BASE_PATH="/usr/$(get_libdir)"
68 else
69 PLUGIN_BASE_PATH=".."
70 fi
71
72 dosym "${PLUGIN_BASE_PATH}/nsbrowser/plugins" "${MOZILLA_FIVE_HOME}/plugins"
73}

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

  ViewVC Help
Powered by ViewVC 1.1.20