/[gentoo-x86]/eclass/java-utils-2.eclass
Gentoo

Diff of /eclass/java-utils-2.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.33 Revision 1.45
4# Copyright (c) 2004, Karl Trygve Kalleberg <karltk@gentoo.org> 4# Copyright (c) 2004, Karl Trygve Kalleberg <karltk@gentoo.org>
5# Copyright (c) 2004-2005, Gentoo Foundation 5# Copyright (c) 2004-2005, Gentoo Foundation
6# 6#
7# Licensed under the GNU General Public License, v2 7# Licensed under the GNU General Public License, v2
8# 8#
9# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.33 2006/12/07 02:27:22 flameeyes Exp $ 9# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.45 2007/01/20 20:50:33 betelgeuse Exp $
10 10
11 11
12# ----------------------------------------------------------------------------- 12# -----------------------------------------------------------------------------
13# @eclass-begin 13# @eclass-begin
14# @eclass-shortdesc Java Utility eclass 14# @eclass-shortdesc Java Utility eclass
174 # Create JARDEST if it doesn't exist 174 # Create JARDEST if it doesn't exist
175 dodir ${JAVA_PKG_JARDEST} 175 dodir ${JAVA_PKG_JARDEST}
176 176
177 local jar 177 local jar
178 # for each jar 178 # for each jar
179 for jar in "$@"; do 179 for jar in ${@}; do
180 local jar_basename=$(basename "${jar}") 180 local jar_basename=$(basename "${jar}")
181 181
182 java-pkg_check-versioned-jar ${jar_basename} 182 java-pkg_check-versioned-jar ${jar_basename}
183 183
184 # check if it exists 184 # check if it exists
185 if [[ -e "${jar}" ]] ; then 185 if [[ -e "${jar}" ]] ; then
186 # Don't overwrite if jar has already been installed with the same
187 # name
188 local dest="${D}${JAVA_PKG_JARDEST}/${jar_basename}"
189 if [[ -e "${dest}" ]]; then
190 ewarn "Overwriting ${dest}"
191 fi
192
186 # install it into JARDEST if it's a non-symlink 193 # install it into JARDEST if it's a non-symlink
187 if [[ ! -L "${jar}" ]] ; then 194 if [[ ! -L "${jar}" ]] ; then
188 INSDESTTREE="${JAVA_PKG_JARDEST}" \ 195 INSDESTTREE="${JAVA_PKG_JARDEST}" \
189 doins "${jar}" || die "failed to install ${jar}" 196 doins "${jar}" || die "failed to install ${jar}"
190 java-pkg_append_ JAVA_PKG_CLASSPATH "${JAVA_PKG_JARDEST}/${jar_basename}" 197 java-pkg_append_ JAVA_PKG_CLASSPATH "${JAVA_PKG_JARDEST}/${jar_basename}"
203 210
204 java-pkg_do_write_ 211 java-pkg_do_write_
205} 212}
206 213
207 214
215# ------------------------------------------------------------------------------
216# @internal-function depend-java-query
217#
218# Wrapper for the depend-java-query binary to enable passing USE in env.
219# Using env variables keeps this eclass working with java-config versions that
220# do not handle use flags.
221# ------------------------------------------------------------------------------
222
223depend-java-query() {
224 USE="${USE}" $(which depend-java-query) "${@}"
225}
208 226
209# ------------------------------------------------------------------------------ 227# ------------------------------------------------------------------------------
210# @ebuild-function java-pkg_regjar 228# @ebuild-function java-pkg_regjar
211# 229#
212# Records an already installed jar in the package.env 230# Records an already installed jar in the package.env
243 [[ ${#} -lt 1 ]] && die "at least one argument needed" 261 [[ ${#} -lt 1 ]] && die "at least one argument needed"
244 262
245 java-pkg_init_paths_ 263 java-pkg_init_paths_
246 264
247 local jar jar_dir jar_file 265 local jar jar_dir jar_file
248 for jar in "$@"; do 266 for jar in ${@}; do
249 # TODO use java-pkg_check-versioned-jar 267 # TODO use java-pkg_check-versioned-jar
250 if [[ -e "${jar}" ]]; then 268 if [[ -e "${jar}" || -e "${D}${jar}" ]]; then
269 [[ -d "${jar}" || -d "${D}${jar}" ]] \
270 && die "Called ${FUNCNAME} on a directory $*"
251 # nelchael: we should strip ${D} in this case too, here's why: 271 # nelchael: we should strip ${D} in this case too, here's why:
252 # imagine such call: 272 # imagine such call:
253 # java-pkg_regjar ${D}/opt/java/*.jar 273 # java-pkg_regjar ${D}/opt/java/*.jar
254 # such call will fall into this case (-e ${jar}) and will 274 # such call will fall into this case (-e ${jar}) and will
255 # record paths with ${D} in package.env 275 # record paths with ${D} in package.env
256 java-pkg_append_ JAVA_PKG_CLASSPATH "${jar#${D}}" 276 java-pkg_append_ JAVA_PKG_CLASSPATH "${jar#${D}}"
257 elif [[ -e "${D}${jar}" ]]; then
258 java-pkg_append_ JAVA_PKG_CLASSPATH "${jar#${D}}"
259 else 277 else
260 die "${jar} does not exist" 278 die "${jar} does not exist"
261 fi 279 fi
262 done 280 done
263 281
264 java-pkg_do_write_ 282 java-pkg_do_write_
265} 283}
266
267 284
268# ------------------------------------------------------------------------------ 285# ------------------------------------------------------------------------------
269# @ebuild-function java-pkg_newjar 286# @ebuild-function java-pkg_newjar
270# 287#
271# Installs a jar with a new name 288# Installs a jar with a new name
282 local original_jar="${1}" 299 local original_jar="${1}"
283 local new_jar="${2:-${PN}.jar}" 300 local new_jar="${2:-${PN}.jar}"
284 local new_jar_dest="${T}/${new_jar}" 301 local new_jar_dest="${T}/${new_jar}"
285 302
286 [[ -z ${original_jar} ]] && die "Must specify a jar to install" 303 [[ -z ${original_jar} ]] && die "Must specify a jar to install"
287 [[ ! -f ${original_jar} ]] && die "${original_jar} does not exist!" 304 [[ ! -f ${original_jar} ]] \
305 && die "${original_jar} does not exist or is not a file!"
288 306
289 rm -f "${new_jar_dest}" || die "Failed to remove ${new_jar_dest}" 307 rm -f "${new_jar_dest}" || die "Failed to remove ${new_jar_dest}"
290 cp "${original_jar}" "${new_jar_dest}" \ 308 cp "${original_jar}" "${new_jar_dest}" \
291 || die "Failed to copy ${original_jar} to ${new_jar_dest}" 309 || die "Failed to copy ${original_jar} to ${new_jar_dest}"
292 java-pkg_dojar "${new_jar_dest}" 310 java-pkg_dojar "${new_jar_dest}"
540# @param $1 - filename of launcher to create 558# @param $1 - filename of launcher to create
541# @param $2 - options, as follows: 559# @param $2 - options, as follows:
542# --main the.main.class.too.start 560# --main the.main.class.too.start
543# --jar /the/jar/too/launch.jar or just <name>.jar 561# --jar /the/jar/too/launch.jar or just <name>.jar
544# --java_args 'Extra arguments to pass to java' 562# --java_args 'Extra arguments to pass to java'
545# --pkg_args 'Extra arguments too pass to the package' 563# --pkg_args 'Extra arguments to pass to the package'
546# --pwd 564# --pwd Directory the launcher changes to before executing java
547# -into 565# -into Directory to install the launcher to, instead of /usr/bin
548# -pre 566# -pre Prepend contents of this file to the launcher
549# ------------------------------------------------------------------------------ 567# ------------------------------------------------------------------------------
550java-pkg_dolauncher() { 568java-pkg_dolauncher() {
551 debug-print-function ${FUNCNAME} $* 569 debug-print-function ${FUNCNAME} $*
552 570
553 java-pkg_check-phase install 571 java-pkg_check-phase install
565 local var_tmp="${T}/launcher_variables_tmp" 583 local var_tmp="${T}/launcher_variables_tmp"
566 local target_dir pre 584 local target_dir pre
567 585
568 # Process the other the rest of the arguments 586 # Process the other the rest of the arguments
569 while [[ -n "${1}" && -n "${2}" ]]; do 587 while [[ -n "${1}" && -n "${2}" ]]; do
570 local var=${1} value=${2} 588 local var="${1}" value="${2}"
571 if [[ "${var:0:2}" == "--" ]]; then 589 if [[ "${var:0:2}" == "--" ]]; then
572 local var=${var:2} 590 local var=${var:2}
573 echo "gjl_${var}=\"${value}\"" >> "${var_tmp}" 591 echo "gjl_${var}=\"${value}\"" >> "${var_tmp}"
574 local gjl_${var}="${value}" 592 local gjl_${var}="${value}"
575 elif [[ "${var}" == "-into" ]]; then 593 elif [[ "${var}" == "-into" ]]; then
594 fi 612 fi
595 fi 613 fi
596 614
597 # Write the actual script 615 # Write the actual script
598 echo "#!/bin/bash" > "${target}" 616 echo "#!/bin/bash" > "${target}"
599 [[ -n "${pre}" ]] && [[ -f "${pre}" ]] && cat "${pre}" >> "${target}" 617 if [[ -n "${pre}" ]]; then
618 if [[ -f "${pre}" ]]; then
619 cat "${pre}" >> "${target}"
620 else
621 die "-pre specified file '${pre}' does not exist"
622 fi
623 fi
600 echo "gjl_package=${JAVA_PKG_NAME}" >> "${target}" 624 echo "gjl_package=${JAVA_PKG_NAME}" >> "${target}"
601 cat "${var_tmp}" >> "${target}" 625 cat "${var_tmp}" >> "${target}"
602 rm -f "${var_tmp}" 626 rm -f "${var_tmp}"
603 echo "source /usr/share/java-config-2/launcher/launcher.bash" >> "${target}" 627 echo "source /usr/share/java-config-2/launcher/launcher.bash" >> "${target}"
604 628
714 if [[ "${1}" = "--build-only" ]]; then 738 if [[ "${1}" = "--build-only" ]]; then
715 build_only="true" 739 build_only="true"
716 shift 740 shift
717 fi 741 fi
718 742
743 if [[ "${1}" = "--with-dependencies" ]]; then
744 local deep="--with-dependencies"
745 shift
746 fi
747
719 local target_pkg="${1}" target_jar="${2}" destjar="${3}" 748 local target_pkg="${1}" target_jar="${2}" destjar="${3}"
720 749
721 [[ -z ${target_pkg} ]] && die "Must specify a package" 750 [[ -z ${target_pkg} ]] && die "Must specify a package"
722 751
723 # default destjar to the target jar 752 # default destjar to the target jar
724 [[ -z "${destjar}" ]] && destjar="${target_jar}" 753 [[ -z "${destjar}" ]] && destjar="${target_jar}"
725 754
726 local error_msg="There was a problem getting the classpath for ${target_pkg}." 755 local error_msg="There was a problem getting the classpath for ${target_pkg}."
727 local classpath 756 local classpath
728 classpath="$(java-config --classpath=${target_pkg})" 757 classpath="$(java-config ${deep} --classpath=${target_pkg})"
729 [[ $? != 0 ]] && die ${error_msg} 758 [[ $? != 0 ]] && die ${error_msg}
730 759
731 local jar 760 local jar
732 for jar in ${classpath//:/ }; do 761 for jar in ${classpath//:/ }; do
733 local jar_name=$(basename "${jar}") 762 local jar_name=$(basename "${jar}")
789# (passed to java-config --classpath) 818# (passed to java-config --classpath)
790# ------------------------------------------------------------------------------ 819# ------------------------------------------------------------------------------
791java-pkg_getjars() { 820java-pkg_getjars() {
792 debug-print-function ${FUNCNAME} $* 821 debug-print-function ${FUNCNAME} $*
793 822
794 [[ ${#} -lt 1 || ${#} -gt 2 ]] && die "${FUNCNAME} takes only one or two arguments"
795
796 if [[ "${1}" = "--build-only" ]]; then 823 if [[ "${1}" = "--build-only" ]]; then
797 local build_only="true" 824 local build_only="true"
798 shift 825 shift
799 fi 826 fi
800 827
828 if [[ "${1}" = "--with-dependencies" ]]; then
829 local deep="--with-dependencies"
830 shift
831 fi
832
833 [[ ${#} -ne 1 ]] && die "${FUNCNAME} takes only one argument besides --build-only"
834
801 local classpath pkgs="${1}" 835 local classpath pkgs="${1}"
802 jars="$(java-config --classpath=${pkgs})" 836 jars="$(java-config ${deep} --classpath=${pkgs})"
803 [[ -z "${jars}" ]] && die "java-config --classpath=${pkgs} failed" 837 [[ -z "${jars}" ]] && die "java-config --classpath=${pkgs} failed"
804 debug-print "${pkgs}:${jars}" 838 debug-print "${pkgs}:${jars}"
805 839
806 if [[ -z "${classpath}" ]]; then 840 if [[ -z "${classpath}" ]]; then
807 classpath="${jars}" 841 classpath="${jars}"
999# 1033#
1000# export DEPEND="${DEPEND} ${depstr}" 1034# export DEPEND="${DEPEND} ${depstr}"
1001# export RDEPEND="${RDEPEND} ${depstr}" 1035# export RDEPEND="${RDEPEND} ${depstr}"
1002#} 1036#}
1003 1037
1038# ------------------------------------------------------------------------------
1039# @ebuild-function java-pkg_find-normal-jars
1040#
1041# Find the files with suffix .jar file in the given directory or $WORKDIR
1042#
1043# @param $1 - The directory to search for jar files (default: ${WORKDIR})
1044# ------------------------------------------------------------------------------
1045java-pkg_find-normal-jars() {
1046 local dir=$1
1047 [[ "${dir}" ]] || dir="${WORKDIR}"
1048 local found
1049 for jar in $(find "${dir}" -name "*.jar" -type f); do
1050 echo "${jar}"
1051 found="true"
1052 done
1053 [[ "${found}" ]]
1054 return $?
1055}
1056
1057# ------------------------------------------------------------------------------
1058# @ebuild-function java-pkg_ensure-no-bundled-jars
1059#
1060# Try to locate bundled jar files in ${WORKDIR} and die if found.
1004# This should be used after S has been populated with symlinks to jars 1061# This function should be called after WORKDIR has been populated with symlink
1005# TODO document 1062# to system jar files or bundled jars removed.
1063# ------------------------------------------------------------------------------
1006java-pkg_ensure-no-bundled-jars() { 1064java-pkg_ensure-no-bundled-jars() {
1007 debug-print-function ${FUNCNAME} $* 1065 debug-print-function ${FUNCNAME} $*
1008 pushd ${WORKDIR} >/dev/null 2>/dev/null
1009 1066
1010 local bundled_jars=$(find . -name "*.jar" -type f) 1067 local bundled_jars=$(java-pkg_find-normal-jars)
1011 if [[ -n ${bundled_jars} ]]; then 1068 if [[ -n ${bundled_jars} ]]; then
1012 echo "Bundled jars found:" 1069 echo "Bundled jars found:"
1013 local jar 1070 local jar
1014 for jar in ${bundled_jars}; do 1071 for jar in ${bundled_jars}; do
1015 echo $(pwd)${jar/./} 1072 echo $(pwd)${jar/./}
1016 done 1073 done
1017 die "Bundled jars found!" 1074 die "Bundled jars found!"
1018
1019 fi 1075 fi
1020 popd >/dev/null 2>/dev/null
1021} 1076}
1022 1077
1023# ------------------------------------------------------------------------------ 1078# ------------------------------------------------------------------------------
1024# @internal-function java-pkg_ensure-vm-version-sufficient 1079# @internal-function java-pkg_ensure-vm-version-sufficient
1025# 1080#
1174# @ebuild-function java-pkg_get-target 1229# @ebuild-function java-pkg_get-target
1175# 1230#
1176# Determines what target version should be used, for passing to -target. 1231# Determines what target version should be used, for passing to -target.
1177# If you don't care about lower versions, you can set _WANT_TARGET to the 1232# If you don't care about lower versions, you can set _WANT_TARGET to the
1178# version of your JDK. 1233# version of your JDK.
1179# Remember doing this will mostly like cause things to break.
1180# Doesn't allow it to be lower then the one in depend.
1181# Doesn't allow it to be higher then the active vm.
1182# 1234#
1183# @return string - Either the lowest possible target, or JAVA_PKG_WANT_TARGET 1235# @return string - Either the lowest possible target, or JAVA_PKG_WANT_TARGET
1184# ------------------------------------------------------------------------------ 1236# ------------------------------------------------------------------------------
1185java-pkg_get-target() { 1237java-pkg_get-target() {
1186 local min=$(depend-java-query --get-lowest "${DEPEND} ${RDEPEND}")
1187 if [[ -n "${JAVA_PKG_WANT_TARGET}" ]]; then
1188 local max="$(java-config --select-vm "${GENTOO_VM}" -g PROVIDES_VERSION)"
1189 if version_is_at_least "${min}" "${JAVA_PKG_WANT_TARGET}" && version_is_at_least "${JAVA_PKG_WANT_TARGET}" "${max}"; then
1190 echo ${JAVA_PKG_WANT_TARGET}
1191 else
1192 echo ${min}
1193 fi
1194 else
1195 echo ${min}
1196 fi
1197
1198 #echo ${JAVA_PKG_WANT_TARGET:-$(depend-java-query --get-lowest "${DEPEND}")} 1238 echo ${JAVA_PKG_WANT_TARGET:-$(depend-java-query --get-lowest "${DEPEND} ${RDEPEND}")}
1199} 1239}
1200 1240
1201java-pkg_get-javac() { 1241java-pkg_get-javac() {
1202 debug-print-function ${FUNCNAME} $* 1242 debug-print-function ${FUNCNAME} $*
1203 1243
1292 die "No GCJ support found!" 1332 die "No GCJ support found!"
1293 fi 1333 fi
1294} 1334}
1295 1335
1296java-pkg_ensure-test() { 1336java-pkg_ensure-test() {
1297 if hasq test ${FEATURES} && ! hasq -test ${FEATURES} && ! use test; then 1337 if hasq test ${FEATURES} && ! hasq -test ${FEATURES} \
1338 && hasq test ${IUSE} && ! use test;
1339 then
1298 eerror "You specified FEATURES=test, but USE=test is needed" 1340 eerror "You specified FEATURES=test, but USE=test is needed"
1299 eerror "to pull in the additional dependencies for testing" 1341 eerror "to pull in the additional dependencies for testing"
1300 die "Need USE=test enabled" 1342 die "Need USE=test enabled"
1301 fi 1343 fi
1302} 1344}
1316# ------------------------------------------------------------------------------ 1358# ------------------------------------------------------------------------------
1317# @ebuild-function eant 1359# @ebuild-function eant
1318# 1360#
1319# Ant wrapper function. Will use the appropriate compiler, based on user-defined 1361# Ant wrapper function. Will use the appropriate compiler, based on user-defined
1320# compiler. 1362# compiler.
1363# variables:
1364# EANT_GENTOO_CLASSPATH - calls java-pkg_getjars for the value and adds to the
1365# gentoo.classpath property. Be sure to call
1366# java-ant_rewrite-classpath in src_unpack.
1321# 1367#
1322# ------------------------------------------------------------------------------ 1368# ------------------------------------------------------------------------------
1323eant() { 1369eant() {
1324 debug-print-function ${FUNCNAME} $* 1370 debug-print-function ${FUNCNAME} $*
1325 1371
1327# if is-java-strict && [[ ! ${DEPEND} =~ "dev-java/ant" ]]; then 1373# if is-java-strict && [[ ! ${DEPEND} =~ "dev-java/ant" ]]; then
1328# java-pkg_announce-qa-violation \ 1374# java-pkg_announce-qa-violation \
1329# "Using eant, but not depending on dev-java/ant or dev-java/ant-core" 1375# "Using eant, but not depending on dev-java/ant or dev-java/ant-core"
1330# fi 1376# fi
1331 1377
1332 local antflags 1378 local antflags="-Dnoget=true"
1333 java-pkg_init-compiler_ 1379 java-pkg_init-compiler_
1334 local compiler="${GENTOO_COMPILER}" 1380 local compiler="${GENTOO_COMPILER}"
1335 1381
1336 local compiler_env="${JAVA_PKG_COMPILER_DIR}/${compiler}" 1382 local compiler_env="${JAVA_PKG_COMPILER_DIR}/${compiler}"
1337 1383
1339 if [[ "${compiler}" != "javac" && -z "${build_compiler}" ]]; then 1385 if [[ "${compiler}" != "javac" && -z "${build_compiler}" ]]; then
1340 die "ANT_BUILD_COMPILER undefined in ${compiler_env}" 1386 die "ANT_BUILD_COMPILER undefined in ${compiler_env}"
1341 fi 1387 fi
1342 1388
1343 if [[ ${compiler} != "javac" ]]; then 1389 if [[ ${compiler} != "javac" ]]; then
1344 antflags="-Dbuild.compiler=${build_compiler}" 1390 antflags="${antflags} -Dbuild.compiler=${build_compiler}"
1345 # Figure out any extra stuff to put on the classpath for compilers aside 1391 # Figure out any extra stuff to put on the classpath for compilers aside
1346 # from javac 1392 # from javac
1347 # ANT_BUILD_COMPILER_DEPS should be something that could be passed to 1393 # ANT_BUILD_COMPILER_DEPS should be something that could be passed to
1348 # java-config -p 1394 # java-config -p
1349 local build_compiler_deps="$(source ${JAVA_PKG_COMPILER_DIR}/${compiler} 1>/dev/null 2>&1; echo ${ANT_BUILD_COMPILER_DEPS})" 1395 local build_compiler_deps="$(source ${JAVA_PKG_COMPILER_DIR}/${compiler} 1>/dev/null 2>&1; echo ${ANT_BUILD_COMPILER_DEPS})"
1355 if is-java-strict; then 1401 if is-java-strict; then
1356 einfo "Disabling system classpath for ant" 1402 einfo "Disabling system classpath for ant"
1357 antflags="${antflags} -Dbuild.sysclasspath=ignore" 1403 antflags="${antflags} -Dbuild.sysclasspath=ignore"
1358 fi 1404 fi
1359 1405
1360 if [[ -n ${JAVA_PKG_DEBUG} ]]; then 1406 [[ -n ${JAVA_PKG_DEBUG} ]] && antflags="${antflags} -debug"
1361 antflags="${antflags} -debug" 1407 [[ -n ${PORTAGE_QUIET} ]] && antflags="${antflags} -q"
1408
1409 local gcp="${EANT_GENTOO_CLASSPATH}"
1410
1411 if [[ "${gcp}" ]]; then
1412 local cp="$(java-pkg_getjars ${gcp})"
1413 # It seems ant does not like single quotes around ${cp}
1414 antflags="${antflags} -Dgentoo.classpath=\"${cp}\""
1362 fi 1415 fi
1363 1416
1364 [[ -n ${JAVA_PKG_DEBUG} ]] && echo ant ${antflags} "${@}" 1417 [[ -n ${JAVA_PKG_DEBUG} ]] && echo ant ${antflags} "${@}"
1418 debug-print "Calling ant: ${antflags} ${@}"
1365 ant ${antflags} "${@}" || die "eant failed" 1419 ant ${antflags} "${@}" || die "eant failed"
1366 1420
1367} 1421}
1368 1422
1369# ------------------------------------------------------------------------------ 1423# ------------------------------------------------------------------------------
1439# @return string - Name of the target to create javadocs 1493# @return string - Name of the target to create javadocs
1440# ------------------------------------------------------------------------------ 1494# ------------------------------------------------------------------------------
1441use_doc() { 1495use_doc() {
1442 use doc && echo ${@:-javadoc} 1496 use doc && echo ${@:-javadoc}
1443} 1497}
1498
1444 1499
1445# ------------------------------------------------------------------------------ 1500# ------------------------------------------------------------------------------
1446# @section-end build 1501# @section-end build
1447# ------------------------------------------------------------------------------ 1502# ------------------------------------------------------------------------------
1448 1503
1832# Switch VM if we're allowed to (controlled by JAVA_PKG_ALLOW_VM_CHANGE), and 1887# Switch VM if we're allowed to (controlled by JAVA_PKG_ALLOW_VM_CHANGE), and
1833# verify that the current VM is sufficient. 1888# verify that the current VM is sufficient.
1834# Setup the environment for the VM being used. 1889# Setup the environment for the VM being used.
1835# ------------------------------------------------------------------------------ 1890# ------------------------------------------------------------------------------
1836java-pkg_switch-vm() { 1891java-pkg_switch-vm() {
1892 debug-print-function ${FUNCNAME} $*
1893
1837 if java-pkg_needs-vm; then 1894 if java-pkg_needs-vm; then
1838 # Use the VM specified by JAVA_PKG_FORCE_VM 1895 # Use the VM specified by JAVA_PKG_FORCE_VM
1839 if [[ -n ${JAVA_PKG_FORCE_VM} ]]; then 1896 if [[ -n "${JAVA_PKG_FORCE_VM}" ]]; then
1840 # If you're forcing the VM, I hope you know what your doing... 1897 # If you're forcing the VM, I hope you know what your doing...
1898 debug-print "JAVA_PKG_FORCE_VM used: ${JAVA_PKG_FORCE_VM}"
1841 export GENTOO_VM="${JAVA_PKG_FORCE_VM}" 1899 export GENTOO_VM="${JAVA_PKG_FORCE_VM}"
1842 # if we're allowed to switch the vm... 1900 # if we're allowed to switch the vm...
1843 elif [[ "${JAVA_PKG_ALLOW_VM_CHANGE}" == "yes" ]]; then 1901 elif [[ "${JAVA_PKG_ALLOW_VM_CHANGE}" == "yes" ]]; then
1844 debug-print "depend-java-query: NV_DEPEND: ${JAVA_PKG_NV_DEPEND:-${DEPEND}} VNEED: ${JAVA_PKG_VNEED}" 1902 debug-print "depend-java-query: NV_DEPEND: ${JAVA_PKG_NV_DEPEND:-${DEPEND}} VNEED: ${JAVA_PKG_VNEED}"
1845 if [[ -n ${JAVA_PKG_VNEED} ]]; then 1903 if [[ -n ${JAVA_PKG_VNEED} ]]; then

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

  ViewVC Help
Powered by ViewVC 1.1.20