/[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.30
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2012 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.30 2012/06/02 19:16:31 zmedico 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 multilib
10 16
11DESCRIPTION="Based on the ${ECLASS} eclass" 17DESCRIPTION="Based on the ${ECLASS} eclass"
12 18
13PLUGINS_DIR="nsbrowser/plugins" 19PLUGINS_DIR="nsbrowser/plugins"
14 20
42} 48}
43 49
44# This function installs a plugin with dosym to PLUGINS_DIR. 50# This function installs a plugin with dosym to PLUGINS_DIR.
45# First argument should be the plugin file. 51# First argument should be the plugin file.
46inst_plugin() { 52inst_plugin() {
53 if [[ -z "${1}" ]]; then
54 eerror "The plugin file \"${1}\" does not exist."
55 die "No such file or directory."
56 fi
57
47 dodir /usr/$(get_libdir)/${PLUGINS_DIR} 58 dodir /usr/$(get_libdir)/${PLUGINS_DIR}
48 dosym ${1} /usr/$(get_libdir)/${PLUGINS_DIR}/$(basename ${1}) 59 dosym ${1} /usr/$(get_libdir)/${PLUGINS_DIR}/$(basename ${1})
49} 60}
61
62# This function ensures we use proper plugin path for Gentoo.
63# This should only be used by mozilla packages.
64# ${MOZILLA_FIVE_HOME} must be defined in src_install to support
65share_plugins_dir() {
66 if [[ ${PN} == seamonkey ]] ; then
67 rm -rf "${D}"${MOZILLA_FIVE_HOME}/plugins \
68 || die "failed to remove existing plugins dir"
69 fi
70
71 if [[ ${PN} == *-bin ]] ; then
72 PLUGIN_BASE_PATH="/usr/$(get_libdir)"
73 else
74 PLUGIN_BASE_PATH=".."
75 fi
76
77 dosym "${PLUGIN_BASE_PATH}/nsbrowser/plugins" "${MOZILLA_FIVE_HOME}/plugins"
78}

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

  ViewVC Help
Powered by ViewVC 1.1.20