app-crypt/monkeysphere: add BDEPEND and RDEPEND to DEPEND
[portage-overlay.git] / app-crypt / xul-ext-monkeysphere / xul-ext-monkeysphere-0.8.ebuild
1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=5
6
7 inherit eutils
8
9 DESCRIPTION="Iceweasel/Firefox extension for using Monkeysphere on the web"
10 HOMEPAGE="http://web.monkeysphere.info/"
11
12 SRC_URI="http://archive.monkeysphere.info/debian/pool/monkeysphere/x/xul-ext-monkeysphere/xul-ext-monkeysphere_${PV}.orig.tar.gz"
13
14 LICENSE="GPL-3"
15 SLOT="0"
16 KEYWORDS="~amd64 ~x86"
17 IUSE=""
18
19 BDEPEND="media-gfx/inkscape"
20 RDEPEND="app-crypt/msva-perl"
21 DEPEND="|| ( www-client/firefox-bin www-client/firefox )
22         ${BDEPEND}
23         ${RDEPEND}"
24
25 src_install(){
26         local emid=$(sed -n 's/.*<em:id>\(.*\)<\/em:id>.*/\1/p' ${S}/install.rdf | head -1)
27         local cleanup=( NOTES Changelog Makefile install.rdf.template monkeysphere.xpi chrome/content/bad.svg  chrome/content/broken.svg  chrome/content/error.svg )
28
29         # Delete files not to be installed from $S
30         for i in "${cleanup[@]}"; do rm "${S}/$i"; done;
31
32         local extinstalldir=()
33
34         if has_version '>=www-client/firefox-bin-1.0'; then
35                 einfo "Binary version of Firefox found"
36                 extinstalldir+=/opt/firefox/extensions/${emid}
37         fi
38
39         if has_version '>=www-client/firefox-1.0'; then
40                 einfo "Source version of Firefox found"
41                 extinstalldir+=/usr/$(get_libdir)/firefox/browser/extensions/${emid}
42         fi
43
44         for i in "${extinstalldir[@]}"; do
45                 dodir "${i}"
46                 insinto "${i}"
47                 doins -r "${S}"/*
48         done;
49 }