/[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.15 Revision 1.16
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.15 2006/10/20 03:52:24 nichoj Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.16 2006/11/11 00:13:22 betelgeuse 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
10# This eclass provides functionality which assists with installing 10# This eclass provides functionality which assists with installing
11# virtual machines, and ensures that they are recognized by java-config. 11# virtual machines, and ensures that they are recognized by java-config.
12# 12#
13# ----------------------------------------------------------------------------- 13# -----------------------------------------------------------------------------
14 14
15inherit eutils 15inherit eutils fdo-mime
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="
30fi 30fi
31 31
32JAVA_VM_CONFIG_DIR="/usr/share/java-config-2/vm" 32JAVA_VM_CONFIG_DIR="/usr/share/java-config-2/vm"
33JAVA_VM_DIR="/usr/lib/jvm" 33JAVA_VM_DIR="/usr/lib/jvm"
34 34
35EXPORT_FUNCTIONS pkg_postinst pkg_prerm 35EXPORT_FUNCTIONS pkg_postinst pkg_prerm pkg_postrm
36 36
37java-vm-2_pkg_postinst() { 37java-vm-2_pkg_postinst() {
38 # Set the generation-2 system VM, if it isn't set 38 # Set the generation-2 system VM, if it isn't set
39 if [[ -z "$(java-config-2 -f)" ]]; then 39 if [[ -z "$(java-config-2 -f)" ]]; then
40 java_set_default_vm_ 40 java_set_default_vm_
78 78
79 echo 79 echo
80 80
81 java-vm_check-nsplugin 81 java-vm_check-nsplugin
82 java_mozilla_clean_ 82 java_mozilla_clean_
83 fdo-mime_desktop_database_update
83} 84}
84 85
85java-vm_check-nsplugin() { 86java-vm_check-nsplugin() {
86 local libdir 87 local libdir
87 if [[ ${VMHANDLE} =~ emul-linux-x86 ]]; then 88 if [[ ${VMHANDLE} =~ emul-linux-x86 ]]; then
120 if [[ "$(java-config -f 2>/dev/null)" == "${VMHANDLE}" ]]; then 121 if [[ "$(java-config -f 2>/dev/null)" == "${VMHANDLE}" ]]; then
121 ewarn "It appears you are removing your system-vm!" 122 ewarn "It appears you are removing your system-vm!"
122 ewarn "Please run java-config -L to list available VMs," 123 ewarn "Please run java-config -L to list available VMs,"
123 ewarn "then use java-config -S to set a new system-vm!" 124 ewarn "then use java-config -S to set a new system-vm!"
124 fi 125 fi
126}
127
128java-vm-2_pkg_postrm() {
129 fdo-mime_desktop_database_update
125} 130}
126 131
127java_set_default_vm_() { 132java_set_default_vm_() {
128 java-config-2 --set-system-vm="${VMHANDLE}" 133 java-config-2 --set-system-vm="${VMHANDLE}"
129 134

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

  ViewVC Help
Powered by ViewVC 1.1.20