/[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.5 Revision 1.35
1# eclass for ant based Java packages 1# eclass for ant based Java packages
2# 2#
3# Copyright (c) 2004-2005, Thomas Matthijs <axxo@gentoo.org> 3# Copyright (c) 2004-2005, Thomas Matthijs <axxo@gentoo.org>
4# Copyright (c) 2004-2005, Gentoo Foundation 4# Copyright (c) 2004-2005, Gentoo Foundation
5# Changes:
6# May 2007:
7# Made bsfix make one pass for all things and add some glocal targets for
8# setting up the whole thing. Contributed by kiorky
9# (kiorky@cryptelium.net).
10# December 2006:
11# I pretty much rewrote the logic of the bsfix functions
12# and xml-rewrite.py because they were so slow
13# Petteri R├Ąty (betelgeuse@gentoo.org)
5# 14#
6# Licensed under the GNU General Public License, v2 15# Licensed under the GNU General Public License, v2
7# 16#
17# $Header: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v 1.35 2008/06/20 10:32:15 ali_bush Exp $
8 18
9inherit java-utils-2 19inherit java-utils-2
10 20
11# This eclass provides functionality for Java packages which use 21# This eclass provides functionality for Java packages which use
12# ant to build. In particular, it will attempt to fix build.xml files, so that 22# ant to build. In particular, it will attempt to fix build.xml files, so that
13# they use the appropriate 'target' and 'source' attributes. 23# they use the appropriate 'target' and 'source' attributes.
14 24
25# -----------------------------------------------------------------------------
26# @variable-preinherit WANT_ANT_TASKS
27# @variable-default ""
28#
29# Please see the description in java-utils-2.eclass.
30#WANT_ANT_TASKS
31
32# -----------------------------------------------------------------------------
33# @variable-preinherit JAVA_ANT_DISABLE_ANT_CORE_DEP
34# @variable-default unset for java-pkg-2, true for java-pkg-opt-2
35#
36# Setting this variable non-empty before inheriting java-ant-2 disables adding
37# dev-java/ant-core into DEPEND.
38
39# construct ant-speficic DEPEND
40JAVA_ANT_E_DEPEND=""
41# add ant-core into DEPEND, unless disabled
42if [[ -z "${JAVA_ANT_DISABLE_ANT_CORE_DEP}" ]]; then
43 JAVA_ANT_E_DEPEND="${JAVA_ANT_E_DEPEND} >=dev-java/ant-core-1.7.0"
44fi
45
46# add ant tasks specified in WANT_ANT_TASKS to DEPEND
47local ANT_TASKS_DEPEND;
48ANT_TASKS_DEPEND="$(java-pkg_ant-tasks-depend)"
49# check that java-pkg_ant-tasks-depend didn't fail
50if [[ $? != 0 ]]; then
51 eerror "${ANT_TASKS_DEPEND}"
52 die "java-pkg_ant-tasks-depend() failed"
53fi
54JAVA_ANT_E_DEPEND="${JAVA_ANT_E_DEPEND} ${ANT_TASKS_DEPEND}"
55
56# this eclass must be inherited after java-pkg-2 or java-pkg-opt-2
57# if it's java-pkg-opt-2, ant dependencies are pulled based on USE flag
58if hasq java-pkg-opt-2 ${INHERITED}; then
59 JAVA_ANT_E_DEPEND="${JAVA_PKG_OPT_USE}? ( ${JAVA_ANT_E_DEPEND} )"
60elif ! hasq java-pkg-2 ${INHERITED}; then
61 eerror "java-ant-2 eclass can only be inherited AFTER java-pkg-2 or java-pkg-opt-2"
62fi
63
15# We need some tools from javatoolkit. We also need portage 2.1 for phase hooks 64# We need some tools from javatoolkit. We also need portage 2.1 for phase hooks
65# and ant dependencies constructed above
16DEPEND=">=dev-java/javatoolkit-0.1.5 ${JAVA_PKG_PORTAGE_DEP}" 66DEPEND=">=dev-java/javatoolkit-0.2.0-r1 ${JAVA_PKG_PORTAGE_DEP} ${JAVA_ANT_E_DEPEND}"
17 67
18# ------------------------------------------------------------------------------ 68# ------------------------------------------------------------------------------
19# @global JAVA_ANT_BSFIX 69# @global JAVA_PKG_BSFIX
20# 70#
21# Should we attempt to 'fix' ant build files to include the source/target 71# Should we attempt to 'fix' ant build files to include the source/target
22# attributes when calling javac? 72# attributes when calling javac?
23# 73#
24# default: on 74# default: on
25# ------------------------------------------------------------------------------ 75# ------------------------------------------------------------------------------
26JAVA_ANT_BSFIX=${JAVA_PKG_BSFIX:="on"} 76JAVA_PKG_BSFIX=${JAVA_PKG_BSFIX:-"on"}
27 77
28# ------------------------------------------------------------------------------ 78# ------------------------------------------------------------------------------
29# @global JAVA_ANT_BSFIX_ALL 79# @global JAVA_PKG_BSFIX_ALL
30# 80#
31# If we're fixing build files, should we try to fix all the ones we can find? 81# If we're fixing build files, should we try to fix all the ones we can find?
32# 82#
33# default: yes 83# default: yes
34# ------------------------------------------------------------------------------ 84# ------------------------------------------------------------------------------
35JAVA_ANT_BSFIX_ALL=${JAVA_PKG_BSFIX_ALL:="yes"} 85JAVA_PKG_BSFIX_ALL=${JAVA_PKG_BSFIX_ALL:-"yes"}
36 86
37# ------------------------------------------------------------------------------ 87# ------------------------------------------------------------------------------
38# @global JAVA_PKG_BSFIX_NAME 88# @global JAVA_PKG_BSFIX_NAME
39# 89#
40# Filename of build files to fix/search for 90# Filename of build files to fix/search for
41# 91#
42# default: build.xml 92# default: build.xml
43# ------------------------------------------------------------------------------ 93# ------------------------------------------------------------------------------
44JAVA_PKG_BSFIX_NAME=${JAVA_PKG_BSFIX_NAME:="build.xml"} 94JAVA_PKG_BSFIX_NAME=${JAVA_PKG_BSFIX_NAME:-"build.xml"}
45 95
46# ------------------------------------------------------------------------------ 96# ------------------------------------------------------------------------------
47# @global JAVA_ANT_BSFIX_TARGETS_TAGS 97# @global JAVA_PKG_BSFIX_TARGETS_TAGS
48# 98#
49# Targets to fix the 'source' attribute in 99# Targets to fix the 'source' attribute in
50# 100#
51# default: javac xjavac javac.preset 101# default: javac xjavac javac.preset
52# ------------------------------------------------------------------------------ 102# ------------------------------------------------------------------------------
53JAVA_ANT_BSFIX_TARGET_TAGS=${JAVA_PKG_BSFIX_TARGET_TAGS:="javac xjavac javac.preset"} 103JAVA_PKG_BSFIX_TARGET_TAGS=${JAVA_PKG_BSFIX_TARGET_TAGS:-"javac xjavac javac.preset"}
54 104
55# ------------------------------------------------------------------------------ 105# ------------------------------------------------------------------------------
56# @global JAVA_ANT_BSFIX_SOURCE_TAGS 106# @global JAVA_PKG_BSFIX_SOURCE_TAGS
57# 107#
58# Targets to fix the 'target' attribute in 108# Targets to fix the 'target' attribute in
59# 109#
60# default: javacdoc javac xjavac javac.preset 110# default: javacdoc javac xjavac javac.preset
61# ------------------------------------------------------------------------------ 111# ------------------------------------------------------------------------------
62JAVA_ANT_BSFIX_SOURCE_TAGS=${JAVA_PKG_BSFIX_SOURCE_TAGS:="javadoc javac xjavac javac.preset"} 112JAVA_PKG_BSFIX_SOURCE_TAGS=${JAVA_PKG_BSFIX_SOURCE_TAGS:-"javadoc javac xjavac javac.preset"}
63 113
64# ------------------------------------------------------------------------------ 114# ------------------------------------------------------------------------------
65# @public java-ant_src_unpack 115# @global JAVA_ANT_CLASSPATH_TAGS
66# 116#
67# Unpacks the source, and attempts to fix build files. 117# Targets to add the classpath attribute to
68# ------------------------------------------------------------------------------
69post_src_unpack() {
70 if java-pkg_func-exists ant_src_unpack; then
71 java-pkg_announce-qa-violation "Using old ant_src_unpack. Should be src_unpack"
72 ant_src_unpack
73 fi
74 java-ant_bsfix
75}
76
77# ------------------------------------------------------------------------------
78# @private ant_src_unpack
79# 118#
80# Helper function which does the actual unpacking 119# default: javac xjavac
81# ------------------------------------------------------------------------------ 120# ------------------------------------------------------------------------------
82# TODO maybe use base.eclass for some patching love? 121JAVA_ANT_CLASSPATH_TAGS="javac xjavac"
83#ant_src_unpack() { 122
84# debug-print-function ${FUNCNAME} $* 123# ------------------------------------------------------------------------------
85# if [[ -n "${A}" ]]; then 124# @global JAVA_ANT_IGNORE_SYSTEM_CLASSES
86# unpack ${A} 125#
87# fi 126# Rewrites available tasks to ignore ant classpath.
88#} 127#
128# default: off
129# ------------------------------------------------------------------------------
89 130
90# ------------------------------------------------------------------------------ 131# ------------------------------------------------------------------------------
91# @private java-ant_bsfix 132# @private java-ant_bsfix
92# 133#
93# Attempts to fix build files. The following variables will affect its behavior 134# Attempts to fix build files. The following variables will affect its behavior
102 [[ "${JAVA_PKG_BSFIX}" != "on" ]] && return 143 [[ "${JAVA_PKG_BSFIX}" != "on" ]] && return
103 if ! java-pkg_needs-vm; then 144 if ! java-pkg_needs-vm; then
104 echo "QA Notice: Package is using java-ant, but doesn't depend on a Java VM" 145 echo "QA Notice: Package is using java-ant, but doesn't depend on a Java VM"
105 fi 146 fi
106 147
107 cd "${S}" 148 pushd "${S}" >/dev/null
108 149
109 local find_args="-type f" 150 local find_args=""
110 if [[ "${JAVA_PKG_BSFIX_ALL}" == "yes" ]]; then 151 [[ "${JAVA_PKG_BSFIX_ALL}" == "yes" ]] || find_args="-maxdepth 1"
152
111 find_args="${find_args} -name ${JAVA_PKG_BSFIX_NAME// / -o -name }" 153 find_args="${find_args} -type f -name ${JAVA_PKG_BSFIX_NAME// / -o -name } "
112 else
113 find_args="${find_args} -maxdepth 1 -name ${JAVA_PKG_BSFIX_NAME// / -o -name } "
114 fi
115 154
116 local i=0 155 # This voodoo is done for paths with spaces
117 local -a bsfix_these 156 local bsfix_these
118 while read line; do 157 while read line; do
119 [[ -z ${line} ]] && continue 158 [[ -z ${line} ]] && continue
120 bsfix_these[${i}]="${line}" 159 bsfix_these="${bsfix_these} '${line}'"
121 let i+=1
122 done <<-EOF 160 done <<-EOF
123 $(find . ${find_args}) 161 $(find . ${find_args})
124 EOF 162 EOF
125 163
126 for (( i = 0 ; i < ${#bsfix_these[@]} ; i++ )); do 164 [[ "${bsfix_these// /}" ]] && eval java-ant_bsfix_files ${bsfix_these}
127 local file="${bsfix_these[${i}]}"
128 java-ant_bsfix_one "${file}"
129 done
130}
131 165
166 popd > /dev/null
167}
168
169_bsfix_die() {
170 if has_version dev-python/pyxml; then
171 eerror "If the output above contains:"
172 eerror "ImportError:"
173 eerror "/usr/lib/python2.4/site-packages/_xmlplus/parsers/pyexpat.so:"
174 eerror "undefined symbol: PyUnicodeUCS2_DecodeUTF8"
175 eerror "Try re-emerging dev-python/pyxml"
176 die ${1} " Look at the eerror message above"
177 else
178 die ${1}
179 fi
180}
181
132# ------------------------------------------------------------------------------ 182# ------------------------------------------------------------------------------
133# @public java-ant_bsfix_one 183# @public java-ant_bsfix_files
134# 184#
135# Attempts to fix named build file. The following variables will affect its behavior 185# Attempts to fix named build files. The following variables will affect its behavior
136# as listed above: 186# as listed above:
137# JAVA_PKG_BSFIX_SOURCE_TAGS 187# JAVA_PKG_BSFIX_SOURCE_TAGS
138# JAVA_PKG_BSFIX_TARGET_TAGS 188# JAVA_PKG_BSFIX_TARGET_TAGS
189# JAVA_ANT_REWRITE_CLASSPATH
190# JAVA_ANT_JAVADOC_INPUT_DIRS: Where we can find java sources for javadoc
191# input. Can be a space separated list of
192# directories
193# JAVA_ANT_BSFIX_EXTRA_ARGS: You can use this to pass extra variables to the
194# rewriter if you know what you are doing.
195#
196# If JAVA_ANT_JAVADOC_INPUT_DIRS is set, we will turn on the adding of a basic
197# javadoc target to the ant's build.xml with the javadoc xml-rewriter feature.
198# Then we will set EANT DOC TARGET to the added javadoc target
199# NOTE: the variable JAVA_ANT_JAVADOC_OUTPUT_DIR points where we will
200# generate the javadocs. This is a read-only variable, dont change it.
201
202# When changing this function, make sure that it works with paths with spaces in
203# them.
139# ------------------------------------------------------------------------------ 204# ------------------------------------------------------------------------------
140java-ant_bsfix_one() { 205java-ant_bsfix_files() {
141 debug-print-function ${FUNCNAME} $* 206 debug-print-function ${FUNCNAME} $*
142 207
143 if [ -z "${1}" ]; then 208 [[ ${#} = 0 ]] && die "${FUNCNAME} called without arguments"
144 eerror "java-ant_bsfix_one needs one argument"
145 die "java-ant_bsfix_one needs one argument"
146 fi
147 209
148 local want_source="$(java-pkg_get-source)" 210 local want_source="$(java-pkg_get-source)"
149 local want_target="$(java-pkg_get-target)" 211 local want_target="$(java-pkg_get-target)"
150 212
151 debug-print "bsfix_one: target: ${want_target} source: ${want_source}" 213 debug-print "${FUNCNAME}: target: ${want_target} source: ${want_source}"
152 214
153 if [ -z "${want_source}" -o -z "${want_target}" ]; then 215 if [ -z "${want_source}" -o -z "${want_target}" ]; then
154 eerror "Could not find valid -source/-target values" 216 eerror "Could not find valid -source/-target values"
155 eerror "Please file a bug about this on bugs.gentoo.org" 217 eerror "Please file a bug about this on bugs.gentoo.org"
156 die "Could not find valid -source/-target values" 218 die "Could not find valid -source/-target values"
157 else 219 else
158 local file="${1}" 220 local files
159 echo "Rewriting ${file}"
160 debug-print "bsfix: ${file}"
161 221
222 for file in "${@}"; do
223 debug-print "${FUNCNAME}: ${file}"
224
225 if [[ -n "${JAVA_PKG_DEBUG}" ]]; then
162 cp "${file}" "${file}.orig" || die "failed to copy ${file}" 226 cp "${file}" "${file}.orig" || die "failed to copy ${file}"
227 fi
163 228
164 chmod u+w "${file}" 229 if [[ ! -w "${file}" ]]; then
230 chmod u+w "${file}" || die "chmod u+w ${file} failed"
231 fi
165 232
166 xml-rewrite.py -f "${file}" -c -e ${JAVA_PKG_BSFIX_SOURCE_TAGS// / -e } -a source -v ${want_source} || die "xml-rewrite failed: ${file}" 233 files="${files} -f '${file}'"
167 xml-rewrite.py -f "${file}" -c -e ${JAVA_PKG_BSFIX_TARGET_TAGS// / -e } -a target -v ${want_target} || die "xml-rewrite failed: ${file}" 234 done
235
236 # Play nice with paludis
237 if [[ $(type -t quiet_mode) = function ]] && quiet_mode; then
238 local output=">/dev/null"
239 fi
240
241 # for javadoc target and all in one pass, we need the new rewriter.
242 local rewriter3="/usr/share/javatoolkit/xml-rewrite-3.py"
243
244 if [[ ! -f ${rewriter3} ]]; then
245 rewriter3="/usr/$(get_libdir)/javatoolkit/bin/xml-rewrite-3.py"
246 fi
247
248 if [[ ! -f ${rewriter3} ]]; then
249 debug-print "Using second generation rewriter"
250 eval echo "Rewriting source attributes" ${output}
251 eval xml-rewrite-2.py ${files} \
252 -c -e ${JAVA_PKG_BSFIX_SOURCE_TAGS// / -e } \
253 -a source -v ${want_source} ${output} || _bsfix_die "xml-rewrite2 failed: ${file}"
254
255 eval echo "Rewriting target attributes" ${output}
256 eval xml-rewrite-2.py ${files} \
257 -c -e ${JAVA_PKG_BSFIX_TARGET_TAGS// / -e } \
258 -a target -v ${want_target} ${output} || _bsfix_die "xml-rewrite2 failed: ${file}"
259
260 eval echo "Rewriting nowarn attributes" ${output}
261 eval xml-rewrite-2.py ${files} \
262 -c -e ${JAVA_PKG_BSFIX_TARGET_TAGS// / -e } \
263 -a nowarn -v yes ${output} || _bsfix_die "xml-rewrite2 failed: ${file}"
264
265 if [[ ${JAVA_ANT_REWRITE_CLASSPATH} ]]; then
266 eval echo "Adding gentoo.classpath to javac tasks" ${output}
267 eval xml-rewrite-2.py ${files} \
268 -c -e javac -e xjavac -a classpath -v \
269 '\${gentoo.classpath}' \
270 || _bsfix_die "xml-rewrite2 failed"
271 fi
272 else
273 debug-print "Using third generation rewriter"
274 eval echo "Rewriting attributes" ${output}
275 local bsfix_extra_args=""
276 # WARNING KEEP THE ORDER, ESPECIALLY FOR CHANGED ATTRIBUTES!
277 if [[ -n ${JAVA_ANT_REWRITE_CLASSPATH} ]]; then
278 bsfix_extra_args="${bsfix_extra_args} -g -e javac -e xjavac "
279 bsfix_extra_args="${bsfix_extra_args} -a classpath -v '\${gentoo.classpath}'"
280 fi
281 if [[ -n ${JAVA_ANT_JAVADOC_INPUT_DIRS} ]]; then
282 if [[ -n ${JAVA_ANT_JAVADOC_OUTPUT_DIR} ]]; then
283 die "Do not define JAVA_ANT_JAVADOC_OUTPUT_DIR!"
284 fi
285 # Where will our generated javadoc go.
286 readonly JAVA_ANT_JAVADOC_OUTPUT_DIR="${WORKDIR}/gentoo_javadoc"
287 mkdir -p "${JAVA_ANT_JAVADOC_OUTPUT_DIR}" || die
288
289 if hasq doc ${IUSE}; then
290 if use doc; then
291 if [[ -z ${EANT_DOC_TARGET} ]]; then
292 EANT_DOC_TARGET="gentoojavadoc"
293 else
294 die "You can't use javadoc adding and set EANT_DOC_TARGET too."
295 fi
296
297 for dir in ${JAVA_ANT_JAVADOC_INPUT_DIRS};do
298 if [[ ! -d ${dir} ]]; then
299 eerror "This dir: ${dir} doesnt' exists"
300 die "You must specify directories for javadoc input/output dirs."
301 fi
302 done
303 bsfix_extra_args="${bsfix_extra_args} --javadoc --source-directory "
304 # filter third/double spaces
305 JAVA_ANT_JAVADOC_INPUT_DIRS=${JAVA_ANT_JAVADOC_INPUT_DIRS// /}
306 JAVA_ANT_JAVADOC_INPUT_DIRS=${JAVA_ANT_JAVADOC_INPUT_DIRS// /}
307 bsfix_extra_args="${bsfix_extra_args} ${JAVA_ANT_JAVADOC_INPUT_DIRS// / --source-directory }"
308 bsfix_extra_args="${bsfix_extra_args} --output-directory ${JAVA_ANT_JAVADOC_OUTPUT_DIR}"
309 fi
310 else
311 die "You need to have doc in IUSE when using JAVA_ANT_JAVADOC_INPUT_DIRS"
312 fi
313 fi
314
315 [[ -n ${JAVA_ANT_BSFIX_EXTRA_ARGS} ]] \
316 && bsfix_extra_args="${bsfix_extra_args} ${JAVA_ANT_BSFIX_EXTRA_ARGS}"
317
318 eval ${rewriter3} ${files} \
319 -c --source-element ${JAVA_PKG_BSFIX_SOURCE_TAGS// / --source-element } \
320 --source-attribute source --source-value ${want_source} \
321 --target-element ${JAVA_PKG_BSFIX_TARGET_TAGS// / --target-element } \
322 --target-attribute target --target-value ${want_target} \
323 --target-attribute nowarn --target-value yes \
324 ${bsfix_extra_args} \
325 ${output} || _bsfix_die "xml-rewrite2 failed: ${file}"
326 fi
168 327
169 if [[ -n "${JAVA_PKG_DEBUG}" ]]; then 328 if [[ -n "${JAVA_PKG_DEBUG}" ]]; then
329 for file in "${@}"; do
170 diff -NurbB "${file}.orig" "${file}" 330 diff -NurbB "${file}.orig" "${file}"
331 done
171 fi 332 fi
172 fi 333 fi
334 return 0 # so that the 1 for diff doesn't get reported
173} 335}
336
337
338# ------------------------------------------------------------------------------
339# @public java-ant_bsfix_one
340#
341# Attempts to fix named build file. The following variables will affect its behavior
342# as listed above:
343# JAVA_PKG_BSFIX_SOURCE_TAGS
344# JAVA_PKG_BSFIX_TARGET_TAGS
345# ------------------------------------------------------------------------------
346java-ant_bsfix_one() {
347 debug-print-function ${FUNCNAME} $*
348
349 if [ -z "${1}" ]; then
350 eerror "${FUNCNAME} needs one argument"
351 die "${FUNCNAME} needs one argument"
352 fi
353
354 java-ant_bsfix_files "${1}"
355}
356
357# ------------------------------------------------------------------------------
358# @public java-ant_rewrite-classpath
359#
360# Adds 'classpath="${gentoo.classpath}"' to specified build file.
361# Affected by:
362# JAVA_ANT_CLASSPATH_TAGS
363# @param $1 - the file to rewrite (defaults to build.xml)
364# ------------------------------------------------------------------------------
365java-ant_rewrite-classpath() {
366 debug-print-function ${FUNCNAME} $*
367
368 local file="${1}"
369 [[ -z "${1}" ]] && file=build.xml
370 [[ ${#} -gt 1 ]] && die "${FUNCNAME} currently can only rewrite one file."
371
372 echo "Adding gentoo.classpath to ${file}"
373 debug-print "java-ant_rewrite-classpath: ${file}"
374
375 cp "${file}" "${file}.orig" || die "failed to copy ${file}"
376
377 chmod u+w "${file}"
378
379 java-ant_xml-rewrite -f "${file}" --change \
380 -e ${JAVA_ANT_CLASSPATH_TAGS// / -e } -a classpath -v '${gentoo.classpath}'
381
382 if [[ -n "${JAVA_PKG_DEBUG}" ]]; then
383 diff -NurbB "${file}.orig" "${file}"
384 fi
385}
386
387# ------------------------------------------------------------------------------
388# @public java-ant_ignore-system-classes
389#
390# Makes the available task ignore classes in the system classpath
391# @param $1 - the file to rewrite (defaults to build.xml)
392# ------------------------------------------------------------------------------
393java-ant_ignore-system-classes() {
394 debug-print-function ${FUNCNAME} $*
395 local file="${1}"
396 [[ -z "${1}" ]] && file=build.xml
397 echo "Changing ignoresystemclasses to true for available tasks"
398 java-ant_xml-rewrite -f "${file}" --change \
399 -e available -a ignoresystemclasses -v "true"
400}
401
402# ------------------------------------------------------------------------------
403# @public java-ant_xml-rewrite
404# Run the right xml-rewrite binary with the given arguments
405# ------------------------------------------------------------------------------
406java-ant_xml-rewrite() {
407 local gen2="/usr/bin/xml-rewrite-2.py"
408 local gen2_1="/usr/$(get_libdir)/javatoolkit/bin/xml-rewrite-2.py"
409 # gen1 is deprecated
410 if [[ -x "${gen2}" ]]; then
411 ${gen2} "${@}" || die "${gen2} failed"
412 elif [[ -x "${gen2_1}" ]]; then
413 ${gen2_1} "${@}" || die "${gen2_1} failed"
414 else
415 eerror "No binary for rewriting found."
416 eerror "Do you have dev-java/javatoolkit installed?"
417 die "xml-rewrite not found"
418 fi
419}

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.35

  ViewVC Help
Powered by ViewVC 1.1.20