/[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.36 Revision 1.37
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.36 2006/12/20 22:45:18 caster Exp $ 9# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.37 2006/12/31 01:39:38 caster 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
1184# @ebuild-function java-pkg_get-target 1184# @ebuild-function java-pkg_get-target
1185# 1185#
1186# Determines what target version should be used, for passing to -target. 1186# Determines what target version should be used, for passing to -target.
1187# If you don't care about lower versions, you can set _WANT_TARGET to the 1187# If you don't care about lower versions, you can set _WANT_TARGET to the
1188# version of your JDK. 1188# version of your JDK.
1189# Remember doing this will mostly like cause things to break.
1190# Doesn't allow it to be lower then the one in depend.
1191# Doesn't allow it to be higher then the active vm.
1192# 1189#
1193# @return string - Either the lowest possible target, or JAVA_PKG_WANT_TARGET 1190# @return string - Either the lowest possible target, or JAVA_PKG_WANT_TARGET
1194# ------------------------------------------------------------------------------ 1191# ------------------------------------------------------------------------------
1195java-pkg_get-target() { 1192java-pkg_get-target() {
1196 local min=$(depend-java-query --get-lowest "${DEPEND} ${RDEPEND}")
1197 if [[ -n "${JAVA_PKG_WANT_TARGET}" ]]; then
1198 local max="$(java-config --select-vm "${GENTOO_VM}" -g PROVIDES_VERSION)"
1199 if version_is_at_least "${min}" "${JAVA_PKG_WANT_TARGET}" && version_is_at_least "${JAVA_PKG_WANT_TARGET}" "${max}"; then
1200 echo ${JAVA_PKG_WANT_TARGET}
1201 else
1202 echo ${min}
1203 fi
1204 else
1205 echo ${min}
1206 fi
1207
1208 #echo ${JAVA_PKG_WANT_TARGET:-$(depend-java-query --get-lowest "${DEPEND}")} 1193 echo ${JAVA_PKG_WANT_TARGET:-$(depend-java-query --get-lowest "${DEPEND} ${RDEPEND}")}
1209} 1194}
1210 1195
1211java-pkg_get-javac() { 1196java-pkg_get-javac() {
1212 debug-print-function ${FUNCNAME} $* 1197 debug-print-function ${FUNCNAME} $*
1213 1198

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37

  ViewVC Help
Powered by ViewVC 1.1.20