summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJory Pratt <anarchy@gentoo.org>2013-05-28 03:29:50 +0000
committerJory Pratt <anarchy@gentoo.org>2013-05-28 03:29:50 +0000
commited61998052d4dff9cf4f2748d17342f53703cad3 (patch)
tree22c0725ac630d9bf32590251d1013f80a810292b /eclass/mozextension.eclass
parentfixed a typo, which prevented cuda build (diff)
downloadhistorical-ed61998052d4dff9cf4f2748d17342f53703cad3.tar.gz
historical-ed61998052d4dff9cf4f2748d17342f53703cad3.tar.bz2
historical-ed61998052d4dff9cf4f2748d17342f53703cad3.zip
Ensure plugins/extensions are in correct place for >=firefox{-bin}-21.0
Diffstat (limited to 'eclass/mozextension.eclass')
-rw-r--r--eclass/mozextension.eclass20
1 files changed, 18 insertions, 2 deletions
diff --git a/eclass/mozextension.eclass b/eclass/mozextension.eclass
index c443cc48bf8b..cf103133539a 100644
--- a/eclass/mozextension.eclass
+++ b/eclass/mozextension.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/mozextension.eclass,v 1.8 2013/04/05 15:27:40 floppym Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/mozextension.eclass,v 1.9 2013/05/28 03:29:50 anarchy Exp $
#
# @ECLASS: mozextension.eclass
# @MAINTAINER:
@@ -12,6 +12,18 @@ inherit eutils
DEPEND="app-arch/unzip"
+mozversion_extension_location() {
+ case ${PN} in
+ firefox|firefox-bin)
+ if [[ $(get_version_component_range 1) -ge 21 ]] ; then
+ return 0
+ fi
+ ;;
+ esac
+
+ return 1
+}
+
xpi_unpack() {
local xpi xpiname srcdir
@@ -53,6 +65,10 @@ xpi_install() {
# determine id for extension
emid="$(sed -n -e '/install-manifest/,$ { /em:id/!d; s/.*[\">]\([^\"<>]*\)[\"<].*/\1/; p; q }' "${x}"/install.rdf)" \
|| die "failed to determine extension id"
- insinto "${MOZILLA_FIVE_HOME}"/extensions/${emid}
+ if $(mozversion_extension_location) ; then
+ insinto "${MOZILLA_FIVE_HOME}"/browser/extensions/${emid}
+ else
+ insinto "${MOZILLA_FIVE_HOME}"/extensions/${emid}
+ fi
doins -r "${x}"/* || die "failed to copy extension"
}