/[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.1 Revision 1.4
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.1 2006/06/24 18:36:59 nichoj Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.4 2006/06/30 15:00:07 nichoj Exp $
4# 4#
5# Author: Karl Trygve Kalleberg <karltk@gentoo.org> 5# Author: Karl Trygve Kalleberg <karltk@gentoo.org>
6 6
7inherit eutils 7inherit eutils
8 8
9DEPEND=" 9DEPEND="
10 =dev-java/java-config-2.0* 10 =dev-java/java-config-2.0*
11 =dev-java/java-config-1.3*" 11 =dev-java/java-config-1.3*
12 >=sys-apps/portage-2.1"
12RDEPEND=" 13RDEPEND="
13 =dev-java/java-config-2.0* 14 =dev-java/java-config-2.0*
14 =dev-java/java-config-1.3*" 15 =dev-java/java-config-1.3*"
15 16
16export WANT_JAVA_CONFIG=2 17export WANT_JAVA_CONFIG=2
44 java-config-1 --set-system-vm=${P} 45 java-config-1 --set-system-vm=${P}
45 fi 46 fi
46 # else... some other VM is being updated, so we don't have to worry 47 # else... some other VM is being updated, so we don't have to worry
47 fi 48 fi
48 49
50 if has nsplugin ${IUSE} && use nsplugin; then
51 if [[ ! -f /usr/lib/nsbrowser/plugins/javaplugin.so ]]; then
52 eselect java-nsplugin set ${VMHANDLE}
53 fi
54 fi
55
49 java_mozilla_clean_ 56 java_mozilla_clean_
50} 57}
51 58
52java-vm-2_pkg_prerm() { 59java-vm-2_pkg_prerm() {
53 if [[ "$(java-config -f)" == "${VMHANDLE}" ]]; then 60 if [[ "$(java-config -f)" == "${VMHANDLE}" ]]; then
75# TODO rename to something more evident, like install_env_file 82# TODO rename to something more evident, like install_env_file
76set_java_env() { 83set_java_env() {
77 local platform="$(get_system_arch)" 84 local platform="$(get_system_arch)"
78 local env_file="${D}${JAVA_VM_CONFIG_DIR}/${VMHANDLE}" 85 local env_file="${D}${JAVA_VM_CONFIG_DIR}/${VMHANDLE}"
79 local old_env_file="${D}/etc/env.d/java/20${P}" 86 local old_env_file="${D}/etc/env.d/java/20${P}"
80 local source_env_file="${FILESDIR}/${VMHANDLE}" 87 local source_env_file="${FILESDIR}/${VMHANDLE}.env"
81 88
82 if [[ ! -f ${source_env_file} ]]; then 89 if [[ ! -f ${source_env_file} ]]; then
83 die "Unable to find the env file: ${source_env_file}" 90 die "Unable to find the env file: ${source_env_file}"
84 fi 91 fi
85 92
127 134
128 if [ ! -f "${D}/${plugin}" ] ; then 135 if [ ! -f "${D}/${plugin}" ] ; then
129 die "Cannot find mozilla plugin at ${D}/${plugin}" 136 die "Cannot find mozilla plugin at ${D}/${plugin}"
130 fi 137 fi
131 138
132 local plugin_dir=$(java_get_plugin_dir_) 139 local plugin_dir=/usr/share/java-config-2/nsplugin
133 dodir ${plugin_dir} 140 dodir ${plugin_dir}
134 dosym ${plugin} ${plugin_dir}/javaplugin.so 141 dosym ${plugin} ${plugin_dir}/${VMHANDLE}-javaplugin.so
135} 142}
136 143
137java_mozilla_clean_() { 144java_mozilla_clean_() {
138 # Because previously some ebuilds installed symlinks outside of pkg_install 145 # Because previously some ebuilds installed symlinks outside of pkg_install
139 # and are left behind, which forces you to manualy remove them to select the 146 # and are left behind, which forces you to manualy remove them to select the

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.20