/[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.36
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.36 2006/12/20 22:45:18 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
203 203
204 java-pkg_do_write_ 204 java-pkg_do_write_
205} 205}
206 206
207 207
208# ------------------------------------------------------------------------------
209# @internal-function depend-java-query
210#
211# Wrapper for the depend-java-query binary to enable passing USE in env.
212# Using env variables keeps this eclass working with java-config versions that
213# do not handle use flags.
214# ------------------------------------------------------------------------------
215
216depend-java-query() {
217 USE="${USE}" $(which depend-java-query) "${@}"
218}
208 219
209# ------------------------------------------------------------------------------ 220# ------------------------------------------------------------------------------
210# @ebuild-function java-pkg_regjar 221# @ebuild-function java-pkg_regjar
211# 222#
212# Records an already installed jar in the package.env 223# Records an already installed jar in the package.env
261 fi 272 fi
262 done 273 done
263 274
264 java-pkg_do_write_ 275 java-pkg_do_write_
265} 276}
266
267 277
268# ------------------------------------------------------------------------------ 278# ------------------------------------------------------------------------------
269# @ebuild-function java-pkg_newjar 279# @ebuild-function java-pkg_newjar
270# 280#
271# Installs a jar with a new name 281# Installs a jar with a new name
1292 die "No GCJ support found!" 1302 die "No GCJ support found!"
1293 fi 1303 fi
1294} 1304}
1295 1305
1296java-pkg_ensure-test() { 1306java-pkg_ensure-test() {
1297 if hasq test ${FEATURES} && ! hasq -test ${FEATURES} && ! use test; then 1307 if hasq test ${FEATURES} && ! hasq -test ${FEATURES} \
1308 && hasq test ${IUSE} && ! use test;
1309 then
1298 eerror "You specified FEATURES=test, but USE=test is needed" 1310 eerror "You specified FEATURES=test, but USE=test is needed"
1299 eerror "to pull in the additional dependencies for testing" 1311 eerror "to pull in the additional dependencies for testing"
1300 die "Need USE=test enabled" 1312 die "Need USE=test enabled"
1301 fi 1313 fi
1302} 1314}
1327# if is-java-strict && [[ ! ${DEPEND} =~ "dev-java/ant" ]]; then 1339# if is-java-strict && [[ ! ${DEPEND} =~ "dev-java/ant" ]]; then
1328# java-pkg_announce-qa-violation \ 1340# java-pkg_announce-qa-violation \
1329# "Using eant, but not depending on dev-java/ant or dev-java/ant-core" 1341# "Using eant, but not depending on dev-java/ant or dev-java/ant-core"
1330# fi 1342# fi
1331 1343
1332 local antflags 1344 local antflags="-Dnoget=true"
1333 java-pkg_init-compiler_ 1345 java-pkg_init-compiler_
1334 local compiler="${GENTOO_COMPILER}" 1346 local compiler="${GENTOO_COMPILER}"
1335 1347
1336 local compiler_env="${JAVA_PKG_COMPILER_DIR}/${compiler}" 1348 local compiler_env="${JAVA_PKG_COMPILER_DIR}/${compiler}"
1337 1349
1339 if [[ "${compiler}" != "javac" && -z "${build_compiler}" ]]; then 1351 if [[ "${compiler}" != "javac" && -z "${build_compiler}" ]]; then
1340 die "ANT_BUILD_COMPILER undefined in ${compiler_env}" 1352 die "ANT_BUILD_COMPILER undefined in ${compiler_env}"
1341 fi 1353 fi
1342 1354
1343 if [[ ${compiler} != "javac" ]]; then 1355 if [[ ${compiler} != "javac" ]]; then
1344 antflags="-Dbuild.compiler=${build_compiler}" 1356 antflags="${antflags} -Dbuild.compiler=${build_compiler}"
1345 # Figure out any extra stuff to put on the classpath for compilers aside 1357 # Figure out any extra stuff to put on the classpath for compilers aside
1346 # from javac 1358 # from javac
1347 # ANT_BUILD_COMPILER_DEPS should be something that could be passed to 1359 # ANT_BUILD_COMPILER_DEPS should be something that could be passed to
1348 # java-config -p 1360 # java-config -p
1349 local build_compiler_deps="$(source ${JAVA_PKG_COMPILER_DIR}/${compiler} 1>/dev/null 2>&1; echo ${ANT_BUILD_COMPILER_DEPS})" 1361 local build_compiler_deps="$(source ${JAVA_PKG_COMPILER_DIR}/${compiler} 1>/dev/null 2>&1; echo ${ANT_BUILD_COMPILER_DEPS})"

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

  ViewVC Help
Powered by ViewVC 1.1.20