summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Nichols <nichoj@gentoo.org>2006-10-20 03:52:24 +0000
committerJoshua Nichols <nichoj@gentoo.org>2006-10-20 03:52:24 +0000
commiteb14c12d941411e6075be57045ddd241aea24373 (patch)
treed7e9f94b1d63051fdef01f113b7631dfdb1f6eaf /eclass/java-vm-2.eclass
parentInitial ebuild for the lsb_release command. It's needed by ltsp. (diff)
downloadgentoo-2-eb14c12d941411e6075be57045ddd241aea24373.tar.gz
gentoo-2-eb14c12d941411e6075be57045ddd241aea24373.tar.bz2
gentoo-2-eb14c12d941411e6075be57045ddd241aea24373.zip
Updated the setting of the Java nsplugin so that it works nicely with the new multilib support in java-nsplugin.
Diffstat (limited to 'eclass/java-vm-2.eclass')
-rw-r--r--eclass/java-vm-2.eclass36
1 files changed, 31 insertions, 5 deletions
diff --git a/eclass/java-vm-2.eclass b/eclass/java-vm-2.eclass
index b537a357fd67..533758b6f17a 100644
--- a/eclass/java-vm-2.eclass
+++ b/eclass/java-vm-2.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.14 2006/10/15 16:18:01 nichoj Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.15 2006/10/20 03:52:24 nichoj Exp $
# -----------------------------------------------------------------------------
# @eclass-begin
@@ -76,18 +76,44 @@ java-vm-2_pkg_postinst() {
einfo "where all JREs and JDKs will be available"
fi
+ echo
+
+ java-vm_check-nsplugin
+ java_mozilla_clean_
+}
+
+java-vm_check-nsplugin() {
+ local libdir
+ if [[ ${VMHANDLE} =~ emul-linux-x86 ]]; then
+ libdir=lib32
+ else
+ libdir=lib
+ fi
# Install a default nsplugin if we don't already have one
if has nsplugin ${IUSE} && use nsplugin; then
- if [[ ! -f /usr/lib/nsbrowser/plugins/javaplugin.so ]]; then
- einfo "You have no system nsplugin set, setting it to ${VMHANDLE}."
- eselect java-nsplugin set ${VMHANDLE}
+ if [[ ! -f /usr/${libdir}/nsbrowser/plugins/javaplugin.so ]]; then
+ einfo "No system nsplugin currently set."
+ java-vm_set-nsplugin
else
einfo "System nsplugin is already set, not changing it."
fi
einfo "You can change nsplugin with eselect java-nsplugin."
fi
+}
- java_mozilla_clean_
+java-vm_set-nsplugin() {
+ local extra_args
+ if use amd64; then
+ if [[ ${VMHANDLE} =~ emul-linux-x86 ]]; then
+ extra_args="32bit"
+ else
+ extra_args="64bit"
+ fi
+ einfo "Setting ${extra_args} nsplugin to ${VMHANDLE}"
+ else
+ einfo "Setting nsplugin to ${VMHANDLE}..."
+ fi
+ eselect java-nsplugin set ${extra_args} ${VMHANDLE}
}
java-vm-2_pkg_prerm() {