/[gentoo-x86]/eclass/java-vm-2.eclass
Gentoo

Diff of /eclass/java-vm-2.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.14 Revision 1.15
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 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/java-vm-2.eclass,v 1.14 2006/10/15 16:18:01 nichoj Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.15 2006/10/20 03:52:24 nichoj Exp $
4 4
5# ----------------------------------------------------------------------------- 5# -----------------------------------------------------------------------------
6# @eclass-begin 6# @eclass-begin
7# @eclass-shortdesc Java Virtual Machine eclass 7# @eclass-shortdesc Java Virtual Machine eclass
8# @eclass-maintainer java@gentoo.org 8# @eclass-maintainer java@gentoo.org
74 einfo "This is because generation-1 is only for use for building packages." 74 einfo "This is because generation-1 is only for use for building packages."
75 einfo "Only generation-2 should be used by end-users," 75 einfo "Only generation-2 should be used by end-users,"
76 einfo "where all JREs and JDKs will be available" 76 einfo "where all JREs and JDKs will be available"
77 fi 77 fi
78 78
79 echo
80
81 java-vm_check-nsplugin
82 java_mozilla_clean_
83}
84
85java-vm_check-nsplugin() {
86 local libdir
87 if [[ ${VMHANDLE} =~ emul-linux-x86 ]]; then
88 libdir=lib32
89 else
90 libdir=lib
91 fi
79 # Install a default nsplugin if we don't already have one 92 # Install a default nsplugin if we don't already have one
80 if has nsplugin ${IUSE} && use nsplugin; then 93 if has nsplugin ${IUSE} && use nsplugin; then
81 if [[ ! -f /usr/lib/nsbrowser/plugins/javaplugin.so ]]; then 94 if [[ ! -f /usr/${libdir}/nsbrowser/plugins/javaplugin.so ]]; then
82 einfo "You have no system nsplugin set, setting it to ${VMHANDLE}." 95 einfo "No system nsplugin currently set."
83 eselect java-nsplugin set ${VMHANDLE} 96 java-vm_set-nsplugin
84 else 97 else
85 einfo "System nsplugin is already set, not changing it." 98 einfo "System nsplugin is already set, not changing it."
86 fi 99 fi
87 einfo "You can change nsplugin with eselect java-nsplugin." 100 einfo "You can change nsplugin with eselect java-nsplugin."
88 fi 101 fi
102}
89 103
90 java_mozilla_clean_ 104java-vm_set-nsplugin() {
105 local extra_args
106 if use amd64; then
107 if [[ ${VMHANDLE} =~ emul-linux-x86 ]]; then
108 extra_args="32bit"
109 else
110 extra_args="64bit"
111 fi
112 einfo "Setting ${extra_args} nsplugin to ${VMHANDLE}"
113 else
114 einfo "Setting nsplugin to ${VMHANDLE}..."
115 fi
116 eselect java-nsplugin set ${extra_args} ${VMHANDLE}
91} 117}
92 118
93java-vm-2_pkg_prerm() { 119java-vm-2_pkg_prerm() {
94 if [[ "$(java-config -f 2>/dev/null)" == "${VMHANDLE}" ]]; then 120 if [[ "$(java-config -f 2>/dev/null)" == "${VMHANDLE}" ]]; then
95 ewarn "It appears you are removing your system-vm!" 121 ewarn "It appears you are removing your system-vm!"

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

  ViewVC Help
Powered by ViewVC 1.1.20