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

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

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

Revision 1.16 Revision 1.17
8# and xml-rewrite.py because they were so slow 8# and xml-rewrite.py because they were so slow
9# Petteri Räty (betelgeuse@gentoo.org) 9# Petteri Räty (betelgeuse@gentoo.org)
10# 10#
11# Licensed under the GNU General Public License, v2 11# Licensed under the GNU General Public License, v2
12# 12#
13# $Header: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v 1.16 2007/01/28 21:45:38 betelgeuse Exp $ 13# $Header: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v 1.17 2007/01/30 21:51:15 caster Exp $
14 14
15inherit java-utils-2 15inherit java-utils-2
16 16
17# This eclass provides functionality for Java packages which use 17# This eclass provides functionality for Java packages which use
18# ant to build. In particular, it will attempt to fix build.xml files, so that 18# ant to build. In particular, it will attempt to fix build.xml files, so that
23# @variable-default "" 23# @variable-default ""
24# 24#
25# Please see the description in java-utils-2.eclass. 25# Please see the description in java-utils-2.eclass.
26#WANT_ANT_TASKS 26#WANT_ANT_TASKS
27 27
28# We need some tools from javatoolkit. We also need portage 2.1 for phase hooks 28# -----------------------------------------------------------------------------
29DEPEND=">=dev-java/javatoolkit-0.1.5 ${JAVA_PKG_PORTAGE_DEP}" 29# @variable-preinherit WANT_SPLIT_ANT
30# @variable-default ""
31#
32# If set, ant-core dependency specifies version with startup script that
33# honours ANT_TASKS variable, i.e. >=1.7.0. Using WANT_ANT_TASKS implies
34# split-ant already, so you need this only if you manually depend on some
35# external package providing ant tasks and want to use it via ANT_TASKS.
36[[ -n "${WANT_ANT_TASKS}" ]] && WANT_SPLIT_ANT="true"
30 37
38# -----------------------------------------------------------------------------
39# @variable-preinherit JAVA_ANT_DISABLE_ANT_CORE_DEP
40# @variable-default unset for java-pkg-2, true for java-pkg-opt-2
41#
42# Setting this variable non-empty before inheriting java-ant-2 disables adding
43# dev-java/ant-core into DEPEND.
44
45# construct ant-speficic DEPEND
46JAVA_ANT_E_DEPEND=""
31# add ant-core into DEPEND, unless disabled 47# add ant-core into DEPEND, unless disabled; respect WANT_SPLIT_ANT
32[[ "${JAVA_ANT_DISABLE_ANT_CORE_DEP:-true}" ]] || DEPEND="${DEPEND} dev-java/ant-core" 48if [[ -z "${JAVA_ANT_DISABLE_ANT_CORE_DEP}" ]]; then
49 if [[ -n "${WANT_SPLIT_ANT}" ]]; then
50 JAVA_ANT_E_DEPEND="${JAVA_ANT_E_DEPEND} >=dev-java/ant-core-1.7.0"
51 else
52 JAVA_ANT_E_DEPEND="${JAVA_ANT_E_DEPEND} dev-java/ant-core"
53 fi
54fi
33 55
34# add ant tasks specified in WANT_ANT_TASKS to DEPEND 56# add ant tasks specified in WANT_ANT_TASKS to DEPEND
35local ANT_TASKS_DEPEND; 57local ANT_TASKS_DEPEND;
36ANT_TASKS_DEPEND="$(java-pkg_ant-tasks-depend)" 58ANT_TASKS_DEPEND="$(java-pkg_ant-tasks-depend)"
37# check that java-pkg_ant-tasks-depend didn't fail 59# check that java-pkg_ant-tasks-depend didn't fail
38if [[ $? != 0 ]]; then 60if [[ $? != 0 ]]; then
39 eerror "${ANT_TASKS_DEPEND}" 61 eerror "${ANT_TASKS_DEPEND}"
40 die "java-pkg_ant-tasks-depend() failed" 62 die "java-pkg_ant-tasks-depend() failed"
41fi 63fi
42DEPEND="${DEPEND} ${ANT_TASKS_DEPEND}" 64JAVA_ANT_E_DEPEND="${JAVA_ANT_E_DEPEND} ${ANT_TASKS_DEPEND}"
65
66# this eclass must be inherited after java-pkg-2 or java-pkg-opt-2
67# if it's java-pkg-opt-2, ant dependencies are pulled based on USE flag
68if hasq java-pkg-opt-2 ${INHERITED}; then
69 JAVA_ANT_E_DEPEND="${JAVA_PKG_OPT_USE}? ( ${JAVA_ANT_E_DEPEND} )"
70elif ! hasq java-pkg-2 ${INHERITED}; then
71 eerror "java-ant-2 eclass can only be inherited AFTER java-pkg-2 or java-pkg-opt-2"
72fi
73
74# We need some tools from javatoolkit. We also need portage 2.1 for phase hooks
75# and ant dependencies constructed above
76DEPEND=">=dev-java/javatoolkit-0.1.5 ${JAVA_PKG_PORTAGE_DEP} ${JAVA_ANT_E_DEPEND}"
43 77
44# ------------------------------------------------------------------------------ 78# ------------------------------------------------------------------------------
45# @global JAVA_PKG_BSFIX 79# @global JAVA_PKG_BSFIX
46# 80#
47# Should we attempt to 'fix' ant build files to include the source/target 81# Should we attempt to 'fix' ant build files to include the source/target

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

  ViewVC Help
Powered by ViewVC 1.1.20