/[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.18 Revision 1.23
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.18 2007/10/09 10:18:14 ali_bush Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.23 2008/08/29 19:10:19 caster 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
146 echo ${sarch} 146 echo ${sarch}
147} 147}
148 148
149# TODO rename to something more evident, like install_env_file 149# TODO rename to something more evident, like install_env_file
150set_java_env() { 150set_java_env() {
151 debug-print-function ${FUNCNAME} $*
151 local platform="$(get_system_arch)" 152 local platform="$(get_system_arch)"
152 local env_file="${D}${JAVA_VM_CONFIG_DIR}/${VMHANDLE}" 153 local env_file="${D}${JAVA_VM_CONFIG_DIR}/${VMHANDLE}"
153 local old_env_file="${D}/etc/env.d/java/20${P}" 154 local old_env_file="${D}/etc/env.d/java/20${P}"
155 if [[ ${1} ]]; then
156 local source_env_file="${1}"
157 else
154 local source_env_file="${FILESDIR}/${VMHANDLE}.env" 158 local source_env_file="${FILESDIR}/${VMHANDLE}.env"
159 fi
155 160
156 if [[ ! -f ${source_env_file} ]]; then 161 if [[ ! -f ${source_env_file} ]]; then
157 die "Unable to find the env file: ${source_env_file}" 162 die "Unable to find the env file: ${source_env_file}"
158 fi 163 fi
159 164
193 # Make the symlink 198 # Make the symlink
194 dosym ${java_home} ${JAVA_VM_DIR}/${VMHANDLE} \ 199 dosym ${java_home} ${JAVA_VM_DIR}/${VMHANDLE} \
195 || die "Failed to make VM symlink at ${JAVA_VM_DIR}/${VMHANDLE}" 200 || die "Failed to make VM symlink at ${JAVA_VM_DIR}/${VMHANDLE}"
196} 201}
197 202
203# -----------------------------------------------------------------------------
204# @ebuild-function java-vm_revdep-mask
205#
206# Installs a revdep-rebuild control file which SEARCH_DIR_MASK set to the path
207# where the VM is installed. Prevents pointless rebuilds - see bug #177925.
208# Also gives a notice to the user.
209#
210# @example
211# java-vm_revdep-mask
212# java-vm_revdep-mask /path/to/jdk/
213#
214# @param $1 - Path of the VM (defaults to /opt/${P} if not set)
215# ------------------------------------------------------------------------------
216java-vm_revdep-mask() {
217 local VMROOT="${1-/opt/${P}}"
218
219 dodir /etc/revdep-rebuild/
220 echo "SEARCH_DIRS_MASK=\"${VMROOT}\""> "${D}/etc/revdep-rebuild/61-${VMHANDLE}"
221
222 elog "A revdep-rebuild control file was installed to prevent reinstalls due to"
223 elog "missing dependencies (see bug #177925 for more info). Note that some parts"
224 elog "of the JVM may require dependencies that are pulled only through respective"
225 elog "USE flags (typically X, alsa, odbc) and some Java code may fail without them."
226}
198 227
199java_get_plugin_dir_() { 228java_get_plugin_dir_() {
200 echo /usr/$(get_libdir)/nsbrowser/plugins 229 echo /usr/$(get_libdir)/nsbrowser/plugins
201} 230}
202 231
203install_mozilla_plugin() { 232install_mozilla_plugin() {
204 local plugin=${1} 233 local plugin="${1}"
234 local variant="${2}"
205 235
206 if [ ! -f "${D}/${plugin}" ] ; then 236 if [[ ! -f "${D}/${plugin}" ]]; then
207 die "Cannot find mozilla plugin at ${D}/${plugin}" 237 die "Cannot find mozilla plugin at ${D}/${plugin}"
208 fi 238 fi
209 239
240 if [[ -n "${variant}" ]]; then
241 variant="-${variant}"
242 fi
243
210 local plugin_dir=/usr/share/java-config-2/nsplugin 244 local plugin_dir="/usr/share/java-config-2/nsplugin"
211 dodir ${plugin_dir} 245 dodir "${plugin_dir}"
212 dosym ${plugin} ${plugin_dir}/${VMHANDLE}-javaplugin.so 246 dosym "${plugin}" "${plugin_dir}/${VMHANDLE}${variant}-javaplugin.so"
213} 247}
214 248
215java_mozilla_clean_() { 249java_mozilla_clean_() {
216 # Because previously some ebuilds installed symlinks outside of pkg_install 250 # Because previously some ebuilds installed symlinks outside of pkg_install
217 # and are left behind, which forces you to manualy remove them to select the 251 # and are left behind, which forces you to manualy remove them to select the

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.23

  ViewVC Help
Powered by ViewVC 1.1.20