/[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.11 Revision 1.13
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.11 2006/09/10 20:59:11 betelgeuse Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.13 2006/10/14 20:27:21 swegener 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
60 fi 60 fi
61 ewarn "Setting generation-1 system-vm to ${VMHANDLE}" 61 ewarn "Setting generation-1 system-vm to ${VMHANDLE}"
62 java-config-1 --set-system-vm=${P} 2>/dev/null 62 java-config-1 --set-system-vm=${P} 2>/dev/null
63 # dirty check to see if we are upgrading current generation-1 system vm 63 # dirty check to see if we are upgrading current generation-1 system vm
64 elif [[ "${systemvm1}" = ${VMHANDLE}* ]]; then 64 elif [[ "${systemvm1}" = ${VMHANDLE}* ]]; then
65 einfo "Emerging the current generation-1 system-vm..." 65 einfo "Emerging the current generation-1 system-vm..."
66 einfo "Updating its config files." 66 einfo "Updating its config files."
67 java-config-1 --set-system-vm=${P} 2>/dev/null 67 java-config-1 --set-system-vm=${P} 2>/dev/null
68 # dirty check to see if current system vm is a jre - replace it with 68 # dirty check to see if current system vm is a jre - replace it with
69 elif [[ "${systemvm1}" = *jre* ]]; then 69 elif [[ "${systemvm1}" = *jre* ]]; then
70 ewarn "Current generation-1 system-vm is a JRE" 70 ewarn "Current generation-1 system-vm is a JRE"
71 ewarn "For the new and old Java systems to coexist," 71 ewarn "For the new and old Java systems to coexist,"
72 ewarn "the generation-1 system-vm must be a JDK." 72 ewarn "the generation-1 system-vm must be a JDK."
73 ewarn "Setting generation-1 system-vm to ${VMHANDLE}" 73 ewarn "Setting generation-1 system-vm to ${VMHANDLE}"
74 java-config-1 --set-system-vm=${P} 2>/dev/null 74 java-config-1 --set-system-vm=${P} 2>/dev/null
75 fi 75 fi
76 # else... some other VM is being updated, so we don't have to worry 76 # else... some other VM is being updated, so we don't have to worry
77 else 77 else
78 einfo "JREs and 1.5+ JDKs are not supported for use with generation-1." 78 einfo "JREs and 1.5+ JDKs are not supported for use with generation-1."
79 einfo "This is because generation-1 is only for use for building packages." 79 einfo "This is because generation-1 is only for use for building packages."
82 fi 82 fi
83 83
84 # Install a default nsplugin if we don't already have one 84 # Install a default nsplugin if we don't already have one
85 if has nsplugin ${IUSE} && use nsplugin; then 85 if has nsplugin ${IUSE} && use nsplugin; then
86 if [[ ! -f /usr/lib/nsbrowser/plugins/javaplugin.so ]]; then 86 if [[ ! -f /usr/lib/nsbrowser/plugins/javaplugin.so ]]; then
87 einfo "You have no system nsplugin set, setting it to ${VMHANDLE}."
87 eselect java-nsplugin set ${VMHANDLE} 88 eselect java-nsplugin set ${VMHANDLE}
89 else
90 einfo "System nsplugin is already set, not changing it."
88 fi 91 fi
92 einfo "You can change nsplugin with eselect java-nsplugin."
89 fi 93 fi
90 94
91 java_mozilla_clean_ 95 java_mozilla_clean_
92} 96}
93 97
135 -e "/^LDPATH=.*lib\\/\\\"/s|\"\\(.*\\)\"|\"\\1${platform}/:\\1${platform}/server/\"|" \ 139 -e "/^LDPATH=.*lib\\/\\\"/s|\"\\(.*\\)\"|\"\\1${platform}/:\\1${platform}/server/\"|" \
136 < ${source_env_file} \ 140 < ${source_env_file} \
137 > ${env_file} || die "sed failed" 141 > ${env_file} || die "sed failed"
138 142
139 echo "VMHANDLE=\"${VMHANDLE}\"" >> ${env_file} 143 echo "VMHANDLE=\"${VMHANDLE}\"" >> ${env_file}
140 144
141 # generation-1 compatibility 145 # generation-1 compatibility
142 # respect both variables for now... 146 # respect both variables for now...
143 if [[ ${JAVA_SUPPORTS_GENERATION_1} == 'true' && ${JAVA_VM_NO_GENERATION1} != 'true' ]]; then 147 if [[ ${JAVA_SUPPORTS_GENERATION_1} == 'true' && ${JAVA_VM_NO_GENERATION1} != 'true' ]]; then
144 einfo "Enabling generation-1 compatibility..." 148 einfo "Enabling generation-1 compatibility..."
145 dodir /etc/env.d/java # generation-1 compatibility 149 dodir /etc/env.d/java # generation-1 compatibility

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.13

  ViewVC Help
Powered by ViewVC 1.1.20