/[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.14
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.14 2006/10/15 16:18:01 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
16 16
17DEPEND=" 17DEPEND="
18 =dev-java/java-config-2.0* 18 =dev-java/java-config-2.0*
19 >=sys-apps/portage-2.1" 19 >=sys-apps/portage-2.1"
20RDEPEND=" 20RDEPEND="
21 =dev-java/java-config-2.0*" 21 =dev-java/java-config-2.0*
22
23# If the VM supports generation-1, we need to depend on java-config-1
24if [[ ${JAVA_SUPPORTS_GENERATION_1} == 'true' ]]; then
25 DEPEND="${DEPEND} =dev-java/java-config-1.3*" 22 =dev-java/java-config-1.3*"
26 RDEPEND="${RDEPEND} =dev-java/java-config-1.3*"
27fi
28 23
29export WANT_JAVA_CONFIG=2 24export WANT_JAVA_CONFIG=2
30 25
31if [[ "${SLOT}" != "0" ]]; then 26if [[ "${SLOT}" != "0" ]]; then
32 VMHANDLE=${PN}-${SLOT} 27 VMHANDLE=${PN}-${SLOT}
60 fi 55 fi
61 ewarn "Setting generation-1 system-vm to ${VMHANDLE}" 56 ewarn "Setting generation-1 system-vm to ${VMHANDLE}"
62 java-config-1 --set-system-vm=${P} 2>/dev/null 57 java-config-1 --set-system-vm=${P} 2>/dev/null
63 # dirty check to see if we are upgrading current generation-1 system vm 58 # dirty check to see if we are upgrading current generation-1 system vm
64 elif [[ "${systemvm1}" = ${VMHANDLE}* ]]; then 59 elif [[ "${systemvm1}" = ${VMHANDLE}* ]]; then
65 einfo "Emerging the current generation-1 system-vm..." 60 einfo "Emerging the current generation-1 system-vm..."
66 einfo "Updating its config files." 61 einfo "Updating its config files."
67 java-config-1 --set-system-vm=${P} 2>/dev/null 62 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 63 # dirty check to see if current system vm is a jre - replace it with
69 elif [[ "${systemvm1}" = *jre* ]]; then 64 elif [[ "${systemvm1}" = *jre* ]]; then
70 ewarn "Current generation-1 system-vm is a JRE" 65 ewarn "Current generation-1 system-vm is a JRE"
71 ewarn "For the new and old Java systems to coexist," 66 ewarn "For the new and old Java systems to coexist,"
72 ewarn "the generation-1 system-vm must be a JDK." 67 ewarn "the generation-1 system-vm must be a JDK."
73 ewarn "Setting generation-1 system-vm to ${VMHANDLE}" 68 ewarn "Setting generation-1 system-vm to ${VMHANDLE}"
74 java-config-1 --set-system-vm=${P} 2>/dev/null 69 java-config-1 --set-system-vm=${P} 2>/dev/null
75 fi 70 fi
76 # else... some other VM is being updated, so we don't have to worry 71 # else... some other VM is being updated, so we don't have to worry
77 else 72 else
78 einfo "JREs and 1.5+ JDKs are not supported for use with generation-1." 73 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." 74 einfo "This is because generation-1 is only for use for building packages."
82 fi 77 fi
83 78
84 # Install a default nsplugin if we don't already have one 79 # Install a default nsplugin if we don't already have one
85 if has nsplugin ${IUSE} && use nsplugin; then 80 if has nsplugin ${IUSE} && use nsplugin; then
86 if [[ ! -f /usr/lib/nsbrowser/plugins/javaplugin.so ]]; then 81 if [[ ! -f /usr/lib/nsbrowser/plugins/javaplugin.so ]]; then
82 einfo "You have no system nsplugin set, setting it to ${VMHANDLE}."
87 eselect java-nsplugin set ${VMHANDLE} 83 eselect java-nsplugin set ${VMHANDLE}
84 else
85 einfo "System nsplugin is already set, not changing it."
88 fi 86 fi
87 einfo "You can change nsplugin with eselect java-nsplugin."
89 fi 88 fi
90 89
91 java_mozilla_clean_ 90 java_mozilla_clean_
92} 91}
93 92
135 -e "/^LDPATH=.*lib\\/\\\"/s|\"\\(.*\\)\"|\"\\1${platform}/:\\1${platform}/server/\"|" \ 134 -e "/^LDPATH=.*lib\\/\\\"/s|\"\\(.*\\)\"|\"\\1${platform}/:\\1${platform}/server/\"|" \
136 < ${source_env_file} \ 135 < ${source_env_file} \
137 > ${env_file} || die "sed failed" 136 > ${env_file} || die "sed failed"
138 137
139 echo "VMHANDLE=\"${VMHANDLE}\"" >> ${env_file} 138 echo "VMHANDLE=\"${VMHANDLE}\"" >> ${env_file}
140 139
141 # generation-1 compatibility 140 # generation-1 compatibility
142 # respect both variables for now... 141 # respect both variables for now...
143 if [[ ${JAVA_SUPPORTS_GENERATION_1} == 'true' && ${JAVA_VM_NO_GENERATION1} != 'true' ]]; then 142 if [[ ${JAVA_SUPPORTS_GENERATION_1} == 'true' && ${JAVA_VM_NO_GENERATION1} != 'true' ]]; then
144 einfo "Enabling generation-1 compatibility..." 143 einfo "Enabling generation-1 compatibility..."
145 dodir /etc/env.d/java # generation-1 compatibility 144 dodir /etc/env.d/java # generation-1 compatibility

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

  ViewVC Help
Powered by ViewVC 1.1.20