| 1 | # Copyright 1999-2011 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.28 2011/12/27 17:55:12 fauli 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 |
5 | # @ECLASS: nsplugins.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # Mozilla Team <mozilla@gentoo.org> |
7 | # Mozilla Team <mozilla@gentoo.org> |
| 8 | # @AUTHOR: |
8 | # @AUTHOR: |
| … | |
… | |
| 10 | # @BLURB: reusable functions for netscape/moz plugin sharing |
10 | # @BLURB: reusable functions for netscape/moz plugin sharing |
| 11 | # @DESCRIPTION: |
11 | # @DESCRIPTION: |
| 12 | # Reusable functions that promote sharing of netscape/moz plugins, also provides |
12 | # Reusable functions that promote sharing of netscape/moz plugins, also provides |
| 13 | # share_plugins_dir function for mozilla applications. |
13 | # share_plugins_dir function for mozilla applications. |
| 14 | |
14 | |
| 15 | inherit eutils |
15 | inherit eutils multilib |
| 16 | |
16 | |
| 17 | DESCRIPTION="Based on the ${ECLASS} eclass" |
17 | DESCRIPTION="Based on the ${ECLASS} eclass" |
| 18 | |
18 | |
| 19 | PLUGINS_DIR="nsbrowser/plugins" |
19 | PLUGINS_DIR="nsbrowser/plugins" |
| 20 | |
20 | |
| … | |
… | |
| 48 | } |
48 | } |
| 49 | |
49 | |
| 50 | # This function installs a plugin with dosym to PLUGINS_DIR. |
50 | # This function installs a plugin with dosym to PLUGINS_DIR. |
| 51 | # First argument should be the plugin file. |
51 | # First argument should be the plugin file. |
| 52 | inst_plugin() { |
52 | inst_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 | |
| 53 | dodir /usr/$(get_libdir)/${PLUGINS_DIR} |
58 | dodir /usr/$(get_libdir)/${PLUGINS_DIR} |
| 54 | dosym ${1} /usr/$(get_libdir)/${PLUGINS_DIR}/$(basename ${1}) |
59 | dosym ${1} /usr/$(get_libdir)/${PLUGINS_DIR}/$(basename ${1}) |
| 55 | } |
60 | } |
| 56 | |
61 | |
| 57 | # This function ensures we use proper plugin path for Gentoo. |
62 | # This function ensures we use proper plugin path for Gentoo. |