/[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.33 Revision 1.34
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.33 2011/09/01 14:15:57 caster Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.34 2011/10/11 10:55:06 grobian 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
113 113
114# TODO rename to something more evident, like install_env_file 114# TODO rename to something more evident, like install_env_file
115set_java_env() { 115set_java_env() {
116 debug-print-function ${FUNCNAME} $* 116 debug-print-function ${FUNCNAME} $*
117 117
118 has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}" 118 if has ${EAPI:-0} 0 1 2 && ! use prefix ; then
119 ED="${D}"
120 EPREFIX=""
121 fi
119 122
120 local platform="$(get_system_arch)" 123 local platform="$(get_system_arch)"
121 local env_file="${ED}${JAVA_VM_CONFIG_DIR}/${VMHANDLE}" 124 local env_file="${ED}${JAVA_VM_CONFIG_DIR}/${VMHANDLE}"
122 local old_env_file="${ED}/etc/env.d/java/20${P}" 125 local old_env_file="${ED}/etc/env.d/java/20${P}"
123 if [[ ${1} ]]; then 126 if [[ ${1} ]]; then
154 local java_home=$(source "${env_file}"; echo ${JAVA_HOME}) 157 local java_home=$(source "${env_file}"; echo ${JAVA_HOME})
155 [[ -z ${java_home} ]] && die "No JAVA_HOME defined in ${env_file}" 158 [[ -z ${java_home} ]] && die "No JAVA_HOME defined in ${env_file}"
156 159
157 # Make the symlink 160 # Make the symlink
158 dodir "${JAVA_VM_DIR}" 161 dodir "${JAVA_VM_DIR}"
159 dosym ${java_home} ${JAVA_VM_DIR}/${VMHANDLE} \ 162 dosym ${java_home#${EPREFIX}} ${JAVA_VM_DIR}/${VMHANDLE} \
160 || die "Failed to make VM symlink at ${JAVA_VM_DIR}/${VMHANDLE}" 163 || die "Failed to make VM symlink at ${JAVA_VM_DIR}/${VMHANDLE}"
161} 164}
162 165
163# ----------------------------------------------------------------------------- 166# -----------------------------------------------------------------------------
164# @ebuild-function java-vm_revdep-mask 167# @ebuild-function java-vm_revdep-mask

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34

  ViewVC Help
Powered by ViewVC 1.1.20